BlackLiquid Forums
Mod base game buildings - Printable Version

+- BlackLiquid Forums (https://www.blackliquidsoftware.com/forum)
+-- Forum: Banished General (https://www.blackliquidsoftware.com/forum/Forum-Banished-General)
+--- Forum: Mod Makers Help & Support (https://www.blackliquidsoftware.com/forum/Forum-Mod-Makers-Help-Support)
+--- Thread: Mod base game buildings (/Thread-Mod-base-game-buildings)



Mod base game buildings - HollowfiedChaos - 18-04-2017


I need help with modding base game buildings, like changing the vale of how much the Storage Barn can hold, eg from 6000 to 10000. The problem is, I'm not entirely sure how to do it, I was able to mod the raw materials files and pack them, but when trying to get an idea from the Banished kit with the Apiary, its like it was designed to make a whole new building from scratch. So could anyone give me any ideas, screenshots or even a simple walk through that could help me, I would appreciate it. Thank you. 




Mod base game buildings - Necora - 18-04-2017



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",
    ]
}



 





Mod base game buildings - HollowfiedChaos - 18-04-2017


Thank you so much. It worked brilliantly.




Mod base game buildings - Necora - 18-04-2017


Great stuff! And welcome to the modding community [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" title=":)" width="20" />