Turok EX Modding Guide

Defs

actors defines all the things that can exist in the world (pickups, enemies, decorations...)
ammoInfo defines ammo types
damageInfo defines damage type properties
mapInfo bundles maps together into the actual levels of the game
textureSetInfo defines texture variants and animations
weaponInfo defines player weapons

ammoInfo

Defines ammo types.

Specifies max ammo (with and without backpack) and HUD icon.

New ammo types can be created by simply adding their names to this file and listing their properties within their block.

Referenced by weapon definitions in weaponInfo (which ammo types the weapon will draw from) and weapon/ammo pickup actor defs.

damageInfo

Defines damage type properties.

Referred to by particle events and kActor::MeleeObject().

Most damage types are fairly generic, and may be referenced by several different attacks, so be careful when changing values here. It's often preferable to change which damage type an attack refers to, rather than changing the properties of the damage type here.

New damage types can be defined by simply adding its name to this file, and listing its properties within its block.

New damage properties can also be created by simply adding them to a damage type's definition. They won't do anything by default, but you'll be able to test for them in an actor's script to program new reactions.

Properties that begin with a lower-case b are flags. They are enabled if set to 1, and disabled if set to 0 or unspecified.

damage

base damage

defaults to 1 if unspecified

randomFactor

minimum random damage scalar

damage will be randomized within the range randomFactor*damage to damage

values ≥ 1.0 will always result in damage

defaults to 1 if unspecified

bExplode

deal damage in a radius

causes enemies (and bodies) to fly into the air on death

classes in scripts/misc/destructibles.txt (trees, rocks blocking the minigun on level 2, etc.) also look for this flag to determine if they should be destroyed when taking damage

the player takes 14 damage from all explosive damage (not just his own)

radius blast radius for bExplode damage
bNoAIBlast

prevent bExplode damage from causing enemies to fly into the air on death

only affects kill shots – corpses will still fly into the air if damaged

bNoDamageSource do not damage whoever caused this damage (e.g., shockwave weapon splash damage does not affect the player because of this)
bAccelerator

causes shockwave weapon death effects

reacted to in OnDeath() in a few actor scripts

bCauseSpecialAnimation mantis and t-rex will sometimes recoil when hit with this
bKnockback

push enemies back on impact

does not affect velocity – it immediately sets the enemy to a new location a fixed distance away

knockBackForce how far bKnockback damage moves enemies back
bShove player is thrown into the air and away from point of impact if hit with this
bQuake shake the camera when the player is dealt this damage type
quakeAngle

shake the camera by ±quakeAngle*38.2° for bQuake damage

-0.03 if unspecified (a little over 1°)

quakeDuration

time in 0.83 seconds to shake the camera for bQuake damage

2.75 if unspecified (~2.3 seconds)

quakeVelocity

[unused] (used to jostle the player upward for bQuake damage)

5.76 if unspecified

bTargetPlayer

damage the player, irrespective of their location or what was hit

only works in onImpact particle events, and only when hitting the level, not actors

will not damage the player if they are invincible (and thus will not, e.g., trigger bQuake effects), unless damage is 0

will not damage the player if bExplode is 1 (whether the player is within range or not)

sound
soundInterval
bImpact

scale damage by:

projectile speed / impactDamp / impactFalloff

(speed is in terms of distance per second)

if the scalar is ≥ 1.0, damage will instead be 999999, unless the victim's Teleport Avoid Cliffs flag is not set (namely bosses)

impactDamp
impactFalloff

mapInfo

Bundles maps together into the actual levels of the game.

Levels are defined by a name and a level number, followed by a block containing level properties.

title only shown in save file names; hub plaques use localized strings

map_1
...
map_N

maps that belong to this level

mapid_1
...
mapid_N

map IDs to assign to the maps defined above

maxDistance_1
...
maxDistance_N

extended fog distance for each map

when extended draw distance is enabled, every sector's Fog ZFar property will be overriden with this (Fog Start will be left alone)

warptid tag ID of warp exit point marking level start
keys total number of keys to find on this level

script_1
...
script_N

level script file for each map

textureSetInfo

Defines texture variants and animations.

Texture sets are defined by a parent texture, followed by a block containing animation properties and a list of texture variants.

Any surface in the game using a parent texture listed in this file will have access to the variants in its set, and animate if set.

Any texture without any variants or animation can be added to this list, and any surface in the game that uses it will then be affected by it automatically.

animated

Set to 1 to have the game cycle through each variant.

note: texture_1 of animated textures is ignored for some reason.

speed how long to display each frame if animated is 1 (larger values mean slower animation)

texture_1
...
texture_N

Texture variants.

You can have as many of these as you want.

Variants can be applied from a script with kRenderModel::SetTexture().

weaponInfo

Defines player weapons.

These are the things that actually get used by the player. Weapon pickup actor defs refer to these to tell the game which weapon to give the player when picked up.

New weapons can be defined by adding their name followed by their slot number, and listing their properties within their block.

Slot number determines order within the weapon selection wheel, and key bind.

Make sure your weapons' slot numbers are reflected in the turokWeapons enum in scripts/common.txt.

offset 1st person model display properties
model
anim
scale
icon HUD icon for the weapon selection wheel
defaultWeapon supposed to indicate that the player starts the game with this weapon in their hands, but does nothing; the player will always start the game with the knife selected, even if they don't own it (in which case they'll lose it when they switch weapons)
owned set to 1 to start the game with this weapon
allowUnderwater

set to 1 to allow this weapon to be used underwater

however, the player will still auto switch to the knife even if already holding another weapon that can be used underwater, and will still switch back to their previous weapon when surfacing, even if they're already holding it

initialAmmoAmount

How much of this weapon's primary ammo type to start the game with.

Only applies if owned is set to 1?

actorType

Unique ID number for this weapon type.

These are named in the turokActorTypes enum in scripts/common.txt, but I don't think they're actually referred to anywhere.

readySound sound played when selecting the weapon
ammo primary ammo type, from ammoInfo
altAmmo alt ammo type, from ammoInfo
scriptClass which class controls this weapon's operation