Latest Posts

Topic: How does the "preciousness" exactly works?

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-21, 20:08

I understood the basic principle of the game mechanics. However, I still don't understand which algorithm is used to process the value "preciousness".

Which numerical values make sense in principle and how does this value influence the way in which the AI constructs buildings?

I would like to have the AI build more than 1 mine per mine type. Which values would then be suitable?


My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-05-21, 20:43

There is no single algorithm. Basically it is just another weighing factor to determine the score of a building - buildingspot combination. So if there are 2 buildings which would result in the same result in one spot the building producing the ware with higher preciousness the higher preciousness will be build. But there are many other factors in this evaluation including the genetic factors, delay of a needed building not build, gametime, number of buildings, enemy contact and many more...

in principle all preciousnesses should make a distribution of importance of the wares for the tribe.

I still did not find any time to investigate why the AI behaves differntly in your personal tribe. But in our official tribes it buids more then one mine.
Perhaps you need to enable the debug logs of the Ai in the source code to get some hint what is going on.

The main thing is: as long as the probability of your work being part of the game is low. the priority to investigate special problems of them is low as well. Sorry to say but I nearly can't manage all my other projects in this game.


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-21, 21:05

I have a suspicion. Both gold ore and iron ore are found in the official tribes. There is only one type of ore in my tribe. That is probably the decisive factor.


My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-05-21, 21:13

MarkMcWire wrote:

I have a suspicion. Both gold ore and iron ore are found in the official tribes. There is only one type of ore in my tribe. That is probably the decisive factor.

this may be the case if we still have some hardcoded values in the code. Maybe this might help to analyse the code for you


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: 2021-05-21, 22:04

The main thing is: as long as the probability of your work being part of the game is low. the priority to investigate special problems of them is low as well.

@MarkMcWire I think this sums up all problems related to the Europeans tribe pretty well. As long as your tribe exists only in a GitHub fork hardly anyone even knows it exists, and obtaining it requires some tedious manual installation magic. I'd recommend that you should consider packaging your tribe as an add-on. This would have the advantages that there will be more users of your mod, any errors or undesired behaviour will be easier to investigate directly in master, and there would also be more incentive for developers to ensure that everything runs smoothly. Add-ons enjoy less support than the official game but far more than a standalone mod. The ability to create completely new add-on tribes is fully functional with current master (for an example look at the New Tribe add-on).


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-05-23, 15:32

The fundamental question of course goes beyond my own tribe.

I have now archived my fork and will not work on it any further. Instead, I'll make an addon out of it as suggested.


My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote