Custom Side/Main Mission ideas

Custom Side/Main Mission ideas

« posted: Jul 14, 2017, 07:25 AM »
Hi All,

Been mucking around creating custom side/main missions and notice others doing the same. What i'm interested in doing is creating missions that extend the gameplay elements of wasteland beyond player vs ai or player versus player. To focus on making players communicate with each other, or having things like side missions lead into main missions to create a quest or story.

So far i've had some success creating the following missions (code is sub optimal and a bit janky, embarrassed but happy to share)

*Bomb Defusal - A player is picked at random on the server and is given a random colour wire to cut. Other players then have to negotiate for the correct colour/safe passage to defuse the bomb and get the reward. (works but want to make it so only different group from player with intel is only able to cut wire, ran into player locality issues).

*Goat Rescue - Bandits are doing bad things to the village goat, if goat dies before the bandits mission failed.

*Armed Looters - Similar to town invasion but there are a number of unarmed civilians and bandits, if 3 out of 10 of the civilians die mission failed. (had a little trouble with handling the unarmed count and failed condition)

*Paratroopers - 8 paratroopers and a VTOL parachute out with high end gear. (had trouble handling the ai grouping and wanted to make the mission spawn only on airfields).

Mission ideas not started:

* 3 way deals - gameplay mechanic from an old arma mission dark business or a game called sub rosa. . Side mission intel quests, that lead into main mission where multiple groups/factions have to kill or negotiate for a reward.

*Armed Protesters - Similar to Armed looters but a big group of unarmed civilians are travelling from one town to another and you have to target the armed among them.

*Double your money mission - Something like an atm heist that gives players an incentive to carry large amounts of cash when they get to a certain area with the risk that other players are camping the point out.

If anyone with more experience creating custom missions, wants to share how they'd go about coding missions like this or any best practice tips or pointers, pseudocode etc. Any further insight into how the mission conditions, _waitUntilMarkerPos, _failedExec, _successExec work would be greatly appreciated.

Thanks again

Re: Custom Side/Main Mission ideas

« Reply #1 posted: Jul 16, 2017, 07:13 AM »
some nice ideas there, shame that no one who is knowledgeable has come forward as any new content is always good from my opinion.

Variety is the spice of life.   

Re: Custom Side/Main Mission ideas

« Reply #2 posted: Jul 18, 2017, 08:24 AM »
Well here is the bomb mission code, its less than perfect and only runs dedicated but fun enough.

Code: [Select]
//mission_Bomb.sqf by Samson - only works dedicated server

if (!isServer) exitwith {};

#include "sideMissionDefines.sqf"

private [ "_townName", "_missionPos","_change","_area","_playerIntel","_wires"];

_setupVars =
_missionType = "Bomb Defusal";

// settings for this mission
_locArray = ((call cityList) call BIS_fnc_selectRandom);
_missionPos = markerPos (_locArray select 0);
_townName = _locArray select 2;

_area = _missionPos;

_wires =


_setupObjects =

//intel distributor
waitUntil {(count playableUnits > 1 )};
if (isDedicated) then {
_playerIntel = [];
if (isPlayer _x) then
_playerIntel pushBack _x;

} foreach (playableUnits);

playerIntel = _playerIntel call BIS_fnc_selectRandom;
playerName = name playerIntel;
_missionHintText = format ["A bomb has been armed at <br/><t size='1.25' color='%1'>%2</t><br/><br/> Negotiate with <t color='%1'> %3 </t> for defusal intel, reward is <t color='%1'>400,000 Dollars</t> ", sideMissionColor, _townName, playerName];

//intel & Wires
wire = _wires call BIS_fnc_selectRandom;

[[wire],"BIS_fnc_guiMessage",playerIntel,true ] call BIS_fnc_MP;

// boomla boomla
bombModel = createVehicle ["Land_Device_assembled_F", _missionPos, [], 5, "None"];
bombModel setDir random 360;
bombModel setVariable ["wire",wire,true];
bombModel setVariable ["cut","Nope",true];

//this if condition is ganked local player must not be the player intel player to get defuse menu.
//[[player], "name", true, true] call BIS_fnc_MP
[[bombModel, [ "<t color='#FF0000'>Cut Red</t>", {bombModel setVariable ["cut", "Red",true]}, "_this distance cursortarget < 3"]],"addAction",true,true] call BIS_fnc_MP;
[[bombModel, [ "<t color='#186a3b'>Cut Green</t>",{bombModel setVariable ["cut", "Green",true]}, "_this distance cursortarget < 3"]],"addAction",true,true] call BIS_fnc_MP;
[[bombModel, [ "<t color='#f4d03f'>Cut Yellow</t>", {bombModel setVariable ["cut", "Yellow",true]}, "_this distance cursortarget < 3"]],"addAction",true,true] call BIS_fnc_MP;
[[bombModel, [ "<t color='#17202a'>Cut Black</t>", {bombModel setVariable ["cut", "Black",true]}, "_this distance cursortarget < 3"]],"addAction",true,true] call BIS_fnc_MP;
[[bombModel, [ "<t color='#3498db'>Cut Blue</t>", {bombModel setVariable ["cut", "Blue",true]}, "_this distance cursortarget < 3"]],"addAction",true,true] call BIS_fnc_MP;

publicVariable "cut";
publicVariable "wire";
publicVariable "bombModel";


_waitUntilMarkerPos = nil;
_waitUntilExec = nil;

_ignoreAiDeaths = true;
_waitUntilCondition = {((bombModel getVariable "cut") !=  "Nope") && ((bombModel getVariable "cut") != (bombModel getVariable "wire"))};
_waitUntilSuccessCondition = {((bombModel getVariable "cut") == (bombModel getVariable "wire"))};

_failedExec ={

_count = 0;
for "_i" from 0 to (8) do {
for "_j" from 0 to 1 do {
switch (_j) do
{ case 0: {if (random 1 == 1) then {_xVel = -1*_xVel }};
case 1: {if (random 1 == 1) then {_yVel = -1*_yVel }};

_xVel = random 10;
_yVel = random 10;
_zVel = random 20;
_xCoord = random 15;
_yCoord = random 15;
_zCoord = random 5;

_bomb = "Bo_GBU12_LGB_MI10" createVehicle (getPos bombModel);
_bomb setVelocity [_xVel,_yVel,_zVel-50];
_bomb = "Cluster_120mm_AMOS" createVehicle (getPos bombModel);
_bomb setVelocity [_xVel,_yVel,_zVel-50];
_bomb = "HelicopterExploBig" createVehicle (getPos bombModel);
_bomb setVelocity [_xVel,_yVel,_zVel-50];

//destroying target
{_x setdamage 1; } foreach nearestObjects [getPos  bombModel, [],100];
//addCamShake [1+random 5,1+random 3, 5+random 15];
deleteVehicle bombModel;
_successExec =
// Mission completed

for "_i" from 1 to 4 do
_cash = createVehicle ["Land_Money_F", _missionPos, [], 5, "None"];
_cash setPos ([_lastPos, [[2 + random 3,0,0], random 360] call BIS_fnc_rotateVector2D] call BIS_fnc_vectorAdd);
_cash setDir random 360;
_cash setVariable ["cmoney", 100000, true];
_cash setVariable ["owner", "world", true];
deleteVehicle bombModel;
_successHintMessage = "Bomb Defused, well done.";


_this call sideMissionProcessor;
  • Offline Matt76
  • Mercenary
  • *****
  • Posts: 396
  • co founder of

Re: Custom Side/Main Mission ideas

« Reply #3 posted: Jul 22, 2017, 07:25 AM »
interesting and certainly different i give you that, how does this mission generally play out ??

Re: Custom Side/Main Mission ideas

« Reply #4 posted: Jul 24, 2017, 06:49 AM »
I wanted to make it so the player who gets the wire to cut cant defuse, but ran into locality issues i.e the bomb needs to detect the team/group the closest player is on. This would force the players on the server to negotiate or cut a deal for the reward. Was thinking about implementing it as a piece of intel that a player gets and is dropped on death.

as it stands it works out a couple of ways:

*the player that gets the wire information may need to cut a deal with another group for safe passage because of HVT.

*the player with the wire information will trade with another group for an upfront payment (bank transfers across teams on our server), they could double cross them by telling them the incorrect wire for a big boom.

*players without the intel could rush to the bomb and try to defuse for a 1/5 chance for the reward, which most of the time ends in a boom.

Generally it makes people on different teams talk a bit more to each other and adds a bit of deception to the mix. The blast will level a Malden sized town no problem. Whenever i get the wire info - most times i tell players the wrong wire, set up in the area with some range finders/popcorn to watch the fireworks.

Re: Custom Side/Main Mission ideas

« Reply #5 posted: Jul 24, 2017, 08:46 PM »
you sold it where do i sign  :P  great stuff there mate :)