DayZ Mission System

Hey, great addon. Nice work. The missions work as intended for me.

I'm having an issue, though. For some reason, after installing this addon, my vehicles don't save. They go back to their original spawn spot after relog and reset. Any gear placed in them poofs, as well.

Also, any gear placed in tents poofs after reset. The tents themselves save, though. Obviously, I've done something wrong in installation. Any ideas? o_O
 
For those that are having the vehicle disappearing problem, try the following...

Open server_objectupdate.sqf and find this part:

Code:
if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then {
_object_position = getPosATL _object;
//    diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]", typeOf _object, _object_position select 0, _object_position select 1, _object_position select 2];
//_isNotOk = true;
_isNotOk = false;
};
};
 
if (_isNotOk) exitWith { deleteVehicle _object; };

and delete it.

Should stop the vehicles being deleted.


I commented out the above code and my tents now save gear. Need to do some more testing, but as of now I'm assuming that this solved the resetting vehicles, as well. Nice. Thanks for that!
 
Ok, never mind. This actually did not solve either problem. I was mistaken in my last post. I'm actually able to dupe items in my tent now. I have already applied the 1.7.7.1 fix that is supposed to stop tent duping, so that isn't the issue. If I don't use the Missions addon, this doesn't happen. What a bizarre problem.

My vehicles are still resetting to their original spawn spots and stored gear in them poofs after reset...
 
Ok, another question about Mission timing.

Something players on my server have observed is that if you die, relog, or are a new connect to the server, you won't see the map markers for any existing missions. And if existing missions aren't completed, then new missions won't start.

Anyway to put a timer on missions so they only last so long? If the next mission timer starts and there is an existing mission that isn't completed, cancel it and start the new one?
 
Another thing. I've confirmed that the timer is not working correctly. New missions are starting the instant an existing one is completed. I've set the delay for major missions to be 2 hours at the least, and 1 hour for minor missions. However I can keep doing mission after mission after mission with no delay between them.
 
Seriously folks, if you read the github readme's carefully you will see most of the answers there. snarf, check to make sure you've added these sections correctly:

Code:
Add to server_updateObject.sqf place right after terms defined:
 
if (_object getVariable "Mission" == 1) exitWith {};
 
Change line in server_cleanup.fsm around line 349 in the Check for Hacker section:
 
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 "MISSIONS" (Not tested with SARGE AI, may be incompatible.)

And Arterio the mission markers should display on relog if you've added the addmarkers.sqf to your mission pbo and put the code in your init.sqf:

Code:
In your mission.pbo:
 
Add this to end:
 
    [] execVM "debug\addmarkers.sqf";
    [] execVM "debug\addmarkers75.sqf";
Add the debug folder and all associated files.
 
Thanks!
Forgot to put the addmarkers bit in my init.sqf file.

Also quick question.

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

Does ""Mission"" need to be changed to ""Sarge"" here? or no? I am using SargeAI, and this is on DayZ 1.7.6.1 with Epoch 1.0.2.3.

This is what that line looks like right now on my server_cleanup.sqf:
Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) !(vehicle _x in _safety) && (isPlayer _x)  && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

Thanks!
 
You either have to replace Mission with Sarge in all the mission files too or replace Sarge with Mission in all the sarge files or just do this:
Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

That should work.
 
Seriously folks, if you read the github readme's carefully you will see most of the answers there. snarf, check to make sure you've added these sections correctly:

Code:
Add to server_updateObject.sqf place right after terms defined:
 
if (_object getVariable "Mission" == 1) exitWith {};
 
Change line in server_cleanup.fsm around line 349 in the Check for Hacker section:
 
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 "MISSIONS" (Not tested with SARGE AI, may be incompatible.)

And Arterio the mission markers should display on relog if you've added the addmarkers.sqf to your mission pbo and put the code in your init.sqf:

Code:
In your mission.pbo:
 
Add this to end:
 
    [] execVM "debug\addmarkers.sqf";
    [] execVM "debug\addmarkers75.sqf";
Add the debug folder and all associated files.


Hey, thanks for responding. In server_updateObject.sqf, do I also need to change "Mission" to "Sarge" in this line?:

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

Other than that, I have followed the destructions on GitHub as closely as I possibly could. This addon is one of my favorites and I will scrap with it until I have it beat. I understand that it is not guaranteed to work with Sarge AI, but I've seen others using them in conjunction. So, theoretically, it should also be possible for me.
 
Change that to Sarge only if you changed the variable in every mission file to Sarge.

Ok, that's what I figured. Thank you.

Everything is basically working as intended with Sarge AI and DayZ Mission System installed together. None of the typical errors due to oversight. I just have this gear-not-saving/vehicles resetting issue that won't go away. Sarge AI alone doesn't cause me any problems. It's when I try to add DayZ Mission System along side it that I get this unwanted effect. I know that if I was a bit more knowledgeable I could sort it out.

I'm having to install every one of these addons to the mission.pbo exclusively. For whatever reason, I can't edit the server.pbo without problems getting into game. I've tried the $PBOPREFIX$ fix and everything I can think of. It just doesn't happen for me. That's why I'm desperately trying to get DayZ Mission System to work with Sarge AI. Sarge is the only AI I've been able to find that doesn't ask me to edit the server.pbo.

So, my installation of DayZ Mission System needed to overwrite a few files from the server.pbo, as well. I'm wondering if that may somehow be the source of my issue. The problem with that notion is that the missions load and function perfectly. My server just insists on deleting stored gear and reverting vehicle positions after server reset when I have DayZ Mission System installed.
 
... My server just insists on deleting stored gear and reverting vehicle positions after server reset when I have DayZ Mission System installed.


Check your rpt file for any mysql error's. It sounds like it's not updating the database with the new vehicle positions and item's stored.
 
Thanks for the advice. I went through my RPT logs and found a few interesting entries:

Code:
String STR_MOD_LAUNCHER_ACTION not found
Item str_action_fire_inflame listed twice
Item str_action_fire_put_down listed twice
Item str_usract_watch_toggle listed twice
Item str_usract_watch listed twice
Item STR_EQUIP_NAME_24 listed twice
Item STR_EQUIP_DESC_24 listed twice
Item STR_EQUIP_NAME_1 listed twice
Item STR_EQUIP_DESC_1 listed twice
Item STR_EQUIP_NAME_2 listed twice
Item STR_EQUIP_DESC_2 listed twice
...

Some things are obviously listed twice. Not sure what it all means.

Code:
Warning Message: Script server_updateObject.sqf not found
 
Warning Message: Script Misc\fnc_hTime.sqf not found
 
Warning Message: Script server_cleanup.fsm not found

Ok, this is the stuff that really concerns me. I can assure you that these files are all in the specified directories. Not sure why they aren't being found. Below, you can see that I tried being more specific about the location of these files. They still were not found on the next server start.

Code:
Warning Message: Script MPMissions\dayz_1.chernarus\missions\server_updateObject.sqf not found
 
Warning Message: Script MPMissions\dayz_1.chernarus\missions\misc\fnc_hTime.sqf not found

Just to be sure: If I am calling from one .sqf to another .sqf in the same folder, I can just call the file without adding a folder name in the path, correct? e.g. If server_monitor calls for server_cleanup.fsm, I can just say something like:

if (isDedicated) then {
_id = [] execFSM "server_cleanup.fsm";

Code:
WARNING: Function 'name' - Sarge is dead

Don't know what to make of that, either...

I didn't find any errors related to mySQL. Unless that first error was database related.
 
Szerdi, I need help with just a few variables in your code, please.


"_coords = [getMarkerPos "center",0,5500,100,0,20,0] call BIS_fnc_findSafePos;"

and

"_aispawn = [_coords,40,4,3,1] execVM "\z\addons\dayz_server\missions\add_unit_server.sq f";//AI Guards"




100 and 20 in _coords appears to be map position.

What are the other numbers, 4 more in _coords and the 4 in _aispawn?

Thanks.
 
I had this script working on my DayZ Overwatch and it is working well. Except for 1 problem...
The ammo crate did not spawn for all missons. I managed to change the ammo crates to tents however the item inside is limited. Does anyone know how to solve the issue?
 
http://tactical.nekromantix.com/wiki/doku.php?id=arma2:scripting:bis_fnc_findsafepos

Code:
BIS_fnc_findSafePos
How to find safe position with open ground etc.
 
Please read BIS_fnc_SpawnGroup how to place Functions manager gamelogic and to check if its running and initialized.
 
Parameter Description
1 Position
2 Minimum distance
3 Maximum distance
4 Maximum distance from nearest object
5 0 - cant be in water, 1 - ?
6 Terrain gradient (how steep terrain)
7 0 - shore mode; does not have to be in shore
_newPos = [_pos, 0, 500, 30, 0, 20, 0] call BIS_fnc_findSafePos;
If the function can't find a place that fits your parameters it defaults to the center of the map which is Novy in the case of Chernarus or between A2 & Norinsk for Namalsk.
 
Snarf, are those files inside a folder like "debug"? If so the path needs to be "debug\server_cleanup.fsm" Also, the Missions folder is supposed to be in the server.pbo, NOT the mission.pbo.
 
Fadzrul, try adding this line to the missions that spawn a crate under the box = createVehicle etc etc

Code:
box setVariable ["Mission",1,true];

If that doesn't work, try replacing the vehicle box with other types of boxes and/or check your BattlEye/other anti-hacks for box blockers.
 
So the missions spawn in truly random positions on the map?
And the "20" is "can't be in water?"

http://tactical.nekromantix.com/wiki/doku.php?id=arma2:scripting:bis_fnc_findsafepos

Code:
BIS_fnc_findSafePos
How to find safe position with open ground etc.
 
Please read BIS_fnc_SpawnGroup how to place Functions manager gamelogic and to check if its running and initialized.
 
Parameter Description
1 Position
2 Minimum distance
3 Maximum distance
4 Maximum distance from nearest object
5 0 - cant be in water, 1 - ?
6 Terrain gradient (how steep terrain)
7 0 - shore mode; does not have to be in shore
_newPos = [_pos, 0, 500, 30, 0, 20, 0] call BIS_fnc_findSafePos;
If the function can't find a place that fits your parameters it defaults to the center of the map which is Novy in the case of Chernarus or between A2 & Norinsk for Namalsk.
 
The "20" you're referring to would be the maximum terrain gradient. (Maximum steepness.) The lower the number the flatter the terrain. On Chernarus it can easily find areas with a maximum terrain gradient of less than 20. On a map like Namalsk with all it's ridges and sharp inclines you have to set the value MUCH higher.
Code:
"_coords = [getMarkerPos "center",0,5500,100,0,20,0] call BIS_fnc_findSafePos;
 
This specifies a spawn with minimum distance from center of map at 0,
maximum distance 5500m, nearest object 100m, can NOT be in water,
maximum terrain gradient 20, does NOT have to be on shoreline.
 
If it can't satisfy those requirements it defaults to the center of map.
I believe trees and rocks and such count as objects.
 
Back
Top