Jump to content
Rydygier

HETMAN - Artificial Leader

Recommended Posts

You can check, how fast units are moving or why are moving so slow. Name your unit eg unit1, then add this into its init field:

onMapSingleClick "unit1 setPos _pos";

and play. Your unit has now teleport ability by map clicking, so you can be anywhere and see anything, also these armored units on the move. This way I'm testing many things in Hetman. As for driving AI in current state - I do not expect much. I'll be not surprised at all, if the cause turn out to be some rock, that made vehicle stuck for 10 minutes or forever.

CPU power limitation also may affect AI abilities, I guess.

Share this post


Link to post
Share on other sites

I can't seem to force certain units to recon only and certain units to do non-recon stuff.

These are the lines in my init.sqf

RydHQ_Wait = 2;
RydHQ_Debug = true;
RydHQ_PathFinding = 100;
RydHQ_Rush = false;
RydxHQ_AIChatDensity = 30;
RydHQ_CargoFind = 200;
RydHQ_ROnly = ["recon1","recon2", "recon3"]; 
RydHQ_AOnly = ["a1", "a2", "a3", "b1", "b2", "b3"];

Everything works except that I can't get the groups I want to do recon only. Some of them get a rest mission while some of the attack only groups get a recon mission. Help would be appreciated.

Share this post


Link to post
Share on other sites

All group (not unit) names should be always without the quotes (""), so:

RydHQ_ROnly = [recon1,recon2,recon3]; 
RydHQ_AOnly = [a1,a2,a3,b1,b2,b3];

(assuming, these are names of the groups). I hope this helps. :)

Share this post


Link to post
Share on other sites
"LIMITED" speed is for on foot infantry, if target is far (so will not run so far all the way - this was requested long time ago), or it is idle mission, there is no enemy near and rush variable is false. Withdrawing units towards defensive positions is with "FULL" speed. Rest is on "NORMAL". Unless something was changed in A3, "FULL" differs from "NORMAL" only in that, units do not keep group formation, but just running ASAP. Additionally, when not in combat, vehicles are on "SAFE", that means will prefer move on roads.

I think you may want to look into this for Arma3. I think LIMITED might be useless unless units are idle. From what I've seen developing missions LIMITED is just a slow useless walking speed. Units will never get anywhere in a decent amount of time. I think maybe this was an issue with your A2 version I reported long ago. I saw units just going really slow when they were supposed to be attacking.

As for vehicles on SAFE I don't think this is necessary anymore with A3. I have stopped using it as AI drive a thousand times better than A2 except when they get stuck. But that is a separate BIS issue anyway. You can probably get way with putting them on AWARE. But, test before taking my word for it.

Share this post


Link to post
Share on other sites

Yeah, I'll test. But later. The issue with releasing a mod for so early version of the game is, there are still possible fundamantal changes. Sometimes there is something to fix, so I spent time and effort to fix that, but a month later there is a patch, that simply removes cause of whole fixing work, or even worse, after the patch something, that was a fix, now breaks things and must be undone. HAC 1.0 was created for mature version of A2, now situation is different, A3 is still very "fresh" (and, unlike it was with HAC, I prepared HAL barely knowing A3, without any real experience in regular gameplay), so I preffer to fix for now only internal HAL problems.

Limited - yes. I saw it in A3. Similar, as in A2 - just walking speed. And that way it was intended/requested by someone. Reason was like: "hey, why they are running all the time everywhere? If target area is far, they arrive exhausted and unable to fight effectively". I do not know, but I think, when infantry group is sent on foot far away they'll not, without a good reason, like haste or enemy vicinity, run all the way. Infantry on foot simply is slow. I'll leave that as is, especially, that there is RydHQ_Rush init variable, so user can easily make them run again, as it was in HAC 1.0.

Edited by Rydygier

Share this post


Link to post
Share on other sites
All group (not unit) names should be always without the quotes (""), so:

RydHQ_ROnly = [recon1,recon2,recon3]; 
RydHQ_AOnly = [a1,a2,a3,b1,b2,b3];

(assuming, these are names of the groups). I hope this helps. :)

Damn, true. That's what I get for late night play sessions >_>

Share this post


Link to post
Share on other sites

I just have one more question regarding the group roles. If I have assigned ROnly and AOnly groups like above, what happens if I place additional groups on the map? Can those new groups do recon too? Or does the ROnly array override the automatic task assignment's group selection?

Share this post


Link to post
Share on other sites
If I have assigned ROnly and AOnly groups like above, what happens if I place additional groups on the map?

Hmm? Why should happen anything special then?

ROnly (no attack) and AOnly (no recon) affect only groups of names contained therein. So nothing particular will happen with any other group, you place on map, unless you also add names of these new groups to R/Aonly array.

Groups included in ROnly are automatically sift off (rejected) every time HAL looks for group for the regular attack mission. Groups included in AOnly are automatically sift off (rejected) every time HAL looks for group for the recon mission. BTW note, there are also other kinds of missions like idle, rest, capture, flank...

Share this post


Link to post
Share on other sites
Hmm? Why should happen anything special then?

ROnly (no attack) and AOnly (no recon) affect only groups of names contained therein. So nothing particular will happen with any other group, you place on map, unless you also add names of these new groups to R/Aonly array.

Groups included in ROnly are automatically sift off (rejected) every time HAL looks for group for the regular attack mission. Groups included in AOnly are automatically sift off (rejected) every time HAL looks for group for the recon mission. BTW note, there are also other kinds of missions like idle, rest, capture, flank...

Yeah that's what I thought. I have a scenario where I have three motorized patrol teams and they're in the ROnly group. But this doesn't guarantee that they're used in recon missions, right? The AI leader might put other troops to do the task too if I understood correctly?

So in order to guarantee that those three motorized patrol teams are used for recon, I have to put every other group into the AOnly group. Imho that is quite a chore. I think it would be better that IF the ROnly array isn't empty, only use the units in that array to do recon. This way I you wouldn't have to put every other group into the AOnly array, which would save time when making the mission.

Share this post


Link to post
Share on other sites
But this doesn't guarantee that they're used in recon missions, right?

Right. There are ways to be sure, that given group will not do something, but usually you can not force HAL to use given group for given task in 100%. HAL is too autonomous, too many random factors. Of course, if you know, how exactly HAL chooses group for given task, you can use some tricks to convince HAL to use group chosen by you in a way chosen by you. Yeah, that's better word. HAL may be convinced rather than controlled that way. :)

Yes, putting all but max three groups (including yours) into the AOnly array should do the trick. Quite simple to do. Something like RydHQ_AOnly = (AllGroups - [recon1,recon2,recon3]);

Other possibility - best trick is to use RHQ_RAir class array and put there classname of the vehicle present only in chosen group. Now all vehicles of that kind will be treated as air recon (no matter, if these are really aerial), so recon of first choice. If this is not an option (eg more groups uses unit of that class, that should be not treated as air recon), you can use same way RHQ_recon (second choice), or RHQ_FO, RHQ_sniper, RHQ_LArmor... Allternatively you can set up a mission, so there will be no recon group of higher choice priority, than yours. So if chosen by you group uses light armored class vehicle (not a car), and no any recon, FO, snipers, be sure, there is no any groups, that consist of recon, FO, snipers and especiusally air recon. To be more exact, as HAL usally needs three recon groups, there may be one or two "better for recon" groups than chosen by you. Secondary criterion is distance between a group and recon area. The smaller distance, the higher group priority to be chosen for recon.

Also be sure, that group wasn't selected by HAL as recon or attack reserve. Use ROnly to be sure, that group will be not set as attack available (attack reserve included), and set RydHQ_ReconReserve = 0 to be sure, that HAL will not keep that group as recon reserve.

Why so complicated? Because HAL is not designed to be strictly controlled in the way you want. It is designed to be autonomous and to decide on its own, what, when and how to do prior to win the battle. Plus there is limited randomness nearly everywhere.

If you want, so group will for sure do something, best exclude it from HAL control, then simply give it a waypoint(s), you like (HAL mainly does the same thing - assigns the waypoints). You can any moment switch the group under/out of HAL's control by redefining proper array variable.

If you want strictly control over all groups, so the will do exactly, what you want always - HAL is simply not a tool for your needs.

---------- Post added at 16:02 ---------- Previous post was at 15:12 ----------

I think it would be better that IF the ROnly array isn't empty, only use the units in that array to do recon.

I must admit, names of these two variables are a bit misleading, there is small story behind that fact, but it is really very boring story. :) So, no promises, but I'll try to prepare something like you wish for next version for recon, and maybe also attack, a two new variables working like CargoOnly (means - as you preffer). But, again, no promises, this may be more complex to do, than it looks.

However this may take a while, before next version will be released. I'm currently during some time consuming deep script redesign, that is needed for further development. Some core (deeply rooted) limitations make implementing of some nice ideas very hard or impossible. I'm trying to get rid of these limitations. Some limits resulting from the code architecture weaknesses and bad design - the sins of my ignorant scripting youth still weigh heavily on the some HAL's aspects - after all, that was my second large project, created, when I even did not know, what are the functions... :) .

Edited by Rydygier

Share this post


Link to post
Share on other sites

Rydygier, I just discovered your mod a few days ago and will like to say thanks! Its been one amazing gameplay after another. Great work.

Share this post


Link to post
Share on other sites
Yeah, I'll test. But later. The issue with releasing a mod for so early version of the game is, there are still possible fundamantal changes. Sometimes there is something to fix, so I spent time and effort to fix that, but a month later there is a patch, that simply removes cause of whole fixing work, or even worse, after the patch something, that was a fix, now breaks things and must be undone. HAC 1.0 was created for mature version of A2, now situation is different, A3 is still very "fresh" (and, unlike it was with HAC, I prepared HAL barely knowing A3, without any real experience in regular gameplay), so I preffer to fix for now only internal HAL problems.

I agree with you about this somewhat. I don't think it is as valid with A3 though since the game has been out for months in Alpha and Beta forms and they have aggressively fixed things. I don't see major changes being made at this point but you never know. I think it is stable enough for you to consider it mature for HAC.

Limited - yes. I saw it in A3. Similar, as in A2 - just walking speed. And that way it was intended/requested by someone. Reason was like: "hey, why they are running all the time everywhere? If target area is far, they arrive exhausted and unable to fight effectively". I do not know, but I think, when infantry group is sent on foot far away they'll not, without a good reason, like haste or enemy vicinity, run all the way. Infantry on foot simply is slow. I'll leave that as is, especially, that there is RydHQ_Rush init variable, so user can easily make them run again, as it was in HAC 1.0.

I still think you should use "NORMAL" rather than "LIMITED". There is also "FULL" or whatever it is called. "NORMAL" is decent combat speed if in fact units are moving to attack or going into combat. AI can easily just keep trucking along on "NORMAL" in Vanilla A3. I use it all the time for engagements up to 1-2km away. On "LIMITED" you might as well not even bother sending the group in.

Hopefully you'll test this sooner rather than later.

What exact speed does RydHQ_Rush put them on?

Share this post


Link to post
Share on other sites
I agree with you about this somewhat. I don't think it is as valid with A3 though since the game has been out for months in Alpha and Beta forms and they have aggressively fixed things. I don't see major changes being made at this point but you never know. I think it is stable enough for you to consider it mature for HAC.

I still think you should use "NORMAL" rather than "LIMITED". There is also "FULL" or whatever it is called. "NORMAL" is decent combat speed if in fact units are moving to attack or going into combat. AI can easily just keep trucking along on "NORMAL" in Vanilla A3. I use it all the time for engagements up to 1-2km away. On "LIMITED" you might as well not even bother sending the group in.

Hopefully you'll test this sooner rather than later.

I agree with Delta99 on this. When the groups are in "Normal" while "Safe," the leader moves at the limited speed, but all other units are free to jog if they need to catch up to the group. When they are in "Limited," the whole group moves very slowly and at maximum distance spread apart, which is highly detrimental with large groups where the leader and the last unit may be 150+ meters away from each other. In that scenario, when the group becomes aware and goes into combat, such as coming under fire, the group has difficulty forming on the leader because they are highly spread out, so an effective and quick defense is hindered by the AI acting like ants.

The only time I prefer the Limited speed is when a group is patrolling a small area and I want them to walk in uniform style.

Share this post


Link to post
Share on other sites
I don't see major changes being made at this point but you never know.

I hope, there will be some major changes, especially for AI, as it still need them. Yesterday tried AI driving skill by setting great TPW addon for ambient cars and pedestrians with higher density and just watching the show from some balcony. After some minutes... Well. It was very funny, but it wasn't desired kind of fun. It was hilarious and surrealistic. Very odd things happened around including explosions and cars sinking partially into the ground (still in motion) not mention about usual stucking everywhere, heavy casaulties and car accidents one after another. If there will be no big changes in AI driving/moving behaviour, it would be very disappointing.

This makes me to believe, that there will be some changes, at least in that matter. Also existing of active development branch indicates, that dynamism of A3 development is still high.

What exact speed does RydHQ_Rush put them on?

Normal, and aware mode, if was safe. Simply make groups running, when otherwise will walking.

You can instead swith to "true" variable called RydHQ_DynForm. This will dynamically adjust group speed, stance and formation depending on HAL's "danger factor", means when in danger (enemy close), group will switch dynamically to aware/wedge/normal and back, when danger is no more.

All right, when I finish current code reworking, I'll check groups behaviour with different settings closely.

Edited by Rydygier

Share this post


Link to post
Share on other sites

I wanted to say thank you Rydygier; it was a pleasure spending hours on the unofficial A3 port. I'm excited for the official release for A3 and will report bugs or improvements (if any).

Congratulations!

Share this post


Link to post
Share on other sites

Thanks. :)

When the groups are in "Normal" while "Safe", the leader moves at the limited speed, but all other units are free to jog if they need to catch up to the group. When they are in "Limited," the whole group moves very slowly and at maximum distance spread apart, which is highly detrimental with large groups where the leader and the last unit may be 150+ meters away from each other. In that scenario, when the group becomes aware and goes into combat, such as coming under fire, the group has difficulty forming on the leader because they are highly spread out, so an effective and quick defense is hindered by the AI acting like ants.

Just did some comparing tests and seems to be not so simple to choose best way, beacuse there is no good way in fact.

Perhaps on "SAFE" group member can better catch up the group, but you can't control formation, same, as is in A2, it is always kind of not so pretty column, which for bigger groups anyway means some spread between first and last unit and units' movementy often isn't smooth (faster-slower-faster-slower). Movement speed is about 3.8 - 4.7 km/h. Movement method (kind of walk) is fine, even if a bit strange looking.

On "AWARE"/"LIMITED" you can control formation, and movement speed is slightly bigger and stable: 5 km/h. So this way group moves faster. Test was short, so didn't notice any spread apart. But movement method is not so nice for long range movements - all the time with raised weapon... Not good at all. In A2 that was better set - units, perhaps apart from TL, only ocasionally raised the gun.

Ideal would be: controlled formation without any spread, with 5 km/h speed walk and lowered weapon. But I do not see such possibility. I think in such circumstance I'll just recommend to use Rush, so groups will run all the time. Rest will saty, as is - mix of both, depends on order, distance, circumstancies and movement stage.

Technically we can also use "AWARE"/"NORMAL" with artifically (via script) limited speed (_unit limitSpeed 3) to achieve something between walking and running speed (about 11 km/h, while running is 19-20 and walking about 5), still in that not acceptable "AWARE" pose, with raised gun all the time.

Interesting effect gives "SAFE" with limitSpeed 3. Mix of fast walk and slow run with lowered gun. Speed of run about 11 km/h.

But it is bad idea to limit unit's speed that way, it affects low level behavior and HAL will not do this.

Edited by Rydygier

Share this post


Link to post
Share on other sites

This makes me to believe, that there will be some changes, at least in that matter. Also existing of active development branch indicates, that dynamism of A3 development is still high.

True. I was simply stating though that SAFE isn't required anymore like it was for A2 and driving in general is 1000 times better. Can it be better still, most definitely. I wonder if some of what you were seeing doesn't have to do with TPW mod though. Or perhaps you were just generating a ton of traffic whereas I was talking more about just AI getting around without traffic.

All right, when I finish current code reworking, I'll check groups behaviour with different settings closely.

Appreciate it.

Share this post


Link to post
Share on other sites
a ton of traffic whereas I was talking more about just AI getting around without traffic.

Actually, some effects was so comic, so I spent needed time, found over the net decent and free game recording video tool, made 10 minutes movie and uploaded on youtube (my first!). Uploading took me an hour and half, BTW (that's why this was my first). Anyway. You can see, what I saw and judge yourself. Well, probably, youtube in some fancy way found soundtrack audible from one of TPW's "house radios", told me a title and author and warned, that there may be some access limitations due to copyrights... Let's try (biggest issues are present at the end of that recording):

if there will be a problem with access, I can remove sound.

Yes, it was about AI handling driving with some traffic. But also on empty road you can see stucking etc. Not important, the clue is, there is still much to do with driving AI, so changes here are probable or at least expected by me. Such changes may somehow affect also behavior of alone vehicle "moving toward waypoint".

Edited by Rydygier

Share this post


Link to post
Share on other sites

ha! This video depicts driving in Southern California. I like the guy at 3:43 who's just laid out in the street.

Seriously, though, I get it. I agree that the AI driving is bad. The only thing that can be done by the mission maker is to place waypoints at each point in the road that has any possibility of confusing the AI, so every intersection, large bend, or separation in the path.

Share this post


Link to post
Share on other sites

>explosion at 4:02

>guy crawling across the road at 4:16

>driving without front wheel "lol what seems the problem officer" at 6:31

>pickup balance on back wheel at 8:27

>pickup half underground 8:51

>ATV gang leader gets run over by wild 1 wheeled pickup at 9:16

I laughed hard.

Share this post


Link to post
Share on other sites

Is there any provision in the script to change the distances of waypoints on objectives depending on unit types? I only ask because you'd want infantry units to get in closer to recon an area than armoured vehicles, and stuff like that.

Share this post


Link to post
Share on other sites

These "flanking" distancies depend on that currently, but only by task type. For all units on recon this is about 600 (additional two missions on 300 at night). For armored attack - 500, for infantry/soft veh attack - 350. Certain values was chosen basing on usual spot/engage range for AI in A2 (to keep flanking positions a bit outside infantry engage range). It is only rough estimation of course.

For attack missions final objectives are always located around target itself, so at first unit is taking flanking position, then is pushing towards target position. Separate thing is also flanking distance for main flanking maneuver and similar SF attack.

Should I to make recon distance dependent on kind of group performing given task? Vehicle of course is easier to spot, than infantry, so we may think, these should get further located observing positions to avoid detection, but then, I'm affraid, their recon will be futile, as vehicle will not spot anything on larger distance. Not sure, if on 600 can spot anything except aerial and shooting units. In fact I added vehicle recon only on request, reluctantly just because of that - it is easier to spot a recon vehicle for AI infantry, than to spot infantry by AI recon vehicle. Or it was that way in A2. IMHO in most cases light armored recon is detected by opfor anyway, before will be able to detect opfor, cause vehicles are so easily spottable by AI infantry, so for recon vehicles it is rather "recon by combat" than "non-combat recon".

Edited by Rydygier

Share this post


Link to post
Share on other sites

Vehicles are ok as they are, its just 600m is a bit far for infantry. When we do it, the idea of a recon is to get as close as possible to the enemy, so in ArmA terms, you'd be looking for using something like woodblocks or other cover from around 200m from the objective.

Share this post


Link to post
Share on other sites

200 seems a bit too low (there is also some random values, so here we talk about 100-300).

When we do it, the idea of a recon is to get as close as possible to the enemy, so in ArmA terms, you'd be looking for using something like woodblocks or other cover

We do it that way. But not AI. You cannot rely on AI, so will effectively avoid detection just by proper cover usage nor that it will not engage even on stealth/no shoot and will keep moving freely (withdraw, when done) instead of freeze and targeting when so close to hostiles. Or even closer - enemy is not static. AI will fail. So we need to keep AI recon out of usual engage range of AI infantry. Frankly, do not know, how it looks in A3, and also that possibly may be still changed by devs, but if I'm remeber correctly, in A2 this was 300 meters except snipers and MG operators, that means minimal safe distance for AI would be 400.

Anyway, we are talking about low level AI behavior influence, while there is even dedicated to that thread opened in dev branch subforum - that means we do not know final state yet here.

PS Of course we are talking about supposed-to-be hostile presence. Recon is sent to observe a position, if there is any hostile presence, not to observe particular present enemy. So all that is less important somehow.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×