News:

Welcome to World of Banished!

Main Menu

Beginner mod guidance requested, topic- increase iron gathered by laborers

Started by jrich82, September 14, 2019, 01:36:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jrich82

So...  I understand modding Banished is not like other games.  I believe I have the modkit installed properly and I am ready to start modding.  I have read a lot of forum posts and I am slowly beginning to understand a few things.  As a start, I thought I would increase the amount of Iron gathered by my laborers. 

I start by looking at the StringTable.rsc file.  I find the entry for :
{ String _name = "ClearIron"; String _text = "Collect Iron"; }
{ String _name = "ClearIronTip"; String _text = "Collect all iron in the selected area."; }


I then look for the file under /template "ClearIron.rsc"
I find this:
ComponentDescription _removeTypes
[
"Template/NaturalResourceOre.rsc"
]
ComponentDescription _remover = "Template/Clear.rsc";


So, I then open "Template/NaturalResourceOre.rsc" and find:
NaturalResourceDescription naturalresource
{
ComponentDescription _rawMaterial = "Template\RawMaterialIron.rsc";

float _noisePersistance = 0.1;
float _noiseOctaves = 4.0;

One more jump and find  "Template\RawMaterialIron.rsc"

Looking into this file, there are a few lines of interest:

RawMaterialDescription rawmaterial
{
SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
StringTable _stringTable = "Dialog/StringTable.rsc:rawMaterial";
String _name = "Iron";
String _nameSmall = "IronSmall";

int _lowCreateCount = 1;
int _highCreateCount = 2;
int _weight = 25;
int _createChance = 1;

RawMaterialFlags _flags = Iron;

float _carryScale = 0.33;
}


Do I change the lowCreateCount and highCreateCount ?  Would adjusting carryScale change the amount of iron carried by each laborer?  Does this have to be adjusted as well if I ONLY want to edit the amount of iron gathered by each Laborer?

Am i even going about this the right way?

Also...  in the RawMaterialIron.rsc file, is "ValueDescription value" JUST for the value on trades and sale with the merchants?  I know some people have different vocabulary use and thought this might be responsible...but my second guess has me thinking this more for the economy...


i learn very well by example.  This helped me make a Minecraft mod that added a whole beer and wine making mod from raw resources to a bottled product.  Except there, I had access to the java script.  I downloaded a moreIron.pkm from somewhere, but I think it is out of date and if I understand that aspect of Banished modding...  I can't open or "unpack" that file.  And everyone seems more interested in adding more buildings not gameplay tweaks.  In turn, I cannot see the code examples I would like.  i am about to look at Kid's Beef Tomato mod since I think he said the raw code is available.

RedKetchup

just need to calll and change the number in low and high. no need to call the ClearIron , nor the natural resource. just the raw material file.
in your resource file you will call :

      "Template/RawMaterialIron.rsc:rawmaterial",


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

jrich82

Is there a formula I can reference for the laborer's carrying capacity?  one thing I noticed is when a laborer picks something up, they will go to another resource and pick it up as well.  If I change the amount, I don't want to end up in a situation where my laborers aren't picking anything up useful anymore.  Or do I not really have to worry about it?  It isn't like I am going to have a laborer carry 50 units of Iron ;)

irrelevant

@jrich82 A laborer can carry 100 weight total. You can find the weight of various items (for vanilla) here: https://banishedinfo.com/wiki/Resources

Example, one iron weighs 25, so a laborer can carry 4 iron.