Latest Posts

Topic: Varied diet for miners:

Spiceskull

Topic Opener
Joined: 2009-02-24, 15:13
Posts: 49
Ranking
Pry about Widelands
Posted at: 2009-12-16, 19:23

I'm trying to get some more variety out of my tribes, and still have a hankering to the old days of Settlers I. Then the miners would eat either meat, fish or bread, depending on what they were mining.

In WL it is quite involved to get an integrated economy up and running, allowing for the production of meals and rations. I think that some miners would like to have meat, fish and bread in their diet (plus beer and wine, as well as water). Sooo ...

I am trying a config edit to see what I can do to get around this. The idea is that if the miner eats fish and drinks water he will mine a minimal amount, at a slow rate, but with beer and meal he will work better. I also want the miners to work WHATEVER food and drink is avaialble.

My first test was something along these lines (figures purely as an example):

[inputs] fish=2 water=2 bread=2 meat=2 wine=2 beer=2 meal=2 ration=2

[work]

  • cheap food and water, slower work, less productivity

sleep 40000 consume water fish mine coal produce coal

  • medium food and water, medium work, medium productivity

sleep 30000 consume beer meat mine coal produce coal produce coal

  • expensive food and water, faster work, best productivity

sleep 20000 consume wine ration mine coal produce coal produce coal produce coal

[idle]

  • etc.

On loading the game I get no error messages, and everything works as planned ... except for the varied diet bit. The mine is only productive when fish and water are available (I have tried trial and error, running down all stocks, building up on fish and water, then replacing them with other foods and drinks)

I know that a 'variety of input/consume' works with other workers, such as the toolsmithy, so what am I missing here on my miners?

Edited: 2009-12-16, 19:26

Top Quote
sigra

Joined: 2009-03-05, 19:02
Posts: 130
Ranking
At home in WL-forums
Location: Orsa
Posted at: 2009-12-17, 12:58

The following should work with svn:r4781:

[inputs]

ration=2

meat=2

fish=2

wine=2

beer=2

water=2

[programs]

mine_with_basic_diet=_Mine with basic diet

mine_with_medium_diet=_Mine with medium diet

mine_with_luxury_diet=_Mine with luxury diet

work=_Work

[mine_with_basic_diet]

consume=water fish

sleep=20000

animate=working 20000

mine=coal 2 50 5

produce=coal

[mine_with_medium_diet]

consume=beer meat

sleep=10000

animate=working 10000

mine=coal 2 50 5

produce=coal

animate=working 10000

mine=coal 2 50 5

produce=coal

[mine_with_luxury_diet]

consume=wine ration

sleep=5000

animate=working 5000

mine=coal 2 50 5

produce=coal

animate=working 5000

mine=coal 2 50 5

produce=coal

animate=working 5000

mine=coal 2 50 5

produce=coal

[work]

call=mine_with_luxury_diet on completion skip

call=mine_with_medium_diet on completion skip

call=mine_with_basic_diet on completion skip

Edited: 2009-12-17, 13:30

Top Quote
Spiceskull

Topic Opener
Joined: 2009-02-24, 15:13
Posts: 49
Ranking
Pry about Widelands
Posted at: 2009-12-17, 21:09

Hi Sig,

Thanks for responding ...

I was mulling this over last night, and then it came to me. It would need to work just like the Toolsmith, with each production of coal defined as a specific program (coal1, coal2 etc) and then a call for the programs as you have shown.

To be honest my config file is really complex, with about 70 combinations/permutations of foodstuffs and drinks available ... but now I have it working I am more than happy.

I have the sleep times and production values reasonably balanced depending on the 'value' of the inputs, so it is just a matter of tweaking a few production instructions to get the timings balanced to the rest of the economy.

Thanks again, Adam.


Top Quote
Spiceskull

Topic Opener
Joined: 2009-02-24, 15:13
Posts: 49
Ranking
Pry about Widelands
Posted at: 2009-12-17, 21:11

And yes, I am using r4781 ... when I saw what this build did with the warehouses I had found my nirvana ... goods going to the most sensible places.


Top Quote