Important Dates

Latest Posts

Topic: Atlantean issue?

xorx
Avatar
Topic Opener
Joined: 2020-12-12, 22:36
Posts: 29
Ranking
Pry about Widelands
Posted at: 2022-12-05, 22:40

Hi,

I've been playing a game with Atlantean and I've seen a weird thing. Not sure if it's a bug or a feature. In the economy, corn flour can be set so the mills stop producing it once the desired amount of corn flour is reached, whereas the black root's flour cannot be set and thus the mills produce it till they run out of black root. So far so god. However, if in the economy screen you set the amount of corn flour to infinite, the something weird starts to happen:

  1. corn flour starts increasing (this is expected);
  2. black root's flour is not produced anymore (I was not expecting that).

Did I miss something?

I've attached a save game so you can tweak the economy.


Attachment:
El lejano norte bug.wgf (558.0 KB)

Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2098
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2022-12-05, 22:50

xorx wrote:

Hi,

I've been playing a game with Atlantean and I've seen a weird thing. Not sure if it's a bug or a feature. In the economy, corn flour can be set so the mills stop producing it once the desired amount of corn flour is reached, whereas the black root's flour cannot be set and thus the mills produce it till they run out of black root. So far so god. However, if in the economy screen you set the amount of corn flour to infinite, the something weird starts to happen:

  1. corn flour starts increasing (this is expected);
  2. black root's flour is not produced anymore (I was not expecting that).

Did I miss something?

I've attached a save game so you can tweak the economy.

That's interesting. I think you discovered a bug. But its not like black flour is not produced at all anymore... If a bakery needs it, the mills produce it. Maybe there is a hidden economy target of 0 for black flour?


Wanted to save the world, then I got widetracked

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2029
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2022-12-06, 09:10

I think this is correct behaviour: The mill takes turns producing the two types of wares, skipping wares that are not needed. When neither ware is needed but blackroot is present, blackroot flour is produced. When the cornmeal target is very very high, then blackroot flour is only produced when needed, and yes there's a "hidden" target of 0 so when bakeries run out of blackroot flour the mills will still produce it.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2724
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2022-12-06, 09:19

If you are interested you might read the discussion here:
https://www.widelands.org/forum/post/32527/


Top Quote
xorx
Avatar
Topic Opener
Joined: 2020-12-12, 22:36
Posts: 29
Ranking
Pry about Widelands
Posted at: 2022-12-06, 15:53

What does "When the cornmeal target is very very high, then blackroot flour is only produced when needed" mean? There is no cap on the economy for black root flour, so it is always needed right? Otherwise how do the mills know that they need to produce it?


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2029
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2022-12-06, 17:20

A ware without a target quantity is treated equally to wares with target quantity 0. This means that the ware is needed iff there is at least one consuming building that needs more of this ware and none of that ware is left in supply. So as long as you have any blackroot flour in stock, your economy doesn't need any. When you run out and your bakeries need more, then it is needed.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2724
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2022-12-06, 18:06

Nordfriese wrote:

A ware without a target quantity is treated equally to wares with target quantity 0. This means that the ware is needed iff there is at least one consuming building that needs more of this ware and none of that ware is left in supply. So as long as you have any blackroot flour in stock, your economy doesn't need any. When you run out and your bakeries need more, then it is needed.

That is not completely correct imho. A ware with target quantity = 0 and a ware without any target quantity are both not shown in the economy option window. But for a ware without target quantity is always demanded by the economy while a ware with 0 is only demanded if there are open requests in a productionsite. E.g. water has no default and any check for economy demand would always be true, while blackroot flour has target quantity = 0 and will result in true only if an open request exists.

see
https://www.widelands.org/documentation/autogen_lua_tribes_defining_units/#configuring-a-tribe-s-units-usage


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2029
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2022-12-06, 18:29

Okay maybe I misremembered, blackroot flour handling has been changed quite a number of times face-grin.png


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2724
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2022-12-06, 18:38

Nordfriese wrote:

Okay maybe I misremembered, blackroot flour handling has been changed quite a number of times face-grin.png

yes it is easy to loose the record there, but I think current behaviour is the best we had so far


Top Quote
xorx
Avatar
Topic Opener
Joined: 2020-12-12, 22:36
Posts: 29
Ranking
Pry about Widelands
Posted at: 2022-12-06, 22:29

Why not allowing setting it in the economy window like the corn flour instead of setting it to 0 behind the scenes?


Top Quote