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

Is there a way to force a squad to use empty truck since taget is far away even though enemy contact is not for another 10 minutes or more?

Can you assign empty trucks to squads so if they want to move they use it?

Group looks for cargo only when got order to go far away, except recon missions. Recon utilizes only grouped vehicles.

I placed enemy in the field of view at the beginning precisely in order to avoid waiting for the result of reconnaissance. In fact, if waiting for command group will afar from the vehicle at too great distance, will do not use this vehicle. It's hard to force them to do so. Although you can assign by separate code given vehicle to the group, but HAC still automatically changes these assignments according to current needs. At the moment I see two options: you can to join to the group vehicle with a driver (and maybe even just then to remove driver by some code, not tested), or exclude a given group until it's time to ride, thanks to which HAC will not slide around this group earlier. Of course you can also set bigger search radius, but there is risk, that another group will "borrow" this vehicle. Hrm. You can also by separate code to teleport chosen vehicle at group's position in chosen moment, but I doubt, that you would like to resolve this in such a way. :)

EDIT2: In fact there are also some... "unofficial" methods to make idle groups stay without any wandering:

1. Use this code in init fied of any member of such group:

(group this) setvariable [("Busy" + (str (group this))),true,true];

but in the proper moment you have to change this variable back to false by a trigger or code ("someunit" is name of unit that belongs to given group):

(group someunit) setvariable [("Busy" + (str (group someunit))),false,true];

if not, they will do almost nothing forever considered by HAC as "busy"...

2. With next alpha (or with scripts from my "empty truck" demo) will come better method:

(group this) setvariable [("Deployed" + (str (group this))),true,true];

This will disable only "idle orders" for given group until next reset (default every 10 minuts, may be changed).

---------- Post added at 10:38 ---------- Previous post was at 10:25 ----------

In fact, I foresee a problem with the whole system, and soon I will have to look at him. The point is that the group that comes into possession of the cargo unit, with the next cycle will also be assigned to the category "Cargo". Although it will not be used for the transport of other groups, as long as someone stays in its cargo space, it is when everyone gets out probably will be considered by the HAC as regular and available transport unit...

EDIT: just added some new conditions. In the next version group will not be assigned as a transport to another group if:

- Its vehicle was taken as empty during the game;

- has its vehicle from the beginning, but belongs to internal category of "non-crew" infantry and has more than one member (because some transport units have a single non-crew driver (eg trucks) and another cargo units have crew with more than one crewman (eg armed choppers), but none default cargo units has crew consisting of more than one non-crewman/pilot soldier).

It isn't perfect, still someone may set at the beginning eg. group consisting of one sniper with a car with empty cargo space, and such single-group still will be considered as available cargo, regardless of mission maker intentions, also some cargo units from user-maded addons may have crew consisting of more than one non-crew infantry...

Edited by Rydygier

Share this post


Link to post
Share on other sites

Here's the MP Dedi version I created as an MSO module.

http://www.2shared.com/file/imBZsXuu/ryd_hac.html

Changes made:

1. renamed the init file to main.sqf for MSO purposes

2. Created a bunch of MP Mission params to configure HAC added them to the main.sqf

3. Removed references to player

4. Updated all debugging to use cba createmarker and cba globalexecute to make it MP compatible.

5. Improved logging to RPT

6. Added isServer check

7. Added some additional checks for the value _Trg in some of the scripts as _Trg was returning null sometimes.

8. Added script to add a leaderHQ (using an MSO function) and RydHQ_Obj dynamically (creates trigger at MSO marker)

This won't work out of the box for people, apologies, its just for information sake.

All in all very simple to get working on MP Dedi really. I did notice that after a while the commander seems to go quiet, hopefully our testing with the newer version of MSO will help clarify that.

Cheers

Tup

Edited by Tupolov

Share this post


Link to post
Share on other sites

Great Tupolov, thanks a lot for this work!

---------- Post added at 11:47 ---------- Previous post was at 11:44 ----------

When I finish 1.1, do you want to include newest version of HAC scripts into this module and, perhaps, let me include MSO module version into my release, or maybe you won't to release this with HAC or prefer to do it separately?

---------- Post added at 11:51 ---------- Previous post was at 11:47 ----------

I did notice that after a while the commander seems to go quiet, hopefully our testing with the newer version of MSO will help clarify that.

I think, this was caused by some forgotten and unnecessary "waituntils" in some of end lines of HQOrders(B).sqf ("objective capturing"), and I cancelled them lately and left only some very short "sleeps" instead. If I think correctly, older HAC version should not to stop with RydHQ_Fast = true and RydHQB_Fast = true;

Edited by Rydygier

Share this post


Link to post
Share on other sites

Rydygier,

We would love to include HAC in MSO. Of course we would ask for your permission before doing so. So please let us know if we can't include it. We will credit you for your scripts.

Similarly, feel free to use whatever part of MSO you wish, we only ask for credit where due.

Let us know when 1.1 is available and I can apply the MP updates (or you can include them).

Cheers

Tup

Share this post


Link to post
Share on other sites

OK. Great. I will inform you. Of course, when it will be finished, it will be fully available for yours module (my permission is and will be given) and, of course, you will be credited in my release.

Will try to take into consieration MP when will to implement new references to player character and try to use "isPlayer" test instead of "if unit == player". This make a difference, I hope?

Edited by Rydygier

Share this post


Link to post
Share on other sites

Rydygier,

Thanks for the great addon. I am having fun with this and looking forward to the new update.

Share this post


Link to post
Share on other sites
OK. Great. I will inform you. Of course, when it will be finished, it will be fully available for yours module (my permission is and will be given) and, of course, you will be credited in my release.

Will try to take into consieration MP when will to implement new references to player character and try to use "isPlayer" test instead of "if unit == player". This make a difference, I hope?

Yes isPlayer is better.

We will be releasing MSO v4.1 shortly - most likely in the next few days. We have included your 1.0 beta 2 code in it and will list it as experimental. When 1.1 is available we will include in MSO v4.2. Is that ok?

Thanks

Tup

Edited by Tupolov

Share this post


Link to post
Share on other sites
We will be releasing MSO v4.1 shortly - most likely today. We have included your 1.0 beta 2 code in it and will list it as experimental. When 1.1 is available we will include in MSO v4.2. Is that ok?

Yes, that is very OK. :)

Share this post


Link to post
Share on other sites

After some testing, transport seems (for me anyway) to best work as you said with trucks with a driver already in. But a new issue comes up, many squads in trucks seem to just drive into enemy groups/tanks without a disembark order. They just sit there in truck waiting to be blown up. Is that because orders are issued only with new cycle?

One of the best mods. Its just the trasnport needs a bit of tweaking.

I saw yesterday in Debug Modemany points with Res on it. I could not find it in manual. What does Res stand for?

Share this post


Link to post
Share on other sites

Demo with an empty truck provides the latest scripts, which soon, I hope, will become third alpha release. Res are markers for idle commands (Patrols and guarding);

Theoretically groups with cargo transport are always unloaded before fight, but only when they reach their target point marked by dot. If such group encounters enemy along the way... Well. Then its behavior will depend on the normal game AI. At the moment I haven't idea, how to implement in HAC improvement of this behavior. Maybe figure out something.

Share this post


Link to post
Share on other sites

Arma AI does pose some challanges. Is it possible to implment a script where if leader sees enemy he orders squad to dissembark?

Edit:

Also a suggestion for next release, have name of squad on marker instead of Infantry A. So instead it would be 1st Squad/2nd Platoon A (what ever squad ID selcted in init field of squad leader). This way if human is playing a squad leader, he can see his new orders on map along withother squads. Just an idea.

Edited by CaptainBravo

Share this post


Link to post
Share on other sites

Yes, such script is possible. Problem is with checking this condition frequent enough, but not too frequent because of lags, inside attack mission script, so for each group separatelly. Hmm. I think, this is possible. Thanks.

This way if human is playing a squad leader, he can see his new orders on map along withother squads. Just an idea.

And this is good idea. Thanks again. I think, that would looks like this: If group is led by AI, only in debug mode marker will appear, and will contain present text. Markers for groups led by human will appear even without debug mode and will contain group name.

Edited by Rydygier

Share this post


Link to post
Share on other sites
Yes, such script is possible. Problem is with checking this condition frequent enough, but not too frequent because of lags, inside attack mission script, so for each group separatelly. Hmm. I think, this is possible. Thanks.

And this is good idea. Thanks again. I think, that would looks like this: If group is led by AI, only in debug mode marker will appear, and will contain present text. Markers for groups led by human will appear even without debug mode and will contain group name.

This is looking better & better :) (& although I don't play MP, the tie-up with MSO is one more example of why this community is outstanding)/

Heavy workload this week so I don't really have time to play around with my HAC+DAC missions. Is there some testing I might do with any of the more recent releases?

BTW, what happens with transport if a group is already loaded into a truck or APC when the game starts (i.e., before HAC initialises)?

Cheers

Orcinus

Share this post


Link to post
Share on other sites
Is there some testing I might do with any of the more recent releases?

Soon should be ready alpha 3 I hope. Third day struggling with the dynamic defense and I'm close to the conclusion that I did it as best I could. What not to say that I am completely satisfied with the effect...

BTW, what happens with transport if a group is already loaded into a truck or APC when the game starts (i.e., before HAC initialises)?

If there is any passanger in cargo space of given transport unit, it will be not considered as available cargo for other groups. Of course group already loaded into vehicle will utilize this vehicle, unless is not assigned to it, but then they should just disembark.

Share this post


Link to post
Share on other sites
Soon should be ready alpha 3 I hope. Third day struggling with the dynamic defense and I'm close to the conclusion that I did it as best I could. What not to say that I am completely satisfied with the effect...

Looking forward to trying out the new version.

If there is any passanger in cargo space of given transport unit, it will be not considered as available cargo for other groups. Of course group already loaded into vehicle will utilize this vehicle, unless is not assigned to it, but then they should just disembark.

Hmm... a mission designer might want to avoid all the troops having long route-marches; would setting a vehicle and the loaded group as excluded for an appropriate period (i.e. according to estimates of how long it would take the scouts to locate the enemy) before releasing it to HAC make a difference?

BR

Orcinus

Share this post


Link to post
Share on other sites

Can i ask what's the longest anyone has run this for?

I've been testing on MSO and the debugging markers stop at around 10-15 min mark. I have left it running for about 8 hours without any change.

I know the HQReset is around 10mins, just wondering if in fact this is stopping things from happening.

Alternatively, I'm concerned that certain conditions have HETMAN stuck in a loop. There are no errors in the logs to suggest any script is having issues.

With MSO I have 50 OPFOR groups and 416 units (generated by MSO enemy pop) spread across the whole map. No OPFOR are within 2km of the BLUFOR base to start with. The commander is set to GENIUS and ATTACK with the BLUFOR base as the objective. I get from 2-5 "cycles" of orders then things appear to just stop, no more debug markers or logging.

There are about 30 or so BLUFOR AI and 1 player at the BLUFOR base.

Cheers,

Tup

Edited by Tupolov

Share this post


Link to post
Share on other sites

I still find it easier to just use transport groups, or group transport to squads... The behavior is better, they disembark/re-embark during contact etc.

Why force them to go looking for transport when you can just give it to them?

@Tup

I believe ive gone over 40min, I once left it running with respawn options for testing for a couple of hours and although most respawned units were idle there was still some movement on the map (debug) that's just using HAC out of the box so to speak.

Edited by Katipo66

Share this post


Link to post
Share on other sites
Can i ask what's the longest anyone has run this for?

I've been testing on MSO and the debugging markers stop at around 10-15 min mark. I have left it running for about 8 hours without any change.

I know the HQReset is around 10mins, just wondering if in fact this is stopping things from happening.

Alternatively, I'm concerned that certain conditions have HETMAN stuck in a loop. There are no errors in the logs to suggest any script is having issues.

With MSO I have 50 OPFOR groups and 416 units (generated by MSO enemy pop) spread across the whole map. No OPFOR are within 2km of the BLUFOR base to start with. The commander is set to GENIUS and ATTACK with the BLUFOR base as the objective. I get from 2-5 "cycles" of orders then things appear to just stop, no more debug markers or logging.

There are about 30 or so BLUFOR AI and 1 player at the BLUFOR base.

Cheers,

Tup

If this was with 1.0 beta2, cause is probably infamous "waituntils" in HQOrders. If I'm not mistaken, this is only opportunity in this code to stuck without errors (they waits for certain "getvariable" value from executed sub-scripts, but for some reason this variables not always are set properly. It is only theory however). In later alphas I kicked them out. Maybe try to test with included in init config RydHQ_Fast = true and RydHQB_Fast = true if B side is also present.

EDIT: In your version I see three probably troublemaking waituntils in "capture objective" part (it fits - it may to take about 10-15 minuts before this lines will be executed first time). Removed from lines:

1591,1610,1629.

I hope, this will help.

HAC module corrected

If not, maybe this "fast" config do.

---------- Post added at 21:08 ---------- Previous post was at 20:03 ----------

Small clarification: if "fast" mode is not enabled, HAC is waiting with the next cycle until variable RydHQ_Done (and RydHQB_Done, if B side is present) receives value "true", which means end of current cycle. This is happening in the last line of HQOrders.sqf. If script gets stuck somewhere before (earlier in HQOrders.sqf or somewhere in HQSitRep.sqf before HQOrders is executed), RydHQ_Done never become a "true". In "fast" mode a new cycle does not wait for the end of the previous cycle.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Rydygier I had a question. I know that you are planning on a new release with your recent changes but I was wondering if you could add another personality at some point, one that simply sends all units to attack waypoints at once without holding any back or putting them on defense. Like an all out attack mode. This may seem odd but I think it would be good for two different uses,

1) being that some people are impatient and want to jump right into action, now they have that choice

2) it would allow testers be able to determine different things like whether or not a unit falls under HAC command or if/how they respond to new additions (like search for transport)

Just a thought and I know you are busy, I thought it was something people could use and it might help. A lot of times I have been finding myself using "brute" and "eager" to send as many units forward as possible to determine how they react/what they do and if they are units from a mod if they are counted under HAC control. I know the newest beta might ultimately solve that last problem but either way this would still be helpful to have.

Unless there is a way to edit it through the activity option? I noticed that most are set to 1 and I assumed that was the highest value possible, so increasing it would do nothing. If I am wrong please correct me :) Keep up the great work!

Share this post


Link to post
Share on other sites

@stupidwhitekid75

Such mode will be difficult to implement, because currently used personalities are based only on attributes, and this is not enough, if you want to break any limitation and just send all units forward. In fact such thing is impossible without some fundamental changes in code. But maybe it is not necessary:

In fact you can set attributes above 1 (and below 0 too). Never tried, effects may be... unpredictable. Good method to make quick action is setting some groups of both sides in sight of the enemy. If enemy is known at the beginning, recon stage is skipped. I do so in my own tests. Also of course, the closer to each other both sides armies are standing, the faster you get an intense battle. "EAGER" is probably best for this purpose. High activity, reflex and reclessness and low fineness.

Share this post


Link to post
Share on other sites

A quick observation: although commanders are on HOLD sometimes they will go out of thier protective base 20-30 meters half way through the mission and get killed. I have found using dostop command and set speed to 0 fixes the problem.

As for transport, maybe have squads assigned to trucks and once a squad is ready to move to next wp, they get in and drive and dissembard safely 200 meters from destination always leaving the driver in the truck behind (stop order)and when they are ready to proceed to next way point, driver comes to pick up rest of squad and repeat. This will solve the issue of them being setting ducks for enemy and help with transport without worry about find findcargo distamce limitation. Of course assuming that is easy to script ..

Keep up the good work.

Edited by CaptainBravo

Share this post


Link to post
Share on other sites

Currently cargo unit will disembark group in half-way if nearby destination point is KNOWN (in moment, when movement order was given, not later) enemy (from this point group will move on foot, cargo will return). Probably I could set disembarking always 200 meters before waypoint (but then cargo will be released and will return to start position), but this will not help, if unknown enemy is located earier nearby route. I think, better will be first idea - disembark order when enemy is sighted and close enough. I suppose, that this may be implemented.

EDIT: In fact I would not interfere with this level of AI, HAC is not without reason in principle focuses on higher-level AI, and avoid digging in the ​​group and unit AI. I would like to preserve the widest possible compatibility with AI mods. I will try to persuade passengers for unloading, when they see the enemy, but nothing more...

Edited by Rydygier

Share this post


Link to post
Share on other sites

Is it possible to leave driver in truck waiting so when squad ready for next wp they have a ride. If cargo goes back they are stuck on foot?

Share this post


Link to post
Share on other sites
Is it possible to leave driver in truck waiting so when squad ready for next wp they have a ride. If cargo goes back they are stuck on foot?

If they will must to go somwhere far away, some cargo will be send again (land cargo will be send if in 1000 meters radius, air in 3000, I can set some larger values, but not too much). For some reasons, assignment external truck permanently to the group is not a good idea. Firstly, having reached the place infantry moves into fight, and then easily transport unit may suffer (forcing it to stand still is to me too much interference in the units AI and do not guarantee safety, and makes impossible retreat if needed because of closing enemy), and secondly and most importantly, if you assign given truck to the group permanently (and so it was in initial version of cargo system), then it does not longer available as a transport for other groups. I had a special request, so I would do not do it that way. In fact, with vehicles assigned to group permanently, I had much, really much less code to implement and cargo script would be far simplier. The first version of the cargo system was created in couple of hours, implementation of present version took me a few days... But protest in this matter I considered as justified.

If someone particularly want that given group had at its disposal a truck all the time, let join chosen vehicle to this group at start, or put some empty trucks nearby.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Rydygier,

The Fast option seemed to work great! Looking forward to v1.1. Let me know if you need a hand with updating the debug stuff to MP. The rest should be quite straightforward for MP play. If you are going to do sidechat, use the globalexecute function.

Cheers,

Tup

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

×