BlackLiquid Forums
Adding Materials - 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: Adding Materials (/Thread-Adding-Materials)



Adding Materials - Necora - 17-12-2016


I have built a lumber cutter to produce lumber and am making up a production chain where I will add a few more materials which are not in <abbr title="Colonial Charter">CC</abbr>. How do I go about adding materials to the game? My yard does produce lumber, but it is under the fuel limits.




Adding Materials - Kralyerg - 17-12-2016



To make the Materials, we just kind of stole the Coal flag.




If you give your lumber yard the Coal resource limit, and give your RawMaterialLumber the CoalFuel flag, then you did most of the work already.  The rest is just finding the strings in the dialog boxes that say the word "Coal" and changing it to "Material". That part is actually a little tricky, because it's in a lot of places. Town Hall, Status Bar, Trading Posts...





Adding Materials - Necora - 18-12-2016


Quote:
16 hours ago, Kralyerg said:




To make the Materials, we just kind of stole the Coal flag.




If you give your lumber yard the Coal resource limit, and give your RawMaterialLumber the CoalFuel flag, then you did most of the work already.  The rest is just finding the strings in the dialog boxes that say the word "Coal" and changing it to "Material". That part is actually a little tricky, because it's in a lot of places. Town Hall, Status Bar, Trading Posts...




I was looking through the resource files and did find the coal flag, so I assumed you did that. I also changed it to Material, and it worked, but the goods were not picked up. Now I see it is because they had no where to take them!




So when I edit all of those files too, do I leave them in the resource folder of the mod kit or make a copy of them into my maritimes folder?





Adding Materials - Kralyerg - 18-12-2016



Put them in your maritime folder. If you leave it in the mod kit folder, then it will work for you but it won't be added to your mod.




 





Adding Materials - Kralyerg - 18-12-2016



Also, you need to be careful about storage flags.  In vanilla, Coal is flagged as both "Fuel" and "CoalFuel".  Citizens can pick up things flagged as Fuel, but can't pick up things that are only flagged as CoalFuel. You'll need to edit the Template/Citizen.rsc file to add CoalFuel to the storage option.




Same goes for the stockpiles. Stockpiles can't store things that are only flagged as CoalFuel, so you would need to edit the Template/StorageYard.rsc file.




 




One other weird oddity surrounding CoalFuel and flags.  The flag that the resource gets is called "CoalFuel". But the resource limit is just called "Coal". So your lumber yard should use the "Coal" limit, and the lumber gets the "CoalFuel" flag. Don't mix them up, or nothing will work right. [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" title=":)" width="20" />




Adding Materials - Necora - 18-12-2016


<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3-kralyerg/&do=hovercard" data-mentionid="3" href="<___base_url___>/index.php?/profile/3-kralyerg/">@Kralyerg</a> thanks for that, one thing though, did you change the CoalFuel to MaterialFuel or just Material?




Adding Materials - Kralyerg - 18-12-2016


Neither. It's just CoalFuel. We did tests with other words, like Material, so there might be random things hiding in the code somewhere, but the only one that works is CoalFuel.  Then we just changed the strings to say the word Material, but in the code, it's always CoalFuel (or Coal).




Adding Materials - Necora - 19-12-2016


Cracking <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3-kralyerg/&do=hovercard" data-mentionid="3" href="<___base_url___>/index.php?/profile/3-kralyerg/">@Kralyerg</a> thank you, I have it sorted now. After following the rabbit hole through the resource files I have it so that the coal tag is now material.