dreadedentity 278 Posted July 25, 2016 To make replayable missions, you really need to script. A lot. Impossible. Get some script and follow the instructions, it's not hard. I use UPS. I'm also going to have to disagree with this. While scripts can of course allow you to quickly and easily create deep, complex missions involving different types of objectives, it is absolutely not required to quickly create fun, replayable missions. On the other hand if you start building your function library it can grow pretty quick, especially if you keep an eye out for redundant stuff. So you can easily have a mission that involves hostage rescue and evac, depending on the outcome this can trigger other scripts to chime in. Very good advice when it comes to a topic like this. It's an extremely good idea to start learning scripting if you want to make serious missions. Create some generic objective-type scripts, something that just creates a bunch of buildings and units, sets some patrols etc (modelToWorld is an excellent command for this kind of thing). Then all you really need to do in the editor is scout some good locations and make a note of them (or place markers only meant to be seen in the editor), throw down a game logic, and execVM your script. At mission start, it will create all the units and buildings and you have a fast objective to go and complete. I have created a script months ago that can aid in the placement of objects and it can save their locations to clipboard Scripting is helpful but by no means necessary to make a good replayable mission. In fact there are plenty of tools available for that involve no scripting at all. Things like: placement radius probability of presence This was how I started making missions for my friends and I to play. If you set the placement radius pretty small, around 5 meters, it provides a pretty good area for a unit to spawn in, and if you set the probability to something pretty high (60-70%) it allows you to play a pretty similar mission over and over again but never knowing exactly where a unit is/if there is an enemy there at all 1 Share this post Link to post Share on other sites
Tajin 349 Posted July 26, 2016 What editor object could i use as a dummy object? a logic entity perhaps? which one? What would be the correct syntax to add a waypoint for a group? mywaypoint =_this addwaypoint [position MyObject, 0]; ??? Do you have another idea on how you could make a group randomly select a location to move to - from a pool of predefined locations? For that its probably easier to script it directly. You can use invisible markers to designate waypoint positions. Actually... I have an idea how to do just that elegantly. ... Here is a script that only has to be fed 2 parameters: - a unit - an array of marker names _unit = [_this,0,objnull,[objnull]] call bis_fnc_param; _markers = [_this,1,[],[[]]] call bis_fnc_param; _grp = group _unit; _mname = selectRandom _markers; _i = 0; _marker = format["%1_%2",_mname,_i]; _pos = getMarkerPos _marker; _v0 = _pos vectorDiff getPos _unit; {_x setPos ((getPos _unit) vectorAdd _v0); true} count units _grp; while { (getMarkerType _marker) != "" } do { /* 0-Type: "MOVE" "DESTROY" "GETIN" "SAD" "JOIN" "LEADER" "GETOUT" "CYCLE" "LOAD" "UNLOAD" "TR UNLOAD" "HOLD" "SENTRY" "GUARD" "TALK" "SCRIPTED" "SUPPORT" "GETIN NEAREST" "DISMISS" 1-Speed: "UNCHANGED" "LIMITED" "NORMAL" "FULL" 2-Behaviour: "UNCHANGED" "CARELESS" "SAFE" "AWARE" "COMBAT" "STEALTH" 3-CombatMode "NO CHANGE" (No change) "BLUE" (Never fire) "GREEN" (Hold fire - defend only) "WHITE" (Hold fire, engage at will) "YELLOW" (Fire at will) "RED" (Fire at will, engage at will) 4-Formation: "NO CHANGE" "COLUMN" "STAG COLUMN" "WEDGE" "ECH LEFT" "ECH RIGHT" "VEE" "LINE" "FILE" "DIAMOND" 5-Sync with name of trigger */ _param = (markerText _marker) splitString ".,;"; _pos = getMarkerPos _marker; _size = getMarkerSize _marker; _wp = _grp addWaypoint [_pos, (_size select 0) min (_size select 1)]; { switch _forEachIndex do { case "0": { _wp setWaypointType _x; }; case "1": { _wp setWaypointSpeed _x; }; case "2": { _wp setWaypointBehaviour _x; }; case "3": { _wp setWaypointCombatMode _x; }; case "4": { _wp setWaypointFormation _x; }; case "5": { _trg = missionNamespace getVariable _x; if (!isNil _trg) then { _trg = _trg synchronizeWaypoint [_wp]; }; }; }; } forEach _param; _i = _i + 1; _marker = format["%1_%2",_mname,_i]; }; Put the above into an .sqf file and use it as follows: Put this in the init of your unit (one unit of a group is enough): nul=[this,["route_a","route_b"]] execVM "yourscriptfile.sqf"; Now this example randomly selects one of two routes. To define those routes place down markers with the name of the route and a counting number at the end. route_a0, route_a1, route_a2, .... as many as you want Now to specify what kind of waypoints to create, copy the following in the textfield for each marker and adjust it as needed.: MOVE,UNCHANGED,UNCHANGED,NO CHANGE,NO CHANGE,NameOfATriggerToSyncWith wpType,wpSpeed,wpBehaviour,wpCombatMode,wpFormation,syncedTrigger 0-Type: "MOVE" "DESTROY" "GETIN" "SAD" "JOIN" "LEADER" "GETOUT" "CYCLE" "LOAD" "UNLOAD" "TR UNLOAD" "HOLD" "SENTRY" "GUARD" "TALK" "SCRIPTED" "SUPPORT" "GETIN NEAREST" "DISMISS" 1-Speed: "UNCHANGED" "LIMITED" "NORMAL" "FULL" 2-Behaviour: "UNCHANGED" "CARELESS" "SAFE" "AWARE" "COMBAT" "STEALTH" 3-CombatMode "NO CHANGE" (No change) "BLUE" (Never fire) "GREEN" (Hold fire - defend only) "WHITE" (Hold fire, engage at will) "YELLOW" (Fire at will) "RED" (Fire at will, engage at will) 4-Formation: "NO CHANGE" "COLUMN" "STAG COLUMN" "WEDGE" "ECH LEFT" "ECH RIGHT" "VEE" "LINE" "FILE" "DIAMOND" 5-Sync with name of trigger The group of units also will be teleported to the first waypoint (#0) at the beginning. ps.: Let me know if it works xD 1 Share this post Link to post Share on other sites
1212PDMCDMPPM 200 Posted July 26, 2016 yes, guard-waypoints are incredibly effective. unfortuantely the "guarded by trigger" does not seem to work (tested on stable branch). but even without the trigger, the guard waypoint is a very cool tool. In fact it's still working in the 2D editor. The bug is coming from Eden. 1 Share this post Link to post Share on other sites
Tajin 349 Posted July 26, 2016 It worked fine last time I tried it (only a couple of days ago) 1 Share this post Link to post Share on other sites
twistking 204 Posted July 26, 2016 @Tajin: Wow. Thank you. That script looks cool. Will test it later and report back. Are you on stable or dev branch? Because for me the guardedBy trigger definitely seems broken since first version of eden. i'm on stable though. Perhaps it is fixed on dev! I just wanted to say,t hat i really appreciate all your suggestions and ideas. For those who can't understand why one would try to make a fun mission without a script-framework or other form of heavy script-driven randomization, let me try to explain. First of all, while i think, that a good randomly "generated" mission, would fit the arma concept perfectly (no need for cinematic experiences - purely driven bei interacting machanics), i really dislike the "unrealistic" effects of a completely generated mission. unrealistic placement of certain assets, inability of the scripts to cater for known AI problems etc... Also i feel, that these heavy randomized missions work better on a bigger scale, while in small scenarios heavy randomization can lead to completely unpredicatble difficulty. The main aspect is however the way that i design my missions. I play mostly coop 3 or 4 players. That means, msot of the time i need some friendly AI backup and certain type of missions still don't work well. So i mostly go for missions, that have less of a milsim-approach but more of a tactical-shooter approach: short, but very challenging missions (30 - 90 minutes. relatively high amount of enemies). these can't solely work with just random mechanics playing out (it's just to small scale) but are designed around a certain theme. For example "making your way through open terrain while defending again ambushes from the jungle and finally attack a small outpost". I want these mission to be designed authenticly without misplacement of assets. Also predefining potential places for enemies ensures interesting combat even on very a small scale, because i can somehow cater for AI problems, so that every single fire-team can have an impact on the mission. However - and that was the main purpose of this thread - some form of randomization is still needed to make it less predictable and give higher repalyability. Share this post Link to post Share on other sites
twistking 204 Posted July 26, 2016 ps.: Let me know if it works xD i set it up and as it is now, the script seems to delete the group, that is calling the script. that is weird:) ii don't know most of the commands and functions you used, but i'll try to find the error anyway... by the way, would it need much effort, to change the script in a way, that it chooses a position/route from all avaialble positions/routes and then deletes the position from the array, so that another group can't choose the same position? in other words: you have many groups calling the same script with the same parameter and then each group randomly chooses one marker and gets the waypoint on it (and the attributes like type of waypoint and behaviour) and then deletes the position/route from the list of available markers, so that each group get a unique waypoint/route. that way a map maker could just paste the same little code in each group (or each groups first waypointss "on activation" to make sure groups never call the script at exactly the same time) and then just place many markers in the AO. And everytime you start the mission, another group would have another marker/route assigned. so you would basically just say "someone could possibly patrol >here<, someone could possibly hide >here<, someone coud possibly lay an ambush >here<, someone could possibly just relax >here<. But at every mission start other markers would be assigned and also other groups for each marker. for this a single waypoint could even be enough (instead of a route consisting of multiple positions), but it would be super nice, if you could also pass the "on activation" field to the new waypoint from the marker textfield. so you could have a marker that has a waypoint generated on it, that - for example - calls the bis-patrol-function. Share this post Link to post Share on other sites