World of Banished

MODS Garage => Mod Talk => Topic started by: slink on September 02, 2014, 06:17:41 AM

Title: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 02, 2014, 06:17:41 AM
This very crude first mod package of mine expands the existing pasture from 20x20 to 64x64, which gives a capacity slightly more than 100 times as many animals.  The labor force is also 10 times as large.  This is an override of the existing pasture at the moment, so ignore the text that says it is a new item.  It changes only the pasture definition, with regards to dimensions, area, and number of workers.

If it is what @solarscreen wants, I will turn it into something more presentable.

Edit: I've made it presentable now, as an override.

Edit #2: These are the changes I made to Template\pasture.rsc.

//SJGL   
   int _maxWidth = 64;
   int _maxHeight = 64;

//SJGL
   int _maxWorkerCount = 20;
   int _maxArea = 4096;

Proper compilation appeared to require that I include in the mod directories the following files.

Template\Pasture.rsc (four changes)
Template\CropField.rsc (no changes)
Dialog\SharedElements.rsc (no changes)
Dialog\Work.rsc (no changes)

In the root of the mod directory there was only one file.  This file was named Package.rsc and contained the following.

PackageFile override
{
String _name = "Large Pasture Override";
String _author = "SJGL";
String _description = "This mod overrides the standard pasture, so that it holds about 10 times as many animals.";
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"
]
}

ExternalList list
{
External _resources
[
"Template/Pasture.rsc"
]
}


Edit for Version 2: Eggs, leather, wool, beef, mutton, and chicken have had their _lowCreateCount and  _highCreateCount increased by a factor of 10.
Title: Re: Expanded Pastures For Solarscreen
Post by: solarscreen on September 02, 2014, 06:20:17 AM
Very cool! I will try this out this evening!

Thank you!

Title: Re: Expanded Pastures For Solarscreen
Post by: RedKetchup on September 02, 2014, 01:51:12 PM
nice. :) btw a little bit of info.

i dont think your little mod get in conflict with my milk mod, personally i played with : LivestockCow.rsc
and i didnt played with pasture.rsc , so should be good :)
Title: Re: Expanded Pastures For Solarscreen
Post by: solarscreen on September 02, 2014, 09:06:37 PM
Chicken ranch!

Just a quick test - 43 x 47 pasture, 336 chickens

Title: Re: Expanded Pastures For Solarscreen
Post by: RedKetchup on September 02, 2014, 09:10:30 PM
mwhahaha , maybe @solarscreen you cant win the 5000 pop challenge, but you would win the 5000 chickens hahaha
Title: Re: Expanded Pastures For Solarscreen
Post by: irrelevant on September 02, 2014, 09:29:03 PM
LOL, that's beautiful!
Title: Re: Expanded Pastures For Solarscreen
Post by: RedKetchup on September 03, 2014, 12:02:14 AM
would be interessant if in the game we could get random .... chicken nomad packs :) asking citizensship in one of our pastures ^^
Title: Re: Expanded Pastures For Solarscreen
Post by: solarscreen on September 03, 2014, 04:49:37 AM
Quote from: RedKetchup on September 02, 2014, 09:10:30 PM
mwhahaha , maybe @solarscreen you cant win the 5000 pop challenge, but you would win the 5000 chickens hahaha

Hmmm, new challenge...

Mega Rancher - 10,000 Animals
Title: Re: Expanded Pastures For Solarscreen
Post by: Nilla on September 03, 2014, 06:51:10 AM
You are crazy :D :D

American industrial food-producers goes middle age,..........canĀ“t believe it ;)
Title: Re: Expanded Pastures For Solarscreen
Post by: Paeng on September 03, 2014, 07:30:03 AM
Quote from: solarscreen on September 02, 2014, 09:06:37 PM336 chickens

Woah... What's it look like when they start killing the 'surplus' and laying them down beside the pen?  =:-]

Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 03, 2014, 10:21:31 AM
Updated the distribution file to have a unique name and to say correctly what it does.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: RedKetchup on September 03, 2014, 10:25:11 AM
oh so sorry @slink , i didnt know it was you, your mod !!!!!!!!

awesome ! Keep it up !!!!!!

<3
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 03, 2014, 10:26:18 AM
Yes, I failed to label the post correctly the first time.  Sorry.   ;D
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: solarscreen on September 04, 2014, 04:33:23 AM
Looks like there is some balancing formula that is not liking the expanded pasture size.

With 360 chickens, they lay eggs faster than the workers can pick them up and the pasture only sets out 6 nests of eggs to retrieve.  When eggs can't be laid, the chickens get killed or die instead, I haven't quite figured that out yet.  The pasture when first laid out had one herdsman so the eggs were not getting picked up fast enough. Chicken numbers were falling but not fast.  I increased herdsmen to 3 and the eggs production went up to about 1600 a year but chicken numbers dropped a little faster.  I increased herdsmen to 6 and egg collection was no better to slightly worse, 1500, but chickens dropped almost 50%.

Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 04, 2014, 06:37:58 AM
I guess I'm not totally surprised that there is a problem with the eggs.  My experiments with the size of pasture a week or two ago were done because I wondered if egg production was being affected by the limit of the number that can be displayed in the animal shelter.  Since splitting the flock between two pastures did not cause the egg production to increase, I concluded that the display could somehow cope with too many eggs.  That appears not to be the case in a pasture ten times as large.

I am a little surprised that the game kills off chickens when the eggs have no place to land.

Thanks for the testing.  I'll look at it more closely and see if I can locate anything that can be altered to make it work better with chickens.

How does it work with meat cattle?  There is nothing to be gathered on a monthly or quarterly basis from those.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: rkelly17 on September 04, 2014, 06:50:38 AM
Could you run into the same problem with sheep and wool?
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 04, 2014, 08:23:48 AM
Quote from: rkelly17 on September 04, 2014, 06:50:38 AM
Could you run into the same problem with sheep and wool?
I would imagine so, although @solarscreen's numbers seem to be 4 eggs per chicken, which I believe is the rate of wool production.  Eggs should be 12 per chicken.  My point, though, is that sheep might make it okay.  I am currently trying to test a large cattle pasture, in between baking bread, getting in my daily walking, preparing for our new driveway and front sidewalk, and, of course, posting in this forum.   ;D
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 04, 2014, 10:18:33 AM
I added the information on how I did the mod, in the first post.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: RedKetchup on September 04, 2014, 10:27:10 AM
eggs are 6:

QuoteRawMaterialDescription rawmaterial
{
   SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
   StringTable _stringTable = "Dialog/StringTable.rsc:rawMaterial";
   String _name = "Egg";
      
   int _lowCreateCount = 6;
   int _highCreateCount = 6;

   int _weight = 1;
   int _createChance = 1;
   
   RawMaterialFlags _flags = Edible | Protein;

   float _carryScale = 0.5;
}

and wool are 6 too:
QuoteRawMaterialDescription rawmaterial
{
   SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
   StringTable _stringTable = "Dialog/StringTable.rsc:rawMaterial";
   String _name = "Wool";
      
   int _lowCreateCount = 6;
   int _highCreateCount = 6;
   int _weight = 10;
   int _createChance = 1;
   
   RawMaterialFlags _flags = Textile;

   float _carryScale = 0.33;
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 04, 2014, 01:21:23 PM
Thanks for finding that, @RedKetchup.

I changed the raw materials from pastures to allow for ten times as much and began testing.  Before the change, I had started testing the cattle, so I pursued that aspect first.

I tried the pasture mod with and without modded cattle for 2 years, comparing one 20 x 40 with four workers to an average of four 20 x 20 with two workers each.  It isn't quite twice as much, and it isn't different with the cattle modded at that size of large pasture.  I haven't yet tried it with chickens and their eggs.

ES 55 pasture only
average of 4 x 20 x 20 = 1100 beef, 33 leather
single 20 x 40 = 2000 beef, 60 leather

ES 56 pasture only
average of 4 x 20 x 20 = 950 beef, 28.5 leather
single 20 x 40 = 1600 beef, 48 leather

ES 55 cattle also modded
average of 4 x 20 x 20 = 950 beef, 28.5 leather
single 20 x 40 = 1600 beef, 48 leather

ES 56 cattle also modded
average of 4 x 20 x 20 = 700 beef, 21 leather
single 20 x 40 = 1800 beef, 54 leather
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: RedKetchup on September 04, 2014, 01:37:37 PM
Quote from: slink on September 04, 2014, 01:21:23 PM
Thanks for finding that, @RedKetchup.
you're welcome @slink :)
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: solarscreen on September 04, 2014, 07:41:32 PM
Quote from: slink on September 04, 2014, 06:37:58 AM
I guess I'm not totally surprised that there is a problem with the eggs.  My experiments with the size of pasture a week or two ago were done because I wondered if egg production was being affected by the limit of the number that can be displayed in the animal shelter.  Since splitting the flock between two pastures did not cause the egg production to increase, I concluded that the display could somehow cope with too many eggs.  That appears not to be the case in a pasture ten times as large.

I am a little surprised that the game kills off chickens when the eggs have no place to land.

Thanks for the testing.  I'll look at it more closely and see if I can locate anything that can be altered to make it work better with chickens.

How does it work with meat cattle?  There is nothing to be gathered on a monthly or quarterly basis from those.

I not completely sure about the chickens experiment since I did it late last night and only for about an hour. More testing to go.

Sheep and cows will be next...
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 05, 2014, 11:34:40 AM
For one year of chickens with the chicken and egg rsc files modded, I got the data shown in the attached graphic.  I did it for two years after the pastures were all full, but McAfee is running a scan on my machine and the game didn't take my screenshot keypress in the first of the two years.   :(

There were 266 chickens in the large pasture and about 33 chickens in each of the four smaller pastures.  There were eight herdsmen tending the large pasture and one herdsman tending each of the four smaller pastures.

As you can see, in the second year after all of the pastures were full, there was a little less than seven times as many eggs produced in the 40x40 pasture as there was in the 10x20 pastures.  The expected number was eight times as many.   The eggs still only appeared in six locations even in the large pasture, but were carried off by the herdsmen whereupon new eggs promptly appeared.  I cannot find where the egg drop locations are defined numerically.  Perhaps it is only in vacant areas of the animal shed, which means that the animal shed yard has to be larger in order to accommodate more eggs at one time.  There is this in the AnimalShed.rcs:

String _pathBitmap =
"###
_##
__#
__#
_##";


Underscores in the above would appear to be the locations where eggs appear.

The production of chicken meat, however, is only a little more than twice as much.  This baffles me, unless meat production only occurs after all of the eggs are placed at any given slaughtering time.

Fixing the egg (and wool) drop locations will involve working with models, I fear.  Since the production of wool isn't so frequent, possibly sheep will be okay without that.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 05, 2014, 11:47:16 AM
I've uploaded the newest version with the new name format, and with the six animal products edited.  See first post.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: solarscreen on September 05, 2014, 11:48:41 AM
Quote from: slink on September 05, 2014, 11:34:40 AM
For one year of chickens with the chicken and egg rsc files modded, I got the data shown in the attached graphic.  I did it for two years after the pastures were all full, but McAfee is running a scan on my machine and the game didn't take my screenshot keypress in the first of the two years.   :(

There were 266 chickens in the large pasture and about 33 chickens in each of the four smaller pastures.  There were eight herdsmen tending the large pasture and one herdsman tending each of the four smaller pastures.

As you can see, in the second year after all of the pastures were full, there was a little less than seven times as many eggs produced in the 40x40 pasture as there was in the 10x20 pastures.  The expected number was eight times as many.   The eggs still only appeared in six locations even in the large pasture, but were carried off by the herdsmen whereupon new eggs promptly appeared.  I cannot find where the egg drop locations are defined numerically.  Perhaps it is only in vacant areas of the animal shed, which means that the animal shed yard has to be larger in order to accommodate more eggs at one time.  There is this in the AnimalShed.rcs:

String _pathBitmap =
"###
_##
__#
__#
_##";


Underscores in the above would appear to be the locations where eggs appear.

The production of chicken meat, however, is only a little more than twice as much.  This baffles me, unless meat production only occurs after all of the eggs are placed at any given slaughtering time.

Fixing the egg (and wool) drop locations will involve working with models, I fear.  Since the production of wool isn't so frequent, possibly sheep will be okay without that.

I tested with just one herdsman, then 3 herdsmen, then 6 herdsmen. I got my best results with 3.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 05, 2014, 11:50:51 AM
Quote from: solarscreen on September 05, 2014, 11:48:41 AM
I tested with just one herdsman, then 3 herdsmen, then 6 herdsmen. I got my best results with 3.

This may be a function of from how far away the herdsmen must come.  It makes no sense otherwise, for fewer herdsmen to produce more stuff.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: solarscreen on September 05, 2014, 05:28:28 PM
Quote from: slink on September 05, 2014, 11:50:51 AM
Quote from: solarscreen on September 05, 2014, 11:48:41 AM
I tested with just one herdsman, then 3 herdsmen, then 6 herdsmen. I got my best results with 3.

This may be a function of from how far away the herdsmen must come.  It makes no sense otherwise, for fewer herdsmen to produce more stuff.

Yeah, I don't know. The 6 showed up right away constantly and kept the eggs cleared off.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: irrelevant on September 05, 2014, 06:17:56 PM
Maybe all those guys hanging around spooks the hens.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: rageingnonsense on September 06, 2014, 02:45:08 PM
This is very similar to the Pasture aspect of my Better Fields mod, except I capped the size at 60 as opposed to 64, and I allow less workers.
Title: Re: MOD: Expanded Pastures For Solarscreen - slink (SJGL)
Post by: slink on September 06, 2014, 02:50:44 PM
Quote from: rageingnonsense on September 06, 2014, 02:45:08 PM
This is very similar to the Pasture aspect of my Better Fields mod, except I capped the size at 60 as opposed to 64, and I allow less workers.
And?
Title: Slink's Large Pasture Override
Post by: slink on September 26, 2014, 07:25:15 PM
Slink's Large Pasture Override

http://worldofbanished.com/index.php?action=downloads;sa=view;down=6 (http://worldofbanished.com/index.php?action=downloads;sa=view;down=6)