LZWolf
Author: Linuxwolf Based on: ECWolf 1.3.99999
LZWolf is a fork of Blzut3's ECWolf project, combining Wolf4SDL with the philosophies of projects like ZDoom to create a highly mod-friendly source port for Wolfenstein 3D engine games. Built on top of ECWolf, it adds extra features popular in the Wolf3D modding community and expands the engine's capabilities for creating new games and total conversions.
LZWolf exists in tandem with ECWolf, with the goal of eventually supporting all games built on the Wolf3D engine, including the Blake Stone games, Corridor 7, and others.
Note: LZWolf's development was discontinued on March 5th, 2023. The engine remains a fully functional and feature-rich source port for mod development, but will not be updated to follow ECWolf's 1.4 release.
Where to Download
The latest version of LZWolf can be downloaded from the Dropbox link maintained by Linuxwolf: https://www.dropbox.com/sh/x77td0qm2ze9x2z/AABGD7mHPMPMWMwkp8OEH2yla?dl=0
Bug reports and feature suggestions can be submitted through the source repository at: https://bitbucket.org/linuxwolf6/lzwolf/issues/new
What Makes LZWolf Different from ECWolf?
LZWolf includes everything present in ECWolf and adds features based on their popularity in the Wolf3D modding community and the needs of active modders. Notable additions include:
- Parallaxing skies — scrolling sky textures above the level horizon
- Atmospheric effects — Rain, Snow, Star Sky, and high-quality versions of Snow and Star Sky for higher resolutions
- Weapon damage types and resistances — weapons can deal specific damage types (e.g. fire damage), and actors can be given resistance to certain types
- Custom death animations — enemies can die differently depending on the type of damage they receive
- Custom music triggers — music tracks can be changed dynamically during gameplay
- Factions — enemies can be assigned to factions, enabling infighting, alliances, and betrayal
- Lighting effects — includes zone lighting (even room illumination) and halo lighting (dynamic round light patterns centered on actors)
- Hub level support — the ability to travel back and forth between levels in a non-linear structure
Most mods built for ECWolf will work in LZWolf without modification.
Engine Features at a Glance
- All ECWolf features fully supported
- Parallaxing skies with support for sky below the horizon
- Atmospheric effects: Rain, Snow, Star Sky, High Quality Star Sky, High Quality Snow
- Weapon damage types and actor damage resistances
- Custom death and pain animations tied to damage types
- Custom music triggers via action specials
- Lighting effects including zone lights and halo lights
- Factions system for enemy alliances and infighting
- Hub world support with per-pass spawn control
- Wall decals with parallax sky support
- Semi-transparent floor and ceiling support for parallax and star skies
- Foot splash effects — actors spawned under the player's feet as they walk
- Collateral damage system for scenery and civilian actors
- Stacked planes for multi-level geometry (viewplane branch)
- Light Cell Plane — per-tile light value assignment using a fifth map plane
Decorate Scripting
LZWolf uses a variant of the Decorate scripting language inherited from ECWolf and expanded with additional features. Doom modders will find it familiar due to its similarities with ZDoom's Decorate. This page should be read alongside the official ECWolf wiki, as LZWolf builds upon ECWolf's scripting foundation.
Action Function Namespaces
LZWolf provides multiple implementations of some action functions. The lz:: namespace prefix is used to call the LZWolf-specific version of a function. For example:
lz::A_Explode(random(50, 177), 128, 0, 0, 0, "FireDamage")
Without the prefix, the standard ECWolf version is called instead. LZWolf sets the lz namespace as the default for all actors, so in practice the prefix is usually only needed when you specifically want the ECWolf version.
Key Action Functions
- A_AlertMonsters — increases the alert counter; a value of 2 or above forcibly alerts all non-ambush enemies in connected zones
- A_BeginHeightAnim — smoothly animates the player's view height using a sinusoidal curve over a given time period
- A_Chase — standard monster AI movement, with extended parameters for melee range, ranged attack, field of vision, minimum and maximum sight distances, and evasion behavior
- A_EnableHaloLight / A_EnableZoneLight — toggles specific lighting effects on or off for an actor
- lz::A_Explode — area damage with optional damage type, radius, and alert trigger
- A_GiveInventory — gives an inventory item to the calling actor or a specified target
- A_InertMove — moves the actor a set distance in a specified direction
- A_JumpIfCloser — jumps to a state if the target is within a specified distance
- A_MirrorPosition — positions the actor as a reflection of the player camera
- A_PlaySound — plays a sound with full control over channel, volume, looping, and attenuation
- A_RadiusWake — looks for a shootable actor within a given radius and triggers the RadiusWake state
- A_ResetPosition — moves an actor to a specified map position or the origin
- A_SelectWeapon — switches the player's active weapon by slot number
- A_SetPicXY — positions a status bar actor at specific screen coordinates
- A_SetProperty — modifies an actor property value at runtime
- A_SetVolume — adjusts the volume of a looping sound on the calling actor
- A_StartMusic — changes the currently playing music track
- A_StopSound — stops a looping sound on the calling actor
- A_UpdateZoneIndex — updates the actor's stored zone index to match the player's current zone
Actor Properties
LZWolf adds a wide range of new actor properties:
- damageresistance — reduces the effect of a specific damage type by a given percentage
- weapon.damagetype — assigns a damage type to a weapon, affecting damage dealt, death states, and pain states
- faction — assigns the actor to a named faction
- enemyfaction — specifies which factions this actor will target; it will only attack actors belonging to those factions
- halolight — defines a round halo light pattern emitted by the actor, with up to 31 separate lights per actor
- zonelight — defines an even zone light effect filling the actor's room, with up to 31 separate lights per actor
- flipsprite — renders the actor's sprite as a mirror image
- fullbrightinhibit — forces shading on fullbright actors, useful for fog effects
- fadecmap — overrides the colormap used by the shading algorithm for a specific Lit type
- litfilter — actor only draws when illuminated by a matching light source type
- movebobspeed — controls the speed of view bobbing when the player walks
- singlespawn — ensures only one instance of this actor ever spawns in a level
- activation — controls how an actor responds to trigger activation (switch, activate, deactivate)
- patrolfilterkey — allows an actor to pass through a patrol point only if the keys match
- usetriggerfilterkey — only actors with a matching key can activate a trigger
- obituary / hitobituary — sets a custom death message displayed in the console when the player is killed by this actor or killed by its melee attack
- pickupmessage — sets a message displayed in the console when an inventory item is picked up
Actor Classes
LZWolf introduces several new native actor classes:
- Damage — base class for defining damage types. Inherit from this to create custom types such as FireDamage, SilentDamage, or MeleeDamage. Damage types must be added to the player's start inventory to take effect
- Faction — base class for defining factions. The base package includes Nazis and AlliedForces. Inherit to create new ones
- Lit — base class for defining light types used by zone and halo lighting
- DustCeilingLight — produces a round halo light pattern and a dust cloud effect beneath ceiling lights
- Collateral — allows an actor such as a barrel or civilian to take damage from an enemy's attack aimed at the player, with configurable hit radius and hit chance
MapInfo Features
LZWolf adds several new MapInfo properties:
- parallaxsky — enables a parallaxing sky using a list of texture names (typically 16 tiles)
- numparallaxtiles — enables the parallax sky to appear below the horizon
- parallaxdecals — ensures the parallax sky renders behind walls with transparent sections
- parallaxskyfloorcolor / parallaxskyceilcolor — enables semi-transparent floor and ceiling textures on maps with parallax or star sky
- walldecalcolor — overrides the default transparent color for wall decals
- atmossstarsky / atmosrain / atmossnow / atmoshqsnow / atmoshqstarsky — enables atmospheric weather effects per map
- intermission — plays a defined intermission sequence after level completion
- forceshowpsyched — prevents the Get Psyched screen from being skipped when nointermission is set
- hubpar — sets individual par times for each pass through a hub level
- fadecmap — overrides the shading colormap for the entire map
- fullbrightinhibit — forces shading on all fullbright actors map-wide, useful for fog
- footsplash — spawns a specified actor under the player's feet as they walk, applied to the whole map
- borderpic — overrides the default tiled background with a stretched image
- drawgamemessage — enables pickup messages, obituaries, and other in-game console notifications
Atmospheric Effects
The following atmospheric effects can be enabled per map in MapInfo:
- StarSky — standard star sky effect
- HighQualityStarSky — improved star sky for resolutions above 320×200, with a diamond star pattern and a larger 30×30 moon graphic (the moon graphic can be overridden by adding a FULLMOON lump to your pk3). Moon position can also be controlled via MapInfo
- Rain — rain effect
- Snow — standard snow effect
- HighQualitySnow — improved snow for higher resolutions, using a PNG snowball graphic (overrideable via a SNOWBALL lump)
Multiple atmospheric effects can be active simultaneously on the same map.
Action Specials
- Change_Music(musicid) — switches the currently playing music track to the specified track ID as defined in Xlat
- Teleport_Relative(tag, angle, flags) — teleports the activating actor to a new map spot with a range of flags controlling stopping, fog, centering, angle, and position behavior
- Trigger_ThingSpecial(tag) — activates the thing special set on an actor at the specified map tag
The Map Translator (XLAT)
The XLAT file translates binary format maps into ECWolf's and LZWolf's internal map structure. It must be referenced in MAPINFO for the game to recognize it. It can include definitions from the base game using:
include "$base"
Feature Flags
Feature flags are placed at the top of the XLAT file and enable specific engine capabilities:
- enable lightlevels — enables Rise of the Triad style light and visibility levels using special tiles placed in the map
- enable planedepth — enables taller level geometry inherited from Rise of the Triad
- enable zheights — allows actors to spawn at different heights when combined with planedepth, controlled via the info plane
- enable planeviewdepth — controls the rendered viewing height of extra logical planes (viewplane branch only)
- enable hubnospawn — allows specific actors to be disabled for particular passes through a hub level
Light Levels (when enabled)
| Tile | Light Level |
|---|---|
| 216 | 0 (Darkest) |
| 217–222 | 1–6 |
| 223 | 7 (Brightest) |
Visibility Levels (when enabled)
| Tile | Visibility Level |
|---|---|
| 252 | 0 (Lowest) |
| 253–266 | 1–14 |
| 267 | 15 (Highest) |
Level Height Tiles (when planedepth enabled)
| Tile | Height (in tiles) |
|---|---|
| 90–97 | 1–8 |
| 450–457 | 9–16 |
XLAT Sections
Section 1 — Tiles (1st Plane / Walls)
Defines what goes in the walls plane. Key commands include:
- tile tilenumber — defines a wall tile
- trigger tilenumber { properties } — assigns a trigger such as a door to a tile
- zone tilenumber {} — defines a sound zone (floor code) determining which guards can hear your shots
- modzone tilenumber ambush — the "Deaf Guard" tile, applying the AMBUSH flag to whatever actor occupies that spot
- modzone tilenumber changetrigger action { properties } — searches adjacent tiles for triggers with a specified action and replaces them with new properties (used for secret exits, for example)
Section 2 — Things (2nd Plane / Objects)
Defines actors and objects placed in the map:
- { tilenumber, actor, angles, flags, minskill } — maps a tile number to an actor. If the actor has rotations, each rotation needs its own tile number. Minskill sets the minimum skill level at which the actor spawns, starting at 0
- elevator tilenumber — creates a Rise of the Triad compatible elevator destination point
- teleporter tilenumber — creates a bidirectional teleporter
- trigger tilenumber { properties } — assigns a trigger in the objects plane (used for pushwalls and similar features)
Available thing flags (combinable with |):
- HOLOWALL — when placed in a wall, makes the wall non-solid
- PATHING — actor follows a patrol route
- AMBUSH — actor is deaf to sound
- NOHUBSPAWN0–3 — actor does not spawn during the specified hub pass
Section 3 — Flats (3rd Plane / Floor and Ceiling Textures)
Defines floor and ceiling texture assignments:
- ceiling { "flat1", "flat2", ... } — lists ceiling textures in order corresponding to tile numbers in the map editor (high byte mode)
- floor { "flat1", "flat2", ... } — lists floor textures in order (low byte mode). The first entry is the default, displayed when no tile is placed
- footsplash { "actor", "actor", ... } — defines which actor spawns under the player's feet for each flat index
UWMF Tile Properties
LZWolf adds the following optional properties to tiles in the UWMF format:
- blockray (north/south/east/west) — allows a drawn ray to pass through a specific side of a tile, enabling see-through effects
- bright — tile renders at full brightness
- decal — tile shows through to parallax or star sky on transparent pixels
- showsky — tile does not draw over parallax or star sky; the ray stops traversing when it reaches this tile
- slidestyle — controls how a door opens: Normal (0), Split/Blake Stone style (1), or Inverted (2)
- textureflip — renders the tile as a mirror image
Sector Properties
- footsplash — spawns a specified actor under the player's feet when walking through this sector
Thing Properties
- nohubspawn — disables the actor's spawn for specific hub passes (values 0–3)
Trigger Properties
- monsterusefilter — only monsters with a matching usetriggerfilterkey value can activate this trigger
LZWolf documentation written by Linuxwolf.
