silola 1086 Posted March 15, 2006 hi matt, this is quite easy. Do the following... In the script "DAC_Config_Creator.sqs" change this setting: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DAC_Com_Values = [0.0] This is everything what you must do bye silola Share this post Link to post Share on other sites
honchoblack 2 Posted March 15, 2006 Silola I had great fun in MP latly, and the best experience is always your DAC mission. You should try DAC missions on the SWAF server using FFUR2006 with leaning, its tremendous fun. So just wanted to drop by, and thank you again for your excellent work on the DAC. I hope there will be an update with the updated respawn. Share this post Link to post Share on other sites
gunterlund 0 Posted March 17, 2006 Sorry if Im repeating other posts but Im getting an error with DAC. Nothing fatal. Happens when AI units are being deleted after death. I get an error that flashes by very quickly that is something like _Countmin group count select 1[#] dividezero. Game doesnt stop but still occurs. Ill try to get more detail in it. It is consistent. Share this post Link to post Share on other sites
Drongo69 117 Posted March 17, 2006 I have a few questions/requests regarding DAC. First, is it possible to increase the size of the camps spawned by DAC? Right now it spawns a flag, crate, fire and a building. Is it possible to create several different buildings? In the mission I'm working on, destroying DAC terrorist bases is one of the main objectives. It would be more atmospheric if the bases could be bigger, maybe including some empty vehicles. Alternatively, is it possible to get the location of these bases from DAC so that I can manually spawn extra buildings? I know it has been stated that there is no plan for artillery in the near future. However, I think it would be great if a simplified version was added. For example, now, when a DAC squad makes enemy contact, they are aware of the enemy coordinates, correct? If so, simple "simulated" artillery should be fairly simple. How about allowing a small chance (adjustable by the mission creator) of a barrage on that location (using createvehicle to spawn 105mm shells 300m up)? Another question, is it possible to see the friendly radio chatter, but NOT the enemy's? I was also wondering what sort of experiences people have had using savegame with DAC. Once again Silola, DAC is an awesome tool Share this post Link to post Share on other sites
sanctuary 19 Posted March 17, 2006 In Group Link 1.91, KeyCat introduced a good artillery script that is used by the AI, he has commented his scripts, so maybe giving a look into his code could be helpfull to see if it can be implemented without too much headaches into a mission that is already using the DAC system. Share this post Link to post Share on other sites
Drongo69 117 Posted March 17, 2006 As far as I remember, Grouplink can only focus on a single group. What I am hoping for is the ability for friendly AI DAC groups to call in mortars on enemy AI DAC groups and vice versa. Since DAC groups already reference enemy positions in their responses, it shouldn't be hard to add an artillery option to these responses. So basically, I would like to know: - Which script makes DAC groups report "Enemy contact at grid ..."? - Which part of the script takes care of this? - What is the name of the variable that stores the enemy position? If I know this, I can probably implement the arty myself. Share this post Link to post Share on other sites
silola 1086 Posted March 17, 2006 hi I will think over this, and then announce myself here again...ok? @gunterlund can you please post your "DAC_Config_Creator.sqs" here? maybe there is a small mistake. thx :-) bye silola Share this post Link to post Share on other sites
silola 1086 Posted March 17, 2006 Hi, here the first answer: You find the information to the camps in the Arrays "DAC_Spawn_CampsE" + "DAC_Spawn_CampsW" For every camp 6 values are filed there: 1. Value = position of the zone (to ascertain in which zone the camp has his origin.) 2. Value = name of building 1 (Tent) 3. Value = name of building 2 (Shed) 4. Value = likelyhood of the Respawns (%) 5. Value = Respawn type (infantry, vehicles, infantry + vehicles) 6. Value = Respawn count If you generate, for example, 3 camps, the Array would look so: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DAC_Spawn_CampsE = [[[posX,posY],name1,name2,100,2,10],[[posX,posY],name1,name2,100,2,10],[[posX,posY],name1,name2,100,2,10]] If you liked to place, for example, in every camp an empty Truck 50 m to the north of the tent, if you can solve this as follows: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_i = 0 while "_i < count DAC_Spawn_CampsE" do {_pos = getpos ((DAC_Spawn_CampsE select _i) select 1);_veh = {Ural} createvehicle [(_pos select 0),(_pos select 1) + 50,0];_i = _i + 1} or if you want to generate several objects: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NewObjects = [["Ural",0,50,0],["CampEast",0,-50,90],["Shed",50,0,90]] ; 1 value = typeof object ; 2 value = divergence X ; 3 value = divergence Y ; 4 value = rotation object _c = 0 #Loop ?(_c >= count _NewObjects):exit _nextArray = _NewObjects select _c _newVeh = _nextArray select 0 _newPosX = _nextArray select 1 _newPosY = _nextArray select 2 _newDir = _nextArray select 3 _i = 0;while "_i < count DAC_Spawn_CampsE" do {_pos = getpos ((DAC_Spawn_CampsE select _i) select 1);_veh = _newVeh createvehicle [(_pos select 0) + _newPosX,(_pos select 1) + _newPosY,0];_veh setdir _newDir;_i = _i + 1} ~0.5 _c = _c + 1 goto "Loop" If is pure theory and is untested bye silola Share this post Link to post Share on other sites
quiet_man 8 Posted March 17, 2006 hi I will think over this, and then announce myself here again...ok? great tool I'm just working on a vietnam mission Is it possible for player group to ask for support from AI groups? or could you think about it quiet_man Share this post Link to post Share on other sites
gunterlund 0 Posted March 17, 2006 hi  I will think over this, and then announce myself here again...ok? @gunterlund can you please post your "DAC_Config_Creator.sqs" here? maybe there is a small mistake. thx :-) bye silola Here you go. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;--------------------------| ;   Dynamic-AI-Creator   | ;--------------------------| ;   Script by Silola    | ;   05 / 2005       | ;   silola@mapfact.net   | ;==========================| _ZonePos     = _this select 0 _InitSer     = _this select 1 DAC_Inf     = [] DAC_StartDummy  = "logic" createvehicle [0,0,0] DAC_NewUnit   = DAC_StartDummy DAC_Basic_Value = 0 ~random 0.1 DAC_Inf = DAC_Inf + [_ZonePos] ?(count DAC_Inf > 1):goto "wait" ;\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; DAC-Settings ;/////////////////////////// DAC_Players     = [s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24, s25,s26,s27,s28,s29,s30] DAC_KI_Count_Level = [[2,4],[2,6],[2,9],[2,12],[2,2]] DAC_Reduce_Value  = [500,550,0.1] DAC_Dyn_Weather   = [100,15,0.6] DAC_KI_Spawn    = [60,60,0,1] DAC_Delete_Value  = [60,150,0] DAC_KI_Cache    = [1,1] DAC_Com_Values   = [2,1] DAC_KI_Level    = 4 DAC_KI_AddOn    = 1 DAC_Res_Side    = 0 DAC_Marker     = false goto "startinitscript" ;\\\\\\\\\\\\\\\\\\\\\\\\\\\ #StartScriptOnClient ;/////////////////////////// []exec "DAC\Scripts\DAC_Client_check.sqs" exit ;\\\\\\\\\\\\\\\\\\\\\\\\\\\ #StartScriptOnServer ;/////////////////////////// []exec "DAC\Scripts\DAC_Server_check.sqs" exit ;\\\\\\\\\\\\\\\\\\\\\\\\\\\ #StartScriptLokal ;/////////////////////////// exit #startinitscript ?(_InitSer == 1):if(!(local Server)) then {goto {startweather}} []exec "DAC\Scripts\DAC_Init_Creator.sqs" ?(DAC_Marker):[]exec "DAC\Scripts\DAC_Init_Marker.sqs" #startweather [DAC_Dyn_Weather select 0,DAC_Dyn_Weather select 1,DAC_Dyn_Weather select 2]exec "DAC\Scripts\DAC_Dyn_Weather.sqs" ~0.2 DAC_Inf = DAC_Inf - [_ZonePos] ?(_InitSer == 1):if(!(local Server)) then {goto {Clienthint}} @(DAC_Basic_Value > 0) ?((DAC_Basic_Value > 1) && (_InitSer == 1)):goto "ErrorHint" ?(_InitSer == 1):if(local Server) then {goto {StartScriptOnServer}} goto "StartScriptLokal" #wait ~0.1 @(count DAC_Inf == 1) DAC_Inf = DAC_Inf - [_ZonePos] exit #Clienthint hint format["Dynamic-AI-Creator V1\nis initialized ..."] _sum = time ~3 @(DAC_Basic_Value > 0) ?(DAC_Basic_Value > 1):goto "ErrorHint" _sum = time - _sum hint format["Dynamic-AI-Creator V1\nInitialization successfully.\n\nRequired time: %1 sec.",_sum] goto "StartScriptOnClient" #ErrorHint hintc format["Attention, DAC has caused an Error.\nThe initialization has missed.\n\nError number: %1\n\n2 = Script call\n3 = DAC_Players\n4 = Unit_Config\n5 = Dummy unit\n6 = DAC_Marker\n7 = Waypoints\n8 = Zonename\n9 = wrong AI-Addon",DAC_Basic_Value] exit This does bring up a question. Im using a large force with approx 43 troops. I have not 30 of them [s1,,,s30]. Could this be making a difference? Share this post Link to post Share on other sites
silola 1086 Posted March 17, 2006 hi, @gunterlund Were these 43 groups placed in the editor? The groups which are not put down in the Array "DAC_Players" cause no problems. Only the AI cannot react properly to these units. Observe please exactly, when the mistake appears. Then write down please exactly the error message, if possibly. thx bye silola Share this post Link to post Share on other sites
Drongo69 117 Posted March 17, 2006 Thanks very much for the quick (and detailed) reply Silola. I'll let you know how I go with it Share this post Link to post Share on other sites
gunterlund 0 Posted March 17, 2006 hi,@gunterlund Were these 43 groups placed in the editor? The groups which are not put down in the Array "DAC_Players" cause no problems. Only the AI cannot react properly to these units. Observe please exactly, when the mistake appears. Then write down please exactly the error message, if possibly. thx bye silola the 43 soldiers (not groups) were placed in the editor. Rgr Ill get the exact message. It always happens when the system is removing dead enemy AI units that have recently been kia'ed. Share this post Link to post Share on other sites
silola 1086 Posted March 18, 2006 hi, @honchoblack <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">I hope there will be an update with the updated respawn. The Respawn and the DAC are two independent systems. Therefore, you can bring together the new Respawn without hesitation with DAC @tacrod <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Another question, is it possible to see the friendly radio chatter, but NOT the enemy's? Here the solution: In the script "DAC\Scripts\DAC_Radio.sqs" carry out please the following change... Old: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#RadioNr ?(("alive _x" count units _group) == 0) || ((DAC_Com_Values select 0) == 0):exit ?(side (leader _group) == side player):_sameside = 1 goto format["RadioNr%1",_funknr] New: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#RadioNr ?(("alive _x" count units _group) == 0) || ((DAC_Com_Values select 0) == 0):exit if(side (leader _group) == side player) then {_sameside = 1} else {exit} goto format["RadioNr%1",_funknr] Next one... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">- Which script makes DAC groups report "Enemy contact at grid ..."? - Which part of the script takes care of this? - What is the name of the variable that stores the enemy position? Have a look at this Script "DAC\KI_1\DAC_Move_to_Enemy.sqs". This script starts, as soon as the group knows enough about the enemy, or stands under bombardment. Then the group moves in the direction of enemy. If you see this message... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Enemy Contact! Attacking now! this script "DAC_Move_to_Enemy.sqs" is begun. In this script you find directly at the beginning these both values: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_group = _this select 0 (Which group announces the enemy contact) _target = _this select 1 (the enemy's unit which is a starting point for the attack) There you could start a script. For example: [_group,_target] exec "\DAC\KI_1\DAC_Artillery.sqs" In the "DAC_Config_Creator.sqs" the values of the Arti could lie: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DAC_Arti_Values = [40,[10,10],[50,100],[5,10],[1,1]] DAC_Arti_Array = [] ; 1 value = likelyhood in percent ; 2 value = minimum time up to release + accidental time window ; 3 value = minimum radius, maximum radius ; 4 value = minimum number of the shells, maximum number of the shells ; 5 value = delay of the shells at least + accidental delay ; DAC_Arti_Array = Array to supervise Now the Script "DAC_Artillery.sqs" (is only one example): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_group = _this select 0 _target = _this select 1 _basePos = getpos _target _random = random 100 _entry = format["%1",_target] ?(_entry in DAC_Arti_Array):exit ?(_random > (DAC_Arti_Values select 0)):exit DAC_Arti_Array = DAC_Arti_Array + [_entry] _waitTime = time + ((DAC_Arti_Values select 1) select 0) + random ((DAC_Arti_Values select 1) select 1) _aCount = ((DAC_Arti_Values select 3) select 0) + random ((DAC_Arti_Values select 3) select 1) #waitLoop ~1 ?(("alive _x" count units _group) == 0):DAC_Arti_Array = DAC_Arti_Array - [_entry];exit ?(("alive _x" count units (group _target)) == 0):DAC_Arti_Array = DAC_Arti_Array - [_entry];exit ?(time < _waitTime):goto "WaitLoop" #StartArti ?(_aCount <= 0):DAC_Arti_Array = DAC_Arti_Array - [_entry];exit _t = ((DAC_Arti_Values select 4) select 0) + random ((DAC_Arti_Values select 4) select 1) _r = random 360;_d = ((DAC_Arti_Values select 2) select 0) + random ((DAC_Arti_Values select 2) select 1) _p = [(_basePos Select 0) + (Sin (_r) * _d),(_basePos Select 1) + (Cos (_r) * _d),0] _a = "shell73" camcreate _p ~_t _aCount = _aCount - 1 goto "StartArti" I hope that I could help you with it something bye silola Share this post Link to post Share on other sites
gunterlund 0 Posted March 19, 2006 hi,@gunterlund Were these 43 groups placed in the editor? The groups which are not put down in the Array "DAC_Players" cause no problems. Only the AI cannot react properly to these units. Observe please exactly, when the mistake appears. Then write down please exactly the error message, if possibly. thx bye silola Error is _countmin _groupcount select 1|#| error zero diviser. Something is missing when items are deleted and it gets to the end where there is nothing to delete from that group it looks like. Share this post Link to post Share on other sites
Baphomet 0 Posted March 19, 2006 Is anyone going to make/release missions using the DAC as a basic framework? Share this post Link to post Share on other sites
silola 1086 Posted March 19, 2006 hi, @gunterlund The deleting of units has nothing to do with it. The mistake comes if the Respawn generates a new group. I think, it is a faulty script call. How many zones do you use? Can you send me your "Mission.sqm", or show the script calls here? thx and bye silola Share this post Link to post Share on other sites
Drongo69 117 Posted March 19, 2006 @Silola I tried your script for adding more buildings to camps, it seems to work very well. Thanks I haven't had time to try the other stuff (radio and arty) yet though. @Baphomet My DMA Toyota Wars mission pack has 3 missions, all built with DAC. The pack has SP and coop missions included. Also, the latest release of CCE incorporates DAC. Finally, I am currently working on CoIn 2 which makes VERY heavy use of DAC. Share this post Link to post Share on other sites
quiet_man 8 Posted March 19, 2006 hi,@gunterlund The deleting of units has nothing to do with it. The mistake comes if the Respawn generates a new group. I think, it is a faulty script call. How many zones do you use? Can you send me your "Mission.sqm", or show the script calls here? thx and bye silola DAS_Group_Air.sqs line 135 gives _groupcount as [] when calling DAC_Group_Soldier.sqs I have tried with [_vehcargo,_vehcargo], seams to work better by the way, a good idea how to make heli respawn? quiet_man Share this post Link to post Share on other sites
gunterlund 0 Posted March 19, 2006 hi,@gunterlund The deleting of units has nothing to do with it. The mistake comes if the Respawn generates a new group. I think, it is a faulty script call. How many zones do you use? Can you send me your "Mission.sqm", or show the script calls here? thx and bye silola Great Silola where can I send it to. Thanks Share this post Link to post Share on other sites
silola 1086 Posted March 20, 2006 hi, @tacrod here 2 small changes with regard to the Arti script. The script call must look so: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[_group, _target] exec "DAC\KI_1\DAC_Artillery.sqs" In the script then this change: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_entry = format ["%1", group _target] @gunterlund <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Great Silola where can I send it to. Thanks >>> silola@freenet.de @quiet_man <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DAS_Group_Air.sqs line 135 gives _groupcount as [] when calling DAC_Group_Soldier.sqs This is right, because the group belongs to the Heli, and also the Heli cannot be respawned. In this respect the Array must contain no data. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">I have tried with [_vehcargo,_vehcargo], seams to work better What happens then exactly if you do this? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">by the way, a good idea how to make heli respawn? For it there is at the moment still no solution. Perhaps, in the next version. bye silola Share this post Link to post Share on other sites
Drongo69 117 Posted March 20, 2006 I gave the artillery code a few tests, it seems to work fine. Enemy squads called it in on the player and AI squads called it in on each other. Thanks Share this post Link to post Share on other sites
silola 1086 Posted March 20, 2006 hi, @tacrod You have also tried the thing with the markers? It should function, actually. The script for the Arty was only one simple example. But nicely it functions. Perhaps, you can insert, in addition, a distance query. Or the Arty can be requested only by certain units types. @gunterlund Your email has come and I will try to localize that problem. I hope that I can find something cu silola Share this post Link to post Share on other sites
mattxr 9 Posted March 20, 2006 i still cant get the hang of Activting and deactiving triggers i want to active the dac trigger when player gets near then deactive it when the player leaves i have no idea about how i do that even looking at the readme could any1 help? Share this post Link to post Share on other sites
quiet_man 8 Posted March 20, 2006 @quiet_man<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">DAS_Group_Air.sqs line 135 gives _groupcount as [] when calling DAC_Group_Soldier.sqs This is right, because the group belongs to the Heli, and also the Heli cannot be respawned. In this respect the Array must contain no data. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">I have tried with [_vehcargo,_vehcargo], seams to work better I had the same error message as gunterlund, I also had Helis standing around forever I think the message comes from DAC_Group_Soldier.sqs trying to read _groupcount without checking array size Line 40 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_countmax = _groupcount select 0;_countmin = _groupcount select 1 It seams to me DAS_Group_Air.sqs tries to create the "cargo" for the Heli, so I entered _vehcargo for the _groupcount to generate exactly the number of soldiers to fit into the Heli cargo space since this change I had no more error message and the Helis work fine!? (just blind guess and observation, nothing granted given the complexity of the scripts) quiet_man Share this post Link to post Share on other sites