/*
//==============================//
// SIMPLE-ISH ZT2 MAPPING GUIDE //
// By Zedek the Plague Doctor   //
//==============================//

//---SETTING THINGS UP--------------------

Take the included wavesyst.acs file (or use the text file in
the acs_src folder of the PK3) and copy it to your GZDoom
Builder compilers folder. This is usually GZDoom Builder/Compilers/Zandronum.

When you compile your map script, be sure to add this line to the top:

#import "wavesyst.acs"

When changing variables listed below, make sure to do it in an OPEN script.

//---PART 1: TAGS-------------------------

Zombie Torrent 2 uses different hardcoded tags to
change certain things in the map and control others.

Here is a list of tags that you should or should not use:

211: Boss Camera
Used for the boss wave, briefly shows whatever is in front of it

100: Trader Door
The tag for all trader doors, opened / closed during tradertime

201 - 209: Zombie Spawners
Spawners that control the spawning of zombies, the number starts
at 201 and goes up to 209 for specific waves (Wave 5 is 205, Wave 7
is 207, etc.)

210 - Boss Spawner
The spawner used for spawning the actual boss, used on the boss wave

//---PART 2: ACS SCRIPTS-------------------

ZT2 uses a lot of ACS for controlling things in the map, and you should
follow these rules:

The main ACS script in ZT2 specifies a lot of variables that can be changed
by the map script, and these are as follows:

map_sandbox
Deprecated, but keeps the wave system from running

func_trader
Whether or not other things should happen on tradertime besides opening door 100
If this is true, it uses cases 11 and 12 of script 90 for trader functions.

------------------------------------------------------------

AddMapBattle(file,song,artist)
Adds a custom track to the map's combat music list

AddMapTrader(file,song,artist)
Adds a custom track to the map's trader music list

customboss
Tells ZT2 that the map uses custom boss music

track_boss
If customboss is 1 or true, this will be played during the boss fight

func_prewave
Unknown what this does, but something about functions before wave 1

------------------------------------------------------------

The main ACS script uses script 90 to control wave-based events. This script
will always be executed with an argument, so BE SURE TO SPECIFY ONE ARGUMENT.

The easiest way to have the argument do things is to set it up to a "switch"
and have each case correspond to a different wave. Cases can be omitted and
work just fine.

EXAMPLE OF AN INTRO DISPLAY:

script 1 OPEN
{
    map_title = "Sample Map";
    map_author = "DoomModder666";
}

Roasterock executes script 91 when he's killed, you can override this script
in your map to do all kinds of cinematic effects.

EXAMPLE OF THE DEFAULT SCRIPT:

// Dethroner Death Script
script 91 (void)
{
// This is the default script for the Dethroner. If something is
// to happen when the boss dies, put it right here. However,
// it is advised to keep the delays and the "PROP_FROZEN" lines
// as they are.
SetPlayerProperty(1,1,PROP_FROZEN);
Delay(35*2);
SetFont("SURVIVED");
HudMessageBold(s:"A"; HUDMSG_FADEINOUT, 9493, 0, 1.5, 0.5, 4.0,2.0,2.5);
Delay(35*1);
FadeTo(0,0,0,1.0,1.0);
Delay(35*5);
SetPlayerProperty(1,0,PROP_FROZEN);
Exit_Normal(0);
}

//---PART 3: THE TRADER-------------------

The trader in ZT2 is always behind a spot normally inaccessible by the player,
always blocked off by door 100. Door 100 can lead to a teleporter or alternate
method of entering the trader, but door 100 is always what separates the player
from the trader.

Optionally, the trader can use the TraderDecor actor to have the trader walk
around in the trader room. This actor serves no purpose aside from decoration.

The trader MUST have a line or function in the room that activates script 250.
Script 250 actually opens the trader menu and allows the player to purchase
items.

Map spots with the tags 300-309 should be placed outside of the trader, OUTSIDE
OF DOOR 100. If players are in the trader when the time runs out, they will be
teleported to one of these map spots. Spots 301-309 may be used in future versions,
but spot 300 is the only spot used for now.

There should be a single (maybe more) linedef on the way to the trader that
players CANNOT GET AROUND. This linedef MUST be crossed and should always
execute script 20. Without this, players will not be force-teleported out of
the trader. Optionally, this can block monsters too. The peg in the center of the linedef
should ALWAYS be facing away from the trader. When players cross the front side, this tells
ZT2 that they've entered the trader and should be teleported when the time ends.

//---PART 4: CONCLUSION-------------------

Have fun making your maps, you scrub!

ANOTHER WORD OF ADVICE:
If you use 3D floors and your map is highly vertical, add spawners on
or above the same level of the 3D floor. For example, if your map has a catwalk, add a ceiling
vent or a wall spawner that puts enemies onto the catwalk. This will keep players from camping
the catwalk and ensure that enemies can always reach them.

//---PART 5: ABBUW'S DESIGN ADVICE--------

So, you're making a map for this, and it just feels boring. What can you do to spice your map up?
This is where I come in and attempt to help you out!

1. Try to make enemies come from everywhere. Having enemies that spawn in one place is boring, it just turns in to how fast you can shoot, and how often you've gotta reload. That's not fun.

2. Have open areas leading to the trader, try to avoid tight spaces (less than 96 mapunits in width.) 128 mapunits is fine, but 256 mapunits is optimal.

3. Mark the trader area clearly marked. Nobody wants to wander around the map trying to find the trader.

4. No mazes. That's just a bad idea in this type of game mode.

5. Less of design advice for this game mode, but whatever. No arbitrary invisible walls. It's just stupid to be blocked from somewhere because the mapper doesn't want you to go there. Have some sensible barricade, like a jammed door, or some boxes or something.

//============//
// DISCLAIMER //
//============//

All of the script IDs and junk get confusing, but this guide should be 90% accurate.
I wrote this guide ages ago but I tried to update everything to the latest version.
If anything goes wrong or doesn't work, look at one of the default maps for assistance.

- Zedek

*/