Mod base game buildings
#2


In the resource section of the mod kit, find the template for the building you want to change and copy it into the '*yourmod*/Template' folder. 




You can do two things.




1 - you can either edit the part you want to change and leave the rest of the template as it is, then in your *yourmod*resources.rsc file you list 'Template/StorageBarn.rsc'. Then compile it, and it will 'rebuild' the barn with the new numbers but use everything else from the resource pack. 




2 - you can change the part you want, in this case scroll down to the 'StorageDescription storage' section, change the storage value, then delete everything else in the template file so it looks like this...



Code:
StorageDescription storage
{
    RawMaterialFlags _storageFlags = Edible | Tool | Health | Clothing | Textile;
    bool _areaBasedLimit = false;
    bool _available = false;
    int _volumeLimit = 6000;
}



Then, in your resources.rsc you list 'Template/StorageBarn.rsc:storage" and nothing else. Compile, and it will rebuild just that section of the storage barn code, and when you play with the mod it will overwrite only that section and nothing else. 




 




Both will work to change the numbers in the barn, and you can do the same to any building. 




 




If you do change the storage barn, make sure you use the template file that has the new 1.0.7 flags. If you don't it won't work with new resources. The files in the modkit resource folder do not have the new things added to them, so you need to do that yourself. Hopefully this will change with the next banished release when it comes out of Beta.




 




Here is the code for the new flags, notice that the capacity has also been increased.




 



Code:
StorageDescription storage
{
    RawMaterialFlags _storageFlags = Edible | Tool | Health | Clothing | Textile | Grain | Vegetable | Fruit | Protein | Custom0 | Custom1 | Custom2 | Custom6 | Custom7 | Custom8 | Custom9;
    bool _areaBasedLimit = false;
    bool _available = false;
    int _volumeLimit = 7500;
}



And this is what the *yourmod*resources.rsc will look like...



Code:
ExternalList resource
{
    External _resources
    [
        "Template/StorageBarn.rsc:storage",
    ]
}



 


  Reply


Messages In This Thread
Mod base game buildings - by HollowfiedChaos - 04-17-2017, 12:23 PM
Mod base game buildings - by Necora - 04-17-2017, 01:34 PM
Mod base game buildings - by HollowfiedChaos - 04-17-2017, 02:06 PM
Mod base game buildings - by Necora - 04-17-2017, 02:54 PM