taro8 806 Posted January 5, 2012 (edited) If you guys want AI spawn randomly and attacking position then use this script : http://forums.bistudio.com/showthread.php?t=117220 About the choppers crashing into stuff: give them a waypoint with time out of 10s very close to their unload position. This way chopper will have time to rise to their flyby attitude before moving on. Also the problem with helo moving and stopping. I actually experienced that myself in completely unrelated environment. I had simple support module with chopper transport. Transport chopper shown this odd behavior when enemy units were spotted by the crew and I was in cargo. Edited January 5, 2012 by Taro8 Share this post Link to post Share on other sites
Rydygier 1309 Posted January 5, 2012 Will try this waypoint method, thanks. About multiple commanders... In the near future I will be testing implemented today (see "to do" list for some details) alternative modes of allocating of HAC control over chosen groups. This is the first thing needed to obtain the possibility of many leaders for one side. As regards the second thing, I decided that the only reasonable option would be adding further copies of scripts so that each leader had his own set of files. This leads to two things: first - it will be done at the very end, secondly - the maximum number of commanders will be strictly defined, constant and not too large. So I have a question: how many commanders will be enough for you, folks? Share this post Link to post Share on other sites
mikey74 169 Posted January 5, 2012 (edited) http://www.mediafire.com/?mbssau9dnbub7u8 This one has a respawn for vehicles and a spawn for infantry, and a wave script on it. The wave scipt goes like this veh = ["wave1",4,"attack1",60] execFSM "FSM\wave.fsm"; wave1 is the marker the units will be spawned at 4 is times they will spawn, attack1 is position they will attack till HAC takes over, and 60 is the delay between spawns. Obviously I've got this idea from other scripts. I did this for 2 reasons. TO LEARN something :), and cuase the other scritps can be quite complicated. ;) Rydygier says : the maximum number of commanders will be strictly defined, constant and not too large. I figure company sized unit. Which would consist on 1 company officer and maybe 3 or 4 platoon officers. anything bigger than that would kill performance I think. Rydygier sounds like some of the stuff you are changing looks like almost a total re write. If you do please keep the original file. This way when you finish if you dont like what you finish with compared to what you have started with. :) you can start fresh or just use the original version :) Thanks for all the hard work and fun. Edited January 6, 2012 by Mikey74 Share this post Link to post Share on other sites
taro8 806 Posted January 5, 2012 Why not go with more army like chain of command? *Commander of ALL units under HAC from one side, *2-4 commanders of army groups (will allow multiple fronts) I think it will be enough, AI squad leaders will take care of rest. Share this post Link to post Share on other sites
Rydygier 1309 Posted January 6, 2012 Why not go with more army like chain of command?*Commander of ALL units under HAC from one side, *2-4 commanders of army groups (will allow multiple fronts) I think it will be enough, AI squad leaders will take care of rest. I do not know, if I can manage to add such an over-commander, it would be nice, but would have to write separate scripts for him to manage sub-commanders... Well, probably no big deal, he would oversee assignment of objectives for each subordinates and choosing for them attack/defense Mode etc, unit limit per objective... Of course still will required file sets for these sub-commanders. Share this post Link to post Share on other sites
DaveP 66 Posted January 6, 2012 (edited) There's something interesting to be said for how the different personality settings of an 'over-commander' with the same character variables as their subordinates would apply to the lower units. A 'Brute' personality company commander sending 'Schemer' units, or an Idiot leading Geniuses.. (truth in television) Also, although I think Friznit could probably chime in his experience on this better than I could explain what I've heard of the role from him, a company commander is effectively doing a fairly similar job to the platoon commander when it comes to tactical decisions, but is rather representing each of their multiple 'units' (of a similar denomination to the platoon level) as a platoon rather than just as a squad of 6-12 men, with the larger scale of time and place that is associated with that increase in numbers To be able to control three platoons of individual HETMAN AI and watch the results.. that'd be something fun Edited January 6, 2012 by DaveP Share this post Link to post Share on other sites
mikey74 169 Posted January 6, 2012 (edited) http://s1087.photobucket.com/albums/j466/mikey7410/ <---- I drew a 1st grader type picture becuase I've got the skill of a 1st grader in art. lol Basically if its not to hard Give your high commander (company commander) the total area around obj. Have him direct commands to the sub commanders(platoon leaders), and let them use the script you have now for HAC for ordering squad commanders. Hope this kind of helps as I am not very articulate. lol What David said! ;) lol Edited January 6, 2012 by Mikey74 Share this post Link to post Share on other sites
mjolnir66 48 Posted January 6, 2012 Maybe if you made it so that the AI basically formed adhoc platoons and they stayed close together and acted as one, eg 2 infantry squads and a tank try to keep close together and flank, the tank waiting on the infantry so it doesnt get split up, to flank the enemy, while 3 infantry squads, a sniper team and an IFV attack from the front as a group. Share this post Link to post Share on other sites
friznit2 350 Posted January 6, 2012 Aye, at the very basic tactical level essentially the routines are the same for battalion, company or platoon commander; they're just commanding different sizes of manoeuvre units. However, I think for HETMAN purposes, your Big Boy commander should be a strategist - he determines whether his side is defensive or offensive mode in general, identifies and assigns objectives to the subordinate commanders and sends reinforcements to either one as appropriate. That way your subordinate commander AI routines don't need to change that much - they still have a single objective marker, an offensive/defensive tag, and fight the tactical battle, but the objectives and overall strategy are handled by the boss. A company is 3 platoons of men, approx 90 - 120 bods. That's probably the upper limit of what the ArmA2 engine can handle at any one time without dying in a ditch. Share this post Link to post Share on other sites
mikey74 169 Posted January 6, 2012 However, I think for HETMAN purposes, your Big Boy commander should be a strategist - he determines whether his side is defensive or offensive mode in general, identifies and assigns objectives to the subordinate commanders and sends reinforcements to either one as appropriate. Going by what he said. The mission designer can make the illusion of a high comander if we just have 4 HAC commanders. In other words the mission designer can use triggers and scripts to set a certian side to deffense or offense, and to deligate reinforcements without a higher command. So yes if it to hard to implement a higher commander dont sweat it. :) Share this post Link to post Share on other sites
taro8 806 Posted January 6, 2012 (edited) Still having more then one commander for a side would be cool. Maybe option to limit their fronts could be used. HAC commander would only operate in area defined by marker. BTW: Could somebody with scripting knowledge create a script in with: helo (excluded from HAC) is spawned around placed marker (distance can be defined), with infantry unit on board (maybe random type). Then flies to LZ (marker or H) unloads units and flies back to starting marker and is deleted. Unloaded units are left under HAC's care. Should be repeatable. This is something separate from HAC, but it could be nice "reward" for HAC for capturing strategic positions or soemthing. Edited January 6, 2012 by Taro8 Share this post Link to post Share on other sites
mikey74 169 Posted January 6, 2012 (edited) _unit = player; _pos = [(getmarkerpos "airPoint" select 0), (getmarkerpos "airPoint" select 1), 100]; _dir = getdir _unit; _westVehicle = ["UH60M_EP1"]; _WestSquad = "USMC_InfSquad"; Grouppara1 = CreateGroup West; _veh = [_pos, _dir, "UH60M_EP1", Grouppara1] call BIS_fnc_spawnVehicle; _air_unit = units Grouppara1; _air_veh = _veh select 0; sleep 1; bp1 sideChat "Batalion 5 Paratroopers: Roger that paratroopers is on route to your location for support"; bp1 sideChat "Over"; infgrp = CreateGroup West; infgrp = [(getmarkerpos "airPoint"), side _unit, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_InfSquad")] call BIS_fnc_spawnGroup; _inf_unit = units infgrp; {_x moveincargo _air_veh} foreach _inf_unit; _squadType = _westSquad; hint parseText format["There is a %1 enroute to your location with an Airborne %2!",typeof _air_veh, _squadtype]; sleep 4; _wp = infgrp addwaypoint [position _unit, 0]; _wp setwaypointtype "MOVE"; _wp setWaypointSpeed "NORMAL"; _wp setWaypointBehaviour "CARELESS"; _wp setWaypointCombatMode "BLUE"; //player hcSetGroup [infgrp]; <---- use this for your own high command RydHQ_Excluded = [_air_veh]; _wp1 = Grouppara1 addwaypoint [position _unit, 20]; _wp1 setwaypointtype "TR UNLOAD"; _wp1 setWaypointSpeed "NORMAL"; _wp1 setWaypointBehaviour "CARELESS"; _wp1 setWaypointCombatMode "BLUE"; _air_veh flyinheight 35; sleep 4; waitUntil { _unit distance _air_veh < 500 }; _wp2 = Grouppara1 addwaypoint [getmarkerpos "airPoint", 100]; _wp2 setwaypointtype "MOVE"; _wp2 setWaypointSpeed "FULL"; _wp2 setWaypointBehaviour "CARELESS"; _wp2 setWaypointCombatMode "BLUE"; waituntil { _air_veh distance _unit > 2000 }; {deleteVehicle _x} forEach (_air_unit)+[_air_veh]; waitUntil { {alive _x} count _inf_unit == 0 }; hint format ["All the %1 units have been killed!",_squadtype]; You mean something like this? Edited: P.S This script is not completely mine. I was working I think with Cobra on something and Ive modded some of it to fit my need. edited: pss The last post that I used waves in has part of this script in it. ;) Edited: PSSS lol How much knowledge do you have with scripting? If I need to when I get back home from work I can make you a sample mission. :) Edited January 6, 2012 by Mikey74 Share this post Link to post Share on other sites
DomZ 15 Posted January 6, 2012 (edited) Brilliant addon which makes the game come alive! I tried it with my High Command Extensions addon (current version very old new one this weekend) with the AI on one side switched off and is very interesting with player HC V AI HAC. When I release the new High Command Extensions is it alright if I include a Demo mission with player HC V AI HAC? Edited January 6, 2012 by DomZ Share this post Link to post Share on other sites
gammadust 12 Posted January 6, 2012 (edited) First of all, congrats on your work Ryd! + :cookie: ' been on the sidelines exploring your mod and and it picks on one of my most wanted features in Arma, the potential is enormous. :more cookies: I am now testing the alpha version along with the fallujah mission which you had set up (it appears to be a good test ground in number of units and processing stress). And I have good news, one thing that was bugged was the combination of HETMAN with the vanilla High Command Module: as you used the basic "Team Switch" functionality switching to leaderHQB (from leaderHQ), it would trigger some ambiguity within the "Moral" assesment POV, Moral A would decrease before any contact was made between the troops, and I relate this with leaderHQ (A) becoming aware of enemy positions and their number or something along these lines. As furtuitious as it may have been, the above DOES NOT occur anymore with the latest alpha (you've definitely been doing some clean up :). But it might be good to let you know this, and brings me to another point: It would be "nice" to keep compatibility with the High Command Module. It allows monitoring of the inner workings and orders of HETMAN. So for now, my alpha report is this: Tested on: Arma 2 OA 1.60.87580; (I may test further in base Arma 2) other Addons: @CBA, @fallujah1_2; mission: HQFallujahB; (the one you published here) RPT: clear; other issues: There is another curious thing that happens though. In principle one needs to set up Subordinates and properly sync them in the mission editor for those groups becomming accessible to the High Command. But for some strange reason, without setting up any Subordinate and by placing only a "HC - Commander", when you start the mission and Ctrl+Space to access the HC mode all those "unattached" groups become Subordinates and get listed. And while this is true for leaderHQ (A), for the leaderHQB side the same does not happen and proper Commander > Subordinates need to be set/synched up in the editor (or on the fly through some scripting). Conclusion: This lack of consistency might be symptom of something fishy in HETMAN. (Serendipity FTW). Reproduction: Pick HQFallujahB mission. Make leaderHQB "playable", add 2 "High Command - Commander", sync them up with both leaders each. Start up the mission and after both leaders have given orders (1-1-A 1 (Gammadust): MORALE A: 0 and "1-1-A 1 (Gammadust): MORALE B: 0") press Ctrl+Space (note the slight delay in the icons showing). After that switch to leaderHQB and do the same to notice the difference. Other stuff I tought about along following this thread is that your idea about keeping strategic and tactical decisions separated is the proper one. This helps keep modularity and compatibility with other mods. Keeping micro AI for the arma engine and other mods on one side and also macro AI on the other. Also to keep these different levels of AI "self-suficient" as in able to to their tasks without the upper level being present. I can see 4 different levels of AI (for now) which mimic RL chain of command: 1 - Soldier AI - Arma Engine (+ mods) 2 - Group Leader AI - Arma Engine (+ mods) 3 - Squad/Platoon Leader AI - HETMAN Leader/Captain 4 - Batallion Leader AI - HETMAN Lieutenant At level 3, as has been suggested, would be responsable for a battle front. And 4 fronts per side wouldn't be irrealistic imo. At level 4 would rely on wider decisions and logistics. With 1 per side. This would relay down the chain more generalized orders only for each Captain (level 3) to comply. On another note, I am also glad you intend to enable radios/communications, it adds a lot to the immersion, specially if their synched with the action. I have been trying to add this feature to ASR_AI group radios myself and it is very nice. (btw ASR appears to be working fine along with HETMAN so far, another hint that proves the point of keeping modularity) If you need a hand on arma's radioprotocol (mod version) or bikb/kbTell (mission script version) topics drop a line, I may be of use :) Edited January 6, 2012 by gammadust Share this post Link to post Share on other sites
taro8 806 Posted January 6, 2012 How much knowledge do you have with scripting? Pitiful, thats how much :P. I still have lots of ideas, check request thread, I left some there: I need script that allows player to join nearest friendly group.Yes, yes, its one of those "I need you to write the script for me" requests, but my coding-fu sucks so much I dont even know where to start. Also I did search, but I couldnt find anything I was looking for. My idea is that player has action command, or better: radio command. that will make player character/group join nearest friendly group. Note "join" not "join and lead". Ability to leave that group with all soldiers from your old group would be nice, or just leaving it by yourself. I would like this script as Im using High AI Commander addon, with is capable of commanding ALL units on battlefield with surprising coherency, but it only gives orders to groups with AI commander. Also I like to play as member of team rather then leader. That would really cool addon if combined with HAC. Share this post Link to post Share on other sites
stupidwhitekid75 11 Posted January 6, 2012 What if for now you just implemented a commander for each major class? One for... Commander of Overall Forces Commander of Infantry Commander of Special Forces Commander of Light Vehicles Commander of Armored Vehicles Commander of Support Vehicles That's only five additional commanders, six in total. Each subordinate controls that specific group, and would use them accordingly. Overall Commander could specify which objectives he wanted which subordinate to attack maybe based on force size and known enemy positions. So maybe sometimes Infantry and Heavy Armor attack together, maybe not. Maybe there are not a lot of Infantry, but there's a bunch of Light Vehicles, so Light Vehicles go to support Infantry. OC only acts as telling the squads what objectives to attack, individual subordinate commanders are the ones who order the groups around. Only other idea, make number of commanders unlimited, leave it up to the player to decide what the maximum should be. In game, for each commander set it up like: leaderHQ, leaderHQ1, leaderHQ2, etc. and same thing for HQB. Player could assign subordinate commanders in case the original dies, named leaderHQ1_1, leaderHQ2_1, etc. Each leader will be synchronized with the units under his command. Objectives would be defined as RydHQ_Obj, RydHQ_Obj1, RydHQ_Obj2...etc. If one commander died, all of his units would either A) Be commanded by same groups Subordinate Commander, or B) They would be assigned to any other existing commander on the map on the same side. Subordinate commanders should have the same personality as there original leader, however it would be slightly dumbed down by a little bit, or possibly dumbed down a little bit in one area and slightly increased in another that wasn't found in the original commander. Switching command to an entirely other group could affect morale even more too, for example if their original commander was a "GENIUS" but there new one was a"BRUTE", the fact that they went from a smart and competent commander to an aggressive and reckless one would reduce morale even if they weren't in combat yet. Of course, if they went from "BRUTE" to "GENIUS" though, there morale would boost as they'd be more trusting of their commanders decisions. Share this post Link to post Share on other sites
gammadust 12 Posted January 6, 2012 I tried it with my High Command Extensions addon (current version very old new one this weekend) with the AI on one side switched off and is very interesting with player HC V AI HAC. Been doing this combination also DomZ. Actually when I mentioned previously about adding Subordinates through scripting, it was your's doing the job. I actualy tought that the misbehaving I had seen was due to some incompatibility but then I disabled your HCExt to properly track it down. Another thing that might be (now pertinent) to know is this. I noticed when I used your functionality to allow units to move again/follow the waypoints after "Team Switching" that unit would cease to be a subordinate (of this commander at least), unable to give further waypoints. I solved this with this alternate solution instead of using your feature in the init.sqf (credits go to TRexian) onTeamSwitch "selectPlayer (leader _from); {_x doFollow leader _from} foreach units _from; selectPlayer _to;"; Share this post Link to post Share on other sites
Rydygier 1309 Posted January 6, 2012 (edited) When I release the new High Command Extensions is it alright if I include a Demo mission with player HC V AI HAC? Of course, it would be great. I think the most satisfying for me is when my addon is useful to others in their missions/projects. I suggest the latest version, although it is alpha. @gamadust, about HC issues and compatibility - I will try to reproduce this observed by you auto-HC-subordination. Actually, quite bizarre. HAC code in no way relates to the HC module. If there is such a strange interference here, the same I wonder where it comes. Have not looked at the script, on which HC module is based, so I do not know how it is constructed and what could induce such effects. In some free time I will try to decompose HC and see what is going on. If you need a hand on arma's radioprotocol (mod version) or bikb/kbTell (mission script version) topics drop a line, I may be of use I will remember thanks. What if for now you just implemented a commander for each major class? This is interesting idea, however I'd have to write many parts of HAC almost from scratch to take this into account. Perhaps in one of later versions... Hmm. Must to think about that. Only other idea, make number of commanders unlimited, leave it up to the player to decide what the maximum should be. In game, for each commander set it up like: leaderHQ, leaderHQ1, leaderHQ2, etc. and same thing for HQB. Player could assign subordinate commanders in case the original dies, named leaderHQ1_1, leaderHQ2_1, etc. Each leader will be synchronized with the units under his command. Objectives would be defined as RydHQ_Obj, RydHQ_Obj1, RydHQ_Obj2...etc. Unfortunatelly it is not so easy in HAC. Every commander has its own set of arrays and variables (like personality, known enemies, morale) so these variables also need to be multiplied and that's why I plan to assign to every commander own set of scripts, as it is now for the A and B. Variables, and there are numerous, can be in this case easily adjusted in my code editor with replace tool, according to standard rules RydHQB_ -> RydHQC_ -> RydHQD_ and so on. I'm not saying that what you suggest is impossible, but it also requires a thorough rethink, so if ever I get around this, it is not in the next release. If one commander died, This is an important issue, thanks for drawing attention. As for the stupider "succesor", someone had already postulated it and I have it on my list. 1 - Soldier AI - Arma Engine (+ mods)2 - Group Leader AI - Arma Engine (+ mods) 3 - Squad/Platoon Leader AI - HETMAN Leader/Captain 4 - Batallion Leader AI - HETMAN Lieutenant Yes, I try strictly follow this. Currently there are very few exceptions. I use command "doWatch" in defensive mode in order to properly orient the group, I also use a command "OrderGetIn" to help load and unload groups from assigned to them vehicles and command "Land" in relation to air cargo units. Edited January 6, 2012 by Rydygier Share this post Link to post Share on other sites
orcinus 121 Posted January 6, 2012 BAnother thing that might be (now pertinent) to know is this. I noticed when I used your functionality to allow units to move again/follow the waypoints after "Team Switching" that unit would cease to be a subordinate (of this commander at least), unable to give further waypoints. I solved this with this alternate solution instead of using your feature in the init.sqf (credits go to TRexian) onTeamSwitch "selectPlayer (leader _from); {_x doFollow leader _from} foreach units _from; selectPlayer _to;"; Nice, thanks for this. I have tried to solve this using an old (2007) solution by Wolfrug, but this looks more appropriate. BR Orcinus ---------- Post added at 10:59 AM ---------- Previous post was at 10:50 AM ---------- Hi OK, very little time today so summarising on HAC + DAC: - releasing excluded groups from DAC works as far as DAC is concerned, but there is currently no way to get them under HAC control. There is no command for reversing the exclusion from HAC. - when an inactive DAC zone is turned on, it generates units but although the HAC unit counter increases, no orders appear to be given to them - they just sit around and only take actions if attacked, even if specifically released from DAC. Although this isn't totally useless if they are spawned at a key location, e.g., at or close by the home HQ, neither side can throw reinforcements into a final push to capture thee nemy HQ, for example. Also the player gets to decide when (or even if) the opposing reinforcements are spawned, which isn't at all great for mission design. @Rydygier: - would it be difficult to make changes that allows a specific excluded group (and/or array of excluded groups such as the "inf_group_z1" example in my earlier post) to be taken into DAC? - would it be possible to change HAC so the later-spawned units/groups are taken fully under HAC control (unless defined as excluded) without player intervention? Both might be achieved by the same script (spouted Orcinus with the sublime confidence of almost total ignorance :o) with some sort of interface so the player can select the groups to be released; and auto-release for the wholly-AI side For the AI-side, upon losses of a given type - grunts, armour, helos, etc. - reaching a particular value, appropriate reserve groups are thrown into the fray. DAC can be set up so that the size of spawned groups is quite unpredictable, so replayability would be significantly increased. Looking forward to trying the latest release over the weekend, thank you :) BR Orcinus Share this post Link to post Share on other sites
Rydygier 1309 Posted January 6, 2012 (edited) There is no command for reversing the exclusion from HAC. Good news is, that in the next alpha there should be such possibility. when an inactive DAC zone is turned on, it generates units but although the HAC unit counter increases, no orders appear to be given to them Not good. If they aren't in some way "incapacitation" by DAC, should receive orders from HAC, like any other ordinary units on the map. Unless units generated by the DAC are not ordinary for some reason... - would it be difficult to make changes that allows a specific excluded group (and/or array of excluded groups such as the "inf_group_z1" example in my earlier post) to be taken into DAC? I don't know, because don't know DAC code and don't know, how to add groups into DAC control. But if you know, how to achieve that, in fact you can (well, you should can) do whatever you want with excluded groups, HAC just don't see them as a friends, so don't control them in any way, although see them if they are enemies of given HAC controlled side. Unless these exclusion rules do not work properly? - would it be possible to change HAC so the later-spawned units/groups are taken fully under HAC control (unless defined as excluded) without player intervention? I'm worried about that, because frankly HAC should absolutely do it already for all groups, which returns the command "AllGroups", and, as the name suggests, this should return ALL groups on map. EDIT: Here's some code (exceptions) that deals with the assignment of the groups under HAC control in the current version and which is activated every cycle: RydHQ_Friends = []; RydHQ_Enemies = []; RydHQ_KnEnemies = []; RydHQ_KnEnemiesG = []; //arrays are emptied every cycle { if (isNil ("RydHQ_SubAll")) then {RydHQ_SubAll = true}; if not ((isNull (leaderHQ)) and not (isNull _x) and (alive (leaderHQ)) and (alive (leader _x))) then { if ((side _x) getFriend (side RydHQ) < 0.6) then {if not (_x in RydHQ_Enemies) then {RydHQ_Enemies = RydHQ_Enemies + [_x]}}; if (RydHQ_SubAll) then { if not ((side _x) getFriend (side RydHQ) < 0.6) then {if (not (_x in RydHQ_Friends) and not (((leader _x) in RydHQ_Excluded) or (faction (leader _x) == "CIV") or (faction (leader _x) == "CIV_RU") or (faction (leader _x) == "BIS_TK_CIV") or (faction (leader _x) == "BIS_CIV_special"))) then { RydHQ_Friends = RydHQ_Friends + [_x] } }; }; } } foreach allGroups;//and are again filled with these groups among all present, which fulfill certain conditions RydHQ_Friends is an internal array, which contains all groups under HAC control in current cycle. ---------- Post added at 15:07 ---------- Previous post was at 13:58 ---------- Reproduction: Pick HQFallujahB mission. Make leaderHQB "playable", add 2 "High Command - Commander", sync them up with both leaders each. Start up the mission and after both leaders have given orders (1-1-A 1 (Gammadust): MORALE A: 0 and "1-1-A 1 (Gammadust): MORALE B: 0") press Ctrl+Space (note the slight delay in the icons showing). After that switch to leaderHQB and do the same to notice the difference. Tested it. Observations: confirm the asymmetric availability of HC for only one side. If I start as West leader - he only has HC. But if I start the game as a leader east, just east leader has access to it. Most importantly - the same effect occurs without HAC. Conclusion: is a feature of the module itself. Apparently no longer needs (Arma2 1.10) synchronization of subordinate HC modules. Apparently also in this arrangement only one unit (first player unit) on the map may use HC module, the others are ignored. BTW: In fact, an excellent tool for monitoring actions of HAC. And for disturbing him too. Cool. :) Edited January 6, 2012 by Rydygier Share this post Link to post Share on other sites
fabrizio_t 58 Posted January 6, 2012 (edited) What if for now you just implemented a commander for each major class?One for... Commander of Overall Forces Commander of Infantry Commander of Special Forces Commander of Light Vehicles Commander of Armored Vehicles Commander of Support Vehicles That's only five additional commanders, six in total. Each subordinate controls that specific group, and would use them accordingly. Overall Commander could specify which objectives he wanted which subordinate to attack maybe based on force size and known enemy positions. So maybe sometimes Infantry and Heavy Armor attack together, maybe not. Maybe there are not a lot of Infantry, but there's a bunch of Light Vehicles, so Light Vehicles go to support Infantry. OC only acts as telling the squads what objectives to attack, individual subordinate commanders are the ones who order the groups around. Only other idea, make number of commanders unlimited, leave it up to the player to decide what the maximum should be. In game, for each commander set it up like: leaderHQ, leaderHQ1, leaderHQ2, etc. and same thing for HQB. Player could assign subordinate commanders in case the original dies, named leaderHQ1_1, leaderHQ2_1, etc. Each leader will be synchronized with the units under his command. Objectives would be defined as RydHQ_Obj, RydHQ_Obj1, RydHQ_Obj2...etc. If one commander died, all of his units would either A) Be commanded by same groups Subordinate Commander, or B) They would be assigned to any other existing commander on the map on the same side. Subordinate commanders should have the same personality as there original leader, however it would be slightly dumbed down by a little bit, or possibly dumbed down a little bit in one area and slightly increased in another that wasn't found in the original commander. Switching command to an entirely other group could affect morale even more too, for example if their original commander was a "GENIUS" but there new one was a"BRUTE", the fact that they went from a smart and competent commander to an aggressive and reckless one would reduce morale even if they weren't in combat yet. Of course, if they went from "BRUTE" to "GENIUS" though, there morale would boost as they'd be more trusting of their commanders decisions. Hi, nice job here. May i give my 2 cents? Just DON'T take this way. Don't have more than 1 AI commander. Make it handle both tactical / strategical deployment. Also I'd make it a "logical" unit, not a physical one. Implementing a full fledged Chain-of-command AI is an intriguing concept, but will be dramatically hard in my experience. Also you'll have to deal with a lot of unneeded computational overhead. Combined arms operations can be easily managed by just a single AI commander directing the movements of all the group leaders. The difficult part is getting all the needed information to properly cohordinate these actions. Edited January 6, 2012 by fabrizio_T Share this post Link to post Share on other sites
Rydygier 1309 Posted January 6, 2012 Implementing a full fledged Chain-of-command AI is an intriguing concept, but will be dramatically hard in my experience. Also you'll have to deal with a lot of unneeded computational overhead. I have a concept, how add to HAC higher level command in quite simply way. If he will be responsible only moving his subordinate commanders objectives, picking for them defense or attack mode, etc., and will does not issue any direct orders to groups. And all this based on the general situations on the map and main target, this will not be too complicated, and will not be specifically overload the CPU. Of course this is not a complete representation of the real chain of command, such a thing would be indeed much too complicated. About combined arm attack. I believe that now it works well enough. If HAC commander knows about the threat, which does not meet infantry alone, often sent in addition to (or instead of) groups of other kinds. As a result, usually in a given area are fighting both infantry and armored vehicles and/or helicopters. You can also join at the beginning to one group infantry and armored vehicle. Share this post Link to post Share on other sites
orcinus 121 Posted January 6, 2012 Good news is, that in the next alpha there should be such possibility. Great, thank you Not good. If they aren't in some way "incapacitation" by DAC, should receive orders from HAC, like any other ordinary units on the map. Unless units generated by the DAC are not ordinary for some reason... Nope - for units generated at the start (before HAC initialises) I use DAC lines like: fun=["z1",[1,0,0],[10,3,50,8,"inf_group_z1"],[],[3,1,10,10,"arm_group_z1"],[],[1,1,1,7]] spawn DAC_Zone; with this in the init: waituntil{DAC_Basic_Value > 0};if(!isServer) then { {[_x] spawn DAC_fReleaseGroup}foreach inf_group_z1; {[_x] enableAttack false}foreach inf_group_z1; {[_x] spawn DAC_fReleaseGroup}foreach arm_group_z1; {[_x] spawn DAC_fReleaseGroup}foreach inf_group_z2; {[_x] enableAttack false}foreach inf_group_z2; {[_x] spawn DAC_fReleaseGroup}foreach arm_group_z2; }; waituntil{time > 45}; RydHQ_Debug = true; // etc. That does work. Units are spawned as others are killed off, & the respawns of the losing side drop to 0 - shortly after which, that side surrenders. The problem is that when a DAC zone starts as inactive, & is later activated & generated groups released by a [too?] simple script activated by radio trigger, they just sit around doing nothing unless attacked. I'll play around with the script & DAC settings tomorrow using the HAC1.1 release & see what happens. I haven't tried using any other spawn scripts - I'm not sure how to set up, say, UPSMON, with a delayed, user-controlled start, which is the issue. -- Oh rats! the line "- would it be difficult to make changes that allows a specific excluded group (and/or array of excluded groups such as the "inf_group_z1" example in my earlier post) to be taken into DAC? " should have been about taking groups into HAC - sorry! :o - especially as you answered that in your first point.. I'm worried about that, because frankly HAC should absolutely do it already for all groups, which returns the command "AllGroups", and, as the name suggests, this should return ALL groups on map. EDIT: Here's some code (exceptions) that deals with the assignment of the groups under HAC control in the current version and which is activated every cycle: RydHQ_Friends = []; RydHQ_Enemies = []; RydHQ_KnEnemies = []; RydHQ_KnEnemiesG = []; //arrays are emptied every cycle { if (isNil ("RydHQ_SubAll")) then {RydHQ_SubAll = true}; if not ((isNull (leaderHQ)) and not (isNull _x) and (alive (leaderHQ)) and (alive (leader _x))) then { if ((side _x) getFriend (side RydHQ) < 0.6) then {if not (_x in RydHQ_Enemies) then {RydHQ_Enemies = RydHQ_Enemies + [_x]}}; if (RydHQ_SubAll) then { if not ((side _x) getFriend (side RydHQ) < 0.6) then {if (not (_x in RydHQ_Friends) and not (((leader _x) in RydHQ_Excluded) or (faction (leader _x) == "CIV") or (faction (leader _x) == "CIV_RU") or (faction (leader _x) == "BIS_TK_CIV") or (faction (leader _x) == "BIS_CIV_special"))) then { RydHQ_Friends = RydHQ_Friends + [_x] } }; }; } } foreach allGroups;//and are again filled with these groups among all present, which fulfill certain conditions RydHQ_Friends is an internal array, which contains all groups under HAC control in current cycle. That code is somewhat <cough> beyond the limits of my current abilities. I think I'll post my HAC-DAC test mission somewhere over the weekend, maybe someone more competent would like to take a look. In any event, for the basic mission the combination seems to work just fine; with beefed-up forces & more respawns I've had some great fire-fights already despite the simplicity of the mission design. Kudos to Rydygier & Silola! BR Orcinus ---------- Post added at 06:57 PM ---------- Previous post was at 06:49 PM ---------- Hi, nice job here.May i give my 2 cents? Just DON'T take this way. Don't have more than 1 AI commander. Make it handle both tactical / strategical deployment. Also I'd make it a "logical" unit, not a physical one. Implementing a full fledged Chain-of-command AI is an intriguing concept, but will be dramatically hard in my experience. Also you'll have to deal with a lot of unneeded computational overhead. Combined arms operations can be easily managed by just a single AI commander directing the movements of all the group leaders. The difficult part is getting all the needed information to properly cohordinate these actions. I agree - despite being a scripting dunce, I quail at even drawing up a flow-chart for how all those commanders would exchange information & co-ordinate actions. As for combined arms groups, by the way, these can be specifically spawned by a DAC zone and passed to HAC at the start. However, I don't think there's currently a specific group setting in HAC for combined arms with armoured units, only for combinations of grunts with unarmoured AT or AA vehicles; so I'm not sure how HAC handles them - I haven't tested yet but will do so shortly. BR Orcinus Share this post Link to post Share on other sites
taro8 806 Posted January 6, 2012 I think the easiest way to deal with DAC created units is to make a list for HAC, in with PHRASES can be put like "inf_group_" or "HAC_". HAC will take control of those units as long as phrase is in leader name. Share this post Link to post Share on other sites
Rydygier 1309 Posted January 6, 2012 Similar option is in testing now. In this optional mode HAC will take control only over groups, which leaders are named "Ryd" (or "RydB", maybe will change this to "HAC" and "HACB") plus number from 1 to 100 (default) or to other, manually set maximum value. Eg "Ryd12" or "RydB98" for B side. At the moment I have no idea how to make HAC looking for a specific phrase in their names instead of whole specific names. As far as I know, "string" variables can only be added to each other. Do not know method for so, that code be looking for shared part of given names. Share this post Link to post Share on other sites