Wiki

Clone wiki

lzwolf / Home

Welcome

Welcome to the LZWolf project! This is a fork of Blzut3's ecwolf, development version 1.3.99999.

This project provides additional features not necessarily present in the official ECWolf project. Be warned the decorate API or other feature implementations in LZWolf may not conform or be consistent with ZDoom or the official ECWolf. Please do not send feature requests to the ECWolf maintainer(s) based on features and implementations present in LZWolf.

This page should be read in conjunction with Blzut3's ecwolf wiki.

Feature Availability

The LZWolf project is made up of several Git branches. The master branch is consistent with the latest LZWolf release. However some features are not included in the master branch and latest release.

The table below can be referred to to know which branch provides a specific feature if it is not available in the master branch. It also helps group the sections together into related areas even they are supported under the master branch.

Feature Branch Sections (partial list only)
Stacked Planes viewplane Extra Planes
Plane view depth
Zone/Halo Lights master Halo light
Zone light actor property
FilterposThrust
Light Cell Plane master Light Cell Plane

Decorate

Action Function Namespaces

The LZWolf engine provides multiple implementations of some action functions, particularly A_Explode. A_Explode has two implementations in LZWolf. One version will adhere to the official ECWolf API where damage types are not accepted. The other version will include an extra damage type argument.

A mod may choose which version of an action function to invoke using a resolution "::". As an example consider this fragment:

    Spawn:
        GREN E 0 bright lz::A_Explode(random(50, 177), 128, 0, 0, 0, "FireDamage")
        GREN E 0 bright A_Stop
        stop

The extra argument "FireDamage" was supplied to the action function and lz:: was used to explicitly call the version of A_Explode which expects it. To call the default implementation the "::" operator would be left out.

As an added convenience LZWolf provides an actor property called actionns. The base package in LZWolf sets this property as follows:

actor Actor native
{
    actionns "lz"
    damage 0
    radius 20
    ...
}

As a result, all mods running on LZWolf will use the "lz" version of A_Explode. However it is possible to override this property value in specific classes to go back to the official ECWolf version of A_Explode.

Constants

Constants are available and can be used in place of integer parameters in action functions.

DIR - Directions

DIR Value
DIR_EAST 0
DIR_NORTHEAST 1
DIR_NORTH 2
DIR_NORTHWEST 3
DIR_WEST 4
DIR_SOUTHWEST 5
DIR_SOUTH 6
DIR_SOUTHEAST 7
DIR_NODIR 8

CHAN - Sound Channels

Sound channels are specified using these predefined constants.

CHAN Channels Purpose
CHAN_AUTO 2+ searches for a channel not in use in "other channels"
CHAN_WEAPON 0 is for weapons
CHAN_VOICE 1 is for oof, sight, or other voice sounds
CHAN_ITEM 2+ is for small things and item pickup
CHAN_BODY 2+ is for generic body sounds

In LZWolf the three values CHAN_BODY, CHAN_ITEM and CHAN_AUTO all perform the same function.

ATTN - Attenuation

Attenuation is specified directly in decimal or via these predefined constants.

ATTN Value
ATTN_NONE 0.0
ATTN_NORM 1.0
ATTN_IDLE 1.001
ATTN_STATIC 3.0
  • Special handling of attenuation flags in LZWolf:
    • ATTN_NONE - full volume the entire level; left/right ear approximation is also disabled
    • ATTN_NORM - vanilla
    • ATTN_IDLE - vanilla; extra diminishing with distance
    • ATTN_STATIC - vanilla; extra 3x faster diminishing with distance

CMF - Custom Missile Flags

CMF Value
CMF_AIMOFFSET 1
CMF_AIMDIRECTION 2
CMF_PROJHITENEMY 4

The CMF_PROJHITENEMY flag causes the fired projectile not to pass through other enemies.

SXF - Spawn Item Flags

SXF Value
SXF_TRANSFERPOINTERS 1
SXF_PROJHITENEMY 2
SXF_CLIPMAPBOUNDS 4

The SXF_PROJHITENEMY flag causes projectiles spawned with A_SpawnItemEx not to pass through enemies.

The SXF_CLIPMAPBOUNDS flag causes the spawned item X or Y position to be clipped to (0,0) if it would otherwise fall outside the map boundary.

TARGET - Target

TARGET Value
TARGET_AUTO 0
TARGET_PLAYER 1

The TARGET_PLAYER value is helpful when an actor does not yet know what its target is and you know in advance the player is the correct target.

OWNER - Inventory Owner

OWNER Value
OWNER_SELF 0
OWNER_TARGET 1
OWNER_PLAYER 2

Actor flags

Actor flags can be enabled and disabled using existing API A_ChangeFlag.

ATTACKMODE

The FL_ATTACKMODE flag is normally controlled internally in LZWolf. However in some special conditions this flag can be enabled to prevent an enemy from playing its alert effect - normally controlled through its seesound actor property.

DRAWRELATIVE

An actor with FL_DRAWRELATIVE enabled is positioned using view centered coordinates, not absolute world coordinates like most actors, and causes the actor to draw in front of the camera at all times. While this flag is enabled, the player cannot move/turn away from the actor to put it out of view. However the actor may change its position (in view centered coordinates) to leave the player's view if it so chooses.

ENEMYSOLID

An actor with FL_ENEMYSOLID can be passed through by the player but not other actors. It works like FL_SOLID except it only applies to enemies (i.e., actors who are not the player).

IGNOREENEMYSOLID

An actor with FL_IGNOREENEMYSOLID enabled will not respect FL_ENEMYSOLID set on other actors.

STATUSBAR

Enable FL_STATUSBAR to cause an actor to be rendered into the status bar. Use A_SetPicXY to control its precise location on the screen.

Action Functions

A_AlertMonsters

A_AlertMonsters [(int noise = 1)]

Increases the internal counter used by LZWolf to trigger alerts. A value of 2 or above will forcibly alert non-ambush enemies. Only those enemies who sit inside a zone connected to the player's zone will be alerted.

A_BeginHeightAnim

A_BeginHeightAnim (float newheight, int period)

Starts an animation on the player's view height. The animation will smoothly interpolate the player's view height from its current value to the value provided (newheight) using a sinusoidal function over the given time period. The period is expressed in tics or in 1/70'ths of a second.

A_Chase

  • A_Chase [(state melee[, state ranged[, int flags[, float minseedist = 0[, float maxseedist = 0[, float maxheardist = 0[, float fov = 180]]]]]])]
    • Standard monster AI function. Moves the monster according to the speed property.
    • melee - If set the monster will jump to the specified state when within the melee range of the target. Default is Melee.
    • ranged - If set the monster will have a chance of jumping to the specified state to perform a ranged attack. Default is Missile.
    • flags - Modifies the behavior of the function based on the following:
      • CHF_BACKOFF - Causes the actor to run away from the player if it gets too close.
      • CHF_DONTDODGE - Forces the actor to move orthogonally.
      • CHF_NOPLAYACTIVE - Disables the random change of playing the active sound.
      • CHF_NOSIGHTCHECK - Do not look for new targets.
    • minseedist - If set to non-zero, no alert is triggered due to line of sight when target is closer than the distance given by this value. Distance is expressed in tile units, not pixel units.
    • maxseedist - If set to non-zero, no alert is triggered due to line of sight when target is further away than the distance given by this value. Distance is expressed in tile units, not pixel units.
    • maxheardist - If set to non-zero, no alert is triggered due to noise when target is further away than the distance given by this value. Distance is expressed in tile units, not pixel units. The effect of this parameter is neutralised when A_AlertMonsters is called by an actor with an argument greater or equal to 2.
    • fov - The field of vision cone angle for line of sight alerts.

A_EnableHaloLight

A_EnableHaloLight [(int id, bool enabled)]

Enables or disables the given Halo light for this actor as specified by the ID parameter.

See Halo light actor property for more on how to add your own Halo light definitions.

A_EnableZoneLight

A_EnableZoneLight [(int id, bool enabled)]

Enables or disables the given Zone light for this actor as specified by the ID parameter.

See Zone light actor property for more on how to add your own Zone light definitions.

lz::A_Explode

lz::A_Explode [(int damage[, int radius[, int flags[, bool alert[, int fulldamageradius[, string damagetype = ""]]]]])]

Deals damage to all actors within a given radius of the caller. Damage drops off linearly after the fulldamageradius is passed. The only valid flag is XF_HURTSOURCE which is on by default and allows the explosion to damage the source (the source isn't the same as the caller). For example a missile without this flag will not damage the actor that fired the missile. Enabling alert will allow the explosion to wake up nearby enemies. Set damagetype to inflict actors with a specific damage type.

See Damage type actor class for more on how to add your own damage types.

A_GiveInventory

A_GiveInventory (string type[, int amount = 1[, int owner = OWNER_SELF]])

Gives the Inventory item type to the calling actor or to the actor designated by the owner parameter.

A_InertMove

A_InertMove(float move, int dir)

The actor will move in a specified direction, by the specified distance. The distance is expressed in tile coordinates as a decimal number. The direction can be expressed either as a value between 0 and 8 or in string form.

A_JumpIfCloser

A_JumpIfCloser (float distance, state frame[, int target = TARGET_AUTO])

Jumps to the specified state if the calling actor's target (or other specified target) is closer than the specified distance in units (pixels). Another valid value for target is TARGET_PLAYER.

A_MirrorPosition

A_MirrorPosition (float mirx[, int axis = 0])

Changes the position and angle of the calling actor to be a reflection of the player camera position and angle. The reflection position and direction are controlled using parameters mirx and axis.

A_PlaySound

  • A_PlaySound (string sound [, int slot [, float volume [, bool looping [, float attenuation]]]])
    • Plays the specified sound.
    • sound - the desired sound to play.
    • slot - the sound slot used for the sound. Default is CHAN_BODY. See Sound Channel Constants for specific rules.
    • volume - the volume of the sound. Default is 1.0.
    • looping - if true, the sounds loops. Looping sounds can be stopped by using A_StopSound. Default is false.
    • attenuation - this is a positive value that specifies how quickly the sound fades with distance from its source. The higher the value the quicker it fades out. Vanilla falloff and left/right ear approximation is enabled by default (ATTN_NORM). See Attenuation Constants for specific rules.

A_RadiusWake

A_RadiusWake[(int radius)]

Looks for a shootable actor in the near vicinity, no further than the specified radius. If no radius is supplied it defaults to 128 which corresponds to one tile.

If found the Radius Wake state will be triggered.

A_ResetPosition

A_ResetPosition[(float x, float y)]

Sets the position of an actor to the given location expressed in global coordinates. If no parameters are provided, the actor will be relocated to the origin (0,0).

A_SelectWeapon

A_SelectWeapon[(int slot)]

Makes the weapon in the given slot the active one as if the player activated it using the appropriate key. Bring up the Knife by passing slot 1, the Pistol by passing slot 2, and so on.

A_SetPicXY

A_SetPicXY[(int picX, int picY)]

An actor with the STATUSBAR flag enabled can call this function to control where it is rendered on the screen. The provided coordinates will correspond to the lower left corner of the rendered texture.

The top left screen coordinate is (0,0). The bottom right is (320,200).

This API need only be called once, probably within its Spawn state, to specify where in the status bar it should be rendered.

A_SetProperty

A_SetProperty(string name, auto value)

Use this API to modify an actor property value on the fly. Place the property name into the name argument. Place the new property value into the value argument. Since the argument type is defined to be auto you may supply any type into the value argument. However if the value type is not appropriate for the named property the call will fail with an error.

GARD H 10 bright A_SetProperty("faction", "Nazis")

NB: This API may crash for some properties.

A_SetVolume

A_SetVolume(float volume)

Sets the volume of sound currently playing on the specified channel for the calling actor. The function can only affect sounds that have an actor source and were played with looping enabled.

A_StartMusic

A_StartMusic(string song)

Changes the track playing in the current map to the given song. The new track will start playing immediately and will continue when the game is resumed from a pause or reload.

A_StopSound

A_StopSound[(int slot)]

Stops the sound currently playing on the specified channel for the calling actor. The function can only stop sounds that have an actor source and were played with looping enabled.

In LZWolf the slot argument to A_StopSound is currently ignored.

A_UpdateZoneIndex

A_UpdateZoneIndex()

Updates this actor's stored zoneindex property to match the index of the player's current zone. An expression symbol has been reserved in LZWolf for zoneindex.

Actor Properties

Actor damage resistance

You may reduce the effect of certain types of damage by adding the damageresistance actor property. The first parameter of this property specifies a damage type, the second a percentage. As an example the line below gives an actor 50% resistance to fire damage.

damageresistance "FireDamage", 50

Weapon damage type

Weapons may be assigned a predefined damage type. The damage type affects:

  1. The amount of damage dealt by a weapon.
  2. The death state triggered by the weapon when it kills an actor.
  3. The pain state triggered by the weapon when it damages an actor.

As an example, the actor property below will assign the "FireDamage" damage type to a weapon.

weapon.damagetype "FireDamage"

See Damage type actor class for more on how to add your own damage types.

Enemy faction

You may assign an actor one or more enemy factions.

enemyfaction "Nazis", "AlliedForces"

If the actor is a monster and at least one enemy faction is provided, it will only target actors belonging to one of those enemy factions. It is acceptable for an actor to an enemy of its own faction but it will not target itself.

Faction

An actor may be assigned to a particular faction. As an example, to make an actor a Nazi the following property setting is used.

faction "Nazis"

See Faction actor class for more on how to add your own factions.

Fade colormap actor property

Set the fadecmap property in a Lit type to override the colormap used by the shading algorithm.

fadecmap <cmapname>

An example use of this property is already present in actors/wolf/wolftest.txt:

actor TestFadeLit : Lit
{
    fadecmap "TESTCMAP"
}

The TESTCMAP.lmp lump is already added to the base pk3 (lzwolf.pk3) for testing purposes. However you may add your own. The lump must be exactly 16KB in size which is made up of 64 entries, each containing a single 256-entry remap table. The 0th entry would be used by the engine when rendering, say, an actor or wall up close and the 63rd entry would be used when rendering it a long (i.e., sufficiently long) distance away.

Then you can connect your custom Lit type with a zone light using the zonelight property, as already done in an example actor defined in actors/wolf/wolftest.txt:

actor TestFadeCeilingLight
{
    zonelight 0, 3, "TestFadeLit"
    states
    {
        Spawn:
            GLMP A 1 A_EnableZoneLight(0, true)
            GLMP A -1 bright
            stop
    }
}

When this actor spawns in a zone the zone will be shaded using a colormap resulting from an override.

FilterposThrust actor property

filterposthrust <axis>,<src>

The FilterposThrust property causes an actor to move along an axis based upon a source of thrust.

//                 axis      src
filterposthrust       0,       0
Parameter Value Meaning
axis 0 X-axis
axis 1 Y-axis
axis 2 Z-axis
src 0 Player forward thrust
src 1 Player sideward thrust
src 2 Player rotation in fine-angles

Filterpos properties will be executed in the order given.

FilterposWave actor property

filterposwave <axis>,<amplitude>,<period>,<usesine>

The FilterposWave property causes an actor's position to move in a wave pattern (either sine or cosine) along an axis.

The following property will cause an actor's X-position to move smoothly back and forth one tile in a sine-wave. The wave cycle is set to complete in 3 seconds.

//               axis    amplitude     period    usesine
filterposwave       0,         1.0,       3.0,         1
Parameter Meaning
axis 0, 1 or 2 for the X-, Y- or Z-axis respectively
amplitude In global coordinates the height of wave
period The time duration in seconds of the wave
usesine 0 or 1 for a cosine or sine wave, respectively

Filterpos properties will be executed in the order given.

FilterposWrap actor property

filterposwrap <x1>,<x2>,<axis>

The FilterposWrap property causes an actor's position to rollover within the coordinates specified.

The following property will cause an actor's position along the X axis to return to X=3 from X=0 and vice versa, as it moves.

//             x1   x2  axis
filterposwrap 0.0, 3.0,    0
Parameter Meaning
x1,x2 The limits against which to apply this property
axis 0, 1 or 2 for the X-, Y- or Z-axis respectively

Filterpos properties will be executed in the order given.

Flip sprite actor property

flipsprite <flip>

The flipsprite property causes an actor's sprite rendering to be inverted - as if viewed through a mirror.

Fullbright inhibit actor property

Set the fullbrightinhibit property in a Lit type to ensure actors set to render fullbright do not bypass the shading algorithm. This can be useful to simulate foggy environments where distant actors should always render with shading applied - irrespective of their fullbright status.

fullbrightinhibit <integer>

Halo light actor property

halolight <id>,<radius>,<light>[,<littype>]

The Halo light effect emits a round halo light pattern centered on the actor.

You may define up to 31 different Halo lights for an actor. In this example we define two Halo lights for a single actor. Each can be turned on or off using A_EnableHaloLight.

halolight 0, 1.0, 5
halolight 1, 0.5, 10
Parameter Meaning
id A unique integer starting from zero; necessary for A_EnableHaloLight
radius The Radius in tiles which is expressed as a decimal number
light The amount of light emitted; a value between -20 and 20
littype The string name of the Lit type

Lit filter actor property

An actor with the litfilter property set to a valid Lit type will only draw if the area beneath it is lit by a light source and only if that light source is linked to the same Lit type. A Halo light is an example of one such light source.

Loaded actor property

When an actor is spawned as a new actor or loaded back into the game (after loading a savegame slot) its loaded property - an integer - is always zero. You may use A_SetProperty to change the value of this property but it will reset back to zero upon a level load.

In the example below a Guard will turn his head leftward when he takes damage the first time, and rightward every time after that. However if the game is saved and then reloaded, the guard will again turn his head leftward the next time he takes damage.

actor Guard : WolfensteinMonster 11
{
    health 200

    // ... rest not shown

    states
    {
        // ... rest not shown

        See:
            GARD B 5 NOP A_Chase
            GARD B 1.5
            GARD C 4 NOP A_Chase
            GARD D 5 NOP A_Chase
            GARD D 1.5
            GARD E 4 NOP A_Chase
            loop
        Pain:
            GARD I 5 A_JumpIf(loaded < 1, 1)
            goto See
            GARD J 5 A_SetProperty("loaded", 1)
            goto See

        // ... rest not shown
    }
}

Movebobspeed actor property

You may increase or decrease the bobbing rate applied to the view when walking. Use the movebobspeed property in your player class. The default value for BJPlayer is shown in the below snippet.

The movebobspeed property will also affect Footsplash irrespective of the movebob property.

actor BJPlayer : PlayerPawn
{
    // ...
    player.movebob 0
    player.movebobspeed 1.0
}

Melee actor property

You may flag a damage type as melee using the melee property within the Damage type actor class.

The melee property of a damage type helps LZWolf decide which message to display when the player is killed. See Obituary for more on this.

The base lzwolf.pk3 uses the melee property to define the MeleeDamage actor. Internally LZWolf will use this damage type whenever A_MeleeAttack is used to inflict damage upon an actor.

actor MeleeDamage : Damage
{
    damage.melee 1
}

No XDeath actor property

You may disable XDeath for certain types of damage within the Damage type actor class.

actor RifleDamage : Damage
{
    damage.noxdeath 1
}

Obituary actor property

Set the obituary property in your enemy actor class to define an obituary message (a player death message) for display in the console notification area. The message argument is always a string but translations into other languages is supported by leading with '$'.

actor Guard : WolfensteinMonster 11
{
    obituary "$OB_GUARD"
}

This obituary message does not currently support special placeholders such as gender, killer name or victim name. It is a plain message.

Set the hitobituary property in your enemy actor class to define a custom obituary message for melee deaths.

actor Dog : WolfensteinMonster 14
{
    hitobituary "$OB_DOG"
}

Patrol defer change actor property

actor MyPatrolPoint : PatrolPoint
{
    patrolpoint.patroldeferchange 1
}

Normally actors will immediately update their direction of motion when a patrol point is reached. The patroldeferchange property will override this default so an actor will defer its change of direction until it is ready to start moving again - remembering some patrol points may cause an actor to stop moving for a set period of time.

Patrol filter key actor property

actor MyGuard : Guard
{
    patrolfilterkey 12
}

actor MyPatrolPoint : PatrolPoint
{
    patrolfilterkey 12
}

The patrolfilterkey property allows an actor to pass through a patrol point without affecting its movement. The filter key of the patrol point and actor must be a match before the patrol point will have any effect.

Patrol target state actor property

actor MyPatrolPoint : PatrolPoint
{
    patrolpoint.patroltargetstate "Wait5Seconds"
}

The patroltargetstate property will change an actor's state when it is reached.

Pickup message actor property

Set a pickup message for display in the console notification area when an inventory actor is collected using the pickupmessage property. The message argument is always a string but translations into other languages is supported by leading with '$'.

The following ammo clip item will display "New Game" in the console notification area when grabbed by the player.

actor Clip : Ammo 59
{
    inventory.amount 8
    inventory.maxamount 99
    inventory.pickupmessage "$STR_NG"
    ammo.backpackamount 20
    ammo.backpackboostamount 100
    ammo.backpackmaxamount 299
    states
    {
        Spawn:
            CLIP A -1
            stop
    }
}

Silent actor property

You may disable the generation of noise which alerts enemies for certain types of damage within the Damage type actor class.

actor SilentDamage : Damage
{
    damage.silent 1
}

Single spawn actor property

An actor with the singlespawn property set to 1 will ensure only a single instance of this actor will spawn in a level. Even if A_SpawnItem is called more than once to spawn the actor, it will still only spawn once.

singlespawn 1

Thing activation property

Set the activation property to control an actor's state change mechanism.

Use the action special Trigger_ThingSpecial to trigger an actor's state change mechanism.

The activation property is set in actor classes that:

  1. Inherit the SwitchableDecoration or SwitchingDecoration native class.
  2. Define Active or Inactive states to handle state changes.

This is not a real example but illustrates how the activation property is set within an actor class:

actor ElectricArcBarrier : SwitchableDecoration
{
    radius 32
    +SOLID
    activation THINGSPEC_Switch

    states
    {
        Spawn:
        Active:
            ELCK A 0 bright A_ChangeFlag("SOLID", true)
        ActiveLoop:
            ELCK ABC 1.5 bright
            loop
        Inactive:
            ELCK D -1 A_ChangeFlag("SOLID", false)
            stop
    }
}
  • Here are the supported activation flags for the activation property:
    • THINGSPEC_Activate
    • THINGSPEC_Deactivate
    • THINGSPEC_Switch

Several of the above flags may be applied in combination in a single set of the activation property using the '|' operator; optionally surrounded in brackets.

Use trigger filter key actor property

Some triggers cannot be used by an actor unless it sets its usetriggerfilterkey actor property to a matching trigger filter key value. This mechanism is helpful when you want only specific actors to be able to use a trigger (e.g., open a door).

actor MyGuard : Guard
{
    usetriggerfilterkey 5
}

Zone index actor property

zoneindex <index>

The zone index property is not normally set this way. Instead it is automatically set to match the player's current zone using A_UpdateZoneIndex.

Zone light actor property

zonelight <id>,<light>[,<littype>]

The Zone light effect evenly fills the room with a given amount of light.

You may define up to 31 different Zone lights for an actor. In this example we define two Zone lights for a single actor. Each can be turned on or off using A_EnableZoneLight.

zonelight 0, 5
zonelight 1, 10
Parameter Meaning
id A unique integer starting from zero; necessary for A_EnableZoneLight
light The amount of light emitted; a value between -20 and 20
littype The string name of the Lit type

Actor States

Damage Death states

An actor may define death states for different damage types. If this is not provided LZWolf will trigger the existing Death or XDeath state.

Place the name of the damage type after the state name with an underscore separating them. Here is an example:

Death_FireDamage:
    GARD K 7.5 A_Fall
    //GARD L 7.5 A_Scream
    GARD M 7.5
    GARD N -1
    stop

See Damage type actor class for more on how to add your own damage types.

Damage Pain states

An actor may define pain states for different damage types. If this is not provided LZWolf will trigger the existing Pain.

Place the name of the damage type after the state name with an underscore separating them. Here is an example:

Pain_FireDamage:
    GARD N 5 A_JumpIf(health & 1, 1)
    goto See
    GARD N 5
    goto See

See Damage type actor class for more on how to add your own damage types.

Radius Wake state

An actor using the A_RadiusWake action will transition to the RadiusWake state.

Actor State Flags

When defining state frames for an actor you may include within it a state flag. A state flag can control how the frame sprite is presented in-game.

  • bright
    • This frame is a full-bright frame.
  • zonebright
    • This frame responds to halo and zone lights. This does not need to be added for anything other than player weapon frames. The default player weapon lighting is overridden by this flag.
  • offset
    • TODO: add documentation for this!

Actor Classes

Damage type actor class

This actor defines damage types. Any actor inheriting directly from this class is a new damage type.

actor Damage : Inventory native
{
    damage.ignorearmor 0
    damage.noxdeath 0
    damage.silent 0
    damage.melee 0
}

This is how the class can be inherited to define new damage types.

actor FireDamage : Damage
{
}

actor SilentDamage : Damage
{
    damage.silent 1
}

actor MeleeDamage : Damage
{
    damage.melee 1
}

For convenience, the base lzwolf.pk3 defines the above actor classes in wolfdamage.txt.

The properties of new damage types will not take effect unless damage types are added to the start inventory of the player. Set the startitem property of a PlayerPawn actor (e.g., BJPlayer) with each new damage type.

The LZWolf base pk3 already sets startitem to SilentDamage in the BJPlayer actor class as shown next. For other damage types the mod must inherit BJPlayer and set its own custom damage types as start items in the same way.

actor BJPlayer : PlayerPawn
{
    player.displayname "BJ Blazkowicz"
    player.startitem "Clip", 8
    player.startitem "Pistol"
    player.startitem "Knife"
    player.startitem "SilentDamage"
    player.startitem "MeleeDamage"

Faction actor class

This actor defines factions. Any actor inheriting directly from this class is a new faction.

actor Faction : Inventory native
{
}

Here is an example of how to inherit from this class to define a new faction.

actor Zombies : Faction
{
}

For convenience, the LZWolf base pk3 defines two commonly used factions in wolffaction.txt.

actor Nazis : Faction
{
}

actor AlliedForces : Faction
{
}

Lit type actor class

The native Lit class must be inherited from to define a new Lit type.

actor DustLit : Lit
{
}

DustCeilingLight actor class

The DustCeilingLight actor is available in LZWolf.

actor DustCeilingLight
{
    // (details not shown)
}

A game's decorate may define a new actor inheriting from DustCeilingLight to give all CeilingLight actors two effects:

  1. A round halo light pattern on the ground and ceiling.
  2. A dust cloud effect inside the lit region beneath the ceiling light.

As an example, a game called "Schabbs Must Die" could enable those two effects by defining an actor such as the one below:

actor SchabbsCeilingLight : DustCeilingLight replaces CeilingLight
{
}

Collateral actor class

Inheriting the Collateral class will allow your actor (e.g., scenery actor or civilian actor or some other actor) to take collateral damage from an enemy attempting to deal damage the player using A_WolfAttack. As an example, here is a breakeable barrel which can be destroyed by an enemy actor who uses A_WolfAttack:

actor MyBreakableBarrel : Collateral
{
    collateral.hitradius 24.0
    collateral.hitchance 50

    // rest is not shown (this is normal decorate for your actor)
}

The two properties supported by Collateral are:

  • hitradius
    • This is the radius used to check for hits against the shoot ray between the attacking enemy and player being targetted. Use value 64.0 for one tile worth of distance.
  • hitchance
    • This is a percentage value between 0 and 100 representing the hit chance for this actor when it is being considered for collateral damage.

In the above example, the collateral actor defined takes damage only 50% of the time and blocks a decent amount of space in the tile (3 quarters of a tile to be exact).

MapInfo

Game messages

To enable game messages for pickups, obituaries, etc, enable the drawgamemessage flag in gameinfo. Set it to true to enable.

Parallax sky textures

To enable parallax sky for a map you need to add a property called parallaxsky and specify for it one or more parallax sky texture names. It is customary to provide exactly 16 textures for parallax sky. However ECWolf allows for any number of parallax sky texture tiles.

The Decorate for Wolf3d "MAP01" in mapinfo/wolf3d.txt might appear as follows when parallax sky is present:

map "MAP01"
{
    next = "MAP02"
    secretnext = "MAP10"
    floornumber = 1
    par = 90
    music = "GETTHEM"
    cluster = 1
    parallaxsky = "GSTONEA1", "GSTONEA2", "GSTONEB1", "GSTONEB2", "GSTFLAG1", "GSTFLAG2", "GSTHTLR1", "GSTHTLR2", "BSTCELA1", "BSTCELA2", "GSTEAGL1", "GSTEAGL2", "BSTCELB1", "BSTCELB2", "BSTONEA1", "BSTONEA2"
}

Semi-transparent floor and ceiling support for parallax sky and star sky

Semi-transparent ceiling texture support must be explicitly enabled in gameinfo. The transparent key can be set using the parallaxskyfloorcolor or parallaxskyceilcolor parameter in gameinfo. Set the red component to zero, the green component to 1 and blue component to the transparent color key. In the examples below the value 00 is used as the transparent color key.

These settings will only take effect on maps with parallax sky or star sky. The setting names parallaxskyfloorcolor or parallaxskyceilcolor suggest they work only for parallax sky but star sky is also supported under these settings.

gameinfo
{
    signon = "WLFSGNON"
    // ...
    quitmessages = "$ENDSTR01", "$ENDSTR02", "$ENDSTR03", "$ENDSTR04", "$ENDSTR05", "$ENDSTR06", "$ENDSTR07", "$ENDSTR08", "$ENDSTR09"
    parallaxskyfloorcolor = "00 01 00"
    parallaxskyceilcolor = "00 01 00"
}

Parallax sky below horizon

To enable parallax sky below the horizon, set the numparallaxtiles property to half the number of parallax sky textures set in parallaxsky. For example if there are 16 parallax sky textures then set the number of tiles to 8:

    parallaxsky = "GSTONEA1", "GSTONEA2", "GSTONEB1", "GSTONEB2", "GSTFLAG1", "GSTFLAG2", "GSTHTLR1", "GSTHTLR2", "BSTCELA1", "BSTCELA2", "GSTEAGL1", "GSTEAGL2", "BSTCELB1", "BSTCELB2", "BSTONEA1", "BSTONEA2"
    numparallaxtiles = 8

In xlat, a tile with the showsky property set to true will not draw over parallax sky or star sky. As an example, this entry in xlat will allow sky to draw over tile 5:

tile 5
{   
    texturenorth = "BSTCELA1";
    texturesouth = "BSTCELA1"; 
    textureeast = "BSTCELA2";
    texturewest = "BSTCELA2";
    showsky = true;
}   

Wall decals and sky

The default wall decal transparent color is palette entry 187 which may not be suitable for all projects. You may override this with the walldecalcolor gameinfo setting.

It is expected this setting will only be used in combination with parallax sky or star sky. The following snippet sets the color to palette entry 255.

gameinfo
{
    signon = "WLFSGNON"
    // ...
    walldecalcolor = "00 01 FF"
}

Be sure to also enable the ParallaxDecals boolean flag in your mapinfo so the engine renders parallax sky first and then walls second (by default it is the other way around). This is how you ensure your parallax sky is shown through transparent sections of your walls. The use of ParallaxDecals is not required to get walls to show through to star sky, since star sky is always rendered first across the entire height of the window.

map "MAP01"
{
    // ...
    parallaxdecals = true
}

In xlat, a tile with the decal property set to true will not draw transparent pixels of your texture over parallax sky or star sky. As an example, this entry in xlat will allow tile 5 to show through to your parallax sky or star sky:

tile 5
{   
    texturenorth = "MYWALLA1";
    texturesouth = "MYWALLA1"; 
    textureeast = "MYWALLA2";
    texturewest = "MYWALLA2";
    decal = true;
}   

Atmos

You may enable atmos effects in mapinfo. The supported atmos effects from SDL are:

  • StarSky
  • Rain
  • Snow

Two new atmos effects are available exclusively in LZWolf:

  • HighQualityStarSky; this effect:
    • Is expected to look nicer than StarSky at resolutions above 320x200,
    • Renders stars using a diamond pattern,
    • Supports a bigger moon graphic:
      • 30x30 pixels to be exact (the moon rendered in StarSky is only 10x10)
      • A pk3 can override the moon graphic by adding the FULLMOON lump to its graphics folder
      • The base lzwolf.pk3 ships with a default copy of FULLMOON
    • Allows the moon position to be controlled from mapinfo.
      • Just set atmoshqstarsky to a value between 1 and 399!
  • HighQualitySnow; this effect:
    • Is expected to look nicer than Snow at resolutions above 320x200,
    • Renders snow using a PNG:
      • A pk3 can override the moon graphic by adding the SNOWBALL lump to its graphics folder
      • The base lzwolf.pk3 ships with a default copy of SNOWBALL
    • The size of snow ball on screen cannot be controlled

As an example, this is how "MAP01" can enable StarSky in mapinfo:

map "MAP01"
{
    next = "MAP02"
    secretnext = "MAP10"
    floornumber = 1
    par = 90
    music = "GETTHEM"
    cluster = 1
    atmosstarsky = 1
    //atmosrain = 1
    //atmossnow = 1
    //atmoshqsnow = 1
    //atmoshqstarsky = 1
}

You can enable none, one or several atmos types at a time.

Atmos console variables

NB: This section only applies to the developers build of LZWolf.

Variable Type Purpose
at_hqsnow Boolean Forces HighQualitySnow effect when regular Snow effect is enabled
at_notilecheck Boolean Renders atmos effect without considering ceiling tile

Playing an intermission after level complete

Add the property intermission to a map to play an intermission sequence after a level is completed. The regular level statistics intermission screen will be played just prior.

map "MAP01"
{
    next = "MAP02"
    secretnext = "MAP10"
    floornumber = 1
    intermission = "DemoLoop"
}

Forcing the Get Psyched screen

Use property forceshowpsyched to disable the skipping of the Get Psyched screen when the nointermission property is set.

map "MAP01"
{
    next = "MAP02"
    secretnext = "MAP10"
    floornumber = 1
    nointermission   // this will skip level end stats and get psyched
    forceshowpsyched // this will disable skipping get psyched
}

HUB level par times

In HUB world mods a map may be visited more than once. You may set the par time of each pass through a map individually using the array property hubpar. The existing property par already controls the par-time for the first pass through the map. In this example, the par-time for the second and third pass through map 1 is set to 30 and 40 seconds, respectively.

map "MAP01"
{
    next = "MAP02"
    secretnext = "MAP01"
    floornumber = 1
    par = 90
    hubpar = 30, 40
}

Border graphic with stretch fitting

Add borderpic as a gameinfo setting to override the default tiling background controlled using bordertexture. The texture will be stretched to fit screen limits.

gameinfo
{
    // ...
    borderpic = "MYTEX"
    // ...
}

Fade colormap mapinfo property

Set the fadecmap property in mapinfo to override the colormap used by the shading algorithm. This change is applied map wide.

map "MAP01"
{
    // ...
    fadecmap = "<cmapname>"
}

Fullbright inhibit mapinfo property

Set the fullbrightinhibit property in mapinfo to ensure actors set to render fullbright do not bypass the shading algorithm. This can be useful to simulate foggy environments where distant actors should always render with shading applied - irrespective of their fullbright status. This change is applied map wide.

map "MAP01"
{
    // ...
    fullbrightinhibit = true
}

FootSplash mapinfo property

Set the footsplash property in mapinfo to have an actor spawn under the player's feet as they walk around the map. This property applies to the entire map area.

map "MAP01"
{
    // ...
    footsplash = "TestFootSplash"
}

Action Specials

Change_Music

  • Change_Music( musicid )
    • Activates the specified music track.
    • musicid - A number identifying the music track to play as defined in xlat.

Teleport_Relative

  • Teleport_Relative( tag, angle, flags )
    • Moves activator to a new map spot
    • tag - The tag of the map spot.
    • angle - The new angle after move.
    • flags - A bitwise OR of teleport flags.
      • TELEPORT_NoStop = 1 The half-second pause will not take effect.
      • TELEPORT_NoFog = 2 The fog actor of class "TeleportFog" will not be spawned.
      • TELEPORT_Center = 4 Center onto destination tile.
      • TELEPORT_AbsoluteAngle = 8 Set absolute angle instead of relative.
      • TELEPORT_ActivationAngle = 16 Face the activation point (typically used with AbsoluteAngle).
      • TELEPORT_InvertYFrac = 32 Invert the fraction part of activator's y-position.
      • TELEPORT_AbsolutePosition = 64 Set absolute position instead of relative.

Trigger_ThingSpecial

  • Trigger_ThingSpecial( tag )
    • Activates the thing special set on an actor.
    • tag - The tag of the map spot where actor is located.

WDC Format Maps

Info Plane

An additional, fourth, map plane is read by LZWolf called the Info Plane.

Music selection is available along the first map row in the info plane, within the low-byte, provided the high-byte is set to 0xBA.

If the zheights feature flag is enabled in Xlat, the low-byte of the info plane can control the spawn height of an actor, so long as the high-byte is set to 0xB0.

If the hubnospawn feature flag is enabled in Xlat, the low-byte of the info plane can disable the spawn of an actor for one or more passes through the level, so long as the high-byte is set to 0xBB.

Light Cell Plane

An additional, fifth, map plane is read by LZWolf called the Light-Cell Plane.

You can use this 5th plane to assign light values to each and every spot in your map. The values you set in 5th plane, denoted here with Pl, are related to zone light values Zl in a simple way:

Pl = Zl * 8

Values of Pl equal to and above 32768 will be recasted into signed values which allows for darkness to be added. As a result the values 32768 and 65535 correspond to -32768 and -1, respectively.

Zone lights continue to operate as normal in the presence of the effect produced by the 5th plane.

Extra Planes

This feature is only available on the viewplane branch currently.

An extra fifth, sixth and seventh map plane is read from a WDC format map to provide an additional logical plane within LZWolf. The rendered position of a logical plane can be controlled via Plane view depth.

The extra fifth, sixth and seventh map planes are similar to the first three map planes in a WDC format map. They provide an additional set of walls, things and flats, respectively. The same Xlat is used by LZWolf to interpret the extra map planes.

Map translator

This section builds upon the ecwolf map translater. The map translator is also known as Xlat.

Feature flags

Planeviewdepth

  • enable planeviewdepth;
    • Enables view depth for the logical planes generated from a WDC format map. The value of the upper-right tile of the thing plane will be used to determine the viewing height of its constituent logical plane. A value of 64 will place the plane one tile higher from ground level. Values equal to or in excess of 2048 will place the plane below ground level in a similar fashion (i.e., 2048+64 = 2112 will locate the plane one tile below ground level).

Hubnospawn

  • enable hubnospawn;
    • Allows a thing's spawn to be disabled for HUB world support through the info plane. The info plane low-byte provides the settings for each pass.

Things

  • elevator oldnum
    • Creates a Rise of the Triad compatible elevator destination point. Place these between a door and switch (the door and switch must be in line with each other) and the elevator will round robin between the destination points. The elevator starts in the uppermost spot (or leftmost if in same y position).
  • teleporter oldnum
    • Creates a Bi-directional teleporter. Place these into two different spots on the map.
  • { oldnum, actor, angles, flags, minskill[ ,minangle=<0-359>][ ,numdirs=4] }
    • Maps the oldnum to the actor name that is assigned in DECORATE.
    • The angles parameter indicates how many sequential indexes should be assigned to rotations. For example, if angles is 4 and oldnum is 100, then 100-103 would be assigned to this mapping with each being at 90 degrees.
    • minskill indicates the minimum skill level required for this thing to spawn (starting at 0).
    • flags are:
      • HOLOWALL - When placed into a wall, this thing will make the wall non-solid. When combined with the PATHING flag then the wall immediate in front will be non-solid as well. Combine the flags using a pipe: PATHING|HOLOWALL
      • PATHING - This monster follows a patrol route instead of sitting in the Spawn state.
      • AMBUSH - This monster is deaf to sound.
      • NOHUBSPAWN0 - This monster will not spawn in HUB pass 0.
      • NOHUBSPAWN1 - This monster will not spawn in HUB pass 1.
      • NOHUBSPAWN2 - This monster will not spawn in HUB pass 2.
      • NOHUBSPAWN3 - This monster will not spawn in HUB pass 3.
    • minangle indicates the minimum angle to spawn this thing.
    • numdirs set to 4 will spawn this thing in 4 directions.
      • The angles and positions of each actor spawned will form a wall.
      • Setting the BILLBOARD flag in the actor class is recommended.
      • The appropriate rotation will be used to render the front and back sides of each wall face.

Flats

Footsplash table

A subtable can be added in the flats section of the xlat to have an appropriate actor spawn under the player's feet as they walk around the map.

flats
{
    floor { ... } // floor textures for flats 0,1,2, etc

    ceiling { ... } // ceiling textures for flats 0,1,2, etc

    footsplash
    {
        "<footsplash actor for flat 0>",
        "<footsplash actor for flat 1>",
        // ...
    }
}

UWMF properties

Some new optional properties are available in the UWMF under LZWolf. The Xlat uses UWMF to specify translations.

Tiles

Blockray

  • blockraynorth = <bool>;
  • blockraysouth = <bool>;
  • blockrayeast = <bool>;
  • blockraywest = <bool>;
    • Allows for a drawn ray to pass through on each side of a tile, if set to false. The default value is true. This option allows one or more sides of a tile to show through to the next tile.

Bright

  • bright = <bool>;
    • A tile with the bright property set to true will draw at full brightness. The default value is false.

Decal

  • decal = <bool>;
    • A tile with the decal property set to true will show through to parallax sky or star sky (i.e., not be drawn) on any of its transparent pixels.

Showsky

  • showsky = <bool>;
    • A tile with the showsky property set to true will not draw over parallax sky or star sky. The drawn ray will stop traversing the world when it reaches a tile with this property set to true. The default value of this property is false.

Slidestyle

  • slidestyle = <int>;
    • A door tile with the slidestyle property set will alter the way in which the door moves when it is opened. Possible values are SLIDE_Normal(value 0 and default), SLIDE_Split(value 1 and used in Blake Stone) or SLIDE_Invert(value 2 and applies an inverted open direction).

Textureflip

  • textureflip = <bool>;
    • A tile with the textureflip property set to true will, when rendered, appear as if it was viewed through a mirror.

Sectors

Footsplash

  • footsplash = "<string>";
    • Spawns this actor under the player's feet as they walk through the sector.

Things

Nohubspawn

  • nohubspawn = <int>;
    • Allows a thing's spawn to be disabled in one or more passes through a level as part of HUB world support. A thing may set its nohubspawn property with a valid HUB pass number; only values between 0 and 3 are supported. If a map is visited for the Nth time and a thing's nohubspawn property has been set for value N, it will not spawn in that pass. A thing may set its nohubspawn property for multiple passes to make it unspawnable in each of them. By default this property is not set for any pass, meaning it's spawn will not be disabled due to HUB world support.

Triggers

MonsterUseFilter

  • monsterusefilter = <int>;
    • Only monsters who set usetriggerfilterkey to match this value will be able to activate this trigger.

Updated