Jump to content
Sign in to follow this  
austin_medic

Sidemission Script Package

Recommended Posts

Sidemission Script Package

I created this set of sidemission scripts because it seemed like other sidemission scripts in missions were just way more complex than they had to be and were very difficult to implement into missions. This set of scripts should work with almost any mission you create (as long as the variables aren't overwriting each other).

Sidemissions:

Destory Ammobox:

Pretty simple, just destory the ammoboxes as the designated location.

Kill Officer:

Also pretty simple, just kill the officer any way you want.

Destory Radio Tower:

Once again, it explains itself. Destory a radio tower.

Destory Vehicle:

Destory a randomly selected vehicle in any way you want.

Just put in init.sqf:

 execVM "Sidemissions\SMfinder.sqf";

You will also need to create a marker on the map and leave it empty. Name it sideMarker.

create a game logic on the map and name it center.

http://www.armaholic.com/page.php?id=22637

version 2 thats working with 1.36 and up (http://forums.bistudio.com/showthread.php?186365-Sidemission-Script-Package-V2)

Edited by austin_medic

Share this post


Link to post
Share on other sites

Having some issues with this script pack.

Side missions are spawning repeatedly after completion. For example.. Destroy Radio tower -- We go out, destroy the radio tower. Side mission complete good job. Immediately following that we have the same side mission pop up 500-600 meters away. So we move to the location, as soon as we start to kill the units protecting it, it completes the side mission.

The names of the markers default to Destroy Ifrit. For example, destroy ammo cache if we have not completed it within 10 minutes. When you look at the marker on the map, instead of saying destroy cache it now says destroy Ifrit.

Other than this, we have found no issues. The AI respond more aggresively than I have ever seen in an ARMA 3 mission.

One last thing, is there a way to adjust the sleep time on the side missions to something random, so you could get one anywhere from 5 to 30 minutes.

Thank you for your hard work..

Share this post


Link to post
Share on other sites

Sounds great for livening up my missions, i'm gonna try this later and give you feedback.

Share this post


Link to post
Share on other sites

In SMFinder.sqf at the end you should see sleep XX + random XX;

Just change whatever the numbers are to whatever you want. I probably turned them down to test missions and forgot to turn it back up before releasing it.

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. Haven't seen a bug that makes the tower destory itself after you start killing units protecting it... The game probably found a crappy spot for it and after the game turned on its physics it destoryed itself from being inside another object (maybe findsafepos would be better than randomPos?).

Share this post


Link to post
Share on other sites

at which location would I change the randomPos to findsafepos? I could test this out for you..

And thank you for the other info it helped out a bit.

Share this post


Link to post
Share on other sites

I'll change it myself and release it sometime later this week... probably sometime this weekend. I'll be adding some stuff to the sidemissions such as static weapons that AI can crew as well.

Edited by austin_medic

Share this post


Link to post
Share on other sites

Is there a way that the briefings can be in the Diary so you can be much more verbose with lore/story?

Share this post


Link to post
Share on other sites
The AI respond more aggresively than I have ever seen in an ARMA 3 mission

This is because he is using BIS_fnc_spawnGroup - if you do not set any skill they are spawned with default skill of 1 i.e Aim bots so you need to add in a skill level when you spawn

make a simple function i.e

Function.sqf

God_fnc_Skill ={
_groupnamed = _this select 0;	
_leaderguy = leader _groupnamed;
_leaderguy setskill 0.50;
{
_x setskill ["aimingAccuracy",0.20];
_x setskill ["spotDistance",0.30];
_x setskill ["spotTime",0.35];
_x setskill ["courage",0.35];
_x setskill ["commanding",0.40];
_x setskill ["aimingShake",0.40];
_x setskill ["aimingSpeed",0.35];


} foreach units _groupnamed ;
};

Call it from yout INIT.sqf

[] execvm "functions.sqf";

Then when you spawn them in add it it the group i.e if the group is called _grp1

 [_grp1] call God_fnc_Skill;

Hope that will help

Share this post


Link to post
Share on other sites

I might do that as well. I kind of cut some corners cause im n00b at task creating. AI skill i might randomize for more variety in the combat.

Edited by austin_medic

Share this post


Link to post
Share on other sites

hey I like this mod me and my buddy plays but there is a bug my buddy gets one mission I get different mission we're on the same team

Share this post


Link to post
Share on other sites

man, these are v cool. by looking inside your files ive learnt a ton about taks.

great clean work!

Share this post


Link to post
Share on other sites
hey I like this mod me and my buddy plays but there is a bug my buddy gets one mission I get different mission we're on the same team

Basic locality issue as everybody is running their own instance of the script ^^

just do

if (!isServer) exitWith {}; 

in the SMfinder.sqf at the top of it. That should fix the problem so then only the server will be running an instance of the script (1 instance) and will send out the same thing to everybody connected to the server.

Share this post


Link to post
Share on other sites

Very good congratulations Austin_Medic.

There is a small bug in the SMfinder.sqf should stay that way.

_grouparray = ["OIA_InfSentry", "OIA_InfSquad", "OIA_InfTeam", "OIA_InfTeam_AA"];

Share this post


Link to post
Share on other sites

I really love the simplicity of this, great way to learn how the scripting works. but is it a good idea to do a while true loop in init ?

i chose to load your "init" as a seprate Sqf the way it was in the old version. but what do i know ?

:)

Share this post


Link to post
Share on other sites

Hey love the script works great but is there anyway i could add a custom init to the officer, ammobox and ifrit?

Share this post


Link to post
Share on other sites

is there another way to find a random spawn location? its currently using this method:

_position = [[9938,18283,131],random 1000,10000, 1, 0, 60 * (pi / 180), 0, []] call BIS_fnc_findSafePos;

but that spawns the location off map quite often (maybe not on altis, but it does on FATA)

Share this post


Link to post
Share on other sites

I cant get this to work. I think the instructions are outdated. There is no folder for the execVM portion, and the readme does not mention anything about a gamelogic trigger??? I am using other AI scripts, would that have a conflict?

Share this post


Link to post
Share on other sites

So I messed around with it a little. It looks like it only runs whenever it is the only thing in the init.sqf

having so much as an execNOW "description.ext" will not allow it to run. I am looking into why it would do this, but I havnt figured it out yet. That being said, I really hope to figure it out, as your missions scripts would be very maliable IMO to introduce variety with mods (assuming you can actually execute the script).

Share this post


Link to post
Share on other sites

so first off let me say, this is a very useful script however i saw a few flaws. i edited it a bit for private use amongst me and my buddy. i made it so that it gets a marker position, which is a marker at the center of the map, and then allows for objective spawning up to 8000 meters away from the marker. i had the issue where the missions were spawning off the map so i specified it a bit better imo. i also added in a few more missions (destroy generator, destroy device, kill goat (lol)) and so far so good. will do some mp testing and see if i can get that working correct too.

good foundation for me to work off of, thank you.

Share this post


Link to post
Share on other sites
so first off let me say, this is a very useful script however i saw a few flaws. i edited it a bit for private use amongst me and my buddy. i made it so that it gets a marker position, which is a marker at the center of the map, and then allows for objective spawning up to 8000 meters away from the marker. i had the issue where the missions were spawning off the map so i specified it a bit better imo. i also added in a few more missions (destroy generator, destroy device, kill goat (lol)) and so far so good. will do some mp testing and see if i can get that working correct too.

good foundation for me to work off of, thank you.

Could you post the code you used and where to put it to limit the spawning area? I've got the script running on Fallujah but 90% of the time the objective is 300+km south of the map.

Edited by Woods825

Share this post


Link to post
Share on other sites

is this still a thing? any newer version, or definite working examples. Noob scripter here, dont want to start off with a script with errors in it as i'll have enough trouble understanding it anyway :)

I want to add custom side missions into a larger scale ALIVE mission. My plan is to have scenarios built (no random elements) which only spawn when some switch is flipped. I figure i'll start with this and go from there.

@Austin_Medic btw, Kudos on the zeus mission thang.

G

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  

×