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

Maybe a solution is to tell HAC to wait before giving any orders to support vehicles - start them as excluded, wait 500, include? Could this be run from the init.sqf?

BR

Orcinus

Should be possible. Something like:

RydHQ_Excluded = [supp1, Supp2, Supp3];

nul = [] execVM "RydHQInit.sqf";

sleep 500;

RydHQ_Excluded = [];

But setting at the beginninig support vehicles far from others, and generally all vehicles not to close to other group, especially far (above 100 meters I think) from infantry and especially choppers far from each other, should also help a bit or even a lot.

Share this post


Link to post
Share on other sites
Should be possible. Something like:

RydHQ_Excluded = [supp1, Supp2, Supp3];

nul = [] execVM "RydHQInit.sqf";

sleep 500;

RydHQ_Excluded = [];

But setting at the beginninig support vehicles far from others, and generally all vehicles not to close to other group, especially far (above 100 meters I think) from infantry and especially choppers far from each other, should also help a bit or even a lot.

Thanks, Ryd. I'll try that out. I don't think having the vehicles wait a few minutes will affect the game start too much.

Heh, already boobed with choppers - set some on the map near the railway line that runs past Prigorodki on Chernarus but didn't notice there was a line of telephone poles with wires running along it...

Oops! Sorry, crew. Be assured Leader HQ will write nice condolence letters to your relatives...

Also, re an earlierpoint you made - running a couple of tests with a fairly small number (</~=100) of units/side, I found HAC gave my group & at least some AI groups waypoints right at the objective; which led to some very heavy losses. I noticed also that they seemed to send out very few, if any, scouts first.

Didn't happen with about 200 units/side; HAC gave me waypoints either halfway to the objective or off to the flanks; AI groups also seemed to be given less aggressive / suicidal instructions.

It might be an idea to make the Leaders a little more cautious when they don't have too many troops to start with, especially if the terrain is a bit open near one or other objective.

BR

Orcinus

Share this post


Link to post
Share on other sites

Better, disable vehicles move when they are excluded, this will guarantee that they wont run over anybody.

BTW: I also often get waypoint right at the objective. I usually play with rather limited number of units.

Share this post


Link to post
Share on other sites

Terrain factor is extremely hard to implement. Complex topography scanner is itself a theme for big, standalone addon. And it will be heavy for CPU.

About those "take objective" orders (with "Cap A/Cap B" markers)... It will happen when:

1. there was reconaissance completed or is advanced enough and there is only few or none enemy units founded;

2. When some, but not to numerous, enemy units are known at the beginning;

And never in first cycle.

it also depends on RydHQ_Recklessness personality attribute If equal 0 each known enemy unit reduce chance for such order per 10%, If equal 1, each known enemy unit reduce this chance per 2 %. For GENIUS this will be 3.(3) %, so if there are at least 30 enemy units known, chance for capturing order for genius is 0%. Will think, how to make some connection also with number of own forces.

EDIT: I think, will also connect this chance with number of cycle. So with time chances will grow and will be minimal at beggining.

EDIT2: Done. Now formula is far more complex and gives no chances for such order in first 5 cycles, with next cycles chances will slowly grow, it is also dependent on number of own groups compared with expected number of enemy groups, now I should test it.

Edited by Rydygier

Share this post


Link to post
Share on other sites
Better, disable vehicles move when they are excluded, this will guarantee that they wont run over anybody.

BTW: I also often get waypoint right at the objective. I usually play with rather limited number of units.

I'm spawning tanks, etc., with DAC; however the release happens straight after the spawns (from commands in the init.sqf - I think I already posted that). I'll add Ryd's suggested code to exclude those groups from HAC for a few minutes so that gives the grunts a chance to get out of the way.

BR

Orcinus

---------- Post added at 01:48 PM ---------- Previous post was at 01:41 PM ----------

Terrain factor is extremely hard to implement. Complex topography scanner is itself a theme for big, standalone addon. And it will be heavy for CPU.

Maybe I was unclear - the choppers were placed by me, & when HAC ordered one to take off it crashed into the telepone wires then a pole. Entirely my error. No need for any more terrain scanning than you've already (?) implemented so as to set ambushes on reverse slopes.

About those "take objective" orders (with "Cap A/Cap B" markers)... It will happen when:

1. there was reconaissance completed or is advanced enough and there is only few or none enemy units founded;

2. When some, but not to numerous, enemy units are known at the beginning;

And never in first cycle.

it also depends on RydHQ_Recklessness personality attribute If equal 0 each known enemy unit reduce chance for such order per 10%, If equal 1, each known enemy unit reduce this chance per 2 %. For GENIUS this will be 3.(3) %, so if there are at least 30 enemy units known, chance for capturing order for genius is 0%. Will think, how to make some connection also with number of own forces.

EDIT: I think, will also connect this chance with number of cycle. So with time chances will grow and will be minimal at beggining.

EDIT2: Done. Now formula is far more complex and gives no chances for such order in first 5 cycles, with next cycles chances will slowly grow, it is also dependent on number of own groups compared with expected number of enemy groups, now I should test it.

Looks like a cool solution, looking forward to the test results. The delay also gives the Leaders more time to gather intel as well, which is a key factor in any conflict. FYI, I test with the default "Genius" settings for both leaders.

Thanks, Ryd

Orcinus

Share this post


Link to post
Share on other sites

In conjunction with the move towards making an MP/MSO friendly version, I had a think about what would be needed to make a moving front-line using the system. The solution I considered was something to the effect of:

Make an sqf where (if forces within 15m of objective && no known opfor within 500m) then (command move hq unit to objective, move objective to next location in objective array, restart hac, force defensive mode for x time -a couple hours perhaps, again possibly tied with a personality value)

Similarly for being overrun and retreating:

If (number of enemy forces within area >= personality/recklessness* number of friendly forces within area) or (much larger force entering larger area) then (command move hq to previous location in array, set objective to current location, restart hac, force defensive mode)

I hope that's mostly legible -what I was wondering is whether any aspect of these kinds of calls was already being handled by HAC and could just be called out from the main script during the cycles, to save overhead

Share this post


Link to post
Share on other sites

I think, that "BigBoss" AI level should be perfect for such movements (changes of leaders and objectives positions). Of course this is also possible by external script. In current version LeaderHQ will enter "defend" mode on its position if:

1. It is manually set by RydHQ_Order = "DEFEND";

2. There is also chance for autmatically setting "defend" mode calculated by formula:

((_gauss100 + RydHQ_Inertia + RydHQ_Morale) <= ((RydHQ_EValue/(RydHQ_FValue + 0.1)) * 60))

Where:

_gauss100 - random value between 0 and 100 with Gaussian distribution (average values most probable)

RydHQ_Inertia - factor of tendency to remain in the same mode as to avoid too frequent changes and simulating some psychological aspects. If chosen "attack" mode this factor becomes:

RydHQ_Inertia = 30 * (0.5 + RydHQ_Consistency)*(0.5 + RydHQ_Activity);

otherwise:

RydHQ_Inertia = - (30  * (0.5 + RydHQ_Consistency))/(0.5 + RydHQ_Activity);

RydHQ_Morale - factor changed and displayed every cycle, reflects commanders morale (faster cycles means more rapid morale changes, so slower commanders are also more patient and more resistant to decreasing of morale), rather not army morale, like is said in manual. Values between -50 to 0.

RydHQ_EValue - estimated value of the known enemy forces, where units with higher firepower have greater value;

RydHQ_FValue - ditto, for friendly units.

Total reset of all global variables (ergo complete HAC reset) is also possible and I will try to add such option with special variable.

This is, how it looks currently.

Share this post


Link to post
Share on other sites

HI Rydygier, can you please confirm if AI can use empty vehicles? I have tried to get infantry squads to use empty trucks next to them but no, the squads just decided t walk. I have put a truck with a driver in next to them and still they will not use. Anything I am missing?

Share this post


Link to post
Share on other sites

Yes, empty and crewed cargo units should be used, except, that there is no defined in HAC init config RydHQ_CargoFind variable or is defined with value 0 or less. Positive value of this variable means radius in meters for empty cargo searching around group leader. I recommend not to big values, eg. RydHQ_CargoFind = 100 should be enough, maybe up to 200, depends of needs, mission and CPU. Too big values will cause lags. If you want cargo system active, but without searching for empty vehicles, just define this variable with minimal value, eg. 0.5 or 1.

Or maybe target point for this group was set too close (if distance is less than 1000 meters, there will be no cargo assigned).

Edited by Rydygier

Share this post


Link to post
Share on other sites
Yes, empty and crewed cargo units should be used, except, that there is no defined in HAC init config RydHQ_CargoFind variable or is defined with value 0 or less. Positive value of this variable means radius in meters for empty cargo searching around group leader. I recommend not to big values, eg. RydHQ_CargoFind = 100 should be enough, maybe up to 200, depends of needs, mission and CPU. Too big values will cause lags. If you want cargo system active, but without searching for empty vehicles, just define this variable with minimal value, eg. 0.5 or 1.

Or maybe target point for this group was set too close (if distance is less than 1000 meters, there will be no cargo assigned).

I have placed RydHQ_CargoFind = 100 in init field of trigger and empty trucks were placed approx 80 meters from squad leader. They still refuse to board trucks. Target goup is approx 2,000 meters away. What am I doing wrong?

Thanks for your help with this amazing mod!

Share this post


Link to post
Share on other sites

How is indicated target marker for this group? If "Rec", it is a reconnaissance mission, and to these missions cargo is not allocated, because vehicle too easily can be detected. Although I did a little test and think something is wrong here. Group sent to attack (marker "Inf A"), boarded the empty truck, but did not want to move. Hmm. (This was caused by changes that I made in the code today, after removal of this changes group boarded the empty truck and moved to the target)

---------- Post added at 18:32 ---------- Previous post was at 18:25 ----------

I have placed RydHQ_CargoFind = 100 in init field of trigger

When this trigger is activated? Maybe try to move this code to init field of any unit or to init.sqf.

Edited by Rydygier

Share this post


Link to post
Share on other sites

Have created a HETMAN AI Commander Skype Group for IM chat on this add-on.

If you're interested find me on skype (Tupolov73).

Share this post


Link to post
Share on other sites

Wow. Unfortunately, I do not have Skype, and via voice I'm able to communicate only in Polish.

Share this post


Link to post
Share on other sites

When this trigger is activated? Maybe try to move this code to init field of any unit or to init.sqf.

I moved code to init file and still no luck. The infantry choose to walk 2-3 km than ride empty trucks.

I'd appreciate it if you can take a quick look at attached example mission, to point out my mistake.

Thanks again for your help.

http://www.mediafire.com/?c6gcjdjzlcb6tud

Edited by CaptainBravo

Share this post


Link to post
Share on other sites

Sorry, can't. On Arma 2 1.10 it not works with some missing "acex" messages, so I launched game with my ACE for Arma 2, but still there is message about missing content: acex_ru_veh_Su27, acex_USNavy_veh_ah1, acex_ru_c_vehicle, acex_ru_c_men.

I would love to have complete set of additions for Arma, but I do not have money for this, and so I have access only to the mission based on the generic Arma 2 content plus some addons. Would have to replace units in this mission to generic from Arma 2. For now can only check mission.sqm and init.sqf. I found in these files, that probably you set RHQ arrays in trigger (?), if so, when those triggers are activated? Initialization by trigger is recommended for special purposes (delayed HAC config changes), rather than default, unless these triggers are for sure activated before HAC. Sorry again, only this I can say for now.

EDIT: It also looks, that you have RydHQInit.sqf launched twice: in init field of leaderHQ and in init.sqf. This is no good...

Edited by Rydygier

Share this post


Link to post
Share on other sites
Sorry, can't. On Arma 2 1.10 it not works with some missing "acex" messages, so I launched game with my ACE for Arma 2, but still there is message about missing content: acex_ru_veh_Su27, acex_USNavy_veh_ah1, acex_ru_c_vehicle, acex_ru_c_men.

I would love to have complete set of additions for Arma, but I do not have money for this, and so I have access only to the mission based on the generic Arma 2 content plus some addons. Would have to replace units in this mission to generic from Arma 2. For now can only check mission.sqm and init.sqf. I found in these files, that probably you set RHQ arrays in trigger (?), if so, when those triggers are activated? Initialization by trigger is recommended for special purposes (delayed HAC config changes), rather than default, unless these triggers are for sure activated before HAC. Sorry again, only this I can say for now.

Triggers activated by anybody present so it activates right away. I am only using ACE units so it is odd you getting error msg. I will try to replace with vanilla.

Do you have example mission I can see with vanilla units where infantry use empty trucks?

Thanks again.

Share this post


Link to post
Share on other sites
Do you have example mission I can see with vanilla units where infantry use empty trucks?

Will prepare something right away with my newest HAC scripts.

Share this post


Link to post
Share on other sites

Just to jump in here on something kind off similar... i found that sometimes motorized groups (editor groups) would be given a base patrol waypoint and what ends up happening is the truck is following the units around when patrolling the base?

Share this post


Link to post
Share on other sites

@CB

I set a simple demo, all config in init.sqf. There is no guarantee that HAC will issue for the first time marching orders (for me it was so), but sooner or later, your group should to get a command allows to try usage of an empty truck.

http://www.multiupload.com/8W9PCPMUKX

@Katipo66

I think, that by default in Arma2, if group with own cargo receive waypoint not too far its current position, as is the case of patrols, do not enters vehicle and go on foot, and vehicle will follow the rest. I've seen it before. This can be easly tested. Try to set some demo mission without HAC, with one motorized group and give them waypoint not far from their current position, and in next test move waypoint far from group.

Edited by Rydygier

Share this post


Link to post
Share on other sites
@CB

I set a simple demo, all config in init.sqf. There is no guarantee that HAC will issue for the first time marching orders (for me it was so), but sooner or later, your group should to get a command allows to try usage of an empty truck.

http://www.multiupload.com/8W9PCPMUKX

Thanks Rydygier. I will try later on this eve. I have noticed with a quick look at init field that you have RydHQB_SubAll = true;

What does that command do?

Edited by CaptainBravo

Share this post


Link to post
Share on other sites

RydHQ(B)_SubAll comes with alpha 2 version. It is in fact not necessary here, because this variable is true by default. If true, it keeps normal control mode - over all allied units. It was introduced beacuse of new optional limited control modes, when HAC controls only chosen units.

Edited by Rydygier

Share this post


Link to post
Share on other sites

I think, that by default in Arma2, if group with own cargo receive waypoint not too far its current position, as is the case of patrols, do not enters vehicle and go on foot, and vehicle will follow the rest. I've seen it before. This can be easly tested. Try to set some demo mission without HAC, with one motorized group and give them waypoint not far from their current position, and in next test move waypoint far from group.

Hey Ryd,

Sorry i realized that its default Arma behaviour, i was thinking HAC could only give units without cargo base patrol waypoints, as the vehicle only makes a nuisance of itself in most situations.. but this is no real big deal.

Maybe player can help the commander by assigning specific units tasks that could over ride commander decisions? for example i could enter something in a units init that would force him to be used as recon or defence?

Share this post


Link to post
Share on other sites
Wow. Unfortunately, I do not have Skype, and via voice I'm able to communicate only in Polish.

Rydygier,

Its not voice chat, just text chat for people to discuss the add-on etc.

Cheers,

Tup

Share this post


Link to post
Share on other sites

@Katipo66

Oh. Hmm. With what marker was marked this patrol, of which you speak? In fact patrol missions (chain of randomized waypoints with "cycle" waypoint at the end of route) for idle groups are implemented, but aren't released yet...

Maybe player can help the commander by assigning specific units tasks that could over ride commander decisions? for example i could enter something in a units init that would force him to be used as recon or defence?

Interesting idea, but not sure, if this is possible. Must think about this. Maybe with arrays of some kind, like "recon-only-groups-array" (of course simplier will be to make chosen unit an recon unit or to use RHQ and to add all units of this kind into recon classnames array) but rather not possible will be "always-in-def" array, but this may be simulated with "excluded".

@Tupolov

Oh again (time to sleep...). So how can I get there? Skype is neccesary? For now I have little time for chatting, but when 1.1 will be finished - why not?

Edited by Rydygier

Share this post


Link to post
Share on other sites
@CB

I set a simple demo, all config in init.sqf. There is no guarantee that HAC will issue for the first time marching orders (for me it was so), but sooner or later, your group should to get a command allows to try usage of an empty truck.

http://www.multiupload.com/8W9PCPMUKX

I got to test the demo empty truck mission and it works. A couple of things different in your demo mission than mine:

1) Enemy contact is right away.

2) Only one squad.

In my mission enemy contact is at least 10 minutes away by scouts. By that time infantry squads have walked away from trucks and I think this is the issue.

Also in my mission there are 9 infantry squads on each side. Most will usually start walking with 2-3 minutes even though target is 2-3 km away.

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?

Over all great mod!! I had 300-400 units fighting all over that map dynamically with tanks rushing all over and planes and choppers flying over! GREAT EPIC battle feel! The only annoying thing it took 30 minutes to happen as they all had to walk for a looong time before any action.

I hope BIS implments something similar in Arma3!

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

×