Page 1 of 1
patrol behavior?
Posted: 09 May 2006, 14:00
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.
Posted: 09 May 2006, 14:13
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.)
Posted: 09 May 2006, 16:57
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.
Posted: 09 May 2006, 17:00
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.....
Posted: 09 May 2006, 17:37
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...
Posted: 09 May 2006, 22:23
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.