Skip to content

Commit 697f00f

Browse files
authored
Release/3.1
#Changelog ## [3.1] - 2018-11-12 ### Added - Changelog - Rydigiers "Fire For Effect" artillery system - CBA settings support for "Fire For Effect" artillery system - Parameter for forcing speedMode "FULL" - Descriptive header for all Vcom functions - VCOM is now licensed under the ArmA Public License - Share Alike - Zeus to mission.sqm ### Changed - Vcom will not give flanking orders to AI with a commander - Suppressors are now dynamically checked - Mines are now handled differently (Placed mines are added to an array) - AI will no longer ragdoll when prone, will instead perform animations - AI will not ragdoll when within a certain distance of a player - VCom functions have been moved to Vcom\Functions\VCM_Functions - Hold waypoints now define what building to garrison - AI will not generate flanking waypoints targetting unknown units ### Deprecated - VCom artillery (Replaced by "Fire For Effect") ### Removed ### Fixed - VCM_SKILLCHANGE had no effect - AI taking control when player incapacitated - AI attempting to flank aircraft - Building clearing behaviour did not check distance to target - Civilians being affected by VCOM - VCM_SIDEENABLED had no effect - VCM_ARTYENABLE had no effect ### Security - Whitelisted remote execution for VCOM
1 parent 959d2ba commit 697f00f

File tree

90 files changed

+5466
-2527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+5466
-2527
lines changed

FFE 1.14.pdf

462 KB
Binary file not shown.

Vcom/FSMS/SQUADBEH.fsm

+940-922
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
params ["_source0", "_target0", "_rnd0"];
2+
private ["_dX0","_dY0","_angleAzimuth0"];
3+
4+
_dX0 = (_target0 select 0) - (_source0 select 0);
5+
_dY0 = (_target0 select 1) - (_source0 select 1);
6+
7+
_angleAzimuth0 = (_dX0 atan2 _dY0) + (random (2 * _rnd0)) - _rnd0;
8+
9+
_angleAzimuth0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
//_bArr = [_tgtPos,RydFFE_ArtG,"SADARM",6,leaderHQ] call RYD_fnc_ArtyMission;
2+
params ["_pos","_arty","_ammoG","_amount","_FO"];
3+
private ["_pos","_arty","_ammoG","_amount","_FO","_ammo","_possible","_battery","_agp","_artyAv","_vehs","_gp","_hasAmmo","_checked","_vh","_tp","_inRange","_pX","_pY","_pZ","_ammoArr","_allAmmo"];
4+
5+
_ammo = "";
6+
_ammoArr = [];
7+
8+
_hasAmmo = 0;
9+
_possible = false;
10+
_battery = [];
11+
_agp = [];
12+
13+
_artyAv = [];
14+
_vehs = 0;
15+
_allAmmo = 0;
16+
17+
{
18+
_gp = _x;
19+
if not (isNull _gp) then
20+
{
21+
if not (_gp getVariable ["RydFFE_BatteryBusy",false]) then
22+
{
23+
_hasAmmo = 0;
24+
_checked = [];
25+
26+
{
27+
_vh = vehicle _x;
28+
if not (_vh in _checked) then
29+
{
30+
_checked set [(count _checked),_vh];
31+
32+
_tp = toLower (typeOf _vh);
33+
34+
switch (true) do
35+
{
36+
case (_tp in RydFFE_Mortar) :
37+
{
38+
switch (_ammoG) do
39+
{
40+
case ("HE") : {_ammo = "8Rnd_82mm_Mo_shells"};
41+
case ("SPECIAL") : {_ammo = "8Rnd_82mm_Mo_shells"};
42+
case ("SECONDARY") : {_ammo = "8Rnd_82mm_Mo_shells"};
43+
case ("SMOKE") : {_ammo = "8Rnd_82mm_Mo_Smoke_white"};
44+
case ("ILLUM") : {_ammo = "8Rnd_82mm_Mo_Flare_white"};
45+
}
46+
};
47+
48+
case (_tp in RydFFE_SPMortar) :
49+
{
50+
switch (_ammoG) do
51+
{
52+
case ("HE") : {_ammo = "32Rnd_155mm_Mo_shells"};
53+
case ("SPECIAL") : {_ammo = "2Rnd_155mm_Mo_Cluster"};
54+
case ("SECONDARY") : {_ammo = "2Rnd_155mm_Mo_guided"};
55+
case ("SMOKE") : {_ammo = "6Rnd_155mm_Mo_smoke"};
56+
case ("ILLUM") : {_ammo = ""};
57+
};
58+
};
59+
60+
case (_tp in RydFFE_Rocket) :
61+
{
62+
switch (_ammoG) do
63+
{
64+
case ("HE") : {_ammo = "12Rnd_230mm_rockets"};
65+
case ("SPECIAL") : {_ammo = "12Rnd_230mm_rockets"};
66+
case ("SECONDARY") : {_ammo = "12Rnd_230mm_rockets"};
67+
case ("SMOKE") : {_ammo = ""};
68+
case ("ILLUM") : {_ammo = ""};
69+
};
70+
};
71+
72+
default
73+
{
74+
if ((count RydFFE_Other) > 0) then
75+
{
76+
_arr = [];
77+
78+
{
79+
if (_tp in (_x select 0)) exitWith {_arr = _x select 1}
80+
}
81+
foreach RydFFE_Other;
82+
83+
if ((count _arr) > 0) then
84+
{
85+
switch (_ammoG) do
86+
{
87+
case ("HE") : {_ammo = _arr select 0};
88+
case ("SPECIAL") : {_ammo = _arr select 1};
89+
case ("SECONDARY") : {_ammo = _arr select 2};
90+
case ("SMOKE") : {_ammo = _arr select 3};
91+
case ("ILLUM") : {_ammo = _arr select 4};
92+
}
93+
}
94+
}
95+
}
96+
};
97+
98+
_inRange = _pos inRangeOfArtillery [[_vh],_ammo];
99+
100+
if (_inRange) then
101+
{
102+
{
103+
if ((_x select 0) in [_ammo]) then
104+
{
105+
_hasAmmo = _hasAmmo + (_x select 1);
106+
_allAmmo = _allAmmo + (_x select 1);
107+
_ammoArr set [(count _ammoArr),_ammo];
108+
_vehs = _vehs + 1
109+
};
110+
111+
if not (_hasAmmo < _amount) exitWith {};
112+
if not (_allAmmo < _amount) exitWith {}
113+
}
114+
foreach (magazinesAmmo _vh);
115+
}
116+
};
117+
118+
if not (_vehs < _amount) exitWith {}
119+
}
120+
foreach (units _gp);
121+
122+
if (_hasAmmo > 0) then
123+
{
124+
_artyAv set [(count _artyAv),_gp];
125+
_agp set [(count _agp),leader _gp]
126+
}
127+
}
128+
};
129+
130+
if not (_hasAmmo < _amount) exitWith {};
131+
if not (_allAmmo < _amount) exitWith {}
132+
}
133+
foreach _arty;
134+
135+
if not ((count _artyAv) == 0) then
136+
{
137+
_battery = _artyAv;
138+
139+
_possible = true;
140+
141+
if (_ammoG in ["ILLUM","SMOKE"]) then
142+
{
143+
{
144+
if not (isNull _x) then
145+
{
146+
_x setVariable ["RydFFE_BatteryBusy",true]
147+
}
148+
}
149+
foreach _battery;
150+
151+
_pX = _pos select 0;
152+
_pY = _pos select 1;
153+
_pZ = _pos select 2;
154+
155+
_pX = _pX + (random 100) - 50;
156+
_pY = _pY + (random 100) - 50;
157+
_pZ = _pZ + (random 20) - 10;
158+
159+
_pos = [_pX,_pY,_pZ];
160+
//_i = [_pos,(random 1000),"markArty","ColorRed","ICON","mil_dot",_ammoG,"",[0.75,0.75]] call RYD_fnc_Mark;
161+
[_battery,_pos,_ammoArr,_FO,_amount,_ammoG] spawn
162+
{
163+
params ["_battery","_pos","_ammo","_FO","_amount","_ammoG"];
164+
165+
if (_ammoG == "ILLUM") then
166+
{
167+
[_battery,_pos,_ammo,_amount] call RYD_fnc_CFF_Fire;
168+
}
169+
else
170+
{
171+
_angle = [_FO,_pos,10] call RYD_fnc_AngTowards;
172+
_pos2 = [_pos,_angle + 110,200 + (random 100) - 50] call RYD_fnc_PosTowards2D;
173+
_pos3 = [_pos,_angle - 110,200 + (random 100) - 50] call RYD_fnc_PosTowards2D;
174+
//_i2 = [_pos2,(random 1000),"markArty","ColorRed","ICON","mil_dot",_ammoG,"",[0.75,0.75]] call RYD_Mark;
175+
//_i3 = [_pos3,(random 1000),"markArty","ColorRed","ICON","mil_dot",_ammoG,"",[0.75,0.75]] call RYD_Mark;
176+
177+
{
178+
[_battery,_x,_ammo,ceil (_amount/3)] call RYD_fnc_CFF_Fire;
179+
180+
_ct = 0;
181+
waitUntil
182+
{
183+
sleep 0.1;
184+
_ct = _ct + 0.1;
185+
_busy = 0;
186+
187+
{
188+
if not (isNull _x) then
189+
{
190+
_busy = _busy + ({not ((vehicle _x) getVariable ["RydFFE_GunFree",true])} count (units _x))
191+
};
192+
}
193+
foreach _battery;
194+
195+
((_busy == 0) or (_ct > 12))
196+
};
197+
}
198+
foreach [_pos,_pos2,_pos3]
199+
};
200+
201+
_ct = 0;
202+
waitUntil
203+
{
204+
sleep 0.1;
205+
_ct = _ct + 0.1;
206+
_busy = 0;
207+
208+
{
209+
if not (isNull _x) then
210+
{
211+
_add = {not ((vehicle _x) getVariable ["RydFFE_GunFree",true])} count (units _x);
212+
_busy = _busy + _add;
213+
if (_add == 0) then {_x setVariable ["RydFFE_BatteryBusy",false]}
214+
};
215+
}
216+
foreach _battery;
217+
218+
((_busy == 0) or (_ct > 12))
219+
};
220+
221+
{
222+
if not (isNull _x) then
223+
{
224+
_x setVariable ["RydFFE_BatteryBusy",false]
225+
}
226+
}
227+
foreach _battery
228+
}
229+
}
230+
};
231+
232+
//diag_log format ["AM: %1",[_possible,_battery,_agp,_ammoArr]];
233+
234+
[_possible,_battery,_agp,_ammoArr,_allAmmo]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
params ["_arty", "_amount"];
2+
private ["_arty","_amount","_vh","_handled","_magTypes","_mags","_tp","_cnt"];
3+
4+
_amount = ceil _amount;
5+
//if (_amount < 2) exitWith {};
6+
7+
{
8+
{
9+
_vh = vehicle _x;
10+
_handled = _vh getVariable ["RydFFEArtyAmmoHandled",false];
11+
12+
if not (_handled) then
13+
{
14+
_vh setVariable ["RydFFEArtyAmmoHandled",true];
15+
16+
_vh addEventHandler ["Fired",
17+
{
18+
(_this select 0) setVariable ["RydFFE_ShotFired",true];
19+
(_this select 0) setVariable ["RydFFE_ShotFired2",((_this select 0) getVariable ["RydFFE_ShotFired2",0]) + 1];
20+
21+
//if ((RydFFE_SVStart) and (RydFFE_Debug)) then
22+
//{
23+
_shells = missionNameSpace getVariable ["RydFFE_FiredShells",[]];
24+
_shells set [(count _shells),(_this select 6)];
25+
missionNameSpace setVariable ["RydFFE_FiredShells",_shells];
26+
//}
27+
}];
28+
29+
_magTypes = getArtilleryAmmo [_vh];
30+
_mags = magazines _vh;
31+
32+
{
33+
_tp = _x;
34+
_cnt = {_x in [_tp]} count _mags;
35+
_vh addMagazines [_tp, _cnt * (_amount - 1)];
36+
}
37+
foreach _magTypes
38+
}
39+
}
40+
foreach (units _x)
41+
}
42+
foreach _arty;

0 commit comments

Comments
 (0)