Latest Posts

Topic: Ware-depent activation of buildings for AI

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 349
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-24, 19:53

How about, instead of AI hints with fixed times ("prohibited_till"), the buildings for the AI should be allowed according to the current economic situation? I sketched how such a Lua script could look like in a start condition for my own tribe.

See also https://www.widelands.org/forum/topic/5082/?page=1#post-35960


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2745
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-01-24, 19:59

In fact there were some improvements in the Ai recently to rely more on the economical situation.
the problem is that this is map dependent, and it is probably not perfect yet

the "prohibited till" is just a last ressort tip to avoid any buildings build to early and should be masked pretty much by the basic economy concept. So it is more the less deprecated and should only be used if really unavoidable.


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 349
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-24, 20:04

The advantage of my method is that every advanced player can write a Lua script for his or her own tribe or personal taste. You are no longer dependent on the internal decision-making of the game engine für AI.


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2745
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-01-24, 20:34

Well in fact you are still dependent on the AI decision making, as this is only a flexible version of "prohibited till" which is not the same as the "forced after". So if it works for you I am happy with this, however I would strongly oppose this to get into the official branch in any case.


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 349
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-24, 20:37

hessenfarmer wrote:

Well in fact you are still dependent on the AI decision making, as this is only a flexible version of "prohibited till" which is not the same as the "forced after".

Okay, you're right.


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote