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.
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...
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.
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" />
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).