Latest Posts

Topic: Multiple warhouses

mxb2001
Avatar
Topic Opener
Joined: 2019-05-20, 18:49
Posts: 243
OS: Linux
Version: 1.1
Ranking
Widelands-Forum-Junkie
Location: The land of the thirsty spider
Posted at: 2020-10-16, 21:56

If you set 2 warehouses to prefer store ware x here (and have more houses on normal) what happens? Is there any documenation on how all the warehouse options work in detail?


--
To Boldly Go Where No Man Has Gone Before

Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2020-10-16, 21:59

If you join me playtesting I can answer all of your questions. See you in the Lobby : ) - short answer: Green is always prefered, so then is goes to the next warehouse with green settings - then standard, then red - its like 3 groups ; )


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-10-16, 22:54

There is no documentation unfortunately except the code itself: https://github.com/widelands/widelands/blob/master/src/economy/economy.cc#L992 (esp. line 1011-1056)

After reading the code briefly it seems that if you have one or more warehouses that Prefer a ware, then only those can receive that ware. If there are several Preferring warehouses, the ware goes to the one of these with the lowest stock of this ware. Distance is not considered when you have a Preferring warehouse. If you have no Preferring warehouses, the ware goes to the closest warehouse of those with the Normal policy.

Edited: 2020-10-16, 22:56

Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2020-10-16, 23:08
  • How does the Ampel System work - for buildings as well as for stock, green yellow red. Is the preferred building completey finished before the standard or are those only percentages?

  • How do Wares be called into a building. I saw a wood going right into the starting building when i dismanteld the coal mean next to it?

  • Where in code can I see when a soldier retreats, the distance maximal range and where is calculated when nearby allies support to defense?


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-10-16, 23:42

@ the-x: All your questions has nothing to do with the initial question of warehouses. I would delete your post again, as with some former posts.... either you have substantial answers to this specific question, or create an new topic with your questions.

Nordfriese wrote:

There is no documentation unfortunately except the code itself: https://github.com/widelands/widelands/blob/master/src/economy/economy.cc#L992 (esp. line 1011-1056)

After reading the code briefly it seems that if you have one or more warehouses that Prefer a ware, then only those can receive that ware. If there are several Preferring warehouses, the ware goes to the one of these with the lowest stock of this ware. Distance is not considered when you have a Preferring warehouse. If you have no Preferring warehouses, the ware goes to the closest warehouse of those with the Normal policy.

I think this is the most logical behavior, isn't it? This is may not what the player want though.

Edited: 2020-10-16, 23:45

Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2020-10-17, 00:37

@ kaputnik : I dont understand the logically. The question goes a bit further. Can you answer it?


Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2020-10-17, 11:18

The warehouse system is very similar to the traffic lights system


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-10-17, 11:38

the-x wrote:

The warehouse system is very similar to the traffic lights system

It is defintily different then the Traffic lights in the production site buildings.
In the productionsites the 3 buttons do control priority. Which is just an uprise in probability to get a ware delivered.
in Warehouses the buttons control preference which is a hard setting. See Nordfriese explanations.


Top Quote
niektory
Avatar
Joined: 2019-06-03, 20:06
Posts: 206
Ranking
Widelands-Forum-Junkie
Location: Poland
Posted at: 2020-10-17, 11:54

the-x wrote:

  • How does the Ampel System work - for buildings as well as for stock, green yellow red. Is the preferred building completey finished before the standard or are those only percentages?

The "traffic lights" priorities work differently than warehouses. The lower priority destinations will still receive wares even when there are higher priority destinations. The higher priority ones will just receive them more often.

  • How do Wares be called into a building. I saw a wood going right into the starting building when i dismanteld the coal mean next to it?

Usually they are sent from a warehouse. If there are no wares of this type in warehouses, the building waits until one is produced and it's transported directly from the source, without going to a warehouse first.


Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2020-10-17, 12:29

Good Explanation! : -) So - if for example i need 2 reed and dismantle a building, do i need to close every slot for every building or is it enough if i set in the building which uregntly needs the 2 reed priority to green. Tested if often and about 70-80% it works in the other cases dont, im interested in the exact coding behind it and how reliable it is aimed to be?


Top Quote