11diag_log format [" ------------------ DUWS-R START ----v0------ player: %1" , profileName ];
22
3- // ////////////////////////////////////////////////////
4- // HOW TO MANUALLY CREATE THE MISSION:
5- // 1)YOU MUST PLACE THE HQ LOCATION
6- // 2)DEFINE THE CAPTURABLE ZONES
7- // -- YOU CAN ALSO JUST PUT A HQ SOMEWHERE AND LET THE ZONES BEING RANDOMLY GENERATED
8- // -- YOU MUST PLACE MANUALLY THE HQ IF YOU ARE ALREADY PLACING THE ZONES BY HAND
9- // 3) DONT FORGET TO DEFINE THE VARIABLES BELOW. If you are ONLY placing the HQ by hand, you just need to put "hq_manually_placed" to
10- // "true" instead of "false". If you are also placing the zones by hand, make "zones_manually_placed" to "true".
11- // ///////////////////////////////////////////////////////////
12- // 1) In the gamelogic, for the HQ( !! MAKE ONLY ONE HQ !!): _null=[getpos this] execVM "initHQ\BluHQinit.sqf"
13- //
14- // 2) In the init of gamelogic, to create a capturable enemy zone:
15- // _null = ["zone name",pts awarded upon capture, zone radius,getpos this,false/true,false/true] execvm "createzone.sqf";
16- // "zone name": name of the zone
17- // pts awarded upon capture: points you earn when you capture the zone. Also the amount of points of army power you take and receive
18- // from the enemy after capture
19- // zone radius: how large the zone is
20- // getpos this: It's the position of the zone. The gamelogic actually. You don't have to modify this.
21- // false/true: if the zone is fortified or not. If the zone is fortified, there will be a bit more enemies and they will be maning
22- // static defences if there are any
23- // false/true: if the zone is selecting randomly a prefab base. Prefab is selected according to the zone radius. The bigger the zone,
24- // the bigger the prefab asset will be chosen.
25- //
26- // EXAMPLE, in the init of a gamelogic you have placed on the map:
27- // _null=["OP Xander",20,200,getpos this,true,false] execvm "initZones\createzone.sqf"
28- //
29- // 3) Define these variables:
30-
31- // choose between "tropical" - "arid" - "temperate" - "temperate_cold" - "mediterranean"
32- if (isNil " weather_type" ) then {weather_type = " tropical" ;};
33- // set the skill range of ennemy AI
34- if (isNil " opfor_ai_skill" ) then {opfor_ai_skill = [0.1 ,0.3 ];};
35- // set the skill range of friendly AI, from 0 to 1 (0 being completely dumb)
36- if (isNil " blufor_ai_skill" ) then {blufor_ai_skill = [0.4 ,0.7 ];};
37-
38- // you must specify if you have manually placed HQ or not. false = HQ is randomly placed, true = you have manually placed the HQ
39- hq_manually_placed = false ;
40- // you must specify if you have manually placed the zones or not. false = zones are randomly generated, true = you have manually placed the zones
41- zones_manually_placed = false ;
42- zones_max_dist_from_hq = 7500 ;
43- dynamic_weather_enable = true ;
44- maually_chosen = false ;
45-
46- if (isNil " enable_fast_travel" ) then { enable_fast_travel = true ; };
47- // chopper taxi (support) will fast travel (teleport) or not
48- if (isNil " enableChopperFastTravel" ) then { enableChopperFastTravel = true ; };
49- // Starting CP
50- if (isNil " commandpointsblu1" ) then { commandpointsblu1 = 20 ; };
51- // STARTING ARMY POWER
52- if (isNil " blufor_ap" ) then {blufor_ap = 0 ;};
53- opfor_ap = 0 ;
54-
55- // /////////////////////////////////////////////////////
56- // initialise variables
57- // ////////////////////////////////////////////////////
58- // MOST OF THE VALUES ARE BEING OVERWRITTEN BY PLAYER INPUT AT THE BEGINNING
59- // ////////////////////////////////////////////////////
60-
61- // ///////////////////////////////////////////////////////////
62- debugmode = false ; // Debug mode, kind of obsolete
63- // / ------------- VALUES UNDER THIS ARE OVERWRITTEN
64- zones_number = 9 ; // Number of capturables zones to create (when zones are created randomly)
65- zones_spacing = 1200 ; // minimum space between 2 zones (in meters) // SOON OBSOLETE
66- zones_max_radius = 1000 ; // Determine the maximum radius a generated zone can have
67- zones_min_radius = 200 ; // Determine the minium radius a generated zone can have. SHOULD NOT BE UNDER 200.
68-
69- // /////////////////////////////////////////////////////
70- // This mission will have a harder time generating stuff if a lot of the terrain of the island is sloped, meaning that valid locations
71- // will be harder/take longer to find (side missions, mission init).
72- // Keep that in mind when tweaking the zones amount/radius value.
73- // ///////////////////////////////////////////////////////
74- // preprocess the qrf file for the EH
75- QRF_test = compile preprocessFile " WARCOM\WARCOM_opf_qrf.sqf" ;
76- persistent_stat_script_init = [] execVM " persistent\persistent_stats_init.sqf" ;
77- waitUntil {scriptDone persistent_stat_script_init};
78- execvm " dynamic_music\dyn_music_init.sqf" ;
79-
80- // nber of missions succes(!!dont touch!!)
81- missions_success = 0 ;
82-
83- zones_created = false ;
84- blu_hq_created = false ;
85- can_get_mission = true ;
86- failsafe_zones_not_found = false ;
87- createcenter sideLogic ;
88- LogicGroup = createGroup SideLogic ;
89- PAPABEAR= [West ," HQ" ];
90- locator_hq_actived = false ;
91- op_zones_index = 0 ;
92- clientisSync = false ;
93- fobSwitch = false ;
94- player_is_choosing_hqpos = false ;
95-
96- if (isNil " amount_zones_created" ) then {
97- amount_zones_created = 0 ;
98- };
99-
100- if (isNil " HQ_pos_found_generated" ) then {
101- HQ_pos_found_generated = false ;
102- };
103-
104- if (isNil " chosen_settings" ) then {
105- chosen_settings = false ;
106- };
107-
108- if (isNil " chosen_hq_placement" ) then {
109- chosen_hq_placement = false ;
110- };
111-
112- if (isNil " zoneundercontrolblu" ) then {
113- zoneundercontrolblu = 0 ;
114- };
115-
116- if (isNil " amount_zones_captured" ) then {
117- amount_zones_captured = 0 ;
118- };
119-
120- if (isNil " savegameNumber" ) then {
121- savegameNumber = 0 ;
122- };
123-
124- if (isNil " capturedZonesNumber" ) then {
125- capturedZonesNumber = 0 ;
126- };
127-
128- if (isNil " finishedMissionsNumber" ) then {
129- finishedMissionsNumber = 0 ;
130- };
1313
132- if (isNil " OvercastVar" ) then {
133- OvercastVar = 0 ;
134- };
135-
136- if (isNil " FogVar" ) then {
137- FogVar = 0 ;
138- };
4+ if (isServer ) then { nul = [] execVM " serverinit.sqf" ; };
5+ if (isDedicated ) exitWith {};
6+ waitUntil {! isNull player };
1397
140- // this is a special one (if/else)
141- if (isNil " Array_of_FOBS" ) then {
142- // if the player is sp or server or no fobs have been created
143- Array_of_FOBS = [];
144- }
145- else // / JIP for the client
146- {
147- {
148- [_x ] execVM " support\FOBactions.sqf" ;
149- } forEach Array_of_FOBS;
150- };
8+ player allowDamage false ;
1519
152- if ( isNil " Array_of_FOBname " ) then {
153- Array_of_FOBname = [] ;
154- } ;
10+ persistent_stat_script_init = [] execVM " persistent\persistent_stats_init.sqf " ;
11+ waitUntil { scriptDone persistent_stat_script_init} ;
12+ execvm " dynamic_music\dyn_music_init.sqf " ;
15513
156- game_master = [" player1" ];
157-
158- player allowDamage false ;
15914
16015#include " dialog\supports_init.hpp"
16116#include " dialog\squad_number_init.hpp"
16217
163- execVM " misc\gps_marker.sqf" ;
18+ if ( hasInterface ) then { execVM " misc\gps_marker.sqf" ;} ;
16419if (! isMultiplayer ) then {
16520 getsize_script = [player ] execVM " mapsize.sqf" ;
16621};
@@ -206,6 +61,9 @@ if (isMultiplayer) then {
20661 " finishedMissionsNumber" addPublicVariableEventHandler {[] execVM " persistent\persistent_stats_missions_total.sqf" ;}; // change the shown CP for request dialog
20762 };
20863
64+ player globalChat format [" gamemaster: %1" , game_master];
65+ player globalChat format [" HQ_pos_found_generated: %1" , HQ_pos_found_generated];
66+
20967 if (! isDedicated && ! HQ_pos_found_generated) then { // SERVER INIT
21068 if (((vehiclevarname player ) in game_master)) then {
21169 DUWS_host_start = false ;
@@ -226,9 +84,11 @@ if (!isDedicated && !HQ_pos_found_generated) then {
22684 if (((vehiclevarname player ) in game_master)) then {
22785 _null = [] execVM " dialog\startup\hq_placement\placement.sqf" ;
22886 waitUntil {chosen_hq_placement};
229-
87+ player globalChat format [" hq_manually_placed: %1" , hq_manually_placed];
88+ player globalChat format [" player_is_choosing_hqpos: %1" , player_is_choosing_hqpos];
23089 // create random HQ
23190 if (! hq_manually_placed && ! player_is_choosing_hqpos) then {
91+ player globalChat " lance recherche position..." ;
23292 hq_create = [20 , 0.015 ] execVM " initHQ\locatorHQ.sqf" ;
23393 waitUntil {scriptDone hq_create};
23494 };
@@ -249,16 +109,6 @@ if (!isDedicated && !HQ_pos_found_generated) then {
249109// AMBIANCE LOOP
250110// _nul = [] execVM "musicloop.sqf";
251111
252- if (isServer ) then {
253- // group cleaning script
254- 0 = [
255- 60 * 60 , // seconds to delete dead bodies (0 means don't delete)
256- 60 * 60 , // seconds to delete dead vehicles (0 means don't delete)
257- 60 * 60 , // seconds to delete dropped weapons (0 means don't delete)
258- 0 , // seconds to deleted planted explosives (0 means don't delete)
259- 60 * 60 // seconds to delete dropped smokes/chemlights (0 means don't delete)
260- ] execVM ' repetitive_cleanup.sqf' ;
261- };
262112
263113if (hasInterface ) then {
264114 // WHEN CLIENT CONNECTS INIT (might need sleep)
@@ -284,13 +134,9 @@ if (!isMultiplayer) then {
284134 _handle = [] execVM " dialog\hc_init.sqf" ;
285135};
286136
287- if (isServer ) then {
288- // initialise the ressources per zone bonus
289- _basepoint = [] execVM " zonesundercontrol.sqf" ;
290- };
291137
292- // init the bonuses you get when capturing zones
293- _basepoint = [] execVM " zones_bonus.sqf " ;
138+
139+
294140
295141// INIT the operative list
296142execVM " dialog\operative\operator_init.sqf" ;
@@ -347,11 +193,7 @@ if (isMultiplayer) then {
347193 [" island_captured_win" ,true ,true ] call BIS_fnc_endMission ;
348194};
349195
350- if (zones_manually_placed) then {
351- waitUntil {! isNil (" Array_of_OPFOR_zones" )};
352- sleep 1 ;
353- _warcom_init = [Array_of_OPFOR_zones, getpos hq_blu1, [0 ,0 ,0 ], blufor_ap, opfor_ap, 2700 ,blufor_ai_skill,opfor_ai_skill, 1500 ] execVM " WARCOM\WARCOM_init.sqf" ;
354- };
196+
355197
356198if (mission_DUWS_firstlaunch) then {
357199 waitUntil {chosen_settings};
0 commit comments