Jump to content
Rydygier

HETMAN - Artificial Commander

For HAC users: What is the maximum number of simultaneously used by you Leaders?  

64 members have voted

  1. 1. For HAC users: What is the maximum number of simultaneously used by you Leaders?

    • Only one
      18
    • Two
      9
    • Three
      15
    • Four of them
      0
    • Five
      6
    • Six
      0
    • Seven
      12
    • All eight!
      1


Recommended Posts

so about 40 Units + 5 vehicles of different types in one group.

Hmm. Never tested HAC with big, custom groups. If mix is "exotic" (not recommended), eg. A chopper grouped with the tank and sniper, then HAC will consider such group as simultanously sniper, armor and air capable (quite rightly isn't :) ). Now you can imagine problems, when HAC will send such "mix" with, eg air attack mission... But this is BTW. Generally HAC will consider given group as of each type of its units. So if group consist infantry, AT infantry, AA infantry, a tank and humvee, this "mixed group" will be considered as : infantry, at infantry, aa infantry, armored and motorized group. So any task considered by HAC as proper for any of this types may be issued to that group. Or should. One thing: HAC uses some special ways of distinction type of group based on assumption, that there are set default group types. So if this is complex, custom group, HAC may sometimes misunderstand kind of such group. Not sure, but possible sometimes. For example - a MTVR truck should be considered as non-combat cargo and not used in fight, right? And a rifleman should be considered as infantry, and his group used in fight, yes? Not so simply, cause truck is driven by rifleman, no crewman... So additional distinction is needed here, based on eg number of riflemen in group and their role in vehicle, to distinct empty truck with driver from truck full of troops. Anyway, if possible, I recommend rather to use eg . 5 groups of 5 men, each with vehicle, than one group of 25 men with 5 vehicles.

If things will go, as are going now, shortly should be ready wip5 with partially deeply redesigned code, some problems removed and most of "to do" features implemented. There is good progress in big boss too, so next should be official new version release.

Share this post


Link to post
Share on other sites

So, here is wip5 version. This one should be the last of wips. Includes all features from “To Do†list with several tweaks and fixes, excluding Big Boss, which is currently “work in progress†(and there is progress in work :) ), guerilla mode, which will wait for next version, and new manual content. When BB and manual will be ready – should be officially release next HAC version, probably with beta status however.

In wip5 we have large amount of reworked and new code, co there is good chance for brand new bugs as well, so meanwhile I’ll be grateful for tests and bug reporting (including RPT, if any errors here, info about other addons/mods/DLCs in use, and perhaps even repro mission, if reasonable).

NOTE: this is first version not compatible with Arma 2 1.11 alone. Needs 1.60 or better because of some commands introduced with OA/CO, that I was forced to use for fix of some problems.

Probably not complete list of changes:

- NEW: cyclical comparing forces routine during fight and withdrawing when to big enemy advantage;

Added new value for each group – a “danger factor†based on number of nearby known enemy and ally units and distances. If factor become big enough, there is a chance for withdrawal in same manner, as is for combat ineffective units (towards same area regardless of distance);

- NEW: for impatient: init config variable RydHQ_Rush (default: false). If true, in any circumstancies, when groups are usually moving slowly (limited speed or safe behavior), speed is set to normal, and behavior to aware. No longer very looong walks if not desired;

- IMPROVED: deeply reworked code for defensive stance. Now you can set line of defense of chosen kind including “in siege†like round defense. To achieve that set objective objects in places, that should become a defense centers along with Leader’s position. Next you need to use some new init variables for initialization, and customization:

RydHQ_Order = "DEFEND";

(to keep Leader in defence mode)

RydHQ_DefendObjectives = 4;

(default 4. Must be greater, than 0 for activation of new defense pattern. Integer value tells HAC, when should use given objective position as defense center. This number means, how many of groups on map must be placed closest to this objective for that. Each group will take position in the area of closest objective, so this prevents situations, where eg. only one or too few for efficient defense groups is placed in given area, what is not reasonable. Unless you set this value to 1 of course.)

RydHQ_NObj = 5;

(so Leader will consider all objectives as taken. Only taken objectives will be used for this defense pattern. If you set this 1, none will be used, for value 2 – first of them and so on. This is internal global variable used in offensive mode to control, which objectives are taken, and which aren't yet. So should be not manualy defined in offensive mode)

RydHQ_DefFrontL = ["N","E"];

RydHQ_DefFront1 = ["N","W"];

RydHQ_DefFront2 = ["W",""];

RydHQ_DefFront3 = ["S",""];

RydHQ_DefFront4 = ["E",""];

(these are optional. If defined, as array of two strings, will force given direction of defence perimeter (in which direction is front of Leader’s point and each of four objective points perimeter). Rules: first string may be one of: N, S, W, E. This is “primary directionâ€. For N and S you can set secondary direction: E or W if needed. Otherwise put there an empty string. If not defined, direction towards last known enemy positions will be chosen. If there is no known enemy positions – direction will be randomized for each defense point separately).

Once taken defensive positions will be keeped as long, as there is defensive mode on, no longer chaos generating reshuffles after reset.

Also there is used new reinforcement support in defensive mode, based on mentioned “danger factorâ€. It is dynamic, so reinforcements can be every minute redirected on the fly, if needed more somewhere else, but if group is already sent – there will be usually needed more serious threat for redirection, than reason of initial reinforce order. As most important threat will be considered usually known enemy closer to Leader, than average distance of all allied groups is (enemy on flanks!).

Now also in defensive mode will be used smoke grenades, also 40mm for withdrawal consealing, and, new, artillery smoke screen. After sunset and before sunrise defending groups will use both 40mm flares (not so efficient though because shooters has tendency to shoot flare with too low trajectory, so often it will lamp area only for few seconds) or, optionally, will call for arty illumination if will know about enemy close enough. For “night detection†there is used small piece of code found in TPW’s charming lights addon, originally made by Carl Gustaffa.

- IMPROVED: well… slightly – withdrawal goes now sometimes a bit better, also because arty smoke (not so great, as is usually too quick dispersed). AllowFleeing not helped. Will test this further while working on guerilla mode.

- IMPROVED: old, broken surrendering behavior replaced with new code, bounded with panic system, that gives chance for surrender each group separatelly. It is untested and experimental, so RydHQ_Surr is still false by default. Probably captives still will be shot on sight :(.

- NEW: as mentioned – decided to implement own HAC’s artillery handling. HE/SADARM will be still handled externally, but usage of smoke and illumination, as it needs strict coordination dependent on certain situation, is now optionally moved into Leader’s control. It is based on artillery module, and needs only vanilla howitzers (smoke, illum) or mortars (illum) on map, where each group consist only one kind of arty piece. This, I hope, will not interrupt work of external AI artillery handler. To activate define with value greater, than 0, this init variable:

RydHQ_ArtyShells = 120;

(default 120 – amount of shells of both types available per battery (arty group)). Smoke, in mentioned situations, will be placed by 9 shells, that should to envelope withdrawing group, between that group and nearest known enemy, with some randomization and dispersion. 3 shells on left, 3 on right, 3 in middle. Illum fire mission means single shell deployed above closest known enemy position);

- NEW: morale drop (-10 – (random 10)) when current Leader unit dies;

- NEW: additional pause (60 + (random 60) seconds) before next cycle, if new Leader is replacing killed previous one;

- NEW: distinction between aerial and land medevac vehicles for choosing apriopriate kind depending on distance and kind of wound;

- NEW: in debug mode silent hint info about Leader's staff death (when HAC's control ends);

- IMPROVED: HAC uses now placed temporarily “laser target†object to convince bombers (planes of types included in RHQ_BAir, by default none of the planes are used as bombers) to use their bombs. Not always, but often this works;

- IMPROVED: new garrison handling. Each garrisoned group will: to fill up static defenses, to take positions in enterable buildings. Rest (at least team leader) will patrol area including building’s interior checks (route is randomized once, initially). This feature comes with one init variable:

RydHQ_GarrVehAb = true;

(false by default). If true, garrisoned groups with assigned vehicle will disembark and act as not motorized (crew stays at the vehicle). Otherwise garrisoned groups with vehicle will only get sentry waypoint at its current position.

- reworked architecture of main attack decision-making code, introduced numerous functions, reduced redundancy, fixed some small issues and code problems. Fixed problem with emptied enemy vehicles, that was considered as enemy during objective state checks (was blocking objective capturing). Now empty vehicles are not counted.

PS. There is message about missing "surr.sqf". (that's why changes after last tests aren't good idea). You can just ignore it, or go to VarInit.sqf and comment out or remove 70 line.

Edited by Rydygier

Share this post


Link to post
Share on other sites
Sounds great, been using it for a bit. So far in two different missions I have gotten "Script RYD_HAC\Surr.sqf not found"

Yep. I deleted no longer necessary surr.sqf, and forgot remove it's compiling&preprocessing from VarInit.sqf (line 70). This is harmless, so can be ignored, anyway, HAC's files are uploaded again, fixed, link in first post is updated.

Share this post


Link to post
Share on other sites

Cheers, Ryd :)

Looking forward to trying this out, but work is a bit manic at the moment :(

Share this post


Link to post
Share on other sites

Hi Rydygier,

Re: HAC 1.11wip5

Not sure if this is can also be ignored - Script topics.bikb not found

Also i get this script error:

Error in expression <G;

_x setvariable ["NearE",_danger];
}
foreach (RydHQ_Friends - RydHQ_AirG);s>Error position: <foreach (RydHQ_Friends - RydHQ_AirG);s>Error foreach: Type Number, expected Array

This possibly because im using RHS replacement pack, but i dont get it when using HAC_Simple_demo_Utes, but when i merge that mission onto another map (Chernarus) i get it.

It doesnt seem to break anything? mission runs smooth.

Share this post


Link to post
Share on other sites

Thanks, will check this. What is exactly doing RHS? (checked, looks like just unit/vehicle addon? If so, shouldn't interfere) Which version (addon/script) and which leaders was used, when topics.bikb error occured (this will break tasks for human-controlled TLs, not sure, if will make all script not working)? If you want to help me more: can you run again mission, where cited code error occurs, but to add at end of mission's init.sqf below diagnostic code (I'll do same, but not sure, if will be able to reproduce circumstancies of this error), and, when error occur, paste here yours RPT?:

waituntil {not (isNil "RydHQ_AirG")};

while {(true)} do
{
sleep 10;
diag_log format ["Groups array: %1 friends: %2 air: %3",(RydHQ_Friends - RydHQ_AirG),RydHQ_Friends,RydHQ_AirG];
}; 

Edited by Rydygier

Share this post


Link to post
Share on other sites

Ok, I'll test it properly tomorrow and let you know, RHS is the new russian federation forces from red hammer studios, i am using a replacement mod for them so it's probably that, strange thing is I don't get the error if using your simple demo on utes, but I will test properly tomorrow as I add different units from the mod when I created a new hac mission, I think I just need to create ryd config for them.

Share this post


Link to post
Share on other sites

Thanks again. Will test this also, when finish with today portion of BigBoss code.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Sounds good, looking forward to it, it's great your still working on this awesome mod :)

Share this post


Link to post
Share on other sites

After first tests: bikb file I found on place both in addon and script versions, also paths to them seems to be good. Haven't such error in complex demo also, when using with addon version. For now the only known to me reason of such error may occur, when using script version, but whithout "topics.bikb" in mission's folder (accidentaly removed, or not pasted with rest of scripts).

As for code error - this is part of new enemy scan routine, where new "danger" variable is (re)calculated for each group every 60 seconds. I found, that when using HAC with turned off debug, errors because of undefined yet some global variables may occur at first cycle. This will be repaired, until then I advice to play with debug. But not sure, if this was a reason of that error. This is something about array of controlled groups. If are used limited control modes, eg via Included array, and in such array is an element, that is not a group name, such error my be produced, but then there will be many errors everywhere. Will test this more.

Share this post


Link to post
Share on other sites

Hmm, i got missing script error using add-on version and simple demo on utes?

Script error: yes that makes sense, I removed the debug option, so script error would happen just as you say, no problem I'll use debug untill repaired, no problem thanks.

Edited by Katipo66

Share this post


Link to post
Share on other sites

OK. I was able to reproduce bikb error too. It appears when I'm subordinate TL at the moment of getting orders and only for addon version, what makes sense because of different paths for addon. I must investigate this. BTW noted also, that marker text in debug must be corrected - for all leaders shows "A". Thank you for valuable help! :)

EDIT: uploaded hotfixed version without all three mentioned today problems (I hope). Link in first post updated.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Is the optional flare system on by default? If not, what is the init setting?

Edited by Lucidity

Share this post


Link to post
Share on other sites

Ah yes, I forgot. It is optional, active by default. Init variable to turn this on/off: RydHQ_Flare = (true/false); this one can be (de)activated any moment. BTW now RydHQ_Smoke is controlling also arty smoke missions, not only smoke grenade usage. As for things, that I forgot - there is new marker in debug, that probably will be removed in final release. A green dot with number at each group's leader position. Number indicates for testing purposes newly added danger factor. If high enough, also marker color should be changed (orange/red).

Edited by Rydygier

Share this post


Link to post
Share on other sites
EDIT: uploaded hotfixed version without all three mentioned today problems (I hope). Link in first post updated.

Tested, No errors of course! thanks :)

Share this post


Link to post
Share on other sites

Has anyone tried the script version with Iron Front yet?

Share this post


Link to post
Share on other sites

Do we still need a custom config init for OA units or did you integrate those?

Share this post


Link to post
Share on other sites

Custom config for OA still needed. Such integration is simply time-consuming and not so important, as other things (because RHQ arrays are ready, usage is a question of simply copy&paste). Do not know, if I'll do this at all, if so, then as one of last things. Time isn't an only factor here BTW. The bigger default class arrays, the heavier code, as each cycle HAC must many times to search through each of this arrays. So also because of effectiveness, additional classes should be added only when really needed for given mission, and amongst other reasons that's why there are external RHQ arrays used.

Share this post


Link to post
Share on other sites

When using custom configs, can i place classnames for different factions in the one place?

For example if i want to include just one tank or vehicle from a mod or have a mixture of units from different mods mixed in with default A2 units can i just simply add them to the config like this

RHQ_HArmor = ["customblufortank","customopfortank","customresistancetank"];

I believe that is correct but just want to double check.

Share this post


Link to post
Share on other sites

Yes, each RHQ is for given type of classes regardless of its native faction or side, so eg tanks of all factions/sides goes into same RHQ_HArmor array.

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

×