Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Gunslinger,
Grab the OP files, I can walk you through the rest - what server package are you using?
Bf2freak,
Are you using a packed pbo or an active mpmissions folder?
Also it may be easier to use the "upload a file" function for future files or add the code braces around it which is [ C O D E ] at the top before the file and [ / C O D E ] at the bottom of your file here on the forum, of course without the spaces between the letters.
Gunslinger,
You want to put the 3 files from the OP and your extracted zombie_generate.sqf in a /scripts folder underneath your MPMissions/"map" folder, if you are only using one map it may be the root of the folder. After which you edit the init.sqf in this same place and it should just work. If you are running Chernarus this init should work, I have added the files here for ease (only diff here is the change of MPKilled and MPEventhandler in add_server_unit.sqf due to issues I had on pg 26).
So they just run around with nothing in hands / on their backs? May have a fix for this@Morox,
Thanks for the reply and sorry about my slow reaction as I have been busy with family over here,
Anyway back to the task at hand, lol.
I got the AI working with your instructions for the MPeventhandler changes however I am trying to change the dmr and heavy machine guns for more basic weapons however the AI spawn with the ammo but not the weapon itself.
Still cannot figure this out.
init.sqf
/*
INITILIZATION
*/
startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false, false];
//REALLY IMPORTANT VALUES
dayZ_instance = 1; //The instance
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;
//disable greeting menu
player setVariable ["BIS_noCoreConversations", true];
//disable radio messages to be heard and shown in the left lower corner of the screen
enableRadio false;
//Load in compiled functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
progressLoadingScreen 1.0;
"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
if ((!isServer) && (isNull player) ) then
{
waitUntil {!isNull player};
waitUntil {time > 3};
};
if ((!isServer) && (player != player)) then
{
waitUntil {player == player};
waitUntil {time > 3};
};
if (isServer) then {
_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};
if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
[] execVM "fixes\kh_actions.sqf";
zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
};
if (isServer) then {
// For settings involving the factions, go to scripts\add_unit_server.sqf and adjust the settings at the top of the file
_factions = [] execVM "scripts\set_unit_faction.sqf";
//_aispawnpos - Worldspace location
//_wpradius - Distance you want units to be able to travel
//_wpnum - Number of waypoints to place withing that distance. The higher the number, the more extensively the units will travel
//_numunits - Number of units to place. Keep in mind that squads will be placed in multiples of this number
//_unitType - Type of unit to place. 0: Random, 1: Sniper, 2: Gunner, 3: Militia, 4: Squad of the previous 3 types
//_faction - The type of faction you want this unit to adhere to. 0: RESISTANCE, 1: EAST, 2: WEST. Factions loyalties are set in scripts\set_unit_faction.sqf
//_baseSkill - Lowest possible skill that the units can posess from 1 to 10
//_potentialSkill - Highes possible skill that the units can posess from 1 to 10
//_gearSet - Which set of gear your units will use. To set the types of gear, edit the variables at the top of scripts\add_units_server.sqf
//_respawnTime - How long to wait until NPCs respawn (in seconds)
_aispawn = [[4829.9868,2450.1104,0],100,5,4,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Ballota airstrip West
_aispawn = [[12954.624,9783.1533,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Berezino East
_aispawn = [[12043.963,9091.3477,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Berezino 2 east
_aispawn = [[10276.416,12049.664,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Black Muntain East
_aispawn = [[3320.1643,3938.3496,0],100,5,4,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Bor West
_aispawn = [[6743.8853,2581.1865,0],100,5,4,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Cherno West
_aispawn = [6891.9189,11438.73,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Devils Castle East
_aispawn = [[7788.2856,12613.048,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Dons Camp East
_aispawn = [[3442.2849,4955.7129,0],100,5,4,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Drozhino West
_aispawn = [[10445.011,9868.9912,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Dubrovka East
_aispawn = [[10480.69,2217.8027,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Elektro East
_aispawn = [[13060.078,7094.0596,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // factrory East
_aispawn = [[9659.084,8795.334,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Gorka East
_aispawn = [[5979.6953,10343.341,0],100,5,4,4,0,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Grishno Resistance
_aispawn = [[8517.8682,6676.3276,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Guglovo East
_aispawn = [[8614.4316,11868.967,0],100,5,4,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Gvozdno East
_aispawn = [[5318.8369,8602.6328,0],100,5,4,4,0,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Kabanino Res
_aispawn = [[12290.833,10904.328,0],100,5,2,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Khelm east
_aispawn = [[12127.406,3496.2185,0],100,5,2,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // kamyoshovo east
_aispawn = [[3654.0908,2475.9468,0],100,5,2,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // komarova west
_aispawn = [[4483.6777,4616.1675,0],100,5,2,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // kotzlovka west
_aispawn = [[11212.624,12256.609,0],100,5,2,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Krastonav east
_aispawn = [[2780.3135,10018.82,0],100,5,2,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Lopatino west
_aispawn = [[7544.5845,5148.7822,0],100,5,2,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // moglievka east
_aispawn = [[11275.323,5495.4053,0],100,5,2,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Msta east
_aispawn = [[2019.2487,7327.7178,0],100,5,2,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // myshkino west
_aispawn = [[5846.4434,4706.708,0],100,5,2,4,0,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // nadezdhino res
_aispawn = [[12073.906,12724.305,0],100,5,2,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // NE airfield east
_aispawn = [[13002.393,8285.8574,0],100,5,2,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Nizhnoye east
_aispawn = [[7074.4854,7683.4883,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // novy Sobor east
_aispawn = [[4480.0781,10375.544,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // NW airfield west
_aispawn = [[12146.174,7266.5801,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // orlovets east
_aispawn = [[1693.9392,3845.0657,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Pavlovo west
_aispawn = [[5014.1143,12493.039,0],100,5,1,4,0,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Petrovka res
_aispawn = [[4473.5957,6411.3198,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // pogorevka west
_aispawn = [[10753.393,8132.6606,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // polana east
_aispawn = [[7976.5557,3299.5386,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Prigorodki east
_aispawn = [[4915.0903,5605.6401,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Pulkovo west
_aispawn = [[9156.2549,3897.7598,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Pusta east
_aispawn = [[3072.9629,7945.4404,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // pustoshka west
_aispawn = [[4808.0024,6805.0518,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // rogovo west
_aispawn = [[9654.5244,6555.2583,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // shakhovka east
_aispawn = [[13454.279,6233.647,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Solnichy east
_aispawn = [[2528.7561,6354.9839,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Soosnovka west
_aispawn = [[10140.659,5434.4302,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // staroye east
_aispawn = [[4808.0024,6805.0518,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Stary sobor west
_aispawn = [[12803.296,4450.7466,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Tulga east
_aispawn = [[3815.0635,8865.0938,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Vybor west
_aispawn = [[6590.3159,6029.1128,0],100,5,1,4,1,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // vyshnoye east
_aispawn = [[2758.7144,5304.3457,0],100,5,1,4,2,7,10,0,900] execVM "scripts\add_unit_server.sqf"; // Zellengorsk west
_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};
Reiben,
For this AI addon the file you need to modify is your dayz_missions.pbo and not the server pbo, all the additions are added to the missions so that clients can download them when they connect.