Jump to content

FMission


Recommended Posts

I've got FMission running now. When I read your reply to someone else about creating the addons folder inside the dayz_server.pbo the light went on. I have the spawn time set at 30 past the hour. Unfortunately, I missed the last chance to see it work because the mission spawn chance failed.

 

:)

 

Great! I'm glad you've got it working. :)

Link to comment
Share on other sites

Also, the loot box and it's contents are fully editable inside the mission file itself, here is the current loadout for the Assassination mission:

 

Yes, I know about that. My question was: "would it be possible to pull the contents of the boxes from the server's loot tables, rather than having a fixed list of items that will be in there?"

 

DZMS does it. Perhaps it could be integrated. A random loadout is better than 5 or 6 lists of things that will always spawn.

Link to comment
Share on other sites

Yes, I know about that. My question was: "would it be possible to pull the contents of the boxes from the server's loot tables, rather than having a fixed list of items that will be in there?"

 

DZMS does it. Perhaps it could be integrated. A random loadout is better than 5 or 6 lists of things that will always spawn.

 

Ah I see, I misunderstood. Good idea, would be a nice option to have.

Link to comment
Share on other sites

Very good script, but some things should be changed.

 

Every action is written to the rpt from a mission, vgood for debug, but useless for most admins.

Start and End of mission is enough for logging.  no Reason to log each action. Maybe make _debug and fullDebug (with markers)

 

Im not happy with markers, all called from mission itself and has no random spots inside the marker. [_position, _color] is enough.

Also, missions starts always in the middle, maybe make that it can be spawn everwhere inside a circle. (I updated DZMS for myself).

 

Maybe a var like: randomSpot.

 

My script is:

_coordsRan = ((random _markerRadius) - (_markerRadius /2));

or a other way:

_coordsRan = (random 350) - 175;

MARKER

createMarker ["myMarker", [(_center select 0) + _coordsRan, (_center select 1) + _coordsRan)]];
Link to comment
Share on other sites

Incoming answers

 

@LordDan:

1) Is it possible to make your Assassination Target go prone so they're not so easy to snipe?

I'll update that today.

2) Is it possible to unlock the AI vehicles one mission complete? I disabled a Vodnik by taking out it's tires and was a little disappointed I couldn't claim it.

No, I locked them because they are intended for the AI to defend, not for players to own. They get deleted with Mission cleanup. Not to mention it screws with anithack setups and I am not willing to work around all of them just for players to have temporary access to Armed vehicles before they can buy them legit.

3) Can the Icons be centered rather than attached to the actual cargo crates? It takes away the initial search.

Yep, my bad... Thanks for catching that. I have been working a lot of hours lately so I have been extra tired. It's fixed and I will release an update shortly. They should have been centered and not at loot loc in the first place... a "tired" mistake.

 

FYI the _center variable is not the place to fix that. That should only be changed if you have a random loc spawning issue.

 

-----------------------------------------------------------------------------------------------------------------------------------------------------

@ SnakeEyes

 

Yeah take out the //FMission line and remove all entries not used. You only want to list what you are actually loading. Use the first example in my instructions. Look at the way it's formatted and stick to that.

 

-----------------------------------------------------------------------------------------------------------------------------------------------------

 

@BetterDead

Ok, I finally put this on two of my servers and I'll be trying it out after the next server restart. I have a question and a suggestion: Is there any indicator where the minefield is in the Assassination mission?

I am not sure exactly what you mean so I will answer both possible questions.

There are signs that mark the outer area, one in each corner of the field. There are also visible mines, you have to look close in grass but you can see them. If you mean where is the setting to load it, it is in the Assassination Mission file about 3/4 of the way down, it should have a //comment above it that says what it is.

 Also, would it be possible to pull the contents of the boxes from the server's loot tables, rather than having a fixed list of items that will be in there?

Yes I could, but I didn't do it like that for a reason. I want missions with focused loot based upon the mission itself. For instance, if I design a medical related mission I expect medical related supplies. My Home Depot mission doesn't give out food, it's a home depot mission, they do building supplies. Also, FMission loot is random, it pulls from a specific mission based loot table designed FOR that mission.

 

Either way to get the custom loot per mission you have to edit a file, whether it is an external file or the mission you are working on, doesn't matter 6 of one half dozen of the other the load out still has to be written. Might as well make it IN the file you are working on so it's simple.

 

So while random loot in the sense you mean has it's uses, like AI or random crates of stuff etc etc I think it ends up ruining the immersion into the mission when you get loot that has nothing to do with the mission. Not to mention it makes it more difficult for average users to create "custom" loot load outs for their missions and it's one less call being made during the mission.

 

Keep in mind the idea behind my system is to keep it as simple as possible for avg users to create missions. Don't get me wrong, there is serious power in the tools and you can make some killer stuff if you have more scripting experience, but this is for the avg users so I intend to keep it as simple as possible to operate.

 

Hopefully that is all the Questions, if I missed something let me know.

 

Update 1.3a inc shortly to fix the marker. Fortunately I got a bit of sleep so I am a bit more clear headed tonight!

Link to comment
Share on other sites

Foamy, can you change the predefined loot _list? I rly hate lists like this, after a while you always get the same loot.

	[
	["ItemEtool"],
	["SmokeShellRed","SmokeShellGreen","ItemCopperBar","ItemCanvas","ItemTentDomed","ItemBurlap"]
	]

There are better scripts to add loot ;)

Link to comment
Share on other sites

 

Very good script, but some things should be changed.

 

Every action is written to the rpt from a mission, vgood for debug, but useless for most admins.

Start and End of mission is enough for logging.  no Reason to log each action. Maybe make _debug and fullDebug (with markers)

 

Im not happy with markers, all called from mission itself and has no random spots inside the marker. [_position, _color] is enough.

Also, missions starts always in the middle, maybe make that it can be spawn everwhere inside a circle. (I updated DZMS for myself).

 

Maybe a var like: randomSpot.

 

My script is:

_coordsRan = ((random _markerRadius) - (_markerRadius /2));

or a other way:

_coordsRan = (random 350) - 175;

MARKER

createMarker ["myMarker", [(_center select 0) + _coordsRan, (_center select 1) + _coordsRan)]];

 

The diag's in rpt are very useful for monitoring spawn percentages and whether players are completing missions or letting them time out (in missions setup that way) thus I will be leaving it in. You can comment out the diags in the missions if you don't want to report the info. 

 

The markers I actually messed up in my tired state and set the icon to the loot spawn pos. That is fixed now, other than that I am not sure what you are referring to. Since you have to call a marker from the mission... I mean you could setup a synch script to launch a marker externally from a synch script that is triggered at the same time as the mission but why anyone would do that is beyond me. 

 

Markers, as they work now (now that I fixed the pos error) are like this. Marker is created with a radius, 350 is default and the mission spawns somewhere within that circle. The icon spawns in the center so you can set custom icons and text to identify the missions. If you want to see where the loot spawns in the radius enable debug (set debug to true in fmarker call) it will show a dot somewhere in the radius and that is where the loot is.

 

Sorry if I misunderstood your statement and didn't answer properly.

Link to comment
Share on other sites

Foamy, can you change the predefined loot _list? I rly hate lists like this, after a while you always get the same loot.

	[
	["ItemEtool"],
	["SmokeShellRed","SmokeShellGreen","ItemCopperBar","ItemCanvas","ItemTentDomed","ItemBurlap"]
	]

There are better scripts to add loot ;)

 

You are right, there are better ways to add "loot" to a mission. Matter of fact there are better ways of doing several things I did. Honestly I could go in and make this system so clever and complicated most of the people that this is targeting will scratch their heads and bombard me with a million questions on how to change stuff. I don't want that, I am making this as simple to use as possible for a reason, I don't want a billion support questions, I don't have the time for that. I want this so easy to use that anyone with basic script knowledge can enjoy it with minimal need for support.

 

With that said and as I said before... I do the loot like that for a reason. I want mission specific loot. I honestly think it ruins a mission to have a theme, then when you complete it you get a bunch of loot and granted it's random but it has nothing to do with the mission.

Those loot lists are so easy to modify you can do anything with them. You can add a ton of different "mission related" load outs to choose from easily. Key word "Easily" If you get tired of the load outs, change them up, add in stuff, take stuff out. Etc etc. How much easier could it be?

 

Clever is not always better... especially when ease of use is the entire reason I do things the way I do them.

Link to comment
Share on other sites

After the mission script starts, FMission checks the MissionSpawnChance and it always fails. It needs to be lower than 0.4. I've been observing FMission on my server to see what happens when a mission actually starts, but it has not happened yet. Should I run more missions per hour to increase the mission spawn chance? I'm currently attempting to launch one mission at 30 minutes past the hour. Any ideas?

 

18:30:02 "RUNNING EVENT: FMission_Launcher1 on [2014,3,28,11,30]"

18:30:02 "FMission Launcher 1: Checking Spawn Chance"
18:30:02 "FMission Launcher 1: Spawn Chance Succeeded with 0.824079 it needed to be lower than 1"
18:30:03 "FMission Launcher 1: Selecting script and launching"
18:30:03 "FMission Launcher 1: Launching Mission: \z\addons\dayz_server\addons\Fmission\Missions\M1\Foamy\FMission_M1_Assassination.sqf"
18:30:03 "MISSION 1: Assassination - Script Started"
18:30:03 "MISSION 1: Assassination - Checking MissionSpawnChance"
18:30:03 "MISSION 1: Assassination - Failed with 0.881182 it needed to be lower than 0.4"


 

Link to comment
Share on other sites

If you want to increase mission spawn chance just for testing. Change it in the FMission_M1_Assassination.sqf

private ["_missionSpawnChance","_spawnMarker","_spawnRadius","_markerRadius","_markerColor","_loot","_loot_lists","_loot_box","_wait_time","_spawnRoll","_position","_loot_pos","_base","_aiunit_spawn_pos","_aivehicle_spawn_pos","_aiheli_spawn_pos","_targetunitsAlive","_targetgroup","_target1","_attackgroup","_attacker1","_attacker2","_aiunit1","_aiunit2","_aiunit3","_aiunit4","_aiunit5","_timeout"];

diag_log("MISSION 1: Assassination - Script Started");

_missionSpawnChance =  1;  //I changed it so i can test it on my test server. works fine
_spawnRoll = random 1;

diag_log("MISSION 1: Assassination - Checking MissionSpawnChance");
if (_spawnRoll > _missionSpawnChance) exitWith 
{
diag_log format ["MISSION 1: Assassination - Failed with %1 it needed to be lower than %2",_spawnRoll,_missionSpawnChance];
};

sleep .5;
diag_log("MISSION 1: Assassination - Mission SpawnChance Success");

sleep .5;
diag_log("MISSION 1: Assassination - Mission Script Started");

EPOCH_MISSION1_RUNNING = true;

I'm really liking this mission/event system. Works great with WAI mission system and i'm running epoch panthera and can confirm it spawns fine with no changes. Going to look into how WAI does the humanity gain and that might work/apply for this. I created a vehicle supplies (wheels, scrap, engines, ...etc) mission and going to test that out later.  

 

Overall. Thanks for the work. :thumps up:

 

:D

Link to comment
Share on other sites

_missionSpawnChance = 1; //I changed it so i can test it on my test server. works fine

 

 

That worked great! I'm going to force the missions to spawn over the weekend to give players a chance to try them. Then I'll revert back to the original mission spawn chance setting (.40). I'm currently using a combination of DZAI and DZMS, so there is plenty of AI action at the moment.

Link to comment
Share on other sites

That worked great! I'm going to force the missions to spawn over the weekend to give players a chance to try them. Then I'll revert back to the original mission spawn chance setting (.40). I'm currently using a combination of DZAI and DZMS, so there is plenty of AI action at the moment.

 

Awesome. Glad that worked out. Sounds like a good time! Enjoy!

Link to comment
Share on other sites

I really like the design and features of FMission. Especially because it provides an entry point for non-scripting pros. I can imagine the possibilities using the tools provided. It's good to see multicolored map markers used for a change. Now to learn how to use the templates and start creating missions! I would like to have at least 6 missions in the rotation to keep my players interested in it. It would be cool to have a user created mission repository somewhere so missions files could be shared (upload/download).

Link to comment
Share on other sites

Regarding the random loot... if you look at DZMS, you'll see he does random loot that is based on categories, so a medical mission randomly chooses medical loot, etc.

 

I have looked at all the systems and the reason I didn't do it like DZMS is because it's not a weighted/balanced loot system. Meaning you can get different items or all the same. I simply don't have the time to sit and write a balanced/weighted loot system that *I* would be satisfied with thus I do it like I do. 

 

 

If you want to increase mission spawn chance just for testing. Change it in the FMission_M1_Assassination.sqf

private ["_missionSpawnChance","_spawnMarker","_spawnRadius","_markerRadius","_markerColor","_loot","_loot_lists","_loot_box","_wait_time","_spawnRoll","_position","_loot_pos","_base","_aiunit_spawn_pos","_aivehicle_spawn_pos","_aiheli_spawn_pos","_targetunitsAlive","_targetgroup","_target1","_attackgroup","_attacker1","_attacker2","_aiunit1","_aiunit2","_aiunit3","_aiunit4","_aiunit5","_timeout"];

diag_log("MISSION 1: Assassination - Script Started");

_missionSpawnChance = 1; //I changed it so i can test it on my test server. works fine

_spawnRoll = random 1;

diag_log("MISSION 1: Assassination - Checking MissionSpawnChance");

if (_spawnRoll > _missionSpawnChance) exitWith

{

diag_log format ["MISSION 1: Assassination - Failed with %1 it needed to be lower than %2",_spawnRoll,_missionSpawnChance];

};

sleep .5;

diag_log("MISSION 1: Assassination - Mission SpawnChance Success");

sleep .5;

diag_log("MISSION 1: Assassination - Mission Script Started");

EPOCH_MISSION1_RUNNING = true;

I'm really liking this mission/event system. Works great with WAI mission system and i'm running epoch panthera and can confirm it spawns fine with no changes. Going to look into how WAI does the humanity gain and that might work/apply for this. I created a vehicle supplies (wheels, scrap, engines, ...etc) mission and going to test that out later.  

 

Overall. Thanks for the work. :thumps up:

 

:D

 

 

If you would like to get your missions included in the Mission Pack PM it to me and I will check it out. If it works perfectly I will add it to your own author directory within the Mission Pack Download. I am hoping to get a bunch of people creating scripts so we can have a bunch of author folders with different missions in them so admins can make their own "playlists" so to speak.

 

I do ask that you stick with the mission classifications (M1, M2, and M3) to be included in the Mission Pack so they can be properly filed.

 

 

I really like the design and features of FMission. Especially because it provides an entry point for non-scripting pros. I can imagine the possibilities using the tools provided. It's good to see multicolored map markers used for a change. Now to learn how to use the templates and start creating missions! I would like to have at least 6 missions in the rotation to keep my players interested in it. It would be cool to have a user created mission repository somewhere so missions files could be shared (upload/download).

 

 

Thanks Snake, I am trying to make this as user friendly as possible so people who would normally not be able to make a robust mission can. Also not only do we use multicolored markers, but we have custom icons and text to label the missions with. Also, see the above reply about author directories in the Mission Pack, send me your missions guys!

 

 

Foamy, love the way how you comment.  :)

RLY like your script! Thats was only a suggestion. Im using it ))

 

 

Thank you and all good with the suggestions. If it's something I can add that doesn't stray FMission from where I want to take it and it's something that my limited time can handle I am open to it. If I don't like the idea or what it might do to FMission or don't have the time I won't do it and tell you guys why.

 

As long as you guys remember that first and foremost I wrote this to run on my personal server and designed it like it is for me. I am just sharing it with you guys and no offence meant in this next statement but... "I am not writing this for you guys" so as long as you keep that in mind my answers should make more sense.

 

I am glad you guys are enjoying my work, I will continue to add to it so keep the suggestions coming, just don't be mad if I don't add it or decline.

 

Also, would some video tutorials on how to make a mission using FMission help? I do have a help section in the works for my GitHub site and this was one of my ideas. Let me know.

Link to comment
Share on other sites

Is an Escort mission a possibility? A player has to get to a certain area that has an AI that drives a vehicle. You have to go with that vehicle and defend it from bandits that spawn along the route? I know AI aren't very good when it comes to driving a vehicle, but maybe? On similar idea, escort a VIP from one place to another, on foot, again with bandits spawning along the way. Just trying to throw some ideas out there. I don't think I have the skills to make missions myself.

Link to comment
Share on other sites

Is an Escort mission a possibility? A player has to get to a certain area that has an AI that drives a vehicle. You have to go with that vehicle and defend it from bandits that spawn along the route? I know AI aren't very good when it comes to driving a vehicle, but maybe? On similar idea, escort a VIP from one place to another, on foot, again with bandits spawning along the way. Just trying to throw some ideas out there. I don't think I have the skills to make missions myself.

 

Both scenarios are definitely possible. The vehicle routes would have to be static to work properly, but a few different routes could be made and then select from them to randomize. As far as the escort goes that could be randomized more easily by creating a start and end point array, selecting randoms from each and having random ai groups spawn at random time intervals based upon the escorts current position then randomize the loc and distance off that. I will put this on my list of missions to make.

 

Don't sell yourself short man, look at the templates, I bet you could get to making missions in no time.

Link to comment
Share on other sites

<snip>

Also, would some video tutorials on how to make a mission using FMission help? I do have a help section in the works for my GitHub site and this was one of my ideas. Let me know.

I think some video tuts on mission creation would definitely be helpful. It may encourage people like me that aren't script savvy to try the templates. I've nearly finished my first mission. I'll post it here before trying it live. It may not work at all. LOL.

 

:huh:

Link to comment
Share on other sites

This is my first attempt to create a mission file using the M3 template that Foamy provided. It is simple, but I have to start somewhere. Will it run? Please evaluate. :)

 

/*


File Name: FMission_M3_WellsFargo.sqf
File Created: 3/28/2014
File Version: 1.0
File Author: Snakeyes
File Last Edit Date: 3/28/2014
File Description: WellsFargo (M3)
Template by: Foamy
*/

// CHECK FOR ANOTHER MISSION 3 RUNNING START ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

if (isNil "EPOCH_MISSION3_RUNNING") then
{
EPOCH_MISSION3_RUNNING = false;
};

if (EPOCH_MISSION3_RUNNING) exitWith
{
diag_log("MISSION 3 already running");
};

// CHECK FOR ANOTHER MISSION 3 RUNNING END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// Don't forget to add all your "_names" to the private section
private ["_missionSpawnChance","_spawnMarker","_spawnRadius","_markerRadius","_markerColor","_item","_debug","_loot","_loot_lists","_loot_box","_wait_time","_spawnRoll","_position","_loot_pos","_loot_box","_textMarker_IconType","_markerText","_markerBrush"];

diag_log("MISSION 3: WellsFargo - Script Started");

_missionSpawnChance = 1; //Set Spawn Chance Here 1 = always
_spawnRoll = random 1;

diag_log("MISSION 3: WellsFargo - Checking MissionSpawnChance");
if (_spawnRoll > _missionSpawnChance) exitWith
{
diag_log format ["MISSION 3: WellsFargo - Failed with %1 it needed to be lower than %2",_spawnRoll,_missionSpawnChance];
};

sleep .5;
diag_log("MISSION 3: WellsFargo - Mission SpawnChance Success");

sleep .5;
diag_log("MISSION 3: WellsFargo - Mission Script Started");

EPOCH_MISSION3_RUNNING = true;

/*
// Edit Loot Box Contents Below
// Format is:
// 1st row = Weapons, Tools ( Compass, etc)
// 2nd row = Ammo, Food items etc
// 3rd row = Backpacks

The loot example in this template has 2 loadouts to choose from, you can add as many as you want. The more you add the more
variety you will have.
Each addition will use a block like this:
[
["DMR","NVGoggles","Binocular_Vector"],
["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","ItemSodaMdew","ItemSodaR4z0r","ItemAntibiotic"],
["DZ_Backpack_EP1"]
], <---- The , is NOT needed on last loot block, see example below where the , is only used to separate the
first block from the second block. There is no , at the end of the second block as it is the last block in
the list.
*/

//---------------------------------------------------------------------------------

// Loot Box Setup
_loot_box = "GuerillaCacheBox";
_loot_lists = [
[
["DMR","NVGoggles","Binocular_Vector"],
["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","ItemSodaMdew","ItemSodaR4z0r","ItemAntibiotic"],
["DZ_Backpack_EP1"]
],
[
["M4A1_AIM_SD_CAMO","ItemGPS","Binocular"],
["30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemSodaRbull"],
["DZ_ALICE_Pack_EP1"]
],
[
["glock17_EP1"]
["17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemBriefcase100oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemMorphine"]
[DZ_CivilBackpack_EP1]
];

//---------------------------------------------------------------------------------

_loot = _loot_lists call BIS_fnc_selectRandom;

// Mission Variables
mission_despawn_timer = 1200; // This sets the Timeout if a timer is used.
_wait_time = 900; // This is how long the loot box will stay once it spawns.
_spawnRadius = 5000; // This is the distance from Center - Used to determine the radius in which missions will spawn
_spawnMarker = 'center'; // DO NOT Change this, UNLESS you need a hard coded center loc for custom purposes
_markerRadius = 350; // This sets marker radius and the area the loot can spawn in
_markerColor = "ColorBlue"; // This sets the Marker Color
_textMarker_IconType = "mil_objective"; // This sets the "Icon Type" (https://community.bistudio.com/wiki/cfgMarkers)
_markerText = "Mission: Wells Fargo Transport"; // Text to display at Marker (Leave "" blank if you dont want a message)
_markerBrush = "SOLID"; // Marker Brush - How the marker is filled in


// This sets the global position coords the mission needs to run, do not change.
_position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,20,0] call BIS_fnc_findSafePos;
_loot_pos = [_position,0,(_markerRadius - 100),10,0,20,0] call BIS_fnc_findSafePos;

// Use these if using AI, Vehicles or Helis
_aiunit_spawn_pos = [_loot_pos, 30, 50, 30, 0, 20, 0] call BIS_fnc_findSafePos;
_aivehicle_spawn_pos = [_loot_pos, 30, 50, 30, 0, 20, 0] call BIS_fnc_findSafePos;
_aiheli_spawn_pos = [_loot_pos, 30, 50, 30, 0, 20, 0] call BIS_fnc_findSafePos;

//---------------------------------------------------------------------------------
// Mission Body STARTS Here
// Read General Script Instructions for Variable Usage per script.

// Add a Marker? Make sure to use FMarker3.sqf for M3 Missions
[_position,_loot_pos,_markerRadius,_markerColor,false,_textMarker_IconType,_markerText,_markerBrush] execVM "\z\addons\dayz_server\addons\FMission\FMarker\FMarker3.sqf";

// Add a base?
_base = createVehicle ["Land_fortified_nest_big",_loot_pos,[], 0, "CAN_COLLIDE"];
_base setPos _loot_pos;

// Add some AI to patrol?
sleep 1;

diag_log("MISSION 3: WellsFargo - Loading -=FAI Units=- Started");

_aiunit1 = [_aiunit_spawn_pos,50,4,"Bandit",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit2 = [_aiunit_spawn_pos,50,4,"Bandit",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit3 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit4 = [_aiunit_spawn_pos,50,4,"Medic",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit5 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit6 = [_aiunit_spawn_pos,50,4,"Bandit",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit7 = [_aiunit_spawn_pos,50,4,"Bandit",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

sleep 10;
diag_log("MISSION 3: WellsFargo - Loading -=FAI=- Completed");

sleep .5;

// Add a one off custom AI?
_attackgroup = createGroup east;

_attacker1 = _attackgroup createUnit ["TK_INS_Soldier_3_EP1", _base, [], 0, "Form"];
_attacker1 setUnitPos "AUTO";
[_attacker1] execVM "\z\addons\dayz_server\addons\FMission\FLoot\FLoot_Bandit.sqf";
_attacker1 setUnitPos "Middle";

_attacker2 = _attackgroup createUnit ["TK_Soldier_Medic_EP1", _base, [], 0, "Form"];
_attacker2 setUnitPos "AUTO";
_null = [_attacker2] execVM "\z\addons\dayz_server\addons\FMission\FLoot\FLoot_Medic.sqf";
_attacker2 setUnitPos "Middle";

_attackgroup setCombatMode "RED";
_attackgroup setBehaviour "STEALTH";

/*
// Add a Heli Patrol?
_aiHeli = [_aiheli_spawn_pos,_loot_pos,250,"M1"] execVM "\z\addons\dayz_server\addons\FAI\FMission\FAI_Create_Heli.sqf";
*/

// Add a Vehicle patrols?
_aiVehicle = [_aivehicle_spawn_pos,_loot_pos,100,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Vehicle.sqf";


[nil,nil,rTitleText,"MISSION: WellsFargo - A Wells Fargo Transport has crashed. Bandits are en route now to secure the location!", "PLAIN",10] call RE;

diag_log("MISSION 3: WellsFargo - Waiting...");
_timeout = time + mission_despawn_timer;
waitUntil
{
_targetunitsAlive = {alive _x} count (units _targetgroup);
((time > _timeout) || (_targetunitsAlive < 1))
};

_targetunitsAlive = {alive _x} count (units _targetgroup);
if (_targetunitsAlive < 1) then
{
[nil,nil,rTitleText,"MISSION: Survivors have captured the Wells Fargo Transport cargo, Good Job.", "PLAIN",10] call RE;


// Create a loot box?
// Create loot box
diag_log("MISSION 3: WellsFargo - Creating loot box");
_loot_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
_loot_box setPos _loot_pos;
clearMagazineCargoGlobal _loot_box;
clearWeaponCargoGlobal _loot_box;
clearBackpackCargoGlobal _loot_box;

// Add loot
diag_log("MISSION 3: WellsFargo - Loot box created, adding loot to loot box");
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_loot_box addBackpackCargoGlobal [_x,1];
} forEach (_loot select 2);

// Wait for awhile so loot can be collected?
sleep _wait_time;


// Mission Body ENDS here
// ---------------------------------------------------------------------------------


// Add additional deleteVehicle _xxx; for each item that needs to be deleted.
// Add additional deleteVehicle _xxgroup; to delete the AI units
// Clean up
EPOCH_MISSION3_RUNNING = false;

deleteVehicle _base;
deleteVehicle _loot_box;
{ deleteVehicle _x } forEach units _targetgroup;
deleteGroup _targetgroup;
{ deleteVehicle _x } forEach units _attackgroup;
deleteGroup _attackgroup;

diag_log("MISSION 3: WellsFargo - Script Finished");
};

Link to comment
Share on other sites

Another M3 template Hunting mission, "Death Wish."

 

/*


File Name: FMission_M3_DeathWish.sqf
File Created: 3/29/2014
File Version: 1.0
File Author: Snakeyes
File Last Edit Date: 3/29/2014
File Description: DeathWish (M3)
Template by: Foamy
*/

// CHECK FOR ANOTHER MISSION 3 RUNNING START ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

if (isNil "EPOCH_MISSION3_RUNNING") then
{
EPOCH_MISSION3_RUNNING = false;
};

if (EPOCH_MISSION3_RUNNING) exitWith
{
diag_log("MISSION 3 already running");
};

// CHECK FOR ANOTHER MISSION 3 RUNNING END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// Don't forget to add all your "_names" to the private section
private ["_missionSpawnChance","_spawnMarker","_spawnRadius","_markerRadius","_markerColor","_item","_debug","_loot","_loot_lists","_loot_box","_wait_time","_spawnRoll","_position","_loot_pos","_loot_box","_textMarker_IconType","_markerText","_markerBrush"];

diag_log("MISSION 3: DeathWish - Script Started");

_missionSpawnChance = 1; //Set Spawn Chance Here 1 = always
_spawnRoll = random 1;

diag_log("MISSION 3: DeathWish - Checking MissionSpawnChance");
if (_spawnRoll > _missionSpawnChance) exitWith
{
diag_log format ["MISSION 3: DeathWish - Failed with %1 it needed to be lower than %2",_spawnRoll,_missionSpawnChance];
};

sleep .5;
diag_log("MISSION 3: DeathWish - Mission SpawnChance Success");

sleep .5;
diag_log("MISSION 3: DeathWish - Mission Script Started");

EPOCH_MISSION3_RUNNING = true;

/*
// Edit Loot Box Contents Below
// Format is:
// 1st row = Weapons, Tools ( Compass, etc)
// 2nd row = Ammo, Food items etc
// 3rd row = Backpacks

The loot example in this template has 2 loadouts to choose from, you can add as many as you want. The more you add the more
variety you will have.
Each addition will use a block like this:
[
["DMR","NVGoggles","Binocular_Vector"],
["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","ItemSodaMdew","ItemSodaR4z0r","ItemAntibiotic"],
["DZ_Backpack_EP1"]
], <---- The , is NOT needed on last loot block, see example below where the , is only used to separate the
first block from the second block. There is no , at the end of the second block as it is the last block in
the list.

//---------------------------------------------------------------------------------
*/
// Loot Box Setup
_loot_box = "GuerillaCacheBox";
_loot_lists = [
[
["DMR","DMR","DMR","NVGoggles","NVGoggles","Binocular_Vector","Binocular_Vector"],
["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","ItemSodaMdew","ItemSodaR4z0r","ItemAntibiotic"],
["DZ_Backpack_EP1"]
]
];
/*
["M4A1_AIM_SD_CAMO","ItemGPS","Binocular"],
["30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemSodaRbull"],
["DZ_ALICE_Pack_EP1"]
]
];

//---------------------------------------------------------------------------------
*/
_loot = _loot_lists call BIS_fnc_selectRandom;

// Mission Variables
mission_despawn_timer = 1200; // This sets the Timeout if a timer is used.
_wait_time = 900; // This is how long the loot box will stay once it spawns.
_spawnRadius = 5000; // This is the distance from Center - Used to determine the radius in which missions will spawn
_spawnMarker = 'center'; // DO NOT Change this, UNLESS you need a hard coded center loc for custom purposes
_markerRadius = 350; // This sets marker radius and the area the loot can spawn in
_markerColor = "ColorBlue"; // This sets the Marker Color
_textMarker_IconType = "mil_objective"; // This sets the "Icon Type" (https://community.bistudio.com/wiki/cfgMarkers)
_markerText = "Mission: Sniper Alley"; // Text to display at Marker (Leave "" blank if you dont want a message)
_markerBrush = "SOLID"; // Marker Brush - How the marker is filled in


// This sets the global position coords the mission needs to run, do not change.
_position = [getMarkerPos _spawnMarker,0,_spawnRadius,10,0,20,0] call BIS_fnc_findSafePos;
_loot_pos = [_position,0,(_markerRadius - 100),10,0,20,0] call BIS_fnc_findSafePos;

// Use these if using AI, Vehicles or Helis
_aiunit_spawn_pos = [_loot_pos, 30, 50, 30, 0, 20, 0] call BIS_fnc_findSafePos;
_aivehicle_spawn_pos = [_loot_pos, 30, 50, 30, 0, 20, 0] call BIS_fnc_findSafePos;
_aiheli_spawn_pos = [_loot_pos, 30, 50, 30, 0, 20, 0] call BIS_fnc_findSafePos;

//---------------------------------------------------------------------------------
// Mission Body STARTS Here
// Read General Script Instructions for Variable Usage per script.

// Add a Marker? Make sure to use FMarker3.sqf for M3 Missions
[_position,_loot_pos,_markerRadius,_markerColor,false,_textMarker_IconType,_markerText,_markerBrush] execVM "\z\addons\dayz_server\addons\FMission\FMarker\FMarker3.sqf";

// Add a base?
_base = createVehicle ["Land_fortified_nest_big",_loot_pos,[], 0, "CAN_COLLIDE"];
_base setPos _loot_pos;

// Add some AI to patrol?
sleep 1;

diag_log("MISSION 3: DeathWish - Loading -=FAI Units=- Started");

_aiunit1 = [_aiunit_spawn_pos,50,4,"Bandit",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit2 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit3 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit4 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit5 = [_aiunit_spawn_pos,50,4,"Medic",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit6 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit7 = [_aiunit_spawn_pos,50,4,"Medic",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit8 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit9 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit10 = [_aiunit_spawn_pos,50,4,"Sniper",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

_aiunit11 = [_aiunit_spawn_pos,50,4,"Bandit",_loot_pos,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Unit.sqf";

sleep 10;
diag_log("MISSION 3: DeathWish - Loading -=FAI=- Completed");

sleep .5;
/*
// Add a one off custom AI?
_attackgroup = createGroup east;

_attacker1 = _attackgroup createUnit ["TK_INS_Soldier_3_EP1", _base, [], 0, "Form"];
_attacker1 setUnitPos "AUTO";
[_attacker1] execVM "\z\addons\dayz_server\addons\FMission\FLoot\FLoot_Bandit.sqf";
_attacker1 setUnitPos "Middle";

_attacker2 = _attackgroup createUnit ["TK_Soldier_Medic_EP1", _base, [], 0, "Form"];
_attacker2 setUnitPos "AUTO";
_null = [_attacker2] execVM "\z\addons\dayz_server\addons\FMission\FLoot\FLoot_Medic.sqf";
_attacker2 setUnitPos "Middle";

_attackgroup setCombatMode "RED";
_attackgroup setBehaviour "STEALTH";


// Add a Heli Patrol?
_aiHeli = [_aiheli_spawn_pos,_loot_pos,250,"M1"] execVM "\z\addons\dayz_server\addons\FAI\FMission\FAI_Create_Heli.sqf";


// Add a Vehicle patrols?
_aiVehicle = [_aivehicle_spawn_pos,_loot_pos,100,"M1"] execVM "\z\addons\dayz_server\addons\FMission\FAI\FAI_Create_Vehicle.sqf";
*/

[nil,nil,rTitleText,"MISSION: DeathWish - A group of Bandit Snipers are wreaking havoc in the area. Go check it out!", "PLAIN",10] call RE;

diag_log("MISSION 3: DeathWish - Waiting...");
_timeout = time + mission_despawn_timer;
waitUntil
{
_targetunitsAlive = {alive _x} count (units _targetgroup);
((time > _timeout) || (_targetunitsAlive < 1))
};

_targetunitsAlive = {alive _x} count (units _targetgroup);
if (_targetunitsAlive < 1) then
{
[nil,nil,rTitleText,"MISSION: Survivors have eliminated the Bandit Snipers and their comrades, Good Job.", "PLAIN",10] call RE;


// Create a loot box?
// Create loot box
diag_log("MISSION 3: DeathWish - Creating loot box");
_loot_box = createVehicle [_loot_box,_loot_pos,[], 0, "NONE"];
_loot_box setPos _loot_pos;
clearMagazineCargoGlobal _loot_box;
clearWeaponCargoGlobal _loot_box;
clearBackpackCargoGlobal _loot_box;

// Add loot
diag_log("MISSION 3: DeathWish - Loot box created, adding loot to loot box");
{
_loot_box addWeaponCargoGlobal [_x,1];
} forEach (_loot select 0);
{
_loot_box addMagazineCargoGlobal [_x,1];
} forEach (_loot select 1);
{
_loot_box addBackpackCargoGlobal [_x,1];
} forEach (_loot select 2);

// Wait for awhile so loot can be collected?
sleep _wait_time;


// Mission Body ENDS here
// ---------------------------------------------------------------------------------


// Add additional deleteVehicle _xxx; for each item that needs to be deleted.
// Add additional deleteVehicle _xxgroup; to delete the AI units
// Clean up
EPOCH_MISSION3_RUNNING = false;

deleteVehicle _base;
deleteVehicle _loot_box;
{ deleteVehicle _x } forEach units _targetgroup;
deleteGroup _targetgroup;
//{ deleteVehicle _x } forEach units _attackgroup;
//deleteGroup _attackgroup;

diag_log("MISSION 3: DeathWish - Script Finished");
};

Link to comment
Share on other sites

I know I sound like an idiot. I am new to owning a server and love your concept. However could you please dummy down the instructions to me? I am basically stuck on the first line of your text as follows: Easy Way:
Drop the script in the "Modules" folder on your server and change the call line to point to that location. My question is what call line, and where is it located?

 

Thanks so much.

Link to comment
Share on other sites

Modules is a folder within the dayz_server.pbo

 

You'll have to un-pbo the dayz_server.pbo

Drop the script into the modules folder.

Re-PBO the dayz_server.pbo

Upload it to your server.

 

 

 

The call line is in the mission file.

 

Goto MPmissions in the server directory, go to your mission folder (I.E. Dayz_Epoch_13.Tavi) within you'll find the init.sqf.

 

Your looking for a line like this:

EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"],["any","any","any","any",10,"Military"], ["any","any","any","any",25,"Treasure"], ["any","any","any","any",40,"Supplyitems"], ["any","any","any","any",55,"Construction"]];

Change/Modify it as per the instruction in the 'FMission Instructions.txt' file.

 

Hope this helps you out :)

 

If your totally stumped PM me and I'll help you out, saves filling this thread up with install help :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...