Latest Posts

Topic: Hard coded weapons list. -> please remove

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 349
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-12-02, 10:24

In the DefaultAI.h there is a hard-coded list of weapon names, which ensure that the AI sets the corresponding weapons in the training facilities to the value 1. This list is incomplete. Axes and spears are set to 1, but swords are not. This is particularly noticeable among the Europeans, as they use axes and swords as a type of weapon.

I suggest removing this static list or at least expanding it to include the Frisians and Amazons weapon types in order to avoid this inconsistent behavior.

	// this is a bunch of patterns that have to identify weapons and armors for input queues of
	// trainingsites
	std::vector<std::string> const armors_and_weapons = {
	   "ax", "armor", "helm", "lance", "trident", "tabard", "shield", "mask", "spear"};
Edited: 2020-12-02, 10:25

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

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

Known issue https://github.com/widelands/widelands/issues/3665


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 349
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-12-02, 11:50

> *Nordfriese wrote:*
>
> Known issue https://github.com/widelands/widelands/issues/3665

Okay, I can vaguely remember that we had this topic before.

I thought you had already adjusted it in build 22.


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: 2020-12-02, 12:16

MarkMcWire wrote:

Nordfriese wrote:

Known issue https://github.com/widelands/widelands/issues/3665

Okay, I can vaguely remember that we had this topic before.

I thought you had already adjusted it in build 22.

Until finally fixed we can have the corredcted list first.
I made such a proposal in PR https://github.com/widelands/widelands/pull/4465


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3317
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-12-02, 12:28

I am working on a general fix in https://github.com/gunchleoc/widelands/tree/ai-ware-categories

That branch is still in a very experimental stage though.


Busy indexing nil values

Top Quote