Jump to content
Sign in to follow this  
OberSchutze

MP Dynamic missions

Recommended Posts

Hello I am almost finished with a COIN mission that I have been working on and only have one small part that needs adding to give some variety. Before I begin, yes I did use the search box and no I did not find what I was looking for.

I am trying to create a dynamic side mission that will spawn an objective randomly at about 30 or 40 markers that I create. However I want only two types of missions. Either destroy weapon caches or killing a HVT and his security force. My mission has no armor or anything larger than a MH6, HMMVEEs and UAZs. Thank you for your time.

Share this post


Link to post
Share on other sites

MSO looks neat, but it doesn't do what I want it to. It doesn't seem to have that randomness I was looking for.

Share this post


Link to post
Share on other sites

I'm pretty sure MSO objectives are random. I could be wrong though. In any case, that's entirely beside the point & nothing wrong with wanting to make you're own scripts and/or scenario(s). There are several ways to make dynamic side missions. You can do it entirely using the editor and/or scripts.

The most modest & simplest solution would be to place an object and use a large placement radius or create a few empty markers in random places around the map and group the objective object to the markers. You can take this simpleton method a step further and use the Condition Of Presence in combination with Probability Of Presence to add some randomness. If the objective object(s) exists (!isNil "objname") then you can create an objective for the object(s). ie; destroy the object.

Example: Place a weapons cache on the map and name it. Set its POP to ~50%. Place a group of soldiers on the map guarding the cache, they can be patrolling or w/e. In each of their COP boxes put !isNil "cacheName". This way the group only exists if the cache exists. To add some more randomness, set each infantries POP to a suitable value. ie; ~50%.

Now... place an HVT on the map and name it.Set its POP to ~50% or 100% if you want to be sure to have at least some objective. In the HVT COP put isNil "cacheName" (so if the other objective doesn't exist then the HVT will spawn). Place a group of soldiers on the map guarding the HVT, they can be patrolling or w/e. In each of their COP boxes put !isNil "HVTName". This way the group only exists if the HVT exists. To add some more randomness, set each infantries POP to a suitable value. ie; ~50%.

In the init of each objective object you would call script to make the objectives. The script will only run if the unit is present.

example cache init box:

_handle=[]execVM "cacheObj.sqf"

cacheObj.sqf

...create the task here....

waitUntil {!alive cacheName};
hint "The cache is dead";

...complete the task here...

IMPORTANT!!!: When you use COP, the order the units are initialized in the mission.sqm does matter. ie; which units are placed in the editor first. Always place the "main object" first and then the patrols guarding the object.

Edited by Iceman77

Share this post


Link to post
Share on other sites

I figured out how to use SOM however I have noticed a few issues such as when I die or disconnect then rejoin or respawn it breaks SOM. Any thoughts on what I am doing wrong with that? Also I think for my next scenario I make I will use this method you just showed, it seems pretty simplistic, thank you for taking the time to explain it. As for your example am I able to create a way so that if one of the objectives is alive that other ones do not pop? The mission I am making is a persistent environment until a server reboot or mission change. Thanks again for your help.

Share this post


Link to post
Share on other sites
As for your example am I able to create a way so that if one of the objectives is alive that other ones do not pop?

Yup. It's also good to use in general. Lets say I layout a custom "composition" in the editor. It's a good way to make the cluster of items from the composition spawn in or for the entire cluster not to spawn in. When combining POP & COP it's also a good way for random patrols, combined with waypoint placement radius and timeout. Does the patrol even exist? How big is the patrol? Does it possibly have a vehicle or even two maybe? Which route is the patrol taking? etc etc. You can actually do alot with just the editor.It's especially effective for smaller missions. It's just a very quick way to add dynamics to a mission, for replay value.

I'm not sure about the SOM module. I believe it's a made for SP only (group respawn) and even then it may be broken...I'm not sure.

Edited by Iceman77

Share this post


Link to post
Share on other sites

SOM was never written or intended for dedi or multiplier. I think there have been a few improvements along the way to help with MP compatibility, but in my opinion the amount of work involved for the little bit you get with SOM, its not worth it to try and make it work in your MP mission.

There are several well written missions with random elements to missions or totally random missions.

MSO as Tupolov already mentioned.

Domination by xeno

I think TFOR has some random missions as well.

Also there is a chopper transport mission, I think its called workhorse or something. I wish I could remember what the exact name and author was.

Your not going to find any simple scripts that does this, its a big task with lots of scripts to get this type of system into a mission and working for MP and Jip. Thats why you only see custom scripts that are tailored to a specific mission.

Share this post


Link to post
Share on other sites

well, with taskmaster2, a little mp framework (to broadcast messages), bis compositions & bis_fnc_selectRandom (yes I know it has issues) it's not so hard to make random objectives and make them jip/mp compatible. Server does everything. It just takes dedication to sit down for hours, days even and write the actual content, if you're going for a very large pool of missions and you want missions to be unique. ie; not all missions can be copy & pasted or written with 1 single function, like "destroy" missions can for example.

Edited by Iceman77

Share this post


Link to post
Share on other sites

MSO has Patrol Ops built in where players are tasked with "random" (or a set array of missions), all enemy generation is pretty much random and you could with some scripting add markers if you wanted to specify where those enemy spawned. MSO is modular so you can add and remove components you don't want, its optimized for MP play and the latest version is even compatible with the Headless Client technology BIS implemented recently.

Share this post


Link to post
Share on other sites

ive got a random spawning missions maker somewhere ill dig it out for you - basic but works - JIP as well

Share this post


Link to post
Share on other sites

I have tried using MSO now and I think I am doing it wrong or it is conflicting with my use of DAC. Mikie that would be awesome thanks. Marker I think that thread is missing some a file needed or I am missing the way you execute it in the mission.

Share this post


Link to post
Share on other sites

https://dl.dropbox.com/u/17725328/Focker_Scripts/tasks.Chernarus.rar

try this - its one i used to locate a random town around the map -

for demo purposes it randomly selects a target every 10 secs - once it has a target it wont select another until you have completed it (use players actions)

as for your markers - look in tasks.sqf - add a line

_mapmarkers = ["whatever your markername is_1", "whatever your markername is_2", etc];

then change

_marker = createmarker [_markname,_RandomTownPosition];

to

_marker = createmarker [_markname, position _mapmarkers ];

then in the init uncomment this line

_marker = createMarker [((_this select 1) select 0), position ((_this select 1) select 1)];

and comment

	_marker = createMarker [((_this select 1) select 0), ((_this select 1) select 1)];

Share this post


Link to post
Share on other sites
I have tried using MSO now and I think I am doing it wrong or it is conflicting with my use of DAC. Mikie that would be awesome thanks. Marker I think that thread is missing some a file needed or I am missing the way you execute it in the mission.

Should work as is mate!!

Just call the missionfinder.sqf as normal!

Then it will randomly choose a mission from the makemission.sqf file using the case attributes at the very bottom of the script!

Share this post


Link to post
Share on other sites

Right now I am trying to figure out each one in my mission. I loaded the MSO folder into it and it started having some power system sim going on, I just need HVT and weapon cache stuff so I need to figure out how to do that. The other two scripts it looks like I need to create the objectives before I can test them further. Thanks again everyone for the suggestions.

Share this post


Link to post
Share on other sites

If you're only needing 1 random objective (either the HTV or the weapons cache), then why bother sorting out MSO files? You could write it faster, seeing as it's simple.

Share this post


Link to post
Share on other sites

Iceman is right - simplicity is the way forward if you dont have a solid grasp of arma scripting.

the file i gave you is pretty much what you are asking for - you just need to add in the stuff that spawns. and then have a condition when the objective is meet to call taskcomplete.sqf. thats it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×