[Release] DayZChernarus Mission System

lazyink

Valued Member!
Staff member
DayZChernarus Mission System

Original code by TheSzerdi, Falcyn and TAW_Tonic. Without the base system these guys wrote, this would not have been possible, so I doff my biggest hat to them!

This has only been tested on Chernarus (1.7.7.1)

  • Before installing you must first customize the fillboxes SQF's inside the Missions/Misc folder and the NPC's load-outs in the addunitserver SQF's.
  • If you leave the script as is, you MUST update your BE filters with the attached files as it contains weapons that BE will kick for.
Installation

Download the files here:
https://github.com/lazyink/DayZ-Missions/archive/master.zip

In your server.pbo

Copy the Missions folder to the root of the server PBO.

Open server_functions.sqf

Find:

Code:
fn_bases = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fn_bases.sqf";

Insert after:

Code:
fnc_hTime = compile preprocessFile "\z\addons\dayz_server\Missions\misc\fnc_hTime.sqf"; //Random integer selector for mission wait time

Find:

Code:
dayz_recordLogin = {
private["_key"];
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
_key call server_hiveWrite;
};

Insert after:

Code:
//----------InitMissions--------//
  MissionGo = 0;
  MissionGoMinor = 0;
    if (isServer) then {
  SMarray = ["SM1","SM2","SM3","SM4","SM5","SM6"];
    [] execVM "\z\addons\dayz_server\missions\major\SMfinder.sqf"; //Starts major mission system
    SMarray2 = ["SM1","SM2","SM3","SM4","SM5","SM6"];
    [] execVM "\z\addons\dayz_server\missions\minor\SMfinder.sqf"; //Starts minor mission system
    };
    //---------EndInitMissions------//


Open server_updateObject.sqf

Find:

Code:
#ifdef OBJECT_DEBUG
    diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
#endif
    //force fail
    _objectID = "0";
    _uid = "0";
};

Insert after:

Code:
if (_object getVariable "Mission" == 1) exitWith {};

Open server_cleanup.fsm

Find:

Code:
if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

Replace with:

Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

IF YOU HAVE SARGE AI INSTALLED YOU NEED TO CHANGE THE VEHICLE VARIABLE IN EACH MISSION TO "SARGE" INSTEAD OF USING "MISSION" (Not tested with SARGE AI, may be incompatible.)


In your mission.pbo:

Copy the included debug folder into the root of the mission.pbo.



At the bottom of your init.sqf, add the following lines:

[] execVM "debug\addmarkers.sqf";
[] execVM "debug\addmarkers75.sqf";




The AI require faction settings. If you have SARGE AI you're good to go. Otherwise add faction.sqf to the root of the mission.pbo and add this line to the end of your init.sqf:

Code:
[] execVM "faction.sqf";


The Crates

Inside the Missions/Misc folder, there are 4 differing fillboxes scripts. They are set up like so:

fillboxes.sqf - Large weapons crate.

fillboxesS.sqf - Small weapons crate.

fillboxesH.sqf - High value weapons crate.

fillboxesM.sqf - Medical crate.


The Missions

The missions are split into two types, major and minor, and run as follows.


Major

Bandit Weapon Cache.
Bandits have discovered a weapons cache!

Medical C130 Crash.
A C-130 carrying medical supplies has crashed and bandits are securing the site!

Bandit Medical Camp.
Bandits have set up a medical re-supply camp!

Bandit Heli Down!
A bandit supply helicopter has crash landed!

Medical Ural Attack.
Bandits have destroyed a Ural carrying medical supplies and secured it's cargo!

Medical Supply Crate.
A medical supply crate has been secured by bandits!


Minor

Bandit Hunting Party.
A bandit hunting party has been spotted! Kill them all and get their supplies!

Medical Outpost.
A group of bandits have taken over a Medical Outpost!

Bandit Stash House.
A group of bandits have set up a stash house!

Bandit Helicopter Crash.
A bandit helicopter has crashed!

Bandit Hummer Crash.
A bandit Humvee has crashed!

Bandit Weapons Truck.
A bandit weapons truck has crashed!


Enjoy!
https://github.com/lazyink/DayZ-Missions
 
Ran into a problem. using Sarge 1.0.

1st mission went fine, Ai were alive about 5 of them, but their UAZ disappeared after we killed them.

Below is the 2nd one we did, all Ai were dead besides 1 and both UAZ's disappeared.

Here is my Major>SM1.sqf edit regarding Sarge [did I edit it properly?]:
http://pastebin.com/5YH0jx3u

Here is a pic:
http://tinypic.com/r/2i1h3cx/5

NOTE: I didn't add the BE filters because I removed those two as it was kicking players if they put their radio in a car/tent/etc. Not sure if that would have this effect or not, but worth mentioning.
 
Yes, you will need to replace Mission with Sarge if using his AI.

That Novy spawn is a bug, and not sure as to why it keeps happening...
 
Yes, you will need to replace Mission with Sarge if using his AI.

That Novy spawn is a bug, and not sure as to why it keeps happening...

Ok cool. Did you check my pastebin? I think its properly done, but I've thought that before...gotta be precise.

Also, what about the disappearing vehicles?

Thanks!
 
Thank you. Works flawlessly in my server :)

Followed the directions to the end, made no changes to any files

DO NOT HAVE SARGE AI

Thanks again
 
The AI require faction settings. If you have SARGE AI you're good to go. Otherwise add faction.sqf to the root of the mission.pbo and add this line to the end of your init.sqf:

Mein Englisch ist nicht gut.

Habe ich das so richtig verstanden. Wenn ich SARGE AI nutze dann muss ich nicht [] execVM "faction.sqf"; in der init.sqf eintragen?
 
Mein Englisch ist sehr schlecht und die Online Übersetzer übersetzen das nicht gut genug so das man es versteht. Kann das mal einer so übersetzen das man es versteht?

http://translate.google.de

My English is very poor and the online translators not good enough so that you understand it. Can translate the times of so you understand it?

The AI require faction settings. If you have SARGE AI you're good to go. Otherwise add faction.sqf to the root of the mission.pbo and add this line to the end of your init.sqf:
 
i am trying to follow your suggestions but i can not find in my server_functions.sqf this line :
fn_bases = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fn_bases.sqf";


can i just add it after or before this ? :
fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
 
Curious about the timer. When I restart the serv a bunch of missions go off, then nothing for hours and hours after. Not even sure they all go off. I saw about 4 or 5 go off then nothing. Is that how its intended to work or should they keep going?

i am trying to follow your suggestions but i can not find in my server_functions.sqf this line :
fn_bases = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fn_bases.sqf

Around line 27. Right under:
server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
 
yeah i have nothing there, but i got it to work eventually.

One major problem though markers don't appear on the map where the mission is. Anyone know how to fix it ?
 
I'm removing it until a fix is found. Only 3-4 missions go off and only at the beginning of a session, most I've had go off was 5. After the 1st hour after a restart this script is dead weight.
 
This is strange, I am running this without any of the issues mentioned above. I am doing my best to find a solution, but since I can't replicate the issue...

Try updating to the latest mission files off github, I have updated a few areas so it may help with the issues....
 
Try with the updated github mission files, I have made some changes that should fix that issue...
 
i am trying to follow your suggestions but i can not find in my server_functions.sqf this line :
fn_bases = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fn_bases.sqf";


can i just add it after or before this ? :
fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";

Which version of the mod are you using? This sounds like you are still on 1.7.6.1, and this has only been tested on 1.7.7.1. If you do as dusty said, it should still work, but no promises!
 
This is strange, I am running this without any of the issues mentioned above. I am doing my best to find a solution, but since I can't replicate the issue...

Try updating to the latest mission files off github, I have updated a few areas so it may help with the issues....

Thanks bud.
 
I think I might have found the problem. You said below to change the vehicle variable to Sarge like so:
_hummer setVariable ["Sarge",1,true];

IF YOU HAVE SARGE AI INSTALLED YOU NEED TO CHANGE THE VEHICLE VARIABLE IN EACH MISSION TO "SARGE" INSTEAD OF USING "MISSIONS" (Not tested with SARGE AI, may be incompatible.)

But in the readme it says:
you must change all lines ending with <b>setVariable ["Mission",1,true]

Which means I should change the below:
_crate setVariable ["Mission",1,true];

to

_crate setVariable ["Sarge",1,true];

right?

This is very confusing and above you said INSTEAD OF USING MISSIONS, when its really Mission,w/o the 's' right?

I redid the missions as instructed in the readme. I'll return with the results.
 
Back
Top