Rydygier 1317 Posted February 20, 2012 (edited) @abdel Hmm. ACE shouldn't make a trouble as long as RHQ arrays are proper set for ACE units (maybe some typo in classname? Tried with generic A2 USMC ambulance in the same mission?) ."Res" is idle order. Can you upload this or similar mission? If A2 1.10 + ACE is sufficient to launch it, then I test this, otherwise at least will check configs itp. @ Jingle Thanks for that info and testing. Edited February 20, 2012 by Rydygier Share this post Link to post Share on other sites
abdel 1 Posted February 20, 2012 http://www.mediafire.com/?ou1lbtagz1vmxc1 I used pure ARMA 2 generic units, I'm using ARMA 2 CO 1.6 + ACE2. Share this post Link to post Share on other sites
Rydygier 1317 Posted February 21, 2012 It is takistan, so can't test (really - only A2 here :) ). Config looks fine. But here is my own demo on Utes (HAC script and config included): Medevac test Maybe check, if this will work for you (for me worked). You are injured soldier here, so just wait and check map for medevac marker. One note: first medevac missions are issued after about 160 seconds, so maybe just this was a problem - maybe you did not wait long enough? BTW AI was suprised me here. I tested support range earlier on Duala and there was 500 meters, but here, if injured is not player and alone, then will go towards ambulanse placed much futher. But as subordinate in group, will not receive from TL heal order until ambulance is in radius. Interesting. ---------- Post added at 23:56 ---------- Previous post was at 23:44 ---------- troopmon2 Wow. Thanks. Must check this. ---------- Post added at 00:39 ---------- Previous post was at 23:56 ---------- For interested another, similar debug tool. This one shows on the map in the same way as KAM combat mode and behaviour for current waypoint ("NONE" if there is no any waypoint or "" if there is only initial waypoint always placed at start at unit's position) plus kind of team leader's vehicle. WPMon has same limitations as KAM. _CWi = 1; _CW = []; _CMode = "NONE"; _CBeh = "NONE"; _in = ""; _i = ""; { _LU = leader _x; if ((count (waypoints _x)) > 0) then { _CWi = currentWaypoint _x; _CW = [_x,_CWi]; _CMode = waypointCombatMode _CW; _CBeh = waypointBehaviour _CW; } else { _CW = [_x,1]; _CMode = "NONE"; _CBeh = "NONE"; }; _in = "markKWP" + str (_x); _i = createMarker [_in,position (vehicle _LU)]; _i setMarkerColor "ColorBlack"; _i setMarkerShape "ICON"; _i setMarkerSize [0.1,0.1]; _i setMarkerType "DOT"; _i setMarkerText ((typeof (vehicle _LU)) + " - " + (str _CMode) + " - " + (str _CBeh)); } foreach AllGroups; while {(true)} do { sleep 1; { _LU = leader _x; if ((count (waypoints _x)) > 0) then { _CWi = currentWaypoint _x; _CW = [_x,_CWi]; _CMode = waypointCombatMode _CW; _CBeh = waypointBehaviour _CW; } else { _CW = [_x,1]; _CMode = "NONE"; _CBeh = "NONE"; }; _i = "markKWP" + str (_x); _i setMarkerPos (position (vehicle _LU)); _i setMarkerText ((typeof (vehicle _LU)) + " - " + (str _CMode) + " - " + (str _CBeh)); } foreach AllGroups; } ---------- Post added at 01:02 ---------- Previous post was at 00:39 ---------- BTW I'm curious about effect of some tests, that I will make right away - what if to place close each other two enemy groups, all with manually set blue or green mode... Theroretically shouldn't open fire at all... Also I wonder if there is some difference between A2 1.10 and OA 1.60 in this case... Some short tests was done with this test mission for A2 1.10: In "blue" mode groups will not fire at enemy even when under fire. In "green" mode however groups are firing at enemy on sight. Maybe distance is here important... But more tests needed to be sure. Share this post Link to post Share on other sites
abdel 1 Posted February 21, 2012 It has worked, I had to wait 3-4 mins, thanks Ryd. :) Share this post Link to post Share on other sites
KeyCat 131 Posted February 21, 2012 (edited) troopmon2 is a great tool for debugging, its an easy mod to use which allows you to view all units infantry/vehicle/Armour/air and shows behavior and waypoint types etc. +1 I would say it's the best debugging tool for observing AI behavior etc. Unfortunately it hasn't been udated for a long time but still works with some issues. Also check out GCam 2.0 by Gigan, not so many features as TroopMon 2 but very clean interface and updated for OA. /KC Edited February 21, 2012 by KeyCat Share this post Link to post Share on other sites
Rydygier 1317 Posted February 21, 2012 (edited) @ Jingle Maybe im thinking it is more to do with the new command behaviour to do with vehicles rather than the HAC, It is possible, just now I saw these threads: http://forums.bistudio.com/showthread.php?131362-Armor-Targetting-engagement-in-1-60 http://forums.bistudio.com/showthread.php?131173-Targeting-in-tanks ---------- Post added at 10:56 ---------- Previous post was at 10:40 ---------- Ah, I didn't now that the Kn parameter sums observations in a way that one enemy may be counted several times. Hmm. Actually, losses could be a better route, especially if the casualty rate starts to climb consistently relative to known kills (are those counted? Are they / could they be reported to the leaders?). I need to think about this sometime when I don't have the dreaded lonely axon syndrome :eek: Well. KAM shows Kn value for nearest enemy, and given enemy may be nearest for several groups at once, so this value may for many groups refer to same enemy unit, so if you simply add these values from each group, then you receive strongly exaggerated threat value. Still it is possible to make, that given enemy is counted only once and knowledge about him also. There is even possible to make some "value" gradation, so more dangerous enemy will have more "danger" value, in some free time will try to prepare some code. HAC counts casaulties for each controlled group every cycle, but note, that HAC considers group strenght as nominal in moment, when is taking control over this group. So if group lost some men earier, then HAC will not consider such losses. Kills aren't counted. Edited February 21, 2012 by Rydygier Share this post Link to post Share on other sites
Rydygier 1317 Posted February 21, 2012 (edited) @Orcinus This should help: //to init: nul = [Center point of checked for allies perimeter (object or position array),radius of this perimeter, any unit of side for which threat is checked] execVM "ThreatMon.sqf"; _center = _this select 0; _radius = _this select 1; _unit = _this select 2; _unitG = group _unit; while {(true)} do // refreshed every 30 seconds { if (isNil ("RydHQ_ThreatValue")) then {RydHQ_ThreatValue = 0}; // this global variable will contain final threat value. _NearAllyG = []; _EG = []; _threat = 0; { if (((side _x) getFriend (side _unitG) >= 0.6) and not (_x in _NearAllyG) and (((vehicle (leader _x)) distance _center) <= _radius)) then {_NearAllyG = _NearAllyG + [_x]}; } foreach Allgroups; // getting ally groups in given radius around given center point { _countE = 0; _Eveh = []; _mobileFactor = 1; _armorFactor = 1; _airFactor = 1; _Kn = 0; _LU = leader _x; _ne = _LU findNearestEnemy (vehicle _LU); //getting nearest known enemy for each ally group in radius if ((isNull _ne) or (((group _ne) in _EG))) then //selecting only present enemies not counted yet { _countE = 0; _mobileFactor = 1; _armorFactor = 1; _airFactor = 1; _Kn = 0; } else // setting formula multipiers { _EG = _EG + [(group _ne)]; _Eunits = units (group _ne); _countE = count _Eunits; { if (not ((vehicle _x) == _x) and not ((vehicle _x) in _Eveh)) then {_Eveh = _Eveh + [(vehicle _x)]}; } foreach _Eunits; _mobileFactor = _mobileFactor + ((count _Eveh)/10); { if (_x isKindOf "tank") then { _armorFactor = _armorFactor + 0.5 } else { if (_x isKindOf "Wheeled_APC") then { _armorFactor = _armorFactor + 0.25 } else { if (_x isKindOf "Air") then { _airFactor = _airFactor + 1; } } } } foreach _Eveh; _Kn = (leader _x) knowsAbout _ne; _threat = _threat + (_countE * _mobileFactor * _armorFactor * _airFactor * _Kn); // main threat value formula } } foreach _NearAllyG; if not (_threat == RydHQ_ThreatValue) then {RydHQ_ThreatValue = _threat}; // threat value becomes a global variable value if changed //hint (str RydHQ_ThreatValue); sleep 30; } Note: this is for single case (generating single variable). To make this work for all groups simultanously there will be needed some changes (just ask, if needed, I will think about this then :) ). It is not HAC dependant and may be used anywhere. As more dangerous are considered enemy groups with own vehicles, especially armored or air. Final value may be of course processed further. May be added comparing factor that takes into account number and weaponry of allied and known enemy forces in area... Also note, that this gives higher threat value when enemy is better known, but takes into consideration only Kn value for first checked ally group, and this value may be not highest amongst Kn values of all checked allied groups. Also is not taking into account enemies, that aren't nearest to any ally group in area. For this purpose there may be useful NearTargets command. Use hint (str RydHQ_ThreatValue); just above sleep 30; command to on screen control of this value. Hmm. Such code my be sueful also for HAC improving... But there is in A2 default retreat behaviour when group feels overwhelmed, so maybe this is not neccessary. Edited February 21, 2012 by Rydygier Share this post Link to post Share on other sites
orcinus 121 Posted February 21, 2012 @OrcinusThis should help: Wow, that looks great! Thank you :) I'm looking forward to the weekend & having some time to work on this. Shortly I have to go back to work stuff, I have a report to write. This project should be finished by mid-March & life return to some semblance of sanity. On another point - kills are routinely reported in most militaries - e.g., as far back as WW II, aircraft started to be fitted with cameras linked to the guns; with one purpose being confirmation of kills. There are lots of missions that count player's kills; some keep a running total of casualties on each side (thomsonb's excellent "Flashpoint..." series being one example). Would it be difficult to implement this in HAC? - not necessarily for display to the player(s) during the game unless the mission designer wants that. Ryd, thanks yet again for all your solid work on HAC! BR Orcinus Share this post Link to post Share on other sites
Rydygier 1317 Posted February 21, 2012 Implementing kill counter for each side should be possible as long, as it will be not a part of Leader's knowledge (because may be very hard to determine (and heavy to calculate), about which kills Leader should to know, and about which not, also because it is unnecessary - Leader's morale is calculated in other way, by comparing own and known enemy forces and with losses factors - general and current), but some external value available for mission maker. But if so, equally well may be this resolved by external script. Still, I afraid, that here may be needed some heavy iterations and maybe even event handlers (for example EH "killed" for all units, checked often beacuse of spawning during play). Must to think about such script. Share this post Link to post Share on other sites
orcinus 121 Posted February 21, 2012 @Ryd: No, there's no reason for entity to know about it for what I have in mind. However, while I don't know how the script works, thomsonb's routine (called by a radio button) seems pretty light - I don't see any significant impact on FPS, for example, on activating that button. Just for fun, I also played around with adding a couple of DAC camps & HAC to a modified Flashpoint game - seemed to work OK, the count was sensible; as time went on, groups were destroyed & respawned, the kill count kept climbing (actually groups are respawned anyway in these missions, it's just that I wanted a base to rearm at, etc.). Well, except that sometimes the player spawned right next to the OPFOR camp :icon_ohmygod: Cheers Orcinus Share this post Link to post Share on other sites
subroc 4 Posted February 22, 2012 (edited) Rydygier: i cant thank you enough for this scriptset, only downsida is that i dont play as much mp as before ;) One problem i have though which i cant find any answer for is: I make two (or more) commanders on EAST naming them properly and giving them their own obj trigger but if i set both of them to RydHQ_Order = "DEFEND"; RydHQB_Order = "DEFEND"; both LeaderHQ and LeaderHQB commanders try to defend the startingpoint of LeaderHQ. I would like to have LeaderHQ defend location "A" and LeaderHQB defend location "B", is that possible or am i doing something wrong? Best regards Subroc Edited February 22, 2012 by subroc spelling Share this post Link to post Share on other sites
Rydygier 1317 Posted February 22, 2012 (edited) @Orcinus So here is, some kind of experimental counter with silent hint infoscreen. Behind each number is hidden a global variable, that may be used in any way (hint may be easly turned off or deleted if not needed). Counted are: current forces for west, east and resistance, total losses and total enemy kills ("friendly" kills aren't counted). It is based on "killed" EH, so will be very interefere with any script, that uses this kind of event handler... Is HAC compatibile but may be used without HAC as well. All three files goes into mission folder. Init, as usual: nul = [] execVM "KCInit.sqf"; KC @subroc I will check defend code right away. Edited February 22, 2012 by Rydygier Share this post Link to post Share on other sites
orcinus 121 Posted February 22, 2012 @OrcinusSo here is, some kind of experimental counter with silent hint infoscreen. Behind each number is hidden a global variable, that may be used in any way (hint may be easly turned off or deleted if not needed). Counted are: current forces for west, east and resistance, total losses and total enemy kills ("friendly" kills aren't counted). It is based on "killed" EH, so will be very interefere with any script, that uses this kind of even handler... Is HAC compatibile but may be used without HAC as well. All three files goes into mission folder. Init, as usual: nul = [] execVM "KCInit.sqf"; KC. Oh that looks great! Unfortunately I shall not have time to experiment till the weekend. Getting up at 5 am does not agree with my biology :( Thanks, Ryd. Share this post Link to post Share on other sites
Rydygier 1317 Posted February 22, 2012 (edited) @subroc Can I see all yours HAC init config? Is proper set limit control for both Leaders? If not, this will be simpliest answer. Checked code, and looks fine - for leader "B" code refers to leaderHQB position, and "B" side objective, as should be. ---------- Post added at 21:08 ---------- Previous post was at 21:04 ---------- Getting up at 5 am Throw this awful job. :) And where is the longed-for retirement? Edited February 22, 2012 by Rydygier Share this post Link to post Share on other sites
subroc 4 Posted February 22, 2012 (edited) Ok, here it is: RydHQ_Debug = true; RydHQB_Debug = true; RydHQ_UnlimitedCapt = false; RydHQ_Surr = false; RydHQ_SubSynchro = true; RydHQ_SMed = true; RydHQ_SFuel = true; RydHQ_SAmmo = true; RydHQ_SRep = true; RydHQ_SupportWP = false; RydHQ_Smoke = true; RydHQ_GarrR = 1000; RydHQ_Combining = true; RydHQ_Order = "DEFEND"; RydHQ_CargoFind = 100; RydHQ_Front = false; RydHQB_UnlimitedCapt = false; RydHQB_Surr = false; RydHQB_SubSynchro = true; RydHQB_SMed = true; RydHQB_SFuel = true; RydHQB_SAmmo = true; RydHQB_SRep = true; RydHQB_SupportWP = false; RydHQB_Smoke = true; RydHQB_GarrR = 1000; RydHQB_Combining = true; RydHQB_Order = "DEFEND"; RydHQB_CargoFind = 100; RydHQB_Front = false; nul = [] execVM "RydHQInit.sqf"; fyi i have also synced the diffrent groups to their respective leader, so they are not all synced to leaderHQ. Looking at the debug info on the map the Def Center marker is placed where LeaderA spawns and i get a recB marker around 1200m from leaderHQB spawn. Edited February 22, 2012 by subroc wrote down some info from debug Share this post Link to post Share on other sites
Rydygier 1317 Posted February 22, 2012 (edited) OK. I see, that you use SubSynchro control mode, and, I assume, you synchronized chosen groups with each Leader... One important thing is missing: Enabling SubSynchro is not enough, it is also needed to turn off unlimited control: RydHQ_SubAll = false; RydHQB_SubAll = false; Try with this. This "Rec B" marker was brown? Edited February 22, 2012 by Rydygier Share this post Link to post Share on other sites
subroc 4 Posted February 22, 2012 wow, thanks, works perfect. ok so i thought RydHQ_SubAll = false was default option Share this post Link to post Share on other sites
orcinus 121 Posted February 23, 2012 Throw this awful job. :) And where is the longed-for retirement? Actually it's fun most of the time. However, having my main PC screwed up put me almost two weeks behind, so I can't spread the unsocial hours stuff like conf calls to APAC & West Coast USA as I would normally. Retire? Not while my brain still works reasonably well. I'll always want to do something useful even if only part-time. Preferably somewhere warm & sunny, though - equally tired of British winters & British "summers". Cheers Orcinus Share this post Link to post Share on other sites
Jingle 0 Posted February 24, 2012 Havent found any more bugs - in fact it is working like a dream - so a big thx for that bud. Just an idea though for air units, possibly having RHQ_CAS and RHQ_AIRTRANSPORT arrays. Main reason being it would give the player the option to put attack aircraft and helicopters in the CAS array and Transport type aircraft like the Chinook in the AIRTRANSPORT array, my main observation that air units tend to go straight into the fray (depending on the personality ofc) and ussually dont last very long which isnt very tactical or efficient (for the armies concerned), also the chinook in my mission tends to go into attack mode (rather than transport) - though if I could use the exclusion arrays for this - eg to make them perform only transport missions, it isnt very viable for spawned units of the same type later on which come into play. Do you think there is a way to do this? would be pretty cool adding to an already game renovating experience provided by yours truly:D Share this post Link to post Share on other sites
Rydygier 1317 Posted February 24, 2012 Lately haven't much time, but will try to check this thread as often, as possible (and will keep releasing new versions if ready of course)... @Jingle I think it is some easy way to achieve, that Chinook (and any other cargo vehicle of course) will receive only cargo missions (or stop to receive attack orders at least). Try to add it's class name to RHQ_NCAir and perhaps also RHQ_NCCargo (but this shouldn't be neccessary). These are arrays for unarmed vehicles (No Combat) and HAC will treat such vehicle as an unarmed unit, therefore, excluded from an attack missions (but still if needed such unit will use it's weapon of course). In fact putting given classname in: RHQ_NCAir + RHQ_Air + RHQ_Cargo (+ RHQ_NCCargo ?) should be equal to RHQ_Air + hypothetical RHQ_AIRTRANSPORT. Share this post Link to post Share on other sites
Jingle 0 Posted February 24, 2012 (edited) Thx ryd will try that. (works perfect thx) Another question if I may: Is there a way I can tie in spawning reinforcements at the main HQ tied in with Capturing Objectives? For example - WEST captured Objective 1 - then I would spawn the infantry squad at a game logic at the airbase for example and if they captured a secondary objective I could spawn for example an empty vehicle/artillery piece. Any ideas? Edited February 25, 2012 by Jingle Share this post Link to post Share on other sites
Rydygier 1317 Posted February 26, 2012 (edited) HAC, to track progress, uses this variable: RydHQ_NObj (form for "A" side, for "B" and following as usual, RHQB_NObj and so on). If it's value is equal 1, means, that currently goal is a first objective. Value equal 2 means, that first objective is captured, and second is target, 3 - first and second are captured, 4 - also third is captured. This value may be changed every reset (when objective checking occurs, default every 10 minutes). However there is no value for all objectives captured (not needed for HAC (hmm... something to think about), possible values are 1,2,3,4). So you may to use this variable in some condition for spawning trigger/script. Just remember, that objectives may be also lost (with all subsequent) and retaken theoretically indefinitely (and this variable's value will change accordingly)... There is also second variable, used for Leader's unit relocation routine, named RydHQ_Progress. Usually is equal 0, but if after last reset some objective(s) was captured, then at current reset becomes equal to 1 until next reset. If some objectives was lost lately, then at next reset will become -1 until subsequent reset (for this purpose HAC always compares the state of progress at the previous reset to the state at the current reset). This may be useful too. Edited February 26, 2012 by Rydygier Share this post Link to post Share on other sites
katipo66 94 Posted February 27, 2012 Anyone try this with I44? I tried it without using any configs or setting up arrays and it works no problem... admittedly i didnt play through a whole mission but enough to see commanders take control of all units i placed on the map :D Also is there a way to change the speed in which units move to waypoints i.e. RydHQHaulass = True! Share this post Link to post Share on other sites
Rydygier 1317 Posted February 27, 2012 Nope currently there is no such variable for speed setting. Will think about, however will be some work with this because changes will be needed in numerous code lines for that purpose. BTW I suppose, that during WWII there was some other tactics, blitzkrieg itp. HAC may be anachronistic a bit here... or maybe not? Anyway - who cares? :) Share this post Link to post Share on other sites
taro8 806 Posted March 1, 2012 I may have found a problem with HAC. I set up small infantry only battle around Electozavodsk (or something). I snuck behind enemy lines and found enemy commander, called artillery strike (once again thanks for help) and killed him. Then something weird happened: Arma started lagging as hell and everything turned into slide show. It was very cyclic so Im pretty sure its script trying to do something, but failing, due to dead enemy commander. Share this post Link to post Share on other sites