Jump to content
Rydygier

HETMAN - Artificial Leader

Recommended Posts

So I added an AI, made his name LeaderHQ, I made my four objectives RydHQ_Obj1 RydHQ_Obj2... etc. My problem is, the mod loads up everything seems good, but he continues to send Recon missions by where he is, not where the Objective is. Am I doing something wrong?

Share this post


Link to post
Share on other sites

Hi, having an issue here.

Any time I use more than one LeaderHQ (for exemple now I have leaderHQ,leaderHQB,leaderHQC), no debug show on the map, and the leaders do not send out any kind of missions, nor move any troops.

I suspect something that would be conflicting in my config, as .RPT shows absolutely no error what so ever.

However, Big Boss's debug seems to work... At least he shows me all of the leaders's position, their reserve pos (if any) and objectives.

In any case...

RydHQ_RHSCheck = true;
RydHQ_DbgMon = true;
RydHQ_Rush = false;
RydHQ_RHQAutoFill = true;

//First Company
RydHQ_Debug = true;
RydHQ_DebugII = true;
RydHQ_SubAll = false;
RydHQ_SubZynchro = true;
RydHQ_Surr = true;
RydHQ_LRelocating = true;
RydHQ_MAtt = false;
RydHQ_CargoFind = 150;
RydHQ_GetHQInside = false;
RydHQ_Front = true;
RydHQ_ChatDebug = true;
RydHQ_DynForm = true;
RydHQ_ForceAAO = true;
RydHQ_SlingDrop = true;
RydHQ_ReSynchro = true;
RydHQ_SMed = true;
RydHQ_SAmmo = true;
RydHQ_SFuel = true;
RydHQ_Smoke = true;
RydHQ_Flee = true;
RydHQ_NoRec = 1;
RydHQ_Withdraw = 1;

//Second Company
RydHQB_Debug = true;
RydHQB_DebugII = true;
RydHQB_SubAll = false;
RydHQB_SubZynchro = true;
RydHQB_Surr = true;
RydHQB_LRelocating = true;
RydHQB_MAtt = false;
RydHQB_CargoFind = 150;
RydHQB_GetHQInside = false;
RydHQB_Front = true;
RydHQB_ChatDebug = true;
RydHQB_DynForm = true;
RydHQB_ForceAAO = true;
RydHQB_SlingDrop = true;
RydHQB_ReSynchro = true;
RydHQB_SMed = true;
RydHQB_SAmmo = true;
RydHQB_SFuel = true;
RydHQB_Smoke = true;
RydHQB_Flee = true;
RydHQB_NoRec = 1;
RydHQB_Withdraw = 1;

//Third Company
RydHQC_Debug = true;
RydHQC_DebugII = true;
RydHQC_SubAll = false;
RydHQC_SubZynchro = true;
RydHQC_Surr = true;
RydHQC_LRelocating = true;
RydHQC_MAtt = false;
RydHQC_CargoFind = 150;
RydHQC_GetHQInside = true;
RydHQC_AirEvac = true;
RydHQC_Front = true;
RydHQC_ChatDebug = true;
RydHQC_DynForm = true;
RydHQC_ForceAAO = true;
RydHQC_SlingDrop = true;
RydHQC_ReSynchro = true;
RydHQC_SMed = true;
RydHQC_SAmmo = true;
RydHQC_SFuel = true;
RydHQC_Smoke = true;
RydHQC_Flee = true;
RydHQC_NoRec = 1;
RydHQC_Withdraw = 1;
RydHQC_LZ = true;

//Battalion HQ
RydBB_BBOnMap = true;
RydBBa_HQs = [leaderHQ,leaderHQB,leaderHQC];
RydBB_Active = true;
RydBB_Debug = true;
RydBBa_SimpleDebug = true;
RydBB_LRelocating = true;
RydBBb_HQs = [];

.RPT section of HETMAN.

16:29:27 "Big Boss A awakes (time: 23.022)"
16:29:29 "Morale A (OTHER): 0 - losses: 0 percent (0)"
16:29:35 "Morale B (GENIUS): 0 - losses: 0 percent (0)"
16:29:41 "Morale C (DILATORY): 0 - losses: 0 percent (0)"
16:29:41 "Big Boss studies the map."
16:29:41 "Big Boss A is looking for strategic objectives."
16:29:41 "Big Boss A is analyzing forces..."
16:29:41 "Big Boss A is checking own forces placement..."
16:29:41 "Big Boss A orients the flanks."
16:29:41 "Big Boss A assigns front sections to divisions."
16:29:41 "Assignment of Big Boss A : Left: [] Right: [O Foxtrot 1-2] Front: [O Alpha 4-1] Reserve: [O Charlie 2-3]"
16:29:41 "Big Boss A issues orders."
16:29:41 "Side: A - Losses: 0 Number: 14 Value: 0 enValue: 0 enFactor: 0 lossFactor: 0"
16:29:42 "For Big Boss A cycle is completed: 1 (mission time: 36.104)"
16:29:42 "Big Boss A will now take a moment to ash his cigar."
16:29:52 "Morale B (GENIUS): 0 - losses: 0 percent (0)"
16:29:54 "Morale A (OTHER): 0 - losses: 0 percent (0)"
16:30:01 "Morale B (GENIUS): 0 - losses: 0 percent (0)"
16:30:05 "Morale A (OTHER): 0 - losses: 0 percent (0)"
16:30:07 "Morale C (DILATORY): 0 - losses: 0 percent (0)"
16:30:10 "Morale B (GENIUS): 0 - losses: 0 percent (0)"
16:30:16 "Morale A (OTHER): 0 - losses: 0 percent (0)"

Just to be sure, I made the test without additionnal leaders, and with only one No issues.

Hope you can help me :)

Edited by ElectroEsper

Share this post


Link to post
Share on other sites

I'll try help ASAP, but this may mean "not so soon" sadly...

Share this post


Link to post
Share on other sites

Nevermind on me, figured it out. Small Typo...

Wrote

RydHQ_SubZynchro instead of RydHQ_SubSynchro :P

Also, awesome script! Works great of Dedicated server ;)

Now I just need to find a way of having efficient caching that do not interfere.

Share this post


Link to post
Share on other sites

Now I just need to find a way of having efficient caching that do not interfere.

As i remember zorrobyte wrote this specific code..and he said he had HETMAN in mind doing so.

We are using it along HETMAN without problems.

Share this post


Link to post
Share on other sites

@Rydie

I m using script version (for mobility reasons)

If i delete "sounds" folder to save 5 MB on each mission..it will break anything essential regarding HETMAN's mechanics??

Share this post


Link to post
Share on other sites

Yep, but easy to fix. After deleting sounds you need to edit description.ext and replace any "path\to\the\sound.file" with "" or you'll get error about lacking sound each time it could be played.

But haven't you already prepared "no sound" version in the HAL package?

Share this post


Link to post
Share on other sites

Additionnal question, something to do with the SF Mission.

If during a CooP mission, I name our team leader LeaderHQF or something like that, could HAL pick him up as a leader and then send a SF Mission to deal with him?

Share this post


Link to post
Share on other sites

But haven't you already prepared "no sound" version in the HAL package?

Nope..i just did :)

*ps LOTS of entries tho :P

Share this post


Link to post
Share on other sites
If during a CooP mission, I name our team leader LeaderHQF or something like that, could HAL pick him up as a leader and then send a SF Mission to deal with him?

Yes. Any unit named as one of the Leaders may be targeted using SF task by SF groups controlled by another Leader of side hostile to that unit's side. If you do so though, better (just in case) also prepare proper set of objectives for such F "Leader" even, if he will have no army, to prevent possible code glitches due to Leader without objectives assigned.

Share this post


Link to post
Share on other sites

So, to be clear, you can set a player as the leader, and have him being targeted right? But you need to give him objective to not get code error, correct?

Also, do I need to put friendly units and vehicles into the unit arrays (in the init.sqf) the same as I would put HAL controlled ones? Even if said units/vehicles are players and or to be used by players?

Share this post


Link to post
Share on other sites

if i put down the AmmoDrop array and populate it, i receive the following:

http://gyazo.com/074fd94b7507a89acdaa6dc106bd1791

and only the first of 3 leaders spawns.

Also This:

13:12:46 "Big Boss A awakes (time: 17.977)"
13:12:46 Error in expression <BBa_Init)
}
};

if (RydBB_Debug) then
{
RydBBa_SAL globalChat format ["Big Boss >
13:12:46   Error position: <RydBBa_SAL globalChat format ["Big Boss >
13:12:46   Error Undefined variable in expression: rydbba_sal
13:12:49 "Morale A (OTHER): 0 - losses: 0 percent (0)"
13:12:54 Error in expression <f",[]]));
};

case false : 
{
{
if not (isNull _x) then
{
if (({alive _x} count >
13:12:54   Error position: <isNull _x) then
{
if (({alive _x} count >
13:12:54   Error isnull: Type String, expected Object,Group,Script,Display (dialog),Control,Network Object,Task,Location

Share this post


Link to post
Share on other sites
So, to be clear, you can set a player as the leader, and have him being targeted right? But you need to give him objective to not get code error, correct?

Yes, it should work that way.

Also, do I need to put friendly units and vehicles into the unit arrays (in the init.sqf) the same as I would put HAL controlled ones? Even if said units/vehicles are players and or to be used by players?

Do you mean RHQ? For HAL makes no difference, if unit is AI or player anyway. Currently HAL should automatically categorize all units found on the map, so manual RHQ is optional now.

if i put down the AmmoDrop array and populate it, i receive the following:

Can't be sure anything not knowing your setup, but looks like something is very broken in it (don't know also if it's anything with ammodrop). It may be a typo, or a string used where object/group name was expected... Not sure. Also seems, there is no RydBBa_SAL game logic object on the map according to RPT or some other error causes code think so. My blind guess would be, you filled ammodrop array with names of groups in "", what made them strings. Don't use "" when group or unit name is required (eg Group1, not "Group1").

Share this post


Link to post
Share on other sites

Can't be sure anything not knowing your setup, but looks like something is very broken in it (don't know also if it's anything with ammodrop). It may be a typo, or a string used where object/group name was expected... Not sure. Also seems, there is no RydBBa_SAL game logic object on the map according to RPT or some other error causes code think so. My blind guess would be, you filled ammodrop array with names of groups in "", what made them strings. Don't use "" when group or unit name is required (eg Group1, not "Group1").

A scholar and a gentleman. I see in the manual it does say group, ive been putting classnames in there!!!! *Salty is a fool*.

Thank you good sir!

Share this post


Link to post
Share on other sites

How do you enable the artillery? Even with FO in the field with me in sight, and no friendly close, no missions are ever called.

Share this post


Link to post
Share on other sites

Arty is enabled by default - if arty unit is present and under Leader's control, may be used. "May", because there are many factors affecting that possibility. Too many of them to say, why there isn't arty fire for you. In general - Leader decides when and how to use arty, but will not hesitate, if all conditions are met.

Share this post


Link to post
Share on other sites

@Rydie

Trying to simulate a situation where LeaderHQ hunts a player's group.

Should i place a (large/1-2km radius) Ryd_Obj2 trigger somewhere and having a marker following player's group-and

everytime Player's group is spotted the Ryd_Obj2 trigger gets the position of Player's marker?

or...The result wont differ too much from the default HETMAN's behavior-aka Sends some units on the spotted enemy? :/

Share this post


Link to post
Share on other sites

Well, Hetman isn't meant to be a restless hunter, but battle commander. He'll however react on spotted enemies till enough troops assigned, all enemies dead or unknown or no more troops to sent (busy, combat ineffective or dead). So yeah, he well send some troops. More, if you attach to the player idle decoy trigger or objectives triggers (attachTo command). Size of the objectives trigger changes nothing, size of the decoy trigger matters though. Just note, objective/decoy position isn't updated for sent group on the fly, but taken only once, at the beginning of the task.

Try also:

RydHQ_AlwaysKnownU= [] – (enemy) units added to this array will be always considered as known to Leader;

Edited by Rydygier

Share this post


Link to post
Share on other sites

RydHQ_AlwaysKnownU= [] – (enemy) units added to this array will be always considered as known to Leader;

To be honest ..i always tried to avoid this-as is kind of *cheat (not simulated event)-but i can't say for sure if i m never going to use it/because sometimes HETMAN's reaction times are very slow (even with Genius(or Brute)+Rush+Berserk+ResetNow parameters)

Last 2 hours i tried (and succeeded) to move RydHQ_Obj1 trigger on a marker that follows continuously the player's group //every time they are gets spotted by an enemy unit.Still testing tho...

Share this post


Link to post
Share on other sites

You may try:

RydHQ_Obj1 attachTo [player, [0, 0, 0]]; 

and analogously for other triggers/units. This way you should get objective (decoy) "pinned" to the player without need of constant position update. But this will be active no matter, if player/unit is known or unknown. Not tested.

Share this post


Link to post
Share on other sites

OK, seems to be pickup when players are named with LeaderHQx, now is there a way to disable task giving to them?

Share this post


Link to post
Share on other sites

If players are named LeaderHQ(x), then they're Leaders and shouldn't get any tasks.

In other case - put their group names into RydHQ_ExcludedG = []; array to exclude them from HAL control (no tasks) or use one of limited control modes for Leader and do not include their groups (for "how to" and much more study manual).

Share this post


Link to post
Share on other sites

Still giving me objectives... Odd... Especially if you say it shouldn't happen.

Edit : Did figure it out somehow...

Had to use this on top of what you told me.

RydHQD_SubAll = false;

RydHQD_SubSynchro = false;

RydHQE_SubAll = false;

RydHQE_SubSynchro = false;

RydHQF_SubAll = false;

RydHQF_SubSynchro = false;

RydHQG_SubAll = false;

RydHQG_SubSynchro = false;

Share this post


Link to post
Share on other sites

Hi. Iv started using HETMAN - Artificial Leader and it is fantastic. Im having some difficulties with with garrison and defence. Not sure if I am using the commands correctly. So I have created a script in the mission folder, which is activated as soon as mission starts. Im trying to make six small groups defend and garrison a small cluster of buildings and the command group is present here also. I have placed all for 'objective triggers' on this building cluster. But the groups dont garrison any of the buildings, instead they spread out in a radius of 500m or so in a defensive formation (admittedly a pretty good idea, but not what im looking for). Below is the script I am using along with .pbo version of the addon. Looking at some earlier posts, I can see that defence positioning variable can be edited in .sqf files. How do I edit these in the .pbo version of the addon? (this is the only way I could download from steam).

RydHQ_Debug = true;

RydHQ_Activity = 0.5;

RydHQ_Fineness = 0;

RydHQ_Order = "Defend";

RydHQ_Garrison = [g1,g2,g3,g4,g5,g6];

RydHQ_GarrR = 300

RydHQ_NObj = 5;

RydHQ_ROnly = [g1,g2,g3,g4,g5,g6];

Regards,

Rob501t

Edited by rob501st4

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

×