Jump to content
Sign in to follow this  
austin_medic

Sidemission Script Package V2

Recommended Posts



Sidemission Script Package (v2)

by

austin_medic

I sat down tonight and created a set of sidemission scripts that function on version 1.36 of arma 3.

Using these scripts is pretty simple, merge init.sqf into your init.sqf, then copy the rest of the files into the root directory, and the scripts will be loaded in on start.

Put down a game logic named myzone in the center of where'd you like the objectives to be placed. The script will use a special command to find a good spot for the objective based on what its

Put down a gamelogic near the first gamelogic and name it center. This will prevent the myzone gamelogic from wandering outside the radius set in init.sqf.

chosen, for example, if it selects 2*hills + meadow, the command will try hard to find a really hilly spot that has no trees nearby.

You can edit the values being sent to the startup script for the sidemissions in init.sqf, the side doesn't matter currently, long as something is there it probaly won't matter. You can also

change the distance the script will search for locations to put the objective.

It should also be noted that selectbestplaces sometimes has a tendency to find a really good spot for a mission and it'll keep selecting that same spot over and over again from that time on, though it doesn't happen that often.

Sometimes it'll find a not-so-good spot and you'll end up with composition buildings clipping into preexisting buildings or clipping through trees and bushes.

The mission will stutter for a few seconds until the compositions are loaded into memory to be used later in objectives (you could get rid of it if you wanted to, not that difficult).

Feel free to edit any of the scripts to suit your own needs for your mission, just give me credit for the original script.

These scripts probably won't be MP friendly.

V2 Update

added in a forth sidemission (capture tank, then drive it (or lift) back to an object somewhere else) - you'll need to create the object and name it AUSMD_flagpole

got rid of the compositions since they are pretty damn buggy.

Rewrote how the script finds its locations, now moves the game logic to different locations and lets the selectbestplaces command sample smaller locations (50 meters), this prevents the CPU from choking from the data overload that the command can bring

Organized the sidemissions into their own folder for ease of use

Mirrors:

Dropbox v2

Armaholic

Edited by austin_medic

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

awesome. thanks, always enjoy your scripts. always tons of use and to learn from. Downloaidng now.

Share this post


Link to post
Share on other sites

After a little more testing this morning it would appear theres a few kinks in my scripts that need to get worked out. The objects from old sidemissions don't seem to get deleted despite the code i put in to get rid of them. Sometimes the compositons don't load in fast enough and the scripts break with an error claiming what the objectmapper is supposed to define doesn't exist (because it didn't do it fast enough). Update to come sometime today to address these issues (largely the whole thing is still functional, just a few bugs).

as a little side note for stratis it would seem selectbestplaces used with the hills variable loves selecting airstationmike 26 over and over, as its on top of a hill. I'll try to see if I can find a way to use selectbestplaces in multiple locations on the map, then randomize which one gets selected to be used as the mission area.

If selectbestplaces is having trouble finding a good spot it could bottleneck the CPU (causing FPS to drop to 0) as it rushes to try to find something that will do.

Edited by austin_medic

Share this post


Link to post
Share on other sites

From the old thread:

This game has some somewhat crappy number generation. Sometimes the game will pick the same sidemission 2 or 3 times before it finally decides to pick something new.

You might be interested in this:

x=round(random 5) will return 0,1,2,3,4 or 5. (non-uniform distribution, 0 and 5 are half as likely to be selected than any of the other numbers)

x=floor(random 5) will return 0,1,2,3 or 4. (uniform distribution, all numbers have the same probability of being selected)

x=ceil(random 5) will return 0,1,2,3,4 or 5. (0 is very unlikely, but possible, as ceil 0 is 0)

Maybe switching to floor helps with the results?

Share this post


Link to post
Share on other sites
From the old thread:

You might be interested in this:

Maybe switching to floor helps with the results?

This doesn't happen that often with selectbestplaces after more testing with its precison parameter.

The locations it chooses are far better randomized if I sample lots of small locations by moving around the game logic myzone then having selectbestplaces look out from where it was moved to about 50 meters

Observe:

http://steamcommunity.com/sharedfiles/filedetails/?id=352060985

thats with a 1500 meter radius on stratis, and if I put it on Altis with a 15 km radius then it'll probably be alot better at picking new random locations.

Edited by austin_medic

Share this post


Link to post
Share on other sites

I have one suggestion: Would you mind putting those scripts in an extra folder? Like sideMissions/"yourscripts" ? Otherwise it creates alot of clutter, or every mission maker has to change it manually.

Share this post


Link to post
Share on other sites
I have one suggestion: Would you mind putting those scripts in an extra folder? Like sideMissions/"yourscripts" ? Otherwise it creates alot of clutter, or every mission maker has to change it manually.

Already done

V2 Update

added in a forth sidemission (capture tank, then drive it (or lift) back to an object somewhere else)

got rid of the compositions since they are pretty damn buggy.

Rewrote how the script finds its locations, now moves the game logic to different locations and lets the selectbestplaces command sample smaller locations (50 meters), this prevents the CPU from choking from the data overload that the command can bring. You'll also need a extra game logic by the one named myzone named center in order to prevent the myzone logic from wandering outside the radius set in init.sqf

Organized the sidemissions into their own folder for ease of use

Dropbox (v2)

Edited by austin_medic

Share this post


Link to post
Share on other sites
Suggestion:

Add a unitPool script, too define other factions

Put your scripts into a folder e.g sideMissions

Bugs:

Error message

device isn't placed properly

Those bugs are gone now that it isn't using the compositions now (see update v2)

Also I tried to get a unitpool going, but I failed hard.

//this is botched completely - awesome.
//switch(_siden) do
//{
//	case "west": {_grouptouse = (["BUS_InfSentry","BUS_InfSquad"]) call BIS_fnc_selectRandom; _configpath = "(configfile >> "CfgGroups" >> "West" >> "BLU_F"";};
//	case "east": {_grouptouse = (["OIA_InfSentry","OIA_InfSquad"]) call BIS_fnc_selectRandom;_configpath = "(configfile >> "CfgGroups" >> "West" >> "OPF_F");};
//	case "indep": {_grouptouse = (["HAF_InfSentry","HAF_InfSquad"]) call BIS_fnc_selectRandom;_configpath = "(configfile >> "CfgGroups" >> "Indep" >> "IND_F";};
//};

might try a few other methods that are less... doomed from the start.

---------- Post added at 20:36 ---------- Previous post was at 19:14 ----------

Suggestion:

Add a unitPool script, too define other factions

Put your scripts into a folder e.g sideMissions

Bugs:

Spelling mistakes in the mission descriptions

Error message

device isn't placed properly

Another error message (latest version)

reading the post thats above yours shows the solution. Put another game logic and name it center (this is the spot the radius will extend out from).

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

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  

×