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

I think, better will be first idea - disembark order when enemy is sighted and close enough. I suppose, that this may be implemented.

I think this would be ideal as long as we can get the squads in the trucks in the first place. But really impressive work.

On a side note, as per HCfunc, if you team switching between different playable units and player wants units automatically moveable after team switching then maybe use:

onTeamSwitch "selectPlayer (leader _from); {_x doFollow leader _from} foreach units _from; selectPlayer _to;";

Share this post


Link to post
Share on other sites

Would it be possible to make a script that would allow player to join any friendly team (NOT join and lead), by radio trigger?

Share this post


Link to post
Share on other sites

Trigger act field:

nul = [playerunit] execVM "JNG.sqf";

playerunit is... name of player unit :)

JNG.sqf in mission folder:

_plr = _this select 0;

_grps0 = Allgroups - [group _plr];

_grps = [];

{
if ((faction (leader _x)) == (faction _plr) or ((side _x) getFriend (side _plr) >= 0.6)) then {_grps = _grps + [_x]};
}
foreach _grps0;

_Dmin = 20000;
_chosen = group _plr;

if ((count _grps) > 0) then 
{
for [{_a = 0},{_a < (count _grps)},{_a = _a + 1}] do 
		{
		_Fs = leader (_grps select _a);
		_Vs = _Fs distance _plr;
		if ((_a == 0) or (_Dmin > _Vs)) then {_Dmin = _Vs;_chosen = _grps select _a}
		};
_ldr = leader _chosen;
[_plr] join _chosen;
_chosen selectLeader _ldr
}

Player will join and will not to lead nearest ally group on map except player's current group.

Edited by Rydygier

Share this post


Link to post
Share on other sites

About bombers...

There will be such category, but empty by default. May be filled with RHQ. That's because bombers may also effective act like non-bombers CAS air units, so mission maker this way may control, which planes should be used as bombers.

Bombers will have "Destroy" waypoint attached to vehicle of target group leader instead of SAD and... that's all. Did some re-search and here is conclusion:

To make bombers actualy use their bombs on target is tricky. Known methods are based on creating bomb object with proper position and velocity, or on strict unit AI level control (doTarget, selectWeapon, FireAt...). HAC should not and will not take such control over unit. This may be done with external script referring to chosen plane.

Share this post


Link to post
Share on other sites

What about a reinforcement option for commander where he can spawn units, say from a reinforcement marker?... maybe different markers for infantry/cars/armour.

Then the mission designer can allocate what side gets what reinforcements and how many times they can be called on.. for example east gets 1 armour - 2 infantry - 1 helo.

What would be better if the player can assign reinforcement units in an array.

Somehow the commander could only call on this when there are no other units off the type left? or when it gets below a threshold?

Why i think this is because i play it on Chernarus with lots units over a large area and its really interesting gameplay when it gets going, so i give the commanders lots off units to work with but then it gets to be a strain on the old system at times, having reinforcements spawn later during the game would be cool.

just a random thought to add to the many :D

Share this post


Link to post
Share on other sites

HAC shall not spawn absolutelly nothing and no one, this is against its fundamental principles, HAC should only to manage units already available on the map, not to create new one; but there is no problem - after HAC 1.1 maybe will provide some external scripts to do such things. And maybe is better to use something already done? DAC with aproppriate config perhaps? I think, there is many good and excellent auto-spawning scripts.

Share this post


Link to post
Share on other sites

I agree spawn should not be part of HAC. Each side given a set number of units and winner is one that best manages limited resources.

Perhaps more cooperation between different units 2 squads attack from one side while a 3rd squad flanks from the back. It might be already there ? It would be great if markers showed: Attack, Defend, Recon points, Support points per squad as mentioned earlier.

Share this post


Link to post
Share on other sites

Against a hostile group HAC sends currently up to three groups of infantry, up to two armored and up to one plane. Waypoints of these groups are set so that attackers take target in "clamps" and attack, or try to attack from three sides, from four if you count the air units. In addition, HAC may try to attack from flank(s) entire enemy formation. Each type of mission has its own marker (see manual) showing also in the event of attack missions type of the attacking group. Currently working on extended markers and diary task entries for player controlled teamleaders (human controlled grunts will know only, that should follow after his leader plus visible on HUD group's actual waypoint marker, if not set minimal HUD).

Support points per squad

Hmm. What do you mean?

Oh. There are also markers for support missions in alpha 2 version. Hmm. Have you played with debug on?

Edited by Rydygier

Share this post


Link to post
Share on other sites

I have played with debug on, although I am not sure which version I have. Latest one was the empty truck example you uploaded.

Share this post


Link to post
Share on other sites

Yes, it is newest available. So you should see all these markers (one per each group sended with any mission) on map (red, orange, brown dots with text info, some other markings for support and so on)... If groups are many map should be crowded with markers in fact.

Share this post


Link to post
Share on other sites
HAC shall not spawn absolutelly nothing and no one,

The point was HAC would still be assigned a set amount of units to use, i didnt mean unlimited, but a way to save on system resource some could be placed in reserve? cached? and only called on when needed that way you could have longer prolonged battles, but yeah all good, i understand where you coming from :)

Share this post


Link to post
Share on other sites

Now I understand, what you mean. Hmm. Not impossible, but also not easy. Hmm again. Still better to use external spawner with such limitations set to this purpose. HAC anyway can't take into account when planning strategy units only cached in some array, they must be "phisically" present on map with position (crucial) and so on. Such cached groups may be only in reasonable way considered in caculations of morale and change defend/attack mode and this is not enough, I think...

Share this post


Link to post
Share on other sites
Now I understand, what you mean. Hmm. Not impossible, but also not easy. Hmm again. Still better to use external spawner with such limitations set to this purpose. HAC anyway can't take into account when planning strategy units only cached in some array, they must be "phisically" present on map with position (crucial) and so on. Such cached groups may be only in reasonable way considered in caculations of morale and change defend/attack mode and this is not enough, I think...

If i understand what your getting at you're talking about Spawning in 'reinforcements' from an array (script) and having HAC assume command?

If so, i don't think it would be worth the work to be quite honest, given the number of variables in play with something like this. The only feisable way to use this would be for trigger condition to spawn them, And at that would probably be best left to the mission maker to do that anyways since you really have to account for the Player's intention and context of the mission.

Also, I've enjoyed playin' around with this just getting back into mission making and it really does add a nice level of depth to the combat and make the AI behave much better. Nice Addon mate :)

Share this post


Link to post
Share on other sites
Now I understand, what you mean. Hmm. Not impossible, but also not easy. Hmm again. Still better to use external spawner with such limitations set to this purpose. HAC anyway can't take into account when planning strategy units only cached in some array, they must be "phisically" present on map with position (crucial) and so on. Such cached groups may be only in reasonable way considered in caculations of morale and change defend/attack mode and this is not enough, I think...

I'm working to get DAC running smoothly with HAC. Seems to respawn killed-off units OK, despite all spawned units being immediately released from DAC (this surprised me somewhat, I thought DAC might 'lose track' of released units & respawn immediately).

I have secondary DAC 'reinforcements' zones currently activated (separately for each side) by radio triggers, but I plan that eventually these would be activated by script - a Leader finding it is in deep poo could call for reinforcements (with randomised conditions for the spawn).

Such activaton might be accomplished by using an adaptation of the 'Surrender' script (?).

Haven't got as far as thinking about when that might be used (scenario-dependent, ofc) , how to balance sides, etc.

But using DAC to generate reinforcements (grunts, anyway) does work - HAC takes over the units OK and sends them to the front. Mixed group generation doesn't seem to work properly, but haven't had time to check I haven't cocked something up somewhere.

As I understand your post, Ryd, it seems there's no way of passing to Leaders any information about available respawns? - that implies that the Leader's strategies will be significantly sub-par. It could explain why with 150 - 200 units/side and 10 DAC respawns available, the leaders seem rather overcautious & it takes quite a while before the main battles commence.

BR

Orcinus

Share this post


Link to post
Share on other sites
Such activaton might be accomplished by using an adaptation of the 'Surrender' script (?).

I think so. In certain circumstancies (some respawns still available) in conditions, when leader usually going to surrender, instead of surrender script, spawning script should be activated. Of course this needs some changes, in HQSitRep mostly, dependant on used spawner. Or, simplier, code in Surr.sqf may be replaced by respawning code plus maybe, if there is no more reinforcements, execVM to surrender routine (and some very minor changes in HQSitRep, because currently if conditions of surrender are met, HAC will deactivate for this side). For now surrending do not work properly anyway. :)

As I understand your post, Ryd, it seems there's no way of passing to Leaders any information about available respawns?

With some work I should can theoretically make, that HAC will take into account reinforcements when calculating surrender, mode (def/off) and morale, but nothing more. Else matters needs more info, than only that there are some groups available (like position on map)... It is all theoretical however, do not want do this.

---------- Post added at 15:55 ---------- Previous post was at 15:45 ----------

It could explain why with 150 - 200 units/side and 10 DAC respawns available, the leaders seem rather overcautious & it takes quite a while before the main battles commence.

Yes. HAC takes into consideration only this, what see currently on map.

Edited by Rydygier

Share this post


Link to post
Share on other sites
Yes. HAC takes into consideration only this, what see currently on map.
So if we set respawn time to respawn real quick it should work?

Share this post


Link to post
Share on other sites
So if we set respawn time to respawn real quick it should work?

HAC will take in consideration also any new unit, that will appear on map during the game, but until spawn occurs, HAC do not take into considerations this units, that yet to be spawned in the future, because from his point of view, they do not exist (for him exists only that, what is on the map in current moment). So this units will start to exist for HAC at the beginning of the first cycle after their spawn.

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

Is there a way to disable the surrender script?

Official, for addon user usage - no (will do something about that however in HAC 1.1). But for now:

1. You may minimize chances of surrender by manipulating morale:

Repeatable radio-activated trigger with this code in act field:

RydHQ_Morale = 0;RydHQB_Morale = 0

Will allow you reset morale to its highest value as often, as needed, so chance for surrender will become 0% until number of known enemies is less than four times higher than number of ally units, and only 5% per cycle when enemy advantage is bigger;

2. If you use script version and do not afraid editing scripts :) you may find in HQSitRep.sqf about 364 line this code:

if ((((count RydHQ_KnEnemies)/(1 + RydHQ_CCurrent)) > (4/(1 - (RydHQ_Morale/12.5)))) and ((Random 100) > (95 + (RydHQ_Morale*((count RydHQ_KnEnemies)/(1 + RydHQ_CCurrent))/4))) and not (RydHQB_Surrender)) exitwith {RydHQ_Surrender = true;nul = ["A"] execVM "Surr.sqf"};	

and to comment whole line out:

//if ((((count RydHQ_KnEnemies)/(1 + RydHQ_CCurrent)) > (4/(1 - (RydHQ_Morale/12.5)))) and ((Random 100) > (95 + (RydHQ_Morale*((count RydHQ_KnEnemies)/(1 + RydHQ_CCurrent))/4))) and not (RydHQB_Surrender)) exitwith {RydHQ_Surrender = true;nul = ["A"] execVM "Surr.sqf"};	

This will completely disable surrending. Similarly for side "B" in HQSitRepB.sqf.

Share this post


Link to post
Share on other sites

Today (or rather yesterday) I tested system, that communicates to human controlled teamleader, where to go and what to do. Implementation of this was complex, so it requires further testing & bugtracking, but it looks promising. I used "setSimpleTask", so we have a diary entry and target location shown on the map. In addition there is a special marker on the map with the name of the leader and type of mission. It would be great, if I managed to add a radio message "from HQ" about arrival of new orders (or even about kind of new task, but only short info about something new would be great too). Well, at midnight kbTell concept seems to me quite complex, in addition I do not know whether this is best solution. Never used. Basically I would like to use some generic message(s) like this used eg in the SOM. But how to do it? I remember that gammadust seemed to know something more in this topic, maybe someone else also can help... In any case, since morning I will explore this matter deeper.

Share this post


Link to post
Share on other sites
Today (or rather yesterday) I tested system, that communicates to human controlled teamleader, where to go and what to do. Implementation of this was complex, so it requires further testing & bugtracking, but it looks promising. I used "setSimpleTask", so we have a diary entry and target location shown on the map. In addition there is a special marker on the map with the name of the leader and type of mission. It would be great, if I managed to add a radio message "from HQ" about arrival of new orders (or even about kind of new task, but only short info about something new would be great too). Well, at midnight kbTell concept seems to me quite complex, in addition I do not know whether this is best solution. Never used. Basically I would like to use some generic message(s) like this used eg in the SOM. But how to do it? I remember that gammadust seemed to know something more in this topic, maybe someone else also can help... In any case, since morning I will explore this matter deeper.

Sounds excellent :)

Re messages: there's a GL4 script deals with enemies surrendering; it sends a (text) radio message to the player that (name of unit) has surrendered. Script is GL4_Captive_Player.sqf

It uses "player sideChat"; presumably the string sent to the player could be anything, not just the name of a specific unit. Don't know if this might help you.

On another matter, of available respawns having no influence on HAC - one simple approach might be use the number of potential reinforcements to raise the morale setting - in essence, the reverse of what losses do. As the available respawns decrease, so does the modification factor.

Similarly, that number could be factored into the surrender script.

How it might be done will depend on how the spawn script works. For DAC, the relevant factors are all in arrays in the init line. There is at least one short script for extracting the individual values from an array.

Cheers

Orcinus

Share this post


Link to post
Share on other sites
How it might be done will depend on how the spawn script works.

Yep, this is another problem with implementing that. Method of implementation will be dependant on spawning script used by given mission maker. I can only propose making of some external script associated with used spawner, that should cyclically calculating increase of morale depending on the number of forces available in reserve. It may be simply, or, on the contrary, sophisticated. I think, that it is a flexible solution and, what most important, handling this matter outside HAC scripts.

---------- Post added at 09:55 ---------- Previous post was at 09:42 ----------

It uses "player sideChat";

I used it too - exactly this is info about morale and new cycle that pop-up on screen (I think, this will be removed however, or will be used diag_log into rpt file instead). But now I'm about some kind of sound (voice) notification. That would be only ornament of course, but I think that would increase enjoyment given by gameplay with HAC.

Share this post


Link to post
Share on other sites

Check out HQ dialogues from SecOps module. It has something like this"

HQ "Come in [callsing], this [HQ callsign]. "

team leader "This is [callsing], go ahead [HQ callsign]."

HQ "[callsing], stand by for mission update."

You can remove unit callsigns and make HQ being refered as only HQ. This way you will have soemthing like this:

HQ "Come in, this HQ. "

team leader "Go ahead HQ."

HQ "Stand by for mission update."

This will be enough notification that orders are incoming, without being too big. I have audio editing software, so I can help out with editing clips extracted from Arma 2.

Share this post


Link to post
Share on other sites

Hey, thanks. Maybe there is a way to use for example this HQ "Stand by for mission update." or similar, universal notification without exctraction from SOM? For now, however I do not know a way to refer to a sound file hidden somewhere in the game files...

Share this post


Link to post
Share on other sites

Been coding like there's no tomorrow, I see :)

To set up kbTell you basically need the following four things:

a description.ext file in the mission's root folder (which will define the identity of the speaker)

	class CfgIdentities
{
	class leaderHQ
	{
		name = "leaderHQ";	  // Assuming it will be to this unit you will want to add the speaking ability
		face = "Default";
		glasses = "BlackSun"; // You may leave defaults
		speaker = "Male02EN"; // but might be interesting to customize these
		pitch = 1.0;
	};
};

a topics.bikb file (which will define the diferent audio and text messages you want to use)

	class Sentences
{
	class MoveAndAttack		// a simple sentence class
	{
		text = "MOVE TO AND ATTACK AIRFIELD";	// What will appear in the chat as text message
		speech[] = {"MoveTo","And","Attack","Airfield"}; // More on what goes here later (see list word bellow)
		class Arguments {};

	};
	class GetSupportAtDirOfPlace // a dynamic sentence class
	{
		text = "GET SUPPORT AT %DIRECTION OF %PLACE";
		speech[] = {"GetSupportAt", %DIRECTION, "Of", %PLACE};
		class Arguments
		{
			class DIRECTION {type = "simple";};
			class PLACE {type = "simple";};
		};
	};
};
class Arguments{};
class Special{};
startWithVocal[] = {hour};
startWithConsonant[] = {europe, university};

code which will set the name and add the topic to a certain unit

	leaderHQ kbAddTopic ["orders", "topics.bikb", ""];

I named this topic "orders" here and refered the path to above file, you may leave the last parameter empty "".

code to trigger the message (simple):

	leaderHQ kbTell [player, "orders", "MoveAndAttack", true]; // a simple non-dynamic example

// leaderHQ		the message emiter
// player			the receiver
// "orders"		the topic name (defined in the kbAddTopic sentence)
// "MoveAndAttack" the message as defined in topics.bikb by Class name
// []				unused parameters
// true			whether the message is to be heard over the radio or directly (adds noise and beeps?)

code to trigger the message (dynamic):

	leaderHQ kbTell [player, "orders", "GetSupportAtDirOfPlace",
	["DIRECTION",{},_directionTXT,[_directionSPK]],
	["PLACE",{},_placeTXT,[_placeSPK]],
	true];

// for the on-the-fly message construction this is of note

// "DIRECTION"			the name of the argument which wil take the // %DIRECTION placement as defined in topics.bikb Arguments class of // specific message
// _directionSPK		defined dynamicaly corresponding to the audio word/phrase to use
// _directionTXT		defined dynamicaly, preferably, which corresponds to the above audio

you are free to choose the names of these variables but _directionSPK must hold a string of a word/phrase exacly as in RadioProtocol in use (see list)

in this case you could use the following

	_directionTXT = "NORTH"; // usually caps
_directionSPK = "North"; 
_placeTXT = "ELEKTROZAVODSK";
_placeSPK = "Elektrozavodsk";
leaderHQ kbTell [player, "orders", "GetSupportAtDirOfPlace",
	["DIRECTION",{},_directionTXT,[_directionSPK]],
	["PLACE",{},_placeTXT,[_placeSPK]],
	true];

Just a copy paste from the relevant part of a RadioProtocolEN under the Words class, you may find a full list in the config.bin of dubbing.pbo of vanilla Arma.

North[] = {"DEFAULT\direction\North.ogg"};
South[] = {"DEFAULT\direction\South.ogg"};
West[] = {"DEFAULT\direction\West.ogg"};
East[] = {"DEFAULT\direction\East.ogg"};
Northwest[] = {"DEFAULT\direction\Northwest.ogg"};
Southwest[] = {"DEFAULT\direction\Southwest.ogg"};
Northeast[] = {"DEFAULT\direction\Northeast.ogg"};
Southeast[] = {"DEFAULT\direction\Southeast.ogg"};

 Elektrozavodsk[] = {"RU\core\maploc\Elektrozavodsk"};
 Elektrozavodsk2[] = {"RU\core\maploc\Elektrozavodsk2"};
 Gorka[] = {"RU\core\maploc\Gorka"};
 Gorka2[] = {"RU\core\maploc\Gorka2"};
 Chernogorsk[] = {"RU\core\maploc\Chernogorsk"};
 Chernogorsk2[] = {"RU\core\maploc\Chernogorsk2"};
 Krasnostav[] = {"RU\core\maploc\Krasnostav"};
 Krasnostav2[] = {"RU\core\maploc\Krasnostav2"};
 Solnichniy[] = {"RU\core\maploc\Solnichniy"};
 Solnichniy2[] = {"RU\core\maploc\Solnichniy2"};
 StarySobor[] = {"RU\core\maploc\StarySobor"};
 StarySobor2[] = {"RU\core\maploc\StarySobor2"};
 Vybor[] = {"RU\core\maploc\Vybor"};
 Vybor2[] = {"RU\core\maploc\Vybor2"};
 Zelenogorsk[] = {"RU\core\maploc\Zelenogorsk"};
 Zelenogorsk2[] = {"RU\core\maploc\Zelenogorsk2"};

Edited by gammadust
Syntax correction

Share this post


Link to post
Share on other sites

Thanks a lot, gammadust! Will see, what can I do with all this great stuff. :)

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

×