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

Just finished another game with HAC, what a fantastic atmostmphere it creates.

Rydygier, i find AI facinating so should you want some one to do a little testing i will be more than happy give a hand.

Share this post


Link to post
Share on other sites

@Mjolnir66

Yes, I think, such code is good or even optimal idea. Real tactics is also very good idea, if not quite as sophisticated HAC algorithm will be able to reproduce them properly.

@Taro8

To make certain groups untouchable by HAC you may use RydHQ_Excuded arrays and make they empty under certain circumstations, then, after action, re-exclude those units. But every group will keep it's last position after fight as tactical reserve. Will think, if optional returning on start positions, like recon units and choppers do, is worth introducing. Yours comments on logistical support tactics are valuable. I'll see if I can make it.

---------- Post added at 14:26 ---------- Previous post was at 14:19 ----------

Just finished another game with HAC, what a fantastic atmostmphere it creates.

Rydygier, i find AI facinating so should you want some one to do a little testing i will be more than happy give a hand.

In fact HAC algorithm isn't so sophisticated, as you think, but I agree, effect is rewarding. Testers and bughunters are always welcome. :)

Share this post


Link to post
Share on other sites
@Mjolnir66

Yes, I think, such code is good or even optimal idea. Real tactics is also very good idea, if not quite as sophisticated HAC algorithm will be able to reproduce them properly.

It doesn't have to do it properly, just a basic simulation of them. So you could have an extra variable to choose wether the AI is using blufor tactics where men are more important than the objective and so will reinforce and support units which need help and are under threat of destruction, or to use redfor tactics whereby the objective is most important and so the units which are pushing forward the most, no matter what opposition they are facing, will be the ones the reserves and airstrikes will be directed to.

Possibly even change some of the defensive tactics too, but then I haven't had much chance to look at them yet.

To make certain groups untouchable by HAC you may use RydHQ_Excuded arrays and make they empty under certain circumstations, then, after action, re-exclude those units. But every group will keep it's last position after fight as tactical reserve. Will think, if optional returning on start positions, like recon units and choppers do, is worth introducing. Yours comments on logistical support tactics are valuable. I'll see if I can make it.

If you change RydHQ_Excuded during the game, will the commander loose/gain the units or does it just check it once at the beginning?

Share this post


Link to post
Share on other sites
If you change RydHQ_Excuded during the game, will the commander loose/gain the units or does it just check it once at the beginning?

Info about excluded array is refreshed every cycle, so you can change this variable during the game, or set it empty, you should't only remove this (and any other) variable with "nil". However HAC does not remove waypoints already (earlier) assigned to just (during the game) excluded units.

Share this post


Link to post
Share on other sites
Info about excluded array is refreshed every cycle, so you can change this variable during the game, or set it empty, you should't only remove this (and any other) variable with "nil". However HAC does not remove waypoints already (earlier) assigned to just (during the game) excluded units.

So for example if I wanted to stop a commander giving orders to a unit, I'd have to remove it from the script and then delete any waypoints manually?

Share this post


Link to post
Share on other sites

About logistic: Im not saying that HAC should make any changes other then waypoints. Im pretty sure AI either vanilla, or improved via mods, will be able to use nearby support vehicles by themselves. Even if they dont, HAC moving support vehicles still would be great, as player can still make use of them.

Also it would be better if logistic would be under HAC control. After all this addons beauty lies in fact that you can just drop some units in editor and enjoy the war.

Share this post


Link to post
Share on other sites

About defensive HAC tactics...

In the first is determined a central point and direction of defense perimeter. HAC tries to put the defenders between the commander and the front of known enemy units or their last stored position (the last 100 positions are memorized). If enemy is too close to the commander or in the event, if the commander does not know the location of any enemy, his position becomes the center of perimeter. If do not see the enemy perimeter direction is randomized. HAC then scans surroundings in search of points of a good field of view in the direction of the enemy. Some of these positions occupy scouts and snipers. Positions for the rest of the units may be selected in two ways: either by "selectBestPalces" units are placed per type in a favorable ground or are placed in ambush on the reverse slope, wait for attackers to attack them from near and sides, by surprise. Aerial units will (re)direct to provide cover from above.

---------- Post added at 15:28 ---------- Previous post was at 15:25 ----------

So for example if I wanted to stop a commander giving orders to a unit, I'd have to remove it from the script and then delete any waypoints manually?

Yes. It may become easier in next verison, if I will manage to add a code for deleting waypoints for such units.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Does the AI do counter attacks on the defensive then? Also what about mutual support?

Share this post


Link to post
Share on other sites

@Mjolnir66

Currently land units on defensive positions are rather static (may be relocated after some time, and will normally move in combat, they receive "sentry" waypoint), but positions are usually located fairly close together. It is also possible to automatically switch back to attack mode (unless a defensive mode was set manually). I will think over more dynamic defense.

Share this post


Link to post
Share on other sites

Also, does the commander still take input from the groups in the excluded list? If it doesn't might be an idea to add an option so that it does, in case someone wants something like a scripted/player led recon to affect the judgement of the commander.

Share this post


Link to post
Share on other sites

Currently doesn't, but it is good idea and probably easy to implement.

Share this post


Link to post
Share on other sites

I did some testing and I found out that if lots of units are crammed into small area units with vehicles wont board them and will just follow them. However Im pretty sure its Arma 2 AI fault due to close proximity of other units.

Units under HAC DO BOARD THEIR VEHICLES! (and use them pretty well too) I tested this out and it worked out surprisingly well. I must say that Arma 2 AI is really amazing and improved via mods create some really awesome situations.

BTW: Thanks to HAC I had one of the most authentic experience of war! I was assigned to reserve and sat on my butt doing nothing, then was ordered to board AAV, it fared my team around map then stopped and we were, again, waiting for something, anything to happen.

Thanks Rydygier! :D

Edited by Taro8

Share this post


Link to post
Share on other sites

I downloaded it and test it today.Time of the post says it all.

Excellent job!Thanks for sharing.

Edited by Neopas
typo

Share this post


Link to post
Share on other sites

First off Merry Christmas. I had an idea. Not sure if it would be hard to implement with what you already have, and its just a thought. Maybe if possible use synchronize with the leaderHQ to tell that leader which units he controls... Then we can of an order of battle and a more in dept command structure. Maybe if that's possible and not extremly difficult. Sounds complicated though :/

Let me tell you how good this is. I make mission's. But they lack realism. I rarely play them through, nor release them cuase of lack realism. Ive played through my newest one 4 times now and may even finally release my 1st mission. :D Thanks Rydygier

p.s. I use this in my support script for High command:

player hcSetGroup [infgrp];

not sure if something like this will help. :/

Edited by Mikey74

Share this post


Link to post
Share on other sites

Merry Christmas.

Synchronize... Interesting. With this command: synchronizedObjects it can be a very promising solution. Thanks, will see.

Share this post


Link to post
Share on other sites

I did some testing on AI regarding transport and vehicles and here is what I came up with: AI is pretty good in using all land vehicles as long as they are in their group. Air vehicles are however rather wonky with infantry boarding and disembarking the chopper all the time.

Here is my idea: add 2 new categories: transport (trucks, HUMMVE's etc.) and air_transport (Venoms, Blackhawks). If HAC has infantry group and truck (both separate groups) then HAC would tell infantry to board that truck, then truck would get order to drop infantry around frontline then return to base to carry more soldiers if needed. Choppers would drop their cargo behind enemy lines most of the time.

However there are 2 problems:

1. Transport and cargo waypoints need to be synchronized

2. Cargo group size needs to taken into account. A rifleman squad (13?) can be stuffed into one Blackhawk, but if you have 2 Venoms (in group) only part of squad will board leader chopper with rest remaining on the ground.

HAC would need to check how many passengers transport can carry and only put inside group that is smaller or same as max number of passengers.

EDIT: Some more ideas

*New attribute for commander: Stealth. It would describe how sneaky that commander is. He would hide and move his units in woods, set up ambushes and use guerrilla warfare: quick ambush followed by hold fire+fast move away from the enemy. Using UPSMON ambush (with mines and everything) behavior would be nice.

*If HAC dosent have much to do it should try to secure nearby cities, also occupy them if it has units to spare.

*Merging with Fire at will script would be great. Also HAC should use reserve scout units by sending them to high ground so they can direct artillery fire.

EDIT 2:

*Units in combat are very unwilling to break the contact. When retreating them HAC should give them combination of: full speed, hold fire and careless. This should get them moving

*HAC waypoints show up in cadet mode if you are part of AI commanded squad.

Edited by Taro8

Share this post


Link to post
Share on other sites

I made a CWR2 config, see below.

RHQ_Recon = ["cwr2_SoldierW_Sniper","cwr2_SoldierW_Marksman","cwr2_SoldierE_Sniper","cwr2_SoldierE_Marksman"];  
RHQ_Snipers = ["cwr2_SoldierW_Sniper","cwr2_SoldierW_Marksman","cwr2_SoldierE_Sniper","cwr2_SoldierE_Marksman"];  
RHQ_ATInf = ["cwr2_SoldierE_LAT","cwr2_SoldierE_AT","cwr2_SoldierW_AT","cwr2_SoldierW_LAT"];  
RHQ_AAInf = ["cwr2_SoldierW_AA","cwr2_SoldierE_AA"];  
RHQ_Inf = ["cwr2_SpetsnazBizon","cwr2_Spetsnaz","cwr2_CaptiveE","cwr2_SoldierEFakeW","cwr2_SoldierE_Mortar","cwr2_SoldierE","cwr2_SoldierW_PilotHG","cwr2_SoldierW_Pilot","cwr2_SoldierWFakeE","cwr2_OfficerW_Night","cwr2_OfficerW","cwr2_SoldierW_Medic","cwr2_MechanicW","cwr2_SoldierW_MG","cwr2_SoldierW_HG","cwr2_SoldierW_GL","cwr2_SoldierW_Engineer","cwr2_SoldierW_Crew","cwr2_BlackOp_XMS","cwr2_BlackOp_Laser","cwr2_BlackOp_Day","cwr2_BlackOp","cwr2_SoldierW_AR","cwr2_OfficerE","cwr2_SoldierE_Medic","cwr2_MechanicE","cwr2_SoldierE_MG","cwr2_SoldierE_AR","cwr2_SoldierW_AA","cwr2_SoldierE_AA","cwr2_SoldierE_LAT","cwr2_SoldierW_AT","cwr2_SoldierW_LAT","cwr2_SoldierE_AT","cwr2_SoldierE_PilotHG","cwr2_SoldierE_Pilot","cwr2_OfficerE_Night","cwr2_SoldierE_HG","cwr2_SoldierE_GL","cwr2_SoldierE_Engineer","cwr2_SoldierE_Crew","cwr2_BlackOp_UZI","cwr2_SoldierW","cwr2_SoldierW_G36","cwr2_SoldierW_Mortar","cwr2_SoldierW_Steyr","cwr2_SoldierW_XMS","cwr2_CaptiveW"];  
RHQ_HArmor = ["cwr2_T72","cwr2_T80","cwr2_M60A3","cwr2_M1A1"];  
RHQ_LArmor = ["cwr2_M113A3","cwr2_ZSU","cwr2_BMP2_HQ","cwr2_BMP2","cwr2_bmp1","cwr2_M113_HQ","cwr2_M113","cwr2_M163"];  
RHQ_LarmorAT = ["cwr2_BMP2","cwr2_BMP2"];  
RHQ_Cars = ["cwr2_Truck5t_Open","cwr2_Truck5t","cwr2_Truck5tRepair","cwr2_Truck5tReammo","cwr2_Ural4320","cwr2_UralOpen","cwr2_Ural","cwr2_UralReammo","cwr2_UralRepair","cwr2_UralRefuel","cwr2_UAZ_MG","cwr2_uaz","cwr2_HMMWV","cwr2_Truck5tRefuel"];  
RHQ_Air = ["cwr2_Su25","cwr2_UH60MG","cwr2_UH60","cwr2_AH64C","cwr2_AH1F","cwr2_A10LGB","cwr2_A10","cwr2_Mi17","cwr2_Mi24D"];  
RHQ_Cargo = ["cwr2_Mi17","cwr2_Mi24D","cwr2_UH60MG","cwr2_UH60","cwr2_Truck5t_Open","cwr2_Truck5t","cwr2_Ural4320","cwr2_UralOpen","cwr2_Ural","cwr2_UAZ_MG","cwr2_uaz","cwr2_HMMWV","cwr2_BMP2_HQ","cwr2_BMP2","cwr2_M113A3","cwr2_M113","cwr2_M113_HQ","cwr2_BMP2_HQ"];  
RHQ_NCCargo = ["cwr2_Mi17","cwr2_Mi24D","cwr2_UH60MG","cwr2_UH60","cwr2_Truck5t_Open","cwr2_Truck5t","cwr2_Ural4320","cwr2_UralOpen","cwr2_Ural","cwr2_UAZ_MG","cwr2_uaz","cwr2_HMMWV"];  
RHQ_Crew = ["cwr2_SoldierW_Pilot","cwr2_SoldierE_Crew","cwr2_SoldierE_Pilot","cwr2_SoldierE_PilotHG","cwr2_SoldierW_Crew"];

RHQB_Recon = ["cwr2_SoldierW_Sniper","cwr2_SoldierW_Marksman","cwr2_SoldierE_Sniper","cwr2_SoldierE_Marksman"];  
RHQB_Snipers = ["cwr2_SoldierW_Sniper","cwr2_SoldierW_Marksman","cwr2_SoldierE_Sniper","cwr2_SoldierE_Marksman"];  
RHQB_ATInf = ["cwr2_SoldierE_LAT","cwr2_SoldierE_AT","cwr2_SoldierW_AT","cwr2_SoldierW_LAT"];  
RHQB_AAInf = ["cwr2_SoldierW_AA","cwr2_SoldierE_AA"];  
RHQB_Inf = ["cwr2_SpetsnazBizon","cwr2_Spetsnaz","cwr2_CaptiveE","cwr2_SoldierEFakeW","cwr2_SoldierE_Mortar","cwr2_SoldierE","cwr2_SoldierW_PilotHG","cwr2_SoldierW_Pilot","cwr2_SoldierWFakeE","cwr2_OfficerW_Night","cwr2_OfficerW","cwr2_SoldierW_Medic","cwr2_MechanicW","cwr2_SoldierW_MG","cwr2_SoldierW_HG","cwr2_SoldierW_GL","cwr2_SoldierW_Engineer","cwr2_SoldierW_Crew","cwr2_BlackOp_XMS","cwr2_BlackOp_Laser","cwr2_BlackOp_Day","cwr2_BlackOp","cwr2_SoldierW_AR","cwr2_OfficerE","cwr2_SoldierE_Medic","cwr2_MechanicE","cwr2_SoldierE_MG","cwr2_SoldierE_AR","cwr2_SoldierW_AA","cwr2_SoldierE_AA","cwr2_SoldierE_LAT","cwr2_SoldierW_AT","cwr2_SoldierW_LAT","cwr2_SoldierE_AT","cwr2_SoldierE_PilotHG","cwr2_SoldierE_Pilot","cwr2_OfficerE_Night","cwr2_SoldierE_HG","cwr2_SoldierE_GL","cwr2_SoldierE_Engineer","cwr2_SoldierE_Crew","cwr2_BlackOp_UZI","cwr2_SoldierW","cwr2_SoldierW_G36","cwr2_SoldierW_Mortar","cwr2_SoldierW_Steyr","cwr2_SoldierW_XMS","cwr2_CaptiveW"];  
RHQB_HArmor = ["cwr2_T72","cwr2_T80","cwr2_M60A3","cwr2_M1A1"];  
RHQB_LArmor = ["cwr2_M113A3","cwr2_ZSU","cwr2_BMP2_HQ","cwr2_BMP2","cwr2_bmp1","cwr2_M113_HQ","cwr2_M113","cwr2_M163"];  
RHQB_LarmorAT = ["cwr2_BMP2","cwr2_BMP2"];  
RHQB_Cars = ["cwr2_Truck5t_Open","cwr2_Truck5t","cwr2_Truck5tRepair","cwr2_Truck5tReammo","cwr2_Ural4320","cwr2_UralOpen","cwr2_Ural","cwr2_UralReammo","cwr2_UralRepair","cwr2_UralRefuel","cwr2_UAZ_MG","cwr2_uaz","cwr2_HMMWV","cwr2_Truck5tRefuel"];  
RHQB_Air = ["cwr2_Su25","cwr2_UH60MG","cwr2_UH60","cwr2_AH64C","cwr2_AH1F","cwr2_A10LGB","cwr2_A10","cwr2_Mi17","cwr2_Mi24D"];  
RHQB_Cargo = ["cwr2_Mi17","cwr2_Mi24D","cwr2_UH60MG","cwr2_UH60","cwr2_Truck5t_Open","cwr2_Truck5t","cwr2_Ural4320","cwr2_UralOpen","cwr2_Ural","cwr2_UAZ_MG","cwr2_uaz","cwr2_HMMWV","cwr2_BMP2_HQ","cwr2_BMP2","cwr2_M113A3","cwr2_M113","cwr2_M113_HQ","cwr2_BMP2_HQ"];  
RHQB_NCCargo = ["cwr2_Mi17","cwr2_Mi24D","cwr2_UH60MG","cwr2_UH60","cwr2_Truck5t_Open","cwr2_Truck5t","cwr2_Ural4320","cwr2_UralOpen","cwr2_Ural","cwr2_UAZ_MG","cwr2_uaz","cwr2_HMMWV"];  
RHQB_Crew = ["cwr2_SoldierW_Pilot","cwr2_SoldierE_Crew","cwr2_SoldierE_Pilot","cwr2_SoldierE_PilotHG","cwr2_SoldierW_Crew"];

Edited by Georilla

Share this post


Link to post
Share on other sites
I made a CWR2 config...

Cool, cheers bro :)

Edited by Katipo66

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

RydHQ_Excluded = [LeaderA, LeaderC, LeaderG];

ok now :) is there a way to include them back once they've accomplished a certian task. lol I know there is but is there an easy way. ;) :D

Share this post


Link to post
Share on other sites
RydHQ_Excluded = [LeaderA, LeaderC, LeaderG];

ok now :) is there a way to include them back once they've accomplished a certian task. lol I know there is but is there an easy way. ;) :D

you mean there is a "hard" way? never knew that, mind telling? :)

Share this post


Link to post
Share on other sites

Thanks, Old Bear!

@Mikey74

To include A, C and G again:

RydHQ_Excluded = [];

or to re-include eg only A:

RydHQ_Excluded = [LeaderC, LeaderG]; 

etc.

@Taro8 Thanks for more good ideas. New version of FAW is on the way (elminated some bugs, thanks Taro8 for bughunting :), will be added demo and, I think, new pdf manual), but maybe there is no need to combine both addons into one; now everyone can decide whether to use them together or not, and use them together is trivial.

Edited by Rydygier

Share this post


Link to post
Share on other sites
you mean there is a "hard" way? never knew that, mind telling?
well there is always a hardway to do something easy. :P and easy is
RydHQ_Excluded = []
The hard way idk but Im sure there is a way to code it in there that coulda took me a few months to figure out. lol So :P ;) And thanks again Rydygier.

Share this post


Link to post
Share on other sites

Player dosent get any orders from HAC other then S&D aimed at conquest point.

Maybe HAC should add a task "Complete HQ orders" or something. HAC would treat player as AI group and give him orders. If player wants he can switch to other task (in case some modules like SECOPS are used).

Would it be possible to stop HAC from touching units created by SECOPS module? Completing those tasks requires AI to behave in specific way and HAC would completely break those "quests".

Share this post


Link to post
Share on other sites

@Taro8

Hmm. I just checked - I received orders to reconnaissance as a scout, and "hold" and "capture" as a team leader. I'm not sure what could cause not issuing orders for player in your case... In fact, HAC treats, in any case should treat, a player just like any AI unit except when a player is leaderHQ. In fact, the waypoints are not visible on the map with the exception of first, but are marked in 3D. This may have related to the procedure to remove all waypoints before issuing the order and immediate removal a waypoint at the time of its completion.

SECOPS and HAC in the same mission, is probably not a good idea. Even if I found a way to somehow distinguish between units that are spawned by SECOPS from the rest (at the moment I have no idea). Missions ordered by the module would be often disrupted by the ongoing fight around. Also often would create bizarre, unrealistic situations.

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

×