Turok EX Modding Guide

Levels

General Actor Properties

Spawn Flags 1
Sniper

stand in place

can only use ranged attacks, even up close

Melt On Death

required for enemies that can respawn, or they'll get stuck at the glowing stage

Avoid Water

deletes the actor if it enters a water sector

has no bearing on whether the actor can enter water sectors in the first place, and should generally not be used

Teleport Avoid Cliffs

do not enter cliff sectors when pathfinding to a place to teleport to (seems to affect both the Teleport flag as well as respawning)

also makes the actor vulnerable to super arrows (super arrows will only deal double damage without this flag)

Spawn Flags 2
Item Drop Mask 1 explosive shells 8 minigun ammo
2 grenade 9 mortal wound
3 10 health 10 rockets
4 full health 11 shells
5 ultra health 12 energy cell
6 2 health 13 large energy cell
7 25 health 14 clip
Hold Trigger Animation impervious to all damage until triggered

Spawn Flags 3
Make Spawn Anim Visible

remain visible and solid before being triggered

Hold Trigger Animation must also be checked, or the actor will be active without being triggered

General
Target TID

triggered by enemies when killed
can only trigger actors, not level scripts

other actor types may use this for other purposes

Trigger Anim

animation to play when triggered (see tables below)

actor will be hidden and non-solid until triggered, unless Make Spawn Anim Visible is checked

Hold Trigger Animation should also be checked

Actor-Specific Properties

Player

Dead Height

Step Height

This determines how well the player "sticks" to the ground when moving down slopes.

The default value when placing the actor causes the player to stagger when going down slopes. The value used in the base game is 30.72.

Enemies

Human_Grunt_Soldier
Variant Attacks
0barbarianunarmed proj1wand spell
1axe + shield 2pistol
2morning star 3rifle (crouched)
3polearm 4[nothing]
4shotgunstandard 5rifle (standing)
5spiked shin guards 6blow gun
6riflestandard 7grenade
7topless 8[nothing]
8plasma 9demon fireball
9poachermachette 10demon shaman spell
10pistol strong2-handed melee
11 weak1-handed melee
12shotgun Trigger Anim
13rifle 3aerial ambush
14tribalbone club 4standing
15blow gun 5demon shaman spell
16polearm Alternate Moves
17shaman 2-handed stance
18cyborgpulse rifle
19blade
20polearm
21demonaxe
22polearm
23unarmed
24shaman
25hanging body

Monster_Raptor_Common
Variant Attacks
0normal proj 1 plasma gun
1cyber strong melee
Texture Trigger Anim
0green 2 outstretched arm
1brown

Monster_Purlin
Variant Attacks Trigger Anim
0unarmed proj1blaster 3winding up pose
1blaster 2leap smash (ineffective) 4level 5 wall smash
Texture 7ground pound 5180 uppercut thing
0yellowish green strongbackhand (both types) 6aerial ambush
1forest green

Monster_Stalker
Texture Trigger Anim
0adult 2hind legs, right hand swipe
1elder 3face and left hand up
2young 4all fours, face up (1-second delay)
3elite 5all fours, low and poised
Attacks 6aerial ambush (jolts into the air at the end)
proj 1leap 7same as 2, very slightly shorter delay
strongswipe

Monster_Insect_Beetle
Attacks
proj 1lunge (only when far)
stronglunge (only when close)

Movers

Attack Chance time in seconds to reach new height
Health

time in seconds before returning to original height

0 will prevent the mover from returning

Target TID

sound ID, as defined in defs/fileLookup.txt

some common ones include:

  • 523 deep rumble
  • 526 common rumble
  • 561 level 8 elevator whir
Param 1

change in height – positive is up, negative is down

10.24 * 5 * Param1 for most movers

10.24 * Param1 for Mover_FloorLowerOnceSlow and Mover_FloorPerpetual

Doors

Attack Chance

stay open for Attack Chance * 4 seconds before closing again

0 will prevent the door from closing

Param 1

delay for Param 1 * 4 seconds before opening

Trigger Delay works for doors (and is more granular), so this appears to be redundant

Sector Settings

Blend Length

time taken to transition to this sector's fog properties when entered

1.0 is the usual value

Ambience

These are defined in defs/environmentInfo.txt

# Definition Sounds Reverb
0 [None]
1
Environment_Jungle     0
apes, birds, wildcats
2
Environment_Swamp      1
birds, insects, occasional ape
3
Environment_Cave       2
bats, cave growls cavernous
4
Environment_Catcomb01  3
wind, occasional cave growls, screams enclosed
5
Environment_LostLand   4
wind, rumble, wildcats, t-rex
6
Environment_Catcomb02  5
metal moan (level 8) spacious
7
Environment_Catcomb03  6
[same as 4]
8
Environment_Ruins      7
wind, occasional wildcat, cave growls
9
Environment_Valley     8
wind, occasional wildcat, t-rex
10
Environment_Village    9
apes, birds, rumble

spirit realm ambience is played in TurokPlayer::DoWarpSounds() in scripts/player.txt, based on a map ID check in TurokPlayer::InSpiritWorld()

Music

These are defined in defs/fileLookup.txt

 0 - Level 1 + 2
 1 - Level 5 - Catacombs
 2 - Cave Ambience
 3 - Boss - Longhunter + Mantis
 4 - Level 8 - Final Confrontation
 5 - Boss - Campaigner
 6 - Hub Ambience
 7 - Level 6 - Treetop Village
 8 - Level 7 - Lost Land
 9 - Boss - T-Rex
10 - silence
11 - Mysterious Ambience (level 7 intro cave)
12 - silence
13 - Level 3 - Ancient City
14 - Level 4 - Ruins
100 - Underwater Ambience

Automap

A given sector edge will be drawn on the automap if it isn't shared with another sector, or if the adjacent sectors' Draw Orders are not equal. The color will be chosen by the sector with the lower Draw Order.

The Hidden flag works like another color – the edge will only be hidden if the hidden sector has the lower Draw Order.

The Toggle flag allows Block sectors to be added to the automap like normal.

Sector Flags

Event

Triggers all actors with the matching TID when the player enters the sector. If there are no matching actors, the corresponding $script will be called instead, if there is one.

The event is triggered once every tick for as long as the player is within the sector.

Teleport

Damage

The Lava flag reduces the player's speed (only works in conjunction with Damage flag).

Event Sound

When paired with the Event flag, plays a sound any time the player enters the sector.

Checkpoint & Save Game

Shallow Water

When paired with the Water flag, prevents the player from entering the swimming state, and allows enemies that can't swim to enter the sector.