Frozen Synapse Singleplayer Level Documentation
Guide to using triggers to make custom campaign missions.
© Mode 7
Load the editor and load anything in psychoff/data/encounters/sp to see an example.
At the moment there's no easy way to add missions - you just need to replace certain ones. We'll be adding that functionality later.
To open the editor, load the game, open the console with `, and type loadEditor();
----
LEVEL CREATION INSTRUCTIONS
1. Create a new PNG which is the size that you want the map to be - using the same numbers you do in the level generator.
2. DONT put any colour directly on the edge of the image
3. Create the map - RED is for full-height walls and BLUE is for boxes
4. Save the map as a PNG in psychoff/
5. Open FS and open the editor. Go to Editor WIndow->Import from PNG. Select your PNG. If this is a new map, click "No", else click "Yes" to only change the walls and keep your existing units and triggers.
BAKED ZONES
- there is a MAXIMUM BAKED ZONE of 127
6. Draw triggers around your pre-created rooms/buildings called BAKED_x (where x is 0,1,2,3,4,5) - this number is your room's BAKED ID and it will be important later.
7. Around empty areas which you wish to have filled with terrain, create "RECURSE_a",
"RECURSE_b", "RECURSE_c" zones
8. If you wish the BAKED ZONE to move randomly around a region, do the following:
a. Create a "WIGGLE_x" zone with your BAKED ID - this is the zone in which the baked block may move.
b. Create a "RECBAKED_X" zone around the wiggle zone (x is the baked id). This area acts like a normal RECURSE zone except that it will ignore the baked area. Please be aware that the best RECURSE zones are the largest, so RECBAKED allows you to make much larger areas. Use this wisely.
9. If you DONT use a RecBaked_x, then you can use a “delWallsHere_a” trigger to make sure that walls do not come right over that trigger
10. You can also use a “NUDGE_a” trigger to make sure anything within the trigger will be nudged away from walls
UNITS WITH PLANS BETWEEN TWO BAKED ZONES
-
- Use SHIFT to make sure that, unless you SPECIFICALLY want it, a unit doesn't have any waypoints in a recurse zone.
RANDOM DEPLOYMENT OF UNITS
---------
- You can add lots of "nospawn_x" zones - this will stop any kind of deployment
- create a SPAWN GROUP by surrounding a set of units with a "spawngroup_x_setting" trigger.
Where this trigger is DOESNT MATTER, just that the units are inside it. x is the SPAWN GROUP ID.
- setting can be: "spawngroup_1_wallwise"...
- "spawngroup_1_wallwiseMindLOS".. - this is the setting you need for exterminations, it won't spawn units in the same area.
- Create one or more "spawnarea_x_whatever" (where x is the SPAWN GROUP ID) zones to have that spawn group spawn inside it/them.
DISTANCE BETWEEN WALLS AND DOORWAYS
-------------------
For the AI to work, gaps need to be 40 in size. Use
makeTestTrigger();
To create a trigger which is 40x40 to measure stuff with
GAME MODES
-------------------
Add a zone called "targetzone" for penetrate and defend missions. You can use a bogus "move2_" zone to depict the targetzone for Red. If a unit is sideUnitUntargettable it will not count towards penetration.
For penetration AI, we need a trigger off-screen called "aimode_penetrate", and for Defend it’s “aimode_protect”
For disputed, you need to add targetBox # , and side units at the top coming on to get the box. The boxes should be surrounded by a BAKED zone, and also a delWallsHere zone.
You will also need to add “disputeExit_x” for this mission type
For ViP, you need to set a “vipExitZone” trigger, which the VIP goes to. The vip must be called “vip”
UNIT SETTINGS
--------------------
Set the attributes to name*startingangle*setting (usually none*0*setting*ducking*setting2*displayName), Settings are:
sideUnit
sideUnitHidden - use a ReactivateOrder to make this unit appear
sideUnitShowPlanDuringPlanning - show this units plans during player planning
sideUnitUntargetable
sideUnitUntargetableByUnsideUnits - this is for little cutscenes which happen between units you don’t want generally being involved
sideUnitInvincible - untargetable AND invincible
setting2 can be:
dontShowMyPlans - this stops plans being shown for *player* units during the
displayName - if this is non-”” it will be shown in-game
TRIGGERED EVENTS
-----------------------
Use “triggerEvent_x_timeAfter_mode” for a box to be collected to cause an event. timeAfter is in ms, 0 if it can be collected at any time. Mode is who can do it - 0 is anyone, 1 is just team 1, 2 is just team 2, 3 is just side units.
Use “event_x_explode_200” to have an exploding event with a explosion radius of 200
Use “event_x_switchOffTripWires” to switch off tripwires
switchOffTripWires
AN EXAMPLE OF THIS IS IN advExplodeTest.enc
TIMED EVENTS
--------------------------
For a timed explosion, put a trigger where you want the explosion with the name:
timedEvent*7000*timedEventExplodeHere
(where 7000 is the time)
When you want to test a map, make sure you save it first, then open the console (`) and type:
testAdvancedImport();