You Can Download the entire guide for offline viewing...Download Now

Siege

Level design Guide

 

V. 1.0

 

Copyright ¸ 1998 by Marc "Kor Skarn" Allaire

Korskarn@hexenworld.com

Table of Contents

I. New Siege Entities and Specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

II. Setting Teams (start room, teleports, and barracks) . . . . . . . . . . . . . . . . . . . . . . . .

III. Starting the game ( buttons in barracks) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

IV. Catapults and Balistas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

V. Spikes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

VI. Drawbridge, Chains and Goodies Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

VII. Jail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

VIII. Tigers and Tiger Room Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

IX. Pirhanas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

X. Excelsior (DoC's Sword) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

XI. Throne Key, Throne Room Door and Puzzle Pieces . . . . . . . . . . . . . . . . . . . . . . . .

XII. Crown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

XIII. Door Locker (in defender barracks) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

XIV. Elevators and Doors that need to be "used" . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

XV. Fading Lights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

XVI. Vis Blockers (red curtains in doorways) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

 

New Siege Entities and Specifics

Siege includes new entities, and new specifics that can be applied to new entities as well as the others. And when making a siege map, worldspawn has a new spawnflags:

Set to 1 it means Mission Pack map, set to 2 it means a Siege map. DONT FORGET TO SET IT TO 2 FOR A SIEGE MAP: this is what enables the siege code.

Entities

Light Fader:

Target it to the lights to fade. There is a specific used in Siege that is not described here:

"style" "32" I dont know what style 32 is for.

/*QUAKED ambient_lightfader (.5 .5 .5) (-4 -4 -4) (4 4 4) TOGGLE

"wait" - how long to wait between fade steps (only 25 light values)

default 60 (1 minute)

"level" - what light value to stop at (from 1 - 25)

default 0

"aflag" - direction and increment to fade at (1 is one step brighter, -1 is default-fade down 1 step)

default -1

TOGGLE - Will reach end of it's fade, then start fading back in/out the other way

"delay" - If toggled, how long to wait before changing fade direction and starting again.

default 300 (5 minutes)

*/

Arrows:

/*QUAKED ammo_arrows (.0 .0 .5) (-8 -8 -44) (8 8 20) FLOATING

-------------------------FIELDS-------------------------

None

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

*/

Grenades:

/*QUAKED ammo_grenades (.0 .0 .5) (-8 -8 -44) (8 8 20) FLOATING

-------------------------FIELDS-------------------------

None

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

*/

 

Boots of Climbing:

/*QUAKED art_climb (.0 .0 .5) (-8 -8 -44) (8 8 20) FLOATING

Artifact for wallclimbing

-------------------------FIELDS-------------------------

None

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

*/

Crown:

/*QUAKED art_sword_and_crown (.0 .0 .5) (-8 -8 0) (8 8 20) FLOATING

Artifact for Sword and Crown

-------------------------FIELDS-------------------------

"mdl" set this if you want to use your own model- this includes path and extension- for example:

"mdl" "models/xcalibur.mdl"

"netname" set this if you want to give your winning Siege Piece it's own name when you capture it- for example:

"netname" "Excalibur"

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

*/

Spikes:

/*QUAKED func_obstacle (0 .5 .8) ?

Does damage on impact based on the speed of the impactee

"dmg" - multiplier on damage (damage is based on speed of impact and mass of impactee)

"level" - velocity threshold to not do damage under (400 is running speed)

"mangle" - pitch yaw roll, what dir things must be moving in to allow deadly collision. '0 0 0' means any dir.

for spikes on siege5, this should be (no quotes) "0 270 0" (meaning, they have to be moving North to hurt themselves on it)

give this object an origin brush!!!

*/

Attacker Respawn Point:

/*QUAKED info_player_attacker (1 0 0) (-16 -16 -24) (16 16 24)

Attacker's starting points

team = 2;

-----------------------FIELDS-------------------------

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

*/

Defender Respawn Point:

/*QUAKED info_player_defender (1 0 0) (-16 -16 -24) (16 16 24)

Defender's starting points

team = 1;

-----------------------FIELDS-------------------------

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

*/

Rippler:

/*QUAKED misc_ripples (0 0 1) (-4 -4 0) (4 4 8)

When used, starts a ripple

"wait" - shortest time between two ripples

*/

Piranhas:

/*QUAKED monster_pirhana (1 0 0) (-16 -16 0) (16 16 28)

Set netname to "Chunky" if you want this piranha to be Chunly the Piranha

*/

Greek Fire:

/*QUAKED obj_barrel_gfire (0.3 0.1 0.6) (-13 -13 0) (13 13 36) DOWNHILL NO_DROP ON_SIDE SINK DROP_USE RESPAWN

Greek fire barrel

Use a torch to light them

-------------------------FIELDS-------------------------

.health - How hard it is to blow up

Default: 25

.targetname - set a targetname on a barrel and it will not delay when it explodes (default is arandom delay to prevent too many explosions at once)

DOWNHILL - This barrel will slide downhill with gravity.

NO_DROP - Will not drop to floor before spawning

ON_SIDE - Will make the barrel appear to be on it's side, the top will point right (90 degrees)

Note- barrels on their side must be placed at least 13 units above the floor.

SINK - Sinks in water

DROP_USE - Barrel has no gravity until used, then will drop

RESPAWN - Barrel will RESPAWN at it's initial origin when it is destroyed

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

*/

 

Excelsior (DoC's Sword):

/*QUAKED obj_lady_of_the_lake (1 0.5 0.15) (-16 -16 0) (16 16 32)

This will cause a sword to rise up out of the lake when used

put the origin just above surface of the water.

fail_chance = % chance that it will not activate the first time it's used

*/

Triger Hardfall:

/*QUAKED trigger_hardfall(.5 .5 .5) ?

Hurts player bad when falling through itÿ: used in Siege to prevent jumping from remparts.

*/

Starts Game(targetted by buttons in barracks via a trigger_counter set to 2):

/*QUAKED trigger_start_timer (.5 .5 .5) ?

When activated, will set the timelimit (if there is one) to time + timelimit- this way any time lost getting ready to set up is saved.

*/

WorldSpawn:

This is not a new entity! But for siege its spawnflags need to be set to 2.

/*QUAKED worldspawn (0 0 0) ? MissionPack Siege

Only used for the world entity.

Set message to the string index of the level name.

Set CD to the cd track to play.

Set MIDI to the midi file name

Check "MissionPack" to enable the enhanced door and plat code

Check "Siege" to enable Siege code

-------------------------FIELDS-------------------------

target = sheep enables the Sheep Hunter code

worldtype - determines which skin obj_pots use

0 - castle

1 - egypt

2 - meso

3 - roman

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

*/

Specifics

These are new specifics that can be applied to old and new entities:

"fail_chance" "x"

% of chance this entities activation fails when triggered. Set x to a number from 0 to 100, but 0 and 100 are useless: 0 means it will always be activated (no need then to use fail_chance) and 100 means it will never be activated.

Used in Siege for Excelsior (set to 90).

"impulse" "33"

For objects that need to be "used" like the elevators and defenders barracks door.

"ondeath_target" "match this to an entity's targetname"

Triggers entities with a matching targetname when it dies (or is destroyed).

Used in Siege on inner doors to trigger Tiger Room door.

"pain_target" "match this to an entity's targetname" [corrected from onpain_target - tiglari]

Same as ondeath, but triggers when hurt not when killed.

Used in Siege on Tower door to trigger Excelsior, and on

Breakable stuff to trigger the Rippler.

"siege_team" "x"

Means this entity belongs to team x. Used in Siege on tigers (so they dont attack their owners) and on defender barracks elevators and door (so that attackers cant use them). Set x to 1 for defenders and 2 for attackers.

Back to Top

Setting Teams (start room, teleports, and barracks)

Your Siege map will need a start room with teleports to chose teams like in the original siege maps. Your start room should have some info_player_deathmatch distanced enough so players dont telefrag each other.

In the room make three teleports: one for becoming attacker, one for defender, and one for random team. The teleport for Defender needs to have its spawnflags set to 35, attackers is 67 and random is 131. Defender's teleport has its target set to "defender", attacker's to "attacker", and random has been set to "defender" in Siege, but i think it is not used. In each barracks you have to put at least one (better to have more or players will telefrag) info_teleport_destination with its target set to "defender" or "attacker" . The barracks also need info_palyer_attacker and info_player_defender entities for respawn points when players are killed.

Back to Top

 

Starting the game ( buttons in barracks)

In each barrack should be a func_button with "wait" set to "-1". These should be targetted to a trigger_counter that will trigger a trigger_start_timer. Mana WILL NOT

grow and frag count WILL NOT increase untill the game is started with trigger_start_timer. This trigger will also reset timer.

Back to Top

Catapults and Balistas

Catapults in Siege have these specifics:

"health" "5000"

"speed" "60"

and are targetted by a trigger_control (when the player is inside this trigger, it says "You are in control" and player will control the catapult).

Balistas specifics are:

"dmg" "100" //damage each arrow does?

"thingtype" "12" //wood

"health" "500"

"speed" "1"

Balistas NEED to be triggered by a trigger_cotrol.

Back to Top

Spikes

The spikes in front of the castle are func_obstacle entities. These will hurt the player accordingly to its velocity and moving direction (see its specifics in the new entities section). Siege original map uses the default values (I dont know these).

Back to Top

 

Drawbridge, Chains and Goodies Door

Here are the entities I used to make a drawbridge with chains like the one in Siege:

{

"classname" "func_door_rotating" //the drawbridge itself, drawn in closed

//position

"spawnflags" "98" // TOGGLE REVERSE and X-AXIS set to 162 for

// Y-AXIS instead of X-AXIS

"soundtype" "6" // Drawbridge sound

"flags" "-90" // How much to rotate

"targetname" "opendraw"

"origin" "whatever" // Set to the point around which your bridge will rotate

}

{

"classname" "breakable_brush" //the chains: make two of them

"netname" "snap"

"target" "draw5"

"health" "350"

}

{

"classname" "func_button" //the button

"wait" "2" //how much time before it can be used again

"target" "draw2"

}

{

"classname" "trigger_relay"

"target" "opendraw"

"targetname" "draw2"

}

{

"classname" "trigger_relay"

"target" "draw3"

"targetname" "opendraw"

}

{

"classname" "trigger_relay"

"target" "opendraw"

"targetname" "draw3"

}

{

"classname" "trigger_relay"

"target" "draw3"

"targetname" "draw4"

}

{

"classname" "trigger_deactivate" //to deactivate the button once chains are broken

"spawnflags" "1" // ONCE

"target" "draw2"

"targetname" "draw4"

}

{

"classname" "trigger_counter" //counts the number of chains broken.

"netname" "snap"

"target" "draw4" //Everything that is triggered when chains are broken should

//have its targetname set to "draw4"

"targetname" "draw5"

}

To make goodies doors that open when chains are broken simply set their targetname to "draw4"

Back to Top

 

Jail

Jail only needs to have an info_teleport_destination with "prison" as targetname in each cell, and a couple of Icons of Defender on the map.

 

Back to Top

Tigers and Tiger Room Door

Tigers are monster_werepanther (or you can use any monsters you want) with "siege_team" set to their owner team (1 for defenders and 2 for attackers).

They are targeted to a path_corner entities so they get out of the room.

Their door is a simple toggle door, which targetname is match by "ondeath_target"

on the inner court doors.

 

Back to Top

Pirhanas

Pirhanas are nothing else than monster_pirhana for each of these fishes you want in your

Map. I think its useless to tell that these will work better if put them in water?

If you want to make Chunky the Piranha (the one in the pool in inner court)

Just add "netname" "Chunky". This changes the death message if you get killed by him.

Back to Top

Excelsior (DoC's Sword)

 

obj_lady_of_the_lake, this entity origin should be placed where you want the base of it to be in RAISED position. It needs to be targeted by another entity to make it raise,

and you can give it a fail_chance. In Siege it is targeted by Tower Door pain_target

and has a failchance of 90. Tha means: whenever the Tower door is hurt by an attacker,

the program will return a random number between 0 and 100. If that number is higher than fail_chance then the sowrd will raise. If it is below, it will not. Thats why sometimes Tower door can be broken and no sword appears, this was not a bug.

 

 

Back to Top

Throne Key, Throne Room Door and Puzzle Pieces

The Throne key is nothing else than a puzzle piece with spawnflags 8 addedÿ:

{

"classname" "puzzle_piece"

"spawnflags" "8" //tells the program it is the throne key

"netname" "Throne Room Key" //set it to your key name

"puzzle_id" "cskey" //the name of the model file without path and extension

}

Note: due to the way the key had been coded, you cannot have two or more different keys or other puzzle items without additional coding. If you want to use a key with a different model than cskey.mdl, you can but replace cskey.mdl with the model you want and rename your model to cskey.mdl. Otherwise this will bug the key tracker and server will crash (HELLO COSMOS!!!! I wanted to use another puzzle piece than cskey, and when the key tracker wanted to replace the key that it didnt find it tried to load cskey that has not been precached and server crashed. The key code isn't very portable.).

To make the key open the door you want (or activate ny kind of trigger) just add to your door or trigger "puzzle_piece_1" "cskey".

 

Back to Top

Crown

The Crown is simpler than the key to make: just put a art_sword_and_crown where you want it and its done. You can add "mdl" "path\modelfile.mdl" to change its model to path\modelfile.mdl.

 

Back to Top

Door Locker (in defender barracks)

Still got to figure out that one!ÿ:0)

Back to Top

Elevators and Doors that need to be "used"

Any object that needs the use button (impulse 13) must have "impulse" "33" set.

Go understand WHY they had made it impulse 33 when the use button in impulse13!!!

To make a one sided door you just have to use a trigger near the door that will activate it.

The Siege defender barracks door has a trigger on each side. The outer one has

"impulse" "33" AND "siege_team" "1" so that only defenders can open it from outside.

On the inner side the trigger has only "impulse" "33" so both teams can open it.

 

Back to Top

Fading Lights

To make fading lights like in siege, make an ambient_lightfader and target it to all the lights you want to fade. See the lightfader fields in the new entities section.

 

Back to Top

Vis Blockers (red curtains in doorways)

Have you ever wondered what were these red curtains for? These are not decorations!

They are used to block the view, reducing the nuber of faces the engine has to render, thus speeding up the game. Imagine without these: you would be able in siege.bsp to look from attackers barracks up to the tower stairs (for the engine doors, closed or open, dont block the view). With all this to be rendered, not only the game will be very slow, but the map will get over the max plane limit it can render at once, which is around 800.

Over that limit, you get the translucency disabled warning and some parts of your level will not be rendered. Note it is important if you use these curtains (any water brush will do) to NOT compile with watervis command line for Qbsb. Otherwise the curtains will be useless. To know the speed your level runs at and the number of faces visible, type in console r_speeds 1 (and r_speeds 0 to turn it off). You will have a display like this on top left of your screen:

X.X FPS XXX MS

XXX/YYY/ZZZ POLY X SURF

x.x fps is the framerate (fps stands for frame per second)

xxx MS is the time in microseconds for each frame. If you multiply FPS * MS you will always get 1000

XXX/YYY/ZZZ POLY is related to the number of polygons visible.

The lower they are the faster it will be. In Siege, XXX gets up to 800 in front battlefield,

This is high for multiplayer and should be kept lower (I have been told 450 for CTF)

YYY is thge number of faces rendered at once. It must not get over 800 or you will have translucency disabled. I dont know what ZZZ and SURF are.