Jump to content
Rydygier

HETMAN - Artificial Leader

Recommended Posts

Not really tested too much manipulation with this, but:

 

RydHQ_NObj – initially equal to 1. It is positive integer of range 1 to 5. Indicates, which objective is currently a target. 5 means, that all objectives are taken;

 

For practical example, check page 40 of the manual: 4th exemplary config for custom, round defense.

 

There's also internal variable:

 

_HQ getVariable ["RydHQ_Taken",[]];

 

saved in the Leader's group space ("_HQ" represents fo example: (group LeaderHQ)). This variable holds objective objects actually taken, but if I'm right (do not remember really) this is filled automatically basing on RydHQ_NObj, and if so, you don't need to worry about it. 

 

Also not quite sure (this code really spent too much time dusting on the shelf) but probably Leader should awake from defensive stance to offensive after one of his objectives become recognized as lost. 

  • Like 3

Share this post


Link to post
Share on other sites

Can anyone help me understand the purpose of VAR "RydHQ_RHQAutoFill"?  I read the entire thread + manual and am a bit confused.  What i understood from everything i found is that this setting somehow looks at config values, but unsure when it should be used.  Is this designed around ADDON faction use?  Any further description would be appreciated. 

 

Thanks

Share this post


Link to post
Share on other sites

To know, which unit/vehicle is what exactly, HAL need their classes to be categorized across "RHQ arrays". For example RHQ_Inf stores class names of Arma objects, that HAL will treat as foot infantry in general (RHQ aren't mutually exclusive BTW). 

 

By default RHQ arrays contain A3's vanilla classes only (no DLCs, no modded units). 

 

So, to teach HAL, how he should treat/use DLC/custom units, we need to add their classnames to the proper RHQ arrays for him. HAL gives two ways (both may be used simultanously if needed) to achieve that: RHQ init variables, where player can manually add new classes one by one to the RHQ arrays, and RydHQ_RHQAutoFill, where HAL's code at initialization does same thing automatically, by checking one by one every unit/vehicle on the map and recognizing, which is of what type by analyzing and assessing its class' config values. Second way is of course way simplier for the user, and should work fine with typically configured DLC/modded stuff, but in theory this algorithm may be misled by not typical, "exotic", config. Also wasn't tested by me with newest A3 versions. 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks man.  Still to this day this mod is wonderful.

 

One issue i found that i cannot figure out why is that HELOs when they land to pick up inf units, they are getting damaged.  If they land more than once, it's so bad that the tail rotor goes dead in some cases.  Any ideas why?  Sample mission for example is the DEMO BB mission from ADDON.  I tested this with ghost hawk land waypoint on empty map and it landed just fine.

  • Thanks 1

Share this post


Link to post
Share on other sites

Probably in certain circumstancies game handles helo's landing poorly. In any case, sounds like clear game issue. Unfortunate, but nothing, I could fix on my end except making helos immune to damage, but fixing the game is anyway out of HAL's scope. BTW AFAIK it wasn't the case earlier. Something new, I guess. 

  • Like 1

Share this post


Link to post
Share on other sites

My experience in HWS with AI controlled helis is they usually work, and only problem is the AI might fly the transport helis (unlike a human pilot would )too close to enemy forces. 

BUT, I have also AI use transport helis very well, sneaking guys behind the lines or flanking my own side's forces, similar to the air cavalry tactics in Vietnam or as Special Forces do. 

I sometimes use AI behavior altering mods and sometimes do not, and I constantly mess around with game AI skill and accuracy settings, so that may affect the results here.

 

Share this post


Link to post
Share on other sites

Hey guys,

 

I have a problem with the mod and there's a good chance that the solution is somewhere in this forum already.

But I'll just be bold an ask anyway:happy::

Every time I put the CargoFind Command in the Init.sqf and start the mission, the following pops up:

https://drive.google.com/open?id=1z69gbeTtge2eu4Fi9BE-Ig2JFVYGRLxN

(I have my game's language set to German, so if there's a problem I can set it to English and trigger the error message once more)

I'd be really thankful if someone could tell me what I did wrong, or how I can fix this.

 

Thanks in advance and best Regards,

Jules

 

 

Share this post


Link to post
Share on other sites

Well, this part of code is used three times, in all cases in the code for defensive stance. It says, _AV local variable is not defined. It's mysterious to me. _AV in all these cases is defined earlier, this way:

 

_AV = assignedVehicle _UL; 

 

So, it is a vehicle assigned to _UL, where _UL:

 

_UL = leader _unitG;

 

is a leader unit of the _unitG group. 

 

So, question is, why it is not defined, if it is defined. :) Could happen, if somehow _unitG wouldn't be defined. But then we would see error about that earlier. Unless there is. Anyway, screen message is not enough to point the cause. Perhaps show me whole RPT file from the gameplay, where this error occured (and before you do, please, set language to ENG temporarily).Path to the RPT files folder: "C:\Users\(username here)\AppData\Local\Arma 3" 

Share this post


Link to post
Share on other sites

Hey there, 

 

thanks for the quick response!

I uploaded the RPT-file: https://drive.google.com/open?id=1jFn4kvLNFSqGMs6M4RotYvglkqZ4K33_

I (for the first time) also tried something with the BigBoss. This time I get the following Error: https://drive.google.com/open?id=1PVjpnSg5EJ3mNpePtwSalmm-mZiYEvjv 

Could this be a similar problem? https://drive.google.com/open?id=1GVqgAWLTeVc7iDzMOGXaIOt9Ki4lKeWh

 

Thank you for helping me out,

Jules

Share this post


Link to post
Share on other sites

Second error message suggest, you named LeaderHQB a group, while this should be a name of group leader unit. As you read the message, it's kinda self-explanatory in this case. 

 

As for the first, RPT contains only same thing, and nothing more, that could lead us to the cause, so I'm clueless, sorry. You could show me mod-free repro mission, so I could debug it, or try same thing with this version of the HAL, and then send me RPT again:

 

https://www.dropbox.com/s/kweuooe382fu2s5/Script version_dbg.7z?dl=0

 

(assuming, I made no mistakes, with the above (HAL 1.23 script version) all should work same way, but in the RPT should be some hopefully helpful logs to analyze)

 

Share this post


Link to post
Share on other sites

This is an excellent mod and I'm very grateful for your efforts. I was wondering whether HETMAN uses aircraft (planes) with bombs / clusters to attack enemy targets?  

Share this post


Link to post
Share on other sites

If nothing was broken, since I checked last time (looong time ago for the planes), if HAL controls any aircraft, should use it similar way, as other forces, by assigning in chosen place and time attack waypoint for it. How actually aerial unit will perform this attack, is all under vanilla Arma's AI control. 

Share this post


Link to post
Share on other sites
On 6/5/2018 at 9:25 PM, gavinthecat said:

This is an excellent mod and I'm very grateful for your efforts. I was wondering whether HETMAN uses aircraft (planes) with bombs / clusters to attack enemy targets?  

If you spawn and assign to LeaderHQ it will.  Confirmed it in a mission i was designing...

Share this post


Link to post
Share on other sites

What are the issues that could arise by disabling the Leader's ability to relocate (for both BB and Default) and keeping him in a main base with guards around it?

Share this post


Link to post
Share on other sites

Some positions are calculated in reference to Leader's position, like some idle orders. Therefore Leader shouldn't be too far from his army, or things may start to look weird. IIRC that's the main thing about Leader's relocating, especially in the BB. 

Share this post


Link to post
Share on other sites

Never tried, but probably poorly, as with most of caching-like systems. Because of this:

 

"No support for moving entities; entities will stop moving when disabled." and "group can have either Dynamic Simulation enabled or disabled, no partial state where some units have it enabled, some don't, is allowed. "

 

https://community.bistudio.com/wiki/Arma_3_Dynamic_Simulation

 

In general, it is about distant fights, arty shelling distant targets/from the distance and far movements, which are contradicting with very idea of such systems. IIRC once there was made one system (ZBE caching) designed to work well with HAL. 

Share this post


Link to post
Share on other sites

@Rydygier This is a master piece.I cant believe i never tried using this mod until now,its perfectly suiting my needs for a large scale combined arms mission .

 

I have a few questions,now i am reading the manual,theres alot in there and im sure il be reading it for days to come...However is it possible for yourself or anyone to explain to me where and how to disable HETMAN leader taking control of certain groups?

 

Im trying to have a few groups on the map that i can assign my own waypoints to throughout the mission.

 

Thanks again

Share this post


Link to post
Share on other sites

Thanks, glad, you like it. :) Well, this should help (probably recommended way):

 

Quote

RydHQ_ExcludedG = [] - Another exclusion method, working with both limited and unlimited control modes. As above, but on the contrary;

 

Used best inside init.sqf (or any unit's/object's init field), for LeaderHQ, like this:

 

RydHQ_ExcludedG = [G1,G2,someOhterGroupName];

 

Where G1, G2 and someOhterGroupName are group names (not unit names, important). If you wish to try rather group leader's name, use in analogous way:

 

RydHQ_Excluded = [unit1,unit2,whateverUnitName];

 

There's possible also opposite setup explained in the manual, where given Leader controls no one, except pointed groups. 

Share this post


Link to post
Share on other sites
25 minutes ago, Rydygier said:

Thanks, glad, you like it. :) Well, this should help (probably recommended way):

 

 

Used best inside init.sqf (or any unit's/object's init field), for LeaderHQ, like this:

 

RydHQ_ExcludedG = [G1,G2,someOhterGroupName];

 

Where G1, G2 and someOhterGroupName are group names (not unit names, important). If you wish to try rather group leader's name, use in analogous way:

 

RydHQ_Excluded = [unit1,unit2,whateverUnitName];

 

There's possible also opposite setup explained in the manual, where given Leader controls no one, except pointed groups. 

I literally just figured out the way to define things through the INIT.SQF,i was attempting to place an incorrect code in groups init field before,all sorted,thanks!

 

I would like to add one thing if i may,keep in mind iv only been using this for one hour but in limited testing,i noticed that groups that move to new locations to attack (even when enemies are located and known about in area they are moving to) do so in a aware state,BUT have weapons up,thus moving extremely slow.(Reminds me of AI issues from many updates ago). Is there anyway to get them to move with a "DoMove" command,as in full speed?

 

I hesitate to change the variables to allow vehicles to transport,as this is usually unreliable in all AI scripts.

 

Cheers

 

 

EDIT

 

Mate the algorythim of how units move forward is a perfect concert of realistic unit movement.Im observing the WPs being issued,the units reaction to unexpected enemies etc etc. Il be honest i was just about to give up making combined arms missions,i hit a wall this week with 5 days constantly in the editor trying to create a template of combined arms missions,this mod envisions EXACTLY what it is i was aiming to achieve,and alot more.Really enjoying simply reading the PDF and looking at all it offers.

 

Simply the greatest macro AI mod iv used,period!

Share this post


Link to post
Share on other sites
Quote

Is there anyway to get them to move with a "DoMove" command,as in full speed?

 

HAL controls groups via issuing waypoints with chosen combat mode/formation/etc parameters (depending on kind of order, distance to move, kind of group, situation... For example, limited speed is used for some tasks, if target location is farther, than 1000 meters away). Once waypoint is issued one could, I guess, override waypoint movement settings by changing group's behavior/combat mode/speed with respective scripting commands, or using doMove, but in general HAL is kinda independent in his decisions, not really suited for being strictly "led by hand", so such ways are rather "hacking" HAL than anything else. The more precisely you wish to control/bend, how HAL should conduct his troops, the more difficulties of such kind you'll encounter. 

 

That said, init variables provide some ways to influence HAL's ways, in this case the solution may be:

 

Quote

RydHQ_Rush = false –variable shared by all Leaders. If true, groups will never move slowly, but always with normal speed and aware behavior instead of safe. One of “dynamising” variables;

 

But note, fatigue/stamina is a factor here. To add some rest stops en route, you may consider this:

 

Quote

RydHQ_PathFinding = 0 – this variable is shared by all Leaders. If set with positive value, experimental path finding based on terrain is turned on for non-motorized infantry. It is on waypoints level. Value controls “resolution” in meters – on how long sections route will be splitted for assigning mid-waypoints. Recommended values are 100 - 400. Not motorized groups will choose path preferably through good covered areas, as forests, urban areas or mountains, if near to route. NOTE: use with caution, this is experimental feature and can make troubles sometimes;

 

 

Reliability of cargo transport indeed varies depending on current A3 version mood, terrain etc. in any case, land vehicle seemed more reliable, than choppers. Cargo transport used to work usually though, but I didn't tested HAL quite long time, so anything possible with all this driving AI etc. 

Share this post


Link to post
Share on other sites
7 minutes ago, Rydygier said:

 

HAL controls groups via issuing waypoints with chosen combat mode/formation/etc parameters (depending on kind of order, distance to move, kind of group, situation... For example, limited speed is used for some tasks, if target location is farther, than 1000 meters away). Once waypoint is issued one could, I guess, override waypoint movement settings by changing group's behavior/combat mode/speed with respective scripting commands, or using doMove, but in general HAL is kinda independent in his decisions, not really suited for being strictly "led by hand", so such ways are rather "hacking" HAL than anything else. The more precisely you wish to control/bend, how HAL should perform his job, the more difficulties of such kind you'll encounter. 

 

That said, in this case the solution may be:

 

 

But note, fatigue/stamina is a factor here. To add some rest stops en route, you may consider this:

 

 

 

Reliability of cargo transport indeed varies depending on current A3 version mood, terrain etc. in any case, land vehicle seemed more reliable, than choppers. Cargo transport used to work usually though, but I didn't tested HAL quite long time, so anything possible with all this driving AI etc. 

Thanks mate,theres tonnes of configurability here its awesome.

 

One last qeustion,iv noticed the leader will also pick up spawned groups and assign them move orders.Would you see any issue with that? I briefly thought about the morale system possibly being affected but im hoping to impliment JEBUS respawn to keep performance levels as good as possible,though what i noticed so far with your mod is that(default settings) performance is quite good.

Share this post


Link to post
Share on other sites

Yes, HAL picks up spawned groups (unless excluded, or HAL in limited control mode). Indeed, it affects morale, for HAL such spawned groups are reinforcements basically, so he reacts positively, not an issue IMO. As for performace, HAL is pure SQF, thus rather don't affect FPS directly, SQF is scheduled, queued in each frame with hardcoded piece of CPU power available. Commanded into movement/fight AI will affect FPS though.

 

One thing, I'll say this in advance, HAL is NOT compatibile with almost all groups/units/vehicles caching scripts with probable exception of ZBE caching, if that one still works, or some headless client setups. Each removed unit/group, even only for "caching" purposes is counted as loss, affecting morale and decisions, and, the more, HAL is about war going on no matter, if player is anywhere near (plus things like far artillery strikes) and that's directly against general caching idea. 

  • Thanks 1

Share this post


Link to post
Share on other sites

@Rydygier Im tweaking a few settings,and looking at some variables i had a question regarding this line 

Quote

RydHQ_CaptLimit =

10

-

the number of allied units (not groups!) near an objective that

commander will consider as sufficient to “capture” that objective

. The lesser value the more

dynamic

progress

.

Does this mean the commander would send "more" units to take an OBJ? Or simply consider it taken?And if not enough units there,he sends more on the next cycle..

 

also :

Quote

RydHQ_Order =

"

DEFEND

"

;

sets army in defensive mode. Units will maintain positions near

their commander. Re

-

defining this variable with any other value will set army back in attack

mode

(note

: pay attention to the quotes,

these must be double

-

")

;

Can i use this somehow to make one sides commander defend 2 or 3 areas apart from each other without have 2 or 3 commanders for that side?

 

What im looking to achieve idealy is a defending force that defend multiple areas,but still have all the benefits of movement orders.

 

And is this also the best way to make units garrison?To my understanding,if i read correctly,garrisoning is dynamic and happens when a side is on defence,or pushed back to a recently captured objective.

 

Am i about rite?

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

×