Less useless herders | 0.9.6127

herders_02.jpg

Adds the ability for herdsmen/women to autonomously kill wild animals that come too close to the pasture.

I’ve defined the action radius to 6m 10m (measured between pasture door and animal; changed to 10m on 2017-01-10) as I didn’t want them to replace actual hunters, but that is easy to change if it doesn’t work well for a specific situation. The herders will also gather the hides and bring them to the next barn after the deed is done, and return to their regular chicken stalking afterwards.

2017-04-01: Updated for 0.9.6127 (no functional change, it just installs slightly differently — so if you have the .6112 one still installed you can just as well continue to use that)

2017-03-20: Updated for 0.9.6112.

2017-01-29: Changed the order of things a bit so that carrying off resources has a higher priority. What they do now is 1. kill wild animals if there are any; 2. slaughter old animals; 3. carry off resources; 4. fetch resources (food/water); 5. breed; 6. hang out pointlessly. Also doubled the number of allowed workers in pastures (you don’t have to have twice as many, but you can).

2017-01-27: Updated for 0.9.6042.

2017-01-10: action radius increased; changed scripts to only one function override ( + dependencies + alias) instead of the whole things. If you redownload, delete the scripts folder in your game folder and then reinstall (otherwise it’ll keep using the old version)

Download | How to use (FVModSync installation)

What each file does:

  • scripts > common > buildings > Chicken_pasture.lua: Adds a code snippet (modified from hunter.lua) to the Chicken_pasture.updateWorker function. – removed in 2017-01-10 update
  • scripts > common > buildings > pasture.lua: Same but for pastures. – removed in 2017-01-10 update
  • scripts > pbox_pasture_updateWorker.lua: Overwrites Pasture.updateWorker and the local functions it needs (findAndTransferFood, findAndTransferWater, slayAnimal); aliases Chicken_pasture.updateWorker to it
  • scripts > config.lua: Edits the maximum workers parameter.

This would probably work for apiaries too, I just don’t have a test case for that yet (no bears anywhere near my apiary).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s