Jump to content
Sign in to follow this  
KeyCat

Good design for "multi mission" missions?

Recommended Posts

Hi,

Been a long time since I made any "proper" missions (most time is spent toying around in editor) but have a few ideas for small sized co-op's I would like to give a shot.

Does anyone know any available frameworks with good design for making a "multi mission" mission. i.e a mission with several smaller ones and where one mission/objective gets picked randomly out of a pool to carry out?

I've toyed around with this before but never came up with a good design that was lean (i.e worked well on lower end machines) as well as portable enough to be re-used. Have someone figured out a way to use the merger function (or similar) via scripting?

This weekend I toyed arround with Custom Object Compositions and it works great but only spawns in empty objects

http://community.bistudio.com/wiki/Dynamic_Object_Compositions

I guess what I'm looking for is something like that but that could spawn in custom made object composistions complete with AI's and preferable also their waypoints if assigned.

I'm aware of the F2 framework made by Fer but it doesn't really solve my problems. Are there anything else out there or any recommendations on similar missions with a good modular design that can be learnt from?

/KC

Edited by KeyCat

Share this post


Link to post
Share on other sites

spawning compositions and with use of BIS_fnc_spawnGRoup and BIS_fnc_taskPatrol and use nearestobjects on composition position to check for static weapons to mount ai is is very reliable.

Share this post


Link to post
Share on other sites

I created a framework that allows you to create such mini missions. Objectives can both be hard coded or generated dynamically.

Using the framework here is how a mission file would be created for a complete dynamic generated mini mission:

#include "mission.hpp"

/*
Dynamic mission. Will create a number of patrols depending on the number of players. They must be eliminated.
This script uses 'not alive' triggers to check if the mission has been accomplished.
*/

//At which diffulty level this mission is based on.
#define SET_LEVEL 2

_radius = 150;
//Add 25m per level
_radius = _radius + 25 * GET_LEVEL;

//Request area - wants at least 200m to start of area, other enemies can be much closer. Also some enemies in area allowed.
_center = ["PDIST:", _radius+200, "EDIST:", 160, "MAX_E:", 4] call FindPos;

//Couldn't find such a pos? Then abort
ABORT_IF_NIL(_center);

//Now create some enemies - want at least 7-11 units on level 2 which we set. There will be fewer enemies if very few players and more if many players because of LEVEL_FACTOR
_groups = [ [7*LEVEL_FACTOR, 11*LEVEL_FACTOR], _center, _radius - 30, "Infantry"] call CreateEnemyUntilUnits;

//Now a marker
_mrk = [_center, _radius] call AreaMarker;

//Set task
[["The enemy patrols in this area. Take the opportunity to eliminate this threat.", "Eliminate Patrols", "Enemy Patrol Area"], _center] call SetTask;

//Run UPSMON for each
{
   [_x, _mrk, "nofollow", "move", "showmarker", "spawned"] execVM "scripts\upsmon.sqf";
} forEach _groups;

//Create the trigger. Activate when all groups dead.
["NotAlive", "TARGET:", _groups] call SetSimpleTrigger;

This will create a mission to eliminate an enemy patrol patrol. The patrol will be created at least 200m from any players and not in an area with more than 4 enemies already. The number of enemy unit and the radius in which they patrol depends on the number of human players in the game (the LEVEL_FACTOR and GET_LEVEL macros). Markers, triggers and tasks will be created automatically and be deleted, along with dead bodies, some time after the mission is completed.

Missions can also be more hardcoded, like specific position or object. There is an sample mission where you can enter ID's of objects on the map and they will be randomly chosen as missions where you have to destroy such an object.

If you want the source let me know.

Share this post


Link to post
Share on other sites

Thanks for the input guys, will check out what you mentioned.

After digging around a bit I also found Murklors "Editor based AI spawn script". Looks like a great script and would solve parts of the problem.

http://forums.bistudio.com/showthread.php?t=84854

Are still open for more suggestions tho ;)

/KC

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  

×