SP Mission Creation Documentation

Moderator: Admins

User avatar
Omroth
Site Admin
Posts: 1723
Joined: Sun Nov 07, 2004 7:07 pm

SP Mission Creation Documentation

Postby Omroth » Fri May 06, 2011 11:47 am

Guys, we don't have a lot of time to write docs atm, but here raw are the formats for our randomly generated missions. 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)
User avatar
Omroth
Site Admin
Posts: 1723
Joined: Sun Nov 07, 2004 7:07 pm

Re: SP Mission Creation Documentation

Postby Omroth » Fri May 06, 2011 11:49 am

When you want to test a map, make sure you save it first, then open the console (`) and type:

testAdvancedImport();
User avatar
mizzu
Posts: 44
Joined: Thu Jan 27, 2011 8:10 pm

Re: SP Mission Creation Documentation

Postby mizzu » Fri May 13, 2011 3:02 pm

Hey

I can't get the editor to accept my .png. It totally worked with the importtest.png or another hand made one by me.
Could you take a look over it? Is it because those edges or because the "blue" isn't blue enough or what? Or maybe due to transparency? Or maybe it's too small?

Edit: I got it working after redoing the whole thing and then removing all the non-square unregular bits like the cover in the lower right corner. The ~45 angle wall in said corner didn't btw cause any problems. Just letting you know.
Attachments
paintpallfarm.png
paintpallfarm.png (28.45 KiB) Viewed 28703 times
teknoarcanist
Posts: 6
Joined: Wed Jun 01, 2011 3:23 am

Re: SP Mission Creation Documentation

Postby teknoarcanist » Wed Jun 01, 2011 4:27 am

I see the right click option to DELETE triggers; but how do you add them/draw zones? Is it a console command? I'm trying to make a very simple sp penetrate map.
User avatar
mindcontrol
Posts: 17
Joined: Thu Aug 12, 2010 6:15 am

Re: SP Mission Creation Documentation

Postby mindcontrol » Thu Jun 02, 2011 3:39 am

hold down the t key and drag the mouse. you won't see it until you let go of the t key.
everything tastes better with mindcontrol
User avatar
null
Posts: 3
Joined: Thu Jun 02, 2011 10:37 am

Re: SP Mission Creation Documentation

Postby null » Thu Jun 02, 2011 12:08 pm

thank you, the level editor is great!
teknoarcanist
Posts: 6
Joined: Wed Jun 01, 2011 3:23 am

Re: SP Mission Creation Documentation

Postby teknoarcanist » Thu Jun 02, 2011 4:13 pm

Thanks for that mindcontrol.
TheCaptn
Posts: 10
Joined: Mon Aug 15, 2011 4:34 pm

Re: SP Mission Creation Documentation

Postby TheCaptn » Tue Aug 16, 2011 8:54 am

I've got a series of questions related to triggers/zones for Multiplayer Missions but I figured they'd be better off in here... These all relate to my PNG-based map layouts from this thread.

Secure:
- Is it possible to skip over the bidding process and enforce the active zone in the map editor? Effectively making a multiplayer Penetrate mission where Team 1 always attacks and Team 2 always defends?
- Better still, can I lay out a couple of possible zones and have one randomly selected at the start of a game?

Charge:
- As above, is it possible to skip the bidding process and enforce the active zones within the map?
- Is is possible to make a Dual Charge map where Team 1 needs to reach Side B and Team 2 needs to reach Side A; first team wins?

Disputed:
- How do targetBox_0, targetBox_1, etc work? Should I lay them out as an area within which boxes can spawn, or should I be point-dropping them for an individual box site?
- I don't follow this at all "and side units at the top coming on to get the box".
- Also, regarding this "the boxes should be surrounded by a BAKED zone, and also a delWallsHere zone". Does this matter with a PNG based map where everything's baked and nothing gets generated? If so, how much wider should the baked zone or delWallsHere zone be than the targetBox? Is 1px enough? And what if I don't want it deleting any of my walls?

Hostage:
- Again, is it possible to have randomised start boxes?

Miscellaneous:
- Can triggers be used to set the default turns, or turn length for a map? Mine are so large that the standard defaults always need changing, and it's a little annoying.

[Edit]
Clearly I'm doing something wrong. All the triggers are showing up ingame... I started this multiplayer game to test Disputed mode.
Image

Bright Red boxes are targetBox_ zones.
Bottom-Left Green area is overlapping disputeExit_ and exita zones.
Bottom-Right Red area is the move1_ zone (shown red because I'm playing Team 2).
Upper-Right Green area is the move2_ zone
Upper-Right Inset (hard to see, but it's the small room in the warehouse with two boxes in it) is the hostage zone.

I was hoping this would be the setup for Dispute and Hostage scenarios to begin with, so where did I go wrong?
User avatar
icebrain
Posts: 561
Joined: Sun Feb 27, 2011 1:39 pm
Location: France
Contact:

Re: SP Mission Creation Documentation

Postby icebrain » Tue Aug 16, 2011 11:35 am

Very little is known, the above documentation is all we've got.

Nevertheless…

TheCaptn wrote:Secure:
- Is it possible to skip over the bidding process and enforce the active zone in the map editor? Effectively making a multiplayer Penetrate mission where Team 1 always attacks and Team 2 always defends?
- Better still, can I lay out a couple of possible zones and have one randomly selected at the start of a game?

I doubt the bidding phase can be over-ridden in any game type.
A couple couple of randomly selected bid zones looks like a return to the original concept.
What you can do however is make the level so that one team always want to be the attacker and lose the bid while the other team always wants to be the defender and win the bid.
TheCaptn wrote:Charge:
- Is is possible to make a Dual Charge map where Team 1 needs to reach Side B and Team 2 needs to reach Side A; first team wins?

Problem: both teams could win.
TheCaptn wrote:Disputed:
- How do targetBox_0, targetBox_1, etc work?

Don't add them, they are generated.
TheCaptn wrote:Hostage:
- Again, is it possible to have randomised start boxes?

What for ? every game is random, so unless you want to bid to get a better zone for your hostages, I don't see the point.
TheCaptn wrote:Miscellaneous:
- Can triggers be used to set the default turns, or turn length for a map? Mine are so large that the standard defaults always need changing, and it's a little annoying.

Don' think so, those are set for the whole game prior to it (in advanced setup)
You can give any radius to mines when you create the trigger, so there's no default.
When using SP stuff in MP there are various bugs with player2 not seeing everything Player1 sees.

After you read the Official Manual, check Frozen Synapse's Tactics & Strategy Guide, go further with the Advanced Mechanics for Multiplayer and beat all SP missions with the Campaign Walkthrough • Read the latest News

dspair
Posts: 7
Joined: Mon Jun 13, 2011 12:53 am

Re: SP Mission Creation Documentation

Postby dspair » Fri Jun 01, 2012 11:34 pm

Hi,

I've got a question. Since there is currently no functionality to play Skirmish in other game modes other than Extremination, I've tricked to 'hack' it into the game with the help of the editor. What I did was to create a Hostage level in the Advanced mode, then I saved it into a file, then I put this file to psychoff/data/encounters/sp/ and replaced the original C1M1.enc file with the one I'd created. I renamed it to C1M1.enc after that.

When I started the first campaign mission, my map loaded and it seemed to work fine. However, I noticed that the game mode was not Hostage, but seemed to be a regular Extermination. For instance, even when I killed the hostages, the game went on, though in a regular Hostage game I would've claimed victory.

It seems that I have to set up somewhere and tell the game that this particular campaign level should be played in a Hostage mode, not Extermination. Is there a way to do that?

Return to “Modding”

Who is online

Users browsing this forum: No registered users