Simple AI Tutorial (no rMod or DayZ_Factions)

Has anyone found a way to get them to respawn after a set time ?
My poor AI are getting pwned :( really feel for the little guys, Spent so long adding them that they have become like the brothers i never wanted
 
ye thats something i am also wanting as once they are dead thats it no more action (apart from players) until restart
 
does anyone have any clue about Script scripts\zombie_generate.sqf not found? I have tried everything I can think of
 
Here is the relevant snippet from my init.sqf Scripts are placed in the MPmissions\scripts folder
Code:
zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";
 
if (isServer) then {
//
_factions = [] execVM "scripts\set_unit_faction.sqf";
//diag_log format["Factions executed: %1",_factions];
//Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units, group type [0:random unit, 1:sniper, 2:gunner, 3:militiaman, 4:squad], faction [0:hates everyone except survivors, 1:hates everyone]]
_aispawn = [[11826.25,12851.13,0],100,5,1,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
 
_serverMonitor =[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
};

Normally, I would hope no one saw my post and delete it and laugh quietly at my stupidity. I would however like anyone else who may not have the knowledge to know the difference. The scripts folder needs to be packed in the mission PBO...duh
 
here is me init.sqf and i dont get that error what you get

Code:
/*   
    INITILIZATION
*/
startLoadingScreen ["","DayZ_loadingScreen"];
enableSaving [false, false];
 
//REALLY IMPORTANT VALUES
dayZ_instance = 1;                    //The instance
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;
 
_logistic = execVM "=BTC=_Logistic\=BTC=_Logistic_Init.sqf";
execVM "R3F_ARTY_AND_LOG\init.sqf";
execVM "BTK\Cargo Drop\Start.sqf";
_fast_roping = [] execVM "=BTC=_fast_roping\=BTC=_fast_roping_init.sqf";
 
 
 
//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)
call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf";
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
call compile preprocessFileLineNumbers "compiles.sqf";                //Compile regular functions
progressLoadingScreen 1.0;
zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";
//fnc_usec_selfActions =    compile preprocessFileLineNumbers "scripts\fn_selfActions.sqf";
stream_locationCheck = {
//Thank you very fucking much, KK!
};
 
remProc = true;
hasBuildItem = false;
 
CODEINPUT = [];
keyCode = [];
keyValid = false;
 
"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";
    _factions = [] execVM "scripts\set_unit_faction.sqf";
        //diag_log format["Factions executed: %1",_factions];
        //Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units, group type [0:random unit, 1:sniper, 2:gunner, 3:militiaman, 4:squad], faction [0:hates everyone except survivors, 1:hates everyone]]
      _aispawn = [[14107.359, 2761.4114, 1.9073486e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 1
    _aispawn = [[14129.436, 2752.1528, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 2
    _aispawn = [[14112.284, 2731.5193, 2.2888184e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 3
    _aispawn = [[14088.307, 2751.564, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 4
    _aispawn = [[13716.366, 2888.9133, 3.8146973e-006],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 5
    _aispawn = [[13720.933, 2912.7529, 1.1444092e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 6
    _aispawn = [[13689.323, 2893.8037, -1.5258789e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 7
    _aispawn = [[13671.864, 2884.4431, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 8
    _aispawn = [[13471.255, 3340.6299, -4.5776367e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 9
    _aispawn = [[13459.126, 3326.207, -8.392334e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 10
    _aispawn = [[13211.578, 3229.9529, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 11
    _aispawn = [[13234.376, 3229.9287, 1.5258789e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 12
      _aispawn = [[14107.359, 2761.4114, 1.9073486e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 13
    _aispawn = [[14129.436, 2752.1528, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 14
    _aispawn = [[14112.284, 2731.5193, 2.2888184e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 15
    _aispawn = [[14088.307, 2751.564, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 16
    _aispawn = [[13716.366, 2888.9133, 3.8146973e-006],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 17
    _aispawn = [[13720.933, 2912.7529, 1.1444092e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 18
    _aispawn = [[13689.323, 2893.8037, -1.5258789e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 19
    _aispawn = [[13671.864, 2884.4431, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 20
    _aispawn = [[13471.255, 3340.6299, -4.5776367e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 21
    _aispawn = [[13459.126, 3326.207, -8.392334e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 22
    _aispawn = [[13211.578, 3229.9529, 0],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 23
    _aispawn = [[13234.376, 3229.9287, 1.5258789e-005],100,5,2,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes 24
 
};
 
if (!isDedicated) then {
    //scripts
    [] execVM "Scripts\kh_actions.sqf";
    [] execVM "custom_debug.sqf";
    [] execVM "scripts\ss_remove.sqf";
    [] execVM "fixes\change_streetlights.sqf";
    //Conduct map operations
    0 fadeSound 0;
    waitUntil {!isNil "dayz_loadScreenMsg"};
    dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
   
    //Run the player monitor
    //_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
    __id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "addin\plrInit.sqf";}];
    _playerMonitor =    [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
    _nul = [] execVM "addin\plrInit.sqf";
   
 
    [] execVM "actions.sqf";   
};
 
I run a dedicated reality package. I'm an idiot. I didn't put the scripts folder in the PBO, i just put it in the mpmissions folder. Packed it in the pbo and everything is working great now!
 
hmm mine was working fine just in the mpmission folder im now stuck on putting them into thirsk did the exact same shit but they just wont spawn in has anyone got any ideas? i will post init file next
 
// Mission Initialization
startLoadingScreen ["", "DayZ_loadingScreen"];
cutText ["", "BLACK OUT"];
enableSaving [false, false];

// Variable Initialization
dayZ_instance = 1;
hiveInUse = true;
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;

// Settings
player setVariable ["BIS_noCoreConversations", true]; // Disable greeting menu
//enableRadio false; // Disable global chat radio messages

// Compile and call important functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
progressLoadingScreen 1.0;

// Set Tonemapping
"Filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4];
setToneMapping "Filmic";

// Run the server monitor
if (isServer) then {
_serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";
};

if (!isServer && isNull player) then {
waitUntil { !isNull player };
waitUntil { time > 3 };
};

if (!isServer && player != player) then {
waitUntil { player == player };
waitUntil { time > 3 };
};

zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";

if (isServer) then {
//
_factions = [] execVM "scripts\set_unit_faction.sqf";
//diag_log format["Factions executed: %1",_factions];
//Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units, group type [0:random unit, 1:sniper, 2:gunner, 3:militiaman, 4:squad], faction [0:hates everyone except survivors, 1:hates everyone]]
_aispawn = [[1055.4,3257.47,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1186.6,4324.56,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1712.2,4398.21,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[2563.83,3555.21,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[2673.55,2895.38,0],100,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1963.63,1944.74,0],200,20,3,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1429.78,1993.78,0],200,20,3,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1295.46,2131.51,0],200,20,3,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes

_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";

};

// Run the player monitor
if (!isDedicated) then {
0 fadeSound 0;
0 cutText [(localize "STR_AUTHENTICATING"), "BLACK FADED", 60];

_id = player addEventHandler ["Respawn", { _id = [] spawn player_death; }];

#include "gcam\gcam_config.hpp"
#include "gcam\gcam_functions.sqf"

#ifdef GCAM
waitUntil { alive Player };
waituntil { !(IsNull (findDisplay 46)) };

if (serverCommandAvailable "#kick") then { (findDisplay 46) displayAddEventHandler ["keyDown", "_this call fnc_keyDown"]; };
#endif
};
 
With large code strings like this, throw it in a code box or something, you can find it in the reply toolbar to the right of the media tab. Dont mean to sound like I am winging but it saves on space and allows more posts less pages in total. Cheers;)
Example:
Code:
// Mission Initialization
startLoadingScreen ["", "DayZ_loadingScreen"];
cutText ["", "BLACK OUT"];
enableSaving [false, false];
 
// Variable Initialization
dayZ_instance = 1;
hiveInUse = true;
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;
 
// Settings
player setVariable ["BIS_noCoreConversations", true]; // Disable greeting menu
//enableRadio false; // Disable global chat radio messages
 
// Compile and call important functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
progressLoadingScreen 1.0;
 
// Set Tonemapping
"Filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4];
setToneMapping "Filmic";
 
// Run the server monitor
if (isServer) then {
_serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";
};
 
if (!isServer && isNull player) then {
waitUntil { !isNull player };
waitUntil { time > 3 };
};
 
if (!isServer && player != player) then {
waitUntil { player == player };
waitUntil { time > 3 };
};
 
zombie_generate = compile preprocessFileLineNumbers "scripts\zombie_generate.sqf";
 
if (isServer) then {
//
_factions = [] execVM "scripts\set_unit_faction.sqf";
//diag_log format["Factions executed: %1",_factions];
//Array to pass to .sqf: [[<worldspace>],radius of waypoints (in metres),number of waypoints,number of ai units, group type [0:random unit, 1:sniper, 2:gunner, 3:militiaman, 4:squad], faction [0:hates everyone except survivors, 1:hates everyone]]
_aispawn = [[1055.4,3257.47,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1186.6,4324.56,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1712.2,4398.21,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[2563.83,3555.21,0],200,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[2673.55,2895.38,0],100,20,3,4,1] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1963.63,1944.74,0],200,20,3,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1429.78,1993.78,0],200,20,3,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
_aispawn = [[1295.46,2131.51,0],200,20,3,4,0] execVM "scripts\add_unit_server.sqf";//Fort des Dunes
 
_serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
 
};
 
// Run the player monitor
if (!isDedicated) then {
0 fadeSound 0;
0 cutText [(localize "STR_AUTHENTICATING"), "BLACK FADED", 60];
 
_id = player addEventHandler ["Respawn", { _id = [] spawn player_death; }];
 
#include "gcam\gcam_config.hpp"
#include "gcam\gcam_functions.sqf"
 
#ifdef GCAM
waitUntil { alive Player };
waituntil { !(IsNull (findDisplay 46)) };
 
if (serverCommandAvailable "#kick") then { (findDisplay 46) displayAddEventHandler ["keyDown", "_this call fnc_keyDown"]; };
#endif
};

Now to the problem- Have you got all these code strings in the init.sqf file?:confused:
 
it dont show up with any errors or anything thats why i dont get why its not working it cant be the skins as i have same ones on my cherno map and they still work perfectly i have also treid changing the skins to still no look
 
It could be the skins if they are not in the current map your using. You can see which ones are unbanned on your map somewhere in @dayz_map name or something in the install folder on your pc.
 
is there anyway to unban these or even just one of them so that others dont need to download my files? i cant believe rocket actually banned them all i dont see the point you could have your own individual character on servers i just dont see the point
 
is there anyway to unban these or even just one of them so that others dont need to download my files? i cant believe rocket actually banned them all i dont see the point you could have your own individual character on servers i just dont see the point
The only way to "unban" things server side is with rMod, that I know of at least.
 
Does anyone happen to know if there is a way to randomize the spawn points? I think it would be great to not know where they spawn or if you're going to run into them.
 
ok so heres a new one for you my cherno file also says that the classes im using is banned yet i am able to spawn the AI in so if they are banned on them both how come only one of them can spawn them in? i also refuse to use rmod i hate the thing. also sulo i dont have a clue how they got all that to work and especially how they are not explaining how it does
 
t
Does anyone happen to know if there is a way to randomize the spawn points? I think it would be great to not know where they spawn or if you're going to run into them.

the best way to do that right now is to just expand there radius that way you could run into them just about anywhere and set them more waypionts to yesterday i had a sniper on sniper hill elektro he didnt come across any then today bam he got wiped out by them seems tho i gave them more waypoints
 
Back
Top