The nitty gritty... putting together a template and polishing off a mod
#1


Hello everyone.




I have gotten to the stage on a few mods now where I am polishing them off. They are in game, they work, the buildings look good. But there are a few nagging little bits that are annoying me, and I was wondering if anyone has put together a run through of a template file to explain what different parts mean?




For example, how do building footprint textures work? There are no images in the mod kit, so I'm just guessing at what ones to use. I've seen others make their own footprint textures, but is there any specific size or shape of them? How will a square texture fill a rectangle footprint? How do you have no footprint, for docks etc? The barns I made are only 2x4 tiles, with a third road tile, but the footprint always hangs over the roads and it looks ugly. Is it just poor choice of footprint texture, or am I doing something wrong? There are a few other things in this area too, like the decal locations, what do they mean? Do they have to be different for F-variants? 




I am also having trouble getting the UI boxes to display at the appropriate size, my dock piece UI are so small they are only large enough to show the delete button and don't say the name of the piece etc.




 




If there is a guide knocking about to the finer details of the template file I'd love to see it.




 




Cheers




 




 




 




 


  Reply
#2


The only guide I have is in my head.




 




Here, download this zip file. It has the 4 files you need to make a footprint. We put all of ours in the Models/MaterialInstance folder but you can put it wherever you want, as long as you edit the paths in the files accordingly.




<a class="ipsAttachLink" href="<___base_url___>/applications/core/interface/file/attachment.php?id=593" data-fileid="593">Footprint.zip</a>




 




Make you decal look like this:



Code:
DecalDescription decal
{
    MaterialInstance _materials
    [
        "Models/MaterialInstance/GenericFootprintMaterial.rsc"
        "Models/MaterialInstance/GenericFootprintDamageMaterial.rsc"
    ]
    bool _tiled = false;
    float _initialAlpha = 0.5;
    
    float _mapWidth = 512.0;

    DecalLocation _decalLocations
    [
        {
            float _x0 = 0.0;
            float _y0 = 0.0;
            float _x1 = 512.0;
            float _y1 = 512.0;    
        }
    ]
}



But obviously, change the footprint files to whatever you named yours.




 




You can use a square texture on a rectangle building, it will just stretch it to fit.




I think the hidden footprint file the vanilla buildings use actually has several different footprints in one big file, and the _decalLocations tells it which coordinates to grab from. But if you just do a 0,0,512,512 like above, it will just grab the whole thing. (Make sure the _mapWidth is also 512)




 




If your dock pieces don't say their name on the box, then something is wrong with your stringtable. The game doesn't check for typos in your string names, so it won't tell you if something is wrong. Check your templates toolbar _stringName against your stringtable names.




To make decorative items (non production buildings) box bigger, take a look at the Template/Well.rsc file. Down at the bottom there's a groupEmpty thing, along with  groupEmpty element in the UI code. Copy that.


  Reply