Author Topic: Simple Modding attempt [advice and feedback please]  (Read 769 times)

0 Members and 1 Guest are viewing this topic.

Offline JusticePrevails

  • Laborer
  • **
  • Posts: 12
Simple Modding attempt [advice and feedback please]
« on: June 09, 2018, 12:42:17 AM »
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.

Offline kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2797
  • Country: se
  • Never confuse movement with progress
Re: Simple Modding attempt [advice and feedback please]
« Reply #1 on: June 09, 2018, 03:32:11 AM »
@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! :)

Offline JusticePrevails

  • Laborer
  • **
  • Posts: 12
Re: Simple Modding attempt [advice and feedback please]
« Reply #2 on: June 09, 2018, 02:58:27 PM »
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?

« Last Edit: June 09, 2018, 04:33:07 PM by JusticePrevails »

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9783
  • Country: ca
Re: Simple Modding attempt [advice and feedback please]
« Reply #3 on: June 09, 2018, 05:23:40 PM »
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 .

Offline JusticePrevails

  • Laborer
  • **
  • Posts: 12
Re: Simple Modding attempt [advice and feedback please]
« Reply #4 on: June 09, 2018, 07:27:35 PM »
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.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9783
  • Country: ca
Re: Simple Modding attempt [advice and feedback please]
« Reply #5 on: June 09, 2018, 08:19:18 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"
   ]
}
« Last Edit: June 09, 2018, 08:26:59 PM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9783
  • Country: ca
Re: Simple Modding attempt [advice and feedback please]
« Reply #6 on: June 09, 2018, 08:31:58 PM »
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 .

Offline JusticePrevails

  • Laborer
  • **
  • Posts: 12
Re: Simple Modding attempt [advice and feedback please]
« Reply #7 on: June 09, 2018, 09:52:04 PM »
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"
   ]
}
« Last Edit: June 09, 2018, 09:55:35 PM by JusticePrevails »

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9783
  • Country: ca
Re: Simple Modding attempt [advice and feedback please]
« Reply #8 on: June 09, 2018, 11:07:02 PM »
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 .

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9783
  • Country: ca
Re: Simple Modding attempt [advice and feedback please]
« Reply #9 on: June 09, 2018, 11:22:30 PM »
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 .

Offline JusticePrevails

  • Laborer
  • **
  • Posts: 12
Re: Simple Modding attempt [advice and feedback please]
« Reply #10 on: June 10, 2018, 05:49:52 PM »
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.
« Last Edit: June 10, 2018, 06:25:35 PM by JusticePrevails »

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9783
  • Country: ca
Re: Simple Modding attempt [advice and feedback please]
« Reply #11 on: June 10, 2018, 07:23:35 PM »
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 .

Offline JusticePrevails

  • Laborer
  • **
  • Posts: 12
Re: Simple Modding attempt [advice and feedback please]
« Reply #12 on: June 10, 2018, 07:28:00 PM »
yea sorry, sorry.  I had a moment.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9783
  • Country: ca
Re: Simple Modding attempt [advice and feedback please]
« Reply #13 on: June 10, 2018, 07:47:58 PM »
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

« Last Edit: June 10, 2018, 07:54:23 PM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline JusticePrevails

  • Laborer
  • **
  • Posts: 12
Re: Simple Modding attempt [advice and feedback please]
« Reply #14 on: June 10, 2018, 07:59:28 PM »
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?