News:

Welcome to World of Banished!

Main Menu

Simple Modding attempt [advice and feedback please]

Started by JusticePrevails, June 09, 2018, 12:42:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JusticePrevails

So I'm getting into the groundwork of modding.  I want to be able to change simple things to build up my skill.
Primarily I'm having trouble figuring out what does what within the modkit files.

What I'm trying to do :

1) I want to do something similar to the 1:1 aging mod, but with my own values and tweaks.
-how are the ages implemented within the documentation [I've found where the value goes but don't understand what it means]
-is there any way to open up another mod to look at the way it handles the coding for comparison?

2) Increase the number of citizens per house without changing the texture.  Just the values of what the house can hold.
-increase number of citizens
-increase amount of food/fuel required for comfort

I'm hoping since these just deal with numbers they'll be simple mods for me to do to begin my adventure in modding this wonderful game.  Also moved this from another location since I think it makes more sense to put it here.

kid1293

@JusticePrevails

Try this
http://worldofbanished.com/index.php?topic=1930.msg39182#msg39182

There is code you can use and a link to small discussion about values.
There is more, spread out in forum.

Welcome to fun and frustrating modding! :)

JusticePrevails

#2
thanks! @kid1293

Okay so my thoughts so far :

age is done in 1.0 intervals per five years.
Thus 1.0 is five years old.  That being so, would 1.5 then be 7-8 years old since 2.0 is 10 years?
I think getting my timing down is the first step.  If I'm right on how the timing for age goes and it is +5 years per 1 full point up.  Which is a great starting point.  The resource is really helping me, and for now I'm trying to get my thought process rolling.  Also I really appreciate how much time and effort you and all other modders take to work on these mods and even to help fledgling modders like me.  Knowing the tic for age, and how long a month is in game for my calculations was wonderful. So thank you for all your time and effort.

UPDATE!

So I got the string files editted and tested them in the debug version of the game.
Success! Now my next real question is what is the next step.  The Readme file that comes with the moddingkit is confusing to me and I don't understand.  How do i get it to be a pkm file and thus be able to use it in the game?


RedKetchup

same as all other mods or example.

inside your BanishedKit folder (with no strange caracters) you have your mod folder : /MyAgingMod/ for example
inside you have a package.rsc filled with the name of your mod (.pkm) , the name and all the info that will appear in the mod window.

you will have a MyAgingModResource.rsc file with one link (or more) that point out the Folder/NameOfTheFile.rsc you edited like (Template/Citizens.rsc)
you will have 1 or more folder in your /MyAgingMod/ with all the files you edited and probably with some required files if the toolkit asks it.


and then you will have your .bat that is used to compile and package your mod. similar to this:

..\..\bin\x64\Tools-x64.exe /build MyAgainModResources.rsc /pathres ../MyAgainMod /pathdat ../MyAgainMod/bin
..\..\bin\x64\Tools-x64.exe /mod Package.rsc:MyAgainMod /pathres ../MyAgainMod /pathdat ../MyAgainMod/bin
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

JusticePrevails

I have no idea what you mean.

I've got the .rsc files separated into a folder for easy use, but that's as far as I get.  How do I get them into a pkm format?  That's the part that I'm stuck at. 

First, you'll create a definition for the package (see /example/translation/Package.rsc)

PackageFile translationExample
{
   String _name = "Translation Example";
   String _author = "Shining Rock Software, LLC";
   String _description = "This mod changes the font from the default to Arial.
      It also modifies the default character set. All text strings
      are made uppercase and vowels have accents over them.";
   String _icon = "icon.png";   // must be 48x48
        String _preview = "preview.jpg"  // preview image used for Steam Workshop, must be square, png or jpg.
   int _userVersion = 1;

   // all files in resource directory (each item is searched recursively)
   String _includeList
   [
      "*"   
   ]
   
   // exclude package files, mod files, file used for building packages
   String _excludeList
   [
      "Package_*.crs"
      "*.pkg"
      "*.pkm"
   ]
}
----------------
I need to include two files, so where in this exactly am I supposed to add the information for those rsc files?  This is the example package that comes with the modkit for this code.

RedKetchup

#5
Quote from: JusticePrevails on June 09, 2018, 07:27:35 PM
I have no idea what you mean.

lol thats not a good news for me LOL if you cant figure out that part by checking the examples :D


PackageFile translationExample <==== thats the name of the .pkm you want to create. a "translationExample" will make a "translationExample.pkm" file.
{
   String _name = "Translation Example";  <==== thats the name of the mod you will see in the mod window when you will gonna go enable it , thats the name you will see at your screen
   String _author = "Shining Rock Software, LLC";  <==== thats the name of the author you will see at your screen, YOU
   String _description = "This mod changes the font from the default to Arial.   <==== (along the 2 other lines) thats the description of your mod you will see at your screen in the mod window.
      It also modifies the default character set. All text strings
      are made uppercase and vowels have accents over them.";
   String _icon = "icon.png";   // must be 48x48  <==== thats the icon next to your mod name and author you will see in the mod window
        String _preview = "preview.jpg"  // preview image used for Steam Workshop, must be square, png or jpg.  <==== it is only used for steam workshop bug 512x512 image people will see in the workshop
   int _userVersion = 1;  <==== your internal version of your mod. usually =1 if thats the first version

   // all files in resource directory (each item is searched recursively) <==== everything else you dont touch that.
   String _includeList
   [
      "*"   
   ]
   
   // exclude package files, mod files, file used for building packages
   String _excludeList
   [
      "Package_*.crs"
      "*.pkg"
      "*.pkm"
   ]
}
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

RedKetchup

show me you integrated that part with a copy paste of your own file.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

JusticePrevails

#7
like this?  And I'm sure it would make perfect sense if I had any concept of coding.  I really appreciate you taking the time to help me with this.

PackageFile agingmod
{
   String _name = "agingmod";
   String _author = "ChallengingReality";
   String _description = "this mod changes the age rate of birth of citizens";
   String _icon = "icon.png";
   String _preview = "preview.jpg";
   int _userVersion = 1;

   // all files in resource directory
   String _includeList
   [
      "*"   
   ]
   
   // exclude package files, mod files, file used for building packages
   String _excludeList
   [
      "Package_*.crs"
      "*.pkg"
      "*.pkm"
   ]
}

RedKetchup

right ok

now with what you have written i assume....

your mod folder is name :

/Banishedkit/agingmod/

and inside that folder you have :

/Template/
agingmodResources.rsc
BuildAgingmod.bat
icon.png (maybe, not obligated but it is nice to have an icon instead a black 48x48 image)
Package.rsc
preview.jpg (maybe, not obligated, depend if you want to upload it on steam workshop and not having it black)

---------------------
inside your agingmodResources.rsc you should have something like this:

ExternalList resource
{
   External _resources
   [
      "Template/Citizen.rsc",
   ]
}

---------------------------------------------

and inside the /Template/ folder you have 1 file:

Citizen.rsc

a copy modified of the real Citizen.rsc template which contain all your changes

--------------------------------------------

and your BuildAgingmod.bat contains your DOS commands to compile it and package it :

..\..\bin\x64\Tools-x64.exe /build agingmodResources.rsc /pathres ../agingmod /pathdat ../agingmod/bin
..\..\bin\x64\Tools-x64.exe /mod Package.rsc:agingmod /pathres ../agingmod /pathdat ../agingmod/bin


Note: if happends you placed your mod inside the /Banishedkit/example/ folder, your path in your .bat need to reflect it by adding /example/ to it like:
..\..\bin\x64\Tools-x64.exe /build agingmodResources.rsc /pathres ../example/agingmod /pathdat ../example/agingmod/bin
..\..\bin\x64\Tools-x64.exe /mod Package.rsc:agingmod /pathres ../example/agingmod /pathdat ../example/agingmod/bin

> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

RedKetchup

and you should find your agingmod.pkm inside the /Banishedkit/bin/WinData/ folder. take it and put it in your real game WinData folder
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

JusticePrevails

#10
Figured out why it crashed the first time, now did everything step by step and for whatever reason the .pkm file is not showing up in the WinData folder.  I think the .bat file might not be done right, but I'm not sure.

RedKetchup

and if you give us some pictures ? you know, i am not at your computer behind you and see what you see.
you know how to take pictures ? (keystroke printscreen and open paint.exe and do control+v, and save)

or put your code in a .zip and post here so we can check.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

JusticePrevails


RedKetchup

#13
first your .bat is totally wrong and also as said before never use a strange caracter for your toolkit, a space is a strange caracter, it only can lead to potential errors.

rename your toolkit folder to : \BanishedMods\
2nd: i dont see why you've put all this: C:\Users\Crump\Downloads\banished mods\ and your .bat is missing the /pathdat.. you only specified the /pathres .. not the /pathdat ..

your bat should be :

..\bin\x64\Tools-x64.exe /build mytestmodResources.rsc /pathres ../mytestmod /pathdat ../mytestmod/bin
..\bin\x64\Tools-x64.exe /mod Package.rsc:mytestmod /pathres ../mytestmod /pathdat ../mytestmod/bin

> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

JusticePrevails

because I am dumb.
That did it!  Thank you so much.  I apologize for my total ineptitude and inability to follow simple directions.  I swear I'm not normally this bad, I was just very nervous about trying it out and screwing it up badly.  I really appreciate you taking the time to help. 

I'm going to test this first little mod myself then move on to a few more 'test mods' until I get the process down.  After simple altering of values, what would you say is the next easiest type of modding?