patrol behavior?

patrol behavior?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
Pocus
Posts: 73
Joined: 14 Apr 2006, 09:40

patrol behavior?

Post by Pocus »

I noticed several problems with the patrol behavior of construction units:

a) they can wander very far, indefinitively it seems from the patrol point to gather metal and energy from wrecks and tree.

b) reclaiming is done even if the stock is full.

c) they can move just over a structure being built or a factory without aiding.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

There are errors in the sub-AI logic that dont usually show up because you're moving and commanding the units anyways.

These become highlighted when you let untis occupy themselves, such as patrol commands, or when the units assigned to an AI (in which case units can become idle without UnitIdle being called so they never get kicked out of stall, this usually happens when atatckign si involved, for example when a commander is building a mex and a scouter runs past the commander fires at the scout while building and it freezes up after the building i finished and keeps its pose, or units not having unit idle called after they've been built if they where built by other units and not a factory.)
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

another thing to do with patrol routes is (and I'm not sure if this is a mod or engine thing) that gunships generally seem very reluctant to attack units when patroling, unless the gunship itself is fired at or (in the case of *some* gunships) the enemy unit moves right under the patrol path. I get the feeling that most of this is determined by weapon range at the moment, which means that units (like core emp gunships) with short ranged weapons hardly ever seem to go after the enemy while patrolling.

Could units perhaps be given a separate 'interaction range' property (set per unit by the modder) which would govern how close a unit has to be to something (metal patch, enemy unit etc etc) to interact with (reclaim, move towards and attack etc) it while on patrol or guard actions - instead of using weapon range (or whatever the current system is).

Bear in mind this is slightly different to the movement standing orders setting, which AFAIK only governs how far the unit may 'chase' the enemy *after* the initial engagement.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Maybe because the distance between the unit and the enemy is logner than the weapons range, due to vertical height, when really distance2d() should be used instead of distance() inside the AI code.....
User avatar
Pocus
Posts: 73
Joined: 14 Apr 2006, 09:40

Post by Pocus »

AF wrote:There are errors in the sub-AI logic that dont usually show up because you're moving and commanding the units anyways.

These become highlighted when you let untis occupy themselves, such as patrol commands, or when the units assigned to an AI (in which case units can become idle without UnitIdle being called so they never get kicked out of stall, this usually happens when atatckign si involved, for example when a commander is building a mex and a scouter runs past the commander fires at the scout while building and it freezes up after the building i finished and keeps its pose, or units not having unit idle called after they've been built if they where built by other units and not a factory.)
Dunno, I wanted to see if I could automate my base layout, by having a bunch of construction planes patrolling over my starting area, with 2-3 grounded workers laying it. Does not work.

The second step was to have a regenerating/living base, ie the units in patrol either repairs if needed, or boost the factories production.

For now, patrols for construction units is not recommanded...
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

AF wrote:Maybe because the distance between the unit and the enemy is logner than the weapons range, due to vertical height, when really distance2d() should be used instead of distance() inside the AI code.....
Ah yes, that's also a good point.
Post Reply

Return to “Help & Bugs”