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
randomFactor

minimum random damage scalar

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

values ≥ 1.0 will always result in damage

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

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
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
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 no discernable effect?
owned set to 1 to start the game with this weapon
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