News:

Welcome to World of Banished!

Main Menu

Questions on modding

Started by Selak, February 15, 2016, 12:25:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Selak

I am new to modding and want to be able to make some basic changes.

I downloaded the latest mod toolkit (version 141123) and i have no idea if everything I have done is truely working.

first i added the example beekeeper to the game and that works. 

Now adding to that I have changed some of the parameters on the wood house, hostel and stone house.  Namely changed the storage so that the only hold woodfuel instead of just fuel (looking at fire wood it has 2 tags, one as fuel and other as woodfuel).  My hopes is that will stop them from burning coal without having to change coal any.  I have not idea if that works.

I tried to add the debug menu by changing isvisible to true but in game the debug menu never shows up unless i just don't know where to find it.  I assume its in the sub toolbar of the second button on the main tool bar were you find the options for setting how many people are doing each job and so forth.

also wanting to see about adding a new product to an existing building (like making ale from honey (yes i know it would be called mead but want to start simple first)) but when i add the information to the tavern (new production item and string descriptions for new stuff) it does not appear in the building UI when i start up the game. 

Note - currently i delete the bin folder in the mod directory and the pkm file for the mod make a change and then rebuild everything to get new pkm files.

RedKetchup

Quote from: Selak on February 15, 2016, 12:25:08 PM
I am new to modding and want to be able to make some basic changes.

I downloaded the latest mod toolkit (version 141123) and i have no idea if everything I have done is truely working.

first i added the example beekeeper to the game and that works. 

Now adding to that I have changed some of the parameters on the wood house, hostel and stone house.  Namely changed the storage so that the only hold woodfuel instead of just fuel (looking at fire wood it has 2 tags, one as fuel and other as woodfuel).  My hopes is that will stop them from burning coal without having to change coal any.  I have not idea if that works.

I tried to add the debug menu by changing isvisible to true but in game the debug menu never shows up unless i just don't know where to find it.  I assume its in the sub toolbar of the second button on the main tool bar were you find the options for setting how many people are doing each job and so forth.

also wanting to see about adding a new product to an existing building (like making ale from honey (yes i know it would be called mead but want to start simple first)) but when i add the information to the tavern (new production item and string descriptions for new stuff) it does not appear in the building UI when i start up the game. 

Note - currently i delete the bin folder in the mod directory and the pkm file for the mod make a change and then rebuild everything to get new pkm files.


many things in this.

1. if you compilled apiary and you added it in game and it works... then your modkit folder has been set right and fully functional :)
2. if you do a mod just to change some storage and you dont really add new building, then dont expect to see any new icons in game, it will be totally invisible till you check your citizens behaviors if they fuel their house with woodfuel and not using coal.
3. if you correctly added the debug menu it should appear in : Tools and Reports [F5] the very last icons after the "?" and it is called : Show debug options[] (it looks like a scarab)
4. then if you add new resource, you will need to setup a new resource with all its files graphic+code + custom stringtable and spritesheet (even if you copy over some existent graphics). the apiary example is your best friend :)
5. and if you add mead, check how the tavern is made and add a new paragraph between { } in consumeproduce function.

6. i personally change my .bat to add this at begining of the .bat for auto delete the /bin and /build folders
cd NewTown20
rmdir bin /S /Q
rmdir build /S /Q
cd ..


these are very old DOS functions :)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Selak

Quote from: RedKetchup on February 15, 2016, 04:18:41 PM
3. if you correctly added the debug menu it should appear in : Tools and Reports [F5] the very last icons after the "?" and it is called : Show debug options[] (it looks like a scarab)

Yeah no scarab bug icon after the "?" icon.  I even downloaded a debug .pkm you posted for someone that made that exact change as a stand alone mod and yet no scarab shows up.

Quote
4. then if you add new resource, you will need to setup a new resource with all its files graphic+code + custom stringtable and spritesheet (even if you copy over some existent graphics). the apiary example is your best friend :)
5. and if you add mead, check how the tavern is made and add a new paragraph between { } in consumeproduce function.

I did not even try to add in a new resource yet.  tried on two different buildings.  First I added a new way to make ale to tavern just using honey as the resource but otherwise the same as anything else.  just copied an existing block in the tavern template like:
{
ConsumeRawMaterial _consumeMaterials
[
{
ComponentDescription _material = "Template/RawMaterialApple.rsc";
int _count = 30;
}
]
ComponentDescription _produceMaterial = "Template/RawMaterialAle.rsc";
ResourceLimit _resourceLimit = Alcohol;

String _requirements = "AleAppleRequire";
}

then i took that block and made it use the rawmaterialhoney from the apiary mod while still producing ale and added a new string to the string table called AleHoneyRequire

I also did the same with the blacksmith trying to get the blacksmith to make coal from wood.  In this one it took a little more than what i did with the tavern cause i added a limit config section for the second limit of coal and used the template for the mine as an example since it makes coal or iron up to the coal or iron limits while both tools and steel tools are made to the same limit.

not sure why it does not work right as it compiles with no errors anymore (took me a while to find the error when i forgot to copy over work.rsc since the compiler would actually crash the computer to being a useless brick.  Screen would go black except the mouse cursor and the only thing i could do was hit the reset button and continue to try and guess what was wrong). 

Selak

figured out part of my problem.

I followed the instructions in the readme for the modkit so I had run the build resources batch file which does all the resource compiling and stores it in the ..\bin\windata\ folder.  when you run the game executable it sees those files and uses them versus using all the pack files.

added the /onlypkg option to running the game and everything works as it should now.  got the debug menu and my changes to other things like the blacksmith and the tavern show up and they work.

now my problem is minor cosmetic issues for trying to add more than one resource limit to show on the blacksmith screen but that is ok, at least I know I am doing things correctly now.

RedKetchup

ok. happy you have finally resolves your errors while i was raiding in world of warcraft ^^
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .