MantisBT - VCMI
View Issue Details
0001696VCMIAI - Adventure Mappublic2014-02-09 10:192022-04-12 09:17
Ivan 
SXX 
normalmajorN/A
closedfixed 
 
0.98f 
0001696: AI heroes with set "patrol" property should not leave specified radius
As in summary, In H3M heroes have "patrol radius" property, if set - AI heroes with it should not wander more than X tiles from their original position.

Note that AI should not even "use" objects from outside of this radius (e.g. pick resources placed just next to hero if patrol radius is 0)
No tags attached.
related to 0001713closed Warmonger very long turn AI - SectorMap memory leak 
? SXX_PATROL_TESTING_v1.h3m (41,987) 2015-10-17 00:09
https://bugs.vcmi.eu/file_download.php?file_id=2361&type=bug
Issue History
2014-02-09 10:19IvanNew Issue
2014-02-09 10:19IvanStatusnew => assigned
2014-02-09 10:19IvanAssigned To => Tow
2014-02-09 10:39WarmongerNote Added: 0004435
2014-02-15 17:07WarmongerRelationship addedrelated to 0001713
2015-10-15 01:09SXXAssigned ToTow => SXX
2015-10-17 00:09SXXFile Added: SXX_PATROL_TESTING_v1.h3m
2015-10-17 00:10SXXNote Added: 0005954
2015-11-28 16:08SXXNote Added: 0006125
2015-11-28 18:59SXXNote Added: 0006126
2015-11-29 11:44SXXNote Added: 0006137
2015-12-04 21:58SXXNote Added: 0006144
2015-12-04 21:58SXXStatusassigned => resolved
2015-12-04 21:58SXXFixed in Version => 0.98f
2015-12-04 21:58SXXResolutionopen => fixed
2022-04-12 09:17PovelitelStatusresolved => closed

Notes
(0004435)
Warmonger   
2014-02-09 10:39   
I believe this should be implemented at pathfinder level.
(0005954)
SXX   
2015-10-17 00:10   
I'll certainly work on this so here is my test map.
(0006125)
SXX   
2015-11-28 16:08   
So here is some rules for heroes on patrol:

- Patrol not affect human players.
- Dimension door isn't used to collect items even if it's within radius.
- They may use boats.
- Teleports can be used if exit within radius.
- Anything that result into ground<->underground transition is not used: both teleports and subterranean gates.
- Whirlpools not used.
(0006126)
SXX   
2015-11-28 18:59   
Work in progress in that branch:
https://github.com/vcmi/vcmi/pull/143 [^]
(0006137)
SXX   
2015-11-29 11:44   
More notes about patrol testing in H3:
- Patrol limit affect "gosolo" command too.
- Hero on patrol may flee and AI may buy it again. If that happen such hero will never left town if town outside of allowed patrol zone.
- AI may buy heroes when tavern in empty and map don't have any heroes allowed. Make patrol testing much harder.
(0006144)
SXX   
2015-12-04 21:58   
My branch is finishes and I'm almost done everything I needed to merge it.