MantisBT - VCMI
View Issue Details
0003208VCMIAI - Adventure Mappublic2022-04-14 13:272022-04-28 05:56
val-gaav 
 
normalmajoralways
resolvedfixed 
PcWindows10 and 11
 
0.next 
0003208: Ai hangs when it cannot recruit heroes over set limit
There is a setting in config/defaultmods.json :
        "MAX_HEROES_ON_MAP_PER_PLAYER" : 8,
If one changes it to anything lower then 8 then AI sooner or latter will hang up on this.

VCMIAI will just hang and loop trying to recruit hero end not end it turn.

Nullkiller AI will hang up on trying to recruit hero and it turn and on each next turn it will hang up on this over and over again.

Often when for example hero on map limit is set to 2 AI will end up buing 3 heroes and having them on map and then hanging up on this
Modify the file
config/defaultmods.json

and set to
        "MAX_HEROES_ON_MAP_PER_PLAYER" : 2,

It will trigger this error always for both available adventure AIs
Nullkiler AI when I set:
        "MAX_HEROES_ON_MAP_PER_PLAYER" : 10,

had no problems and ended up using 9 heroes on map.
No tags attached.
Issue History
2022-04-14 13:27val-gaavNew Issue
2022-04-16 21:03val-gaavNote Added: 0008276
2022-04-27 13:45val-gaavNote Added: 0008285
2022-04-28 05:55PovelitelNote Added: 0008286
2022-04-28 05:55PovelitelStatusnew => resolved
2022-04-28 05:55PovelitelFixed in Version => 0.next
2022-04-28 05:55PovelitelResolutionopen => fixed
2022-04-28 05:55PovelitelAssigned To => Povelitel
2022-04-28 05:56PovelitelAssigned ToPovelitel =>

Notes
(0008276)
val-gaav   
2022-04-16 21:03   
Just tested :
        "MAX_HEROES_AVAILABLE_PER_PLAYER" : 1,
        "MAX_HEROES_ON_MAP_PER_PLAYER" : 8,
and
        "MAX_HEROES_AVAILABLE_PER_PLAYER" : 2,
        "MAX_HEROES_ON_MAP_PER_PLAYER" : 2,

in hope that maybe "MAX_HEROES_AVAILABLE_PER_PLAYER" will be respected by AI, but the results are the same AI loops trying to hire more heroes.
(0008285)
val-gaav   
2022-04-27 13:45   
This is fixed
(0008286)
Povelitel   
2022-04-28 05:55   
Fixed by val-gaav in https://github.com/vcmi/vcmi/pull/733 [^]