🎮 Stalker XRF book

Documentation for x-ray forge script engine and tools.

The book describes:

  • set of tools and technologies used for development in XRF project
  • script engine architecture and building blocks
  • debugging and testing of xray engine
  • API and built-in tools of xray engine


References

🧪 Changes

General

  • Added new bugs
  • Optimized performance of scripts
    • Force instant initialization of all objects on game load/start to reduce lag duration
    • Memoize condlists
    • More efficient smart terrain jobs creation/checks
    • More game conditions checks where possible
    • Memoize client objects / simulator and other refs
    • Optimizing game quest state checks (one of most frequent game engine calls)
  • Removing dead code / assets

Gameplay

  • Adding gameplay options for OXR (interface rendering, loot simplification etc.)
  • [optional] Treasures will have different color based on loot price (green, blue, purple, orange)
  • [optional] Alternative start location
  • [optional] Display map marks only after visiting
  • [optional] Allow traveling only to known places
  • [optional] Weapons/armor/helmets with random upgrades
  • Improving and optimizing game AI/logics
    • Improving game schemes (wounded, loot collection, combat danger checks etc.)
  • Physical boxes (wooden, iron) can drop loot with some chance based on difficulty/level similar to SHoC/CS

Graphics

  • Added different variants of fullscreen mode rendering
  • Added grass height configuration
  • Added grass radius configuration
  • Added rendering fps limit configuration
  • Updated weather system (atmosfear3 + tweaks)
  • Updated game levels (absolute nature + tweaks)
  • Removed controls related to game patch download
  • Enabled OXR screenspace/grading shaders

Build pipeline

  • All the modules are separated and sorted with folders
  • Added NodeJS based CLI
    • Added shared commands for intellij based IDEs
  • Added workflows to run tests/checks/build on repository commits
  • Added tools for codebase linting/formatting (ltx/js/ts)
  • Added tools for game assets compression
  • Added tools for game translation
  • Added tools for simplified engines management / testing with different variants of game engines
  • Added tools for forms generation based on JSX
    • Adding type definitions and sharable basic components for custom UI rendering
  • Added tools for game packages creation (build custom game with one command)
  • Added tools for asset management (different locales etc.)
  • Added tools for game profiling/debugging/development
    • Advanced logging (game, cli)
    • Alife debugging
    • Console commands shortcut switcher
    • Game registry debugging
    • Items debugging
    • Lua profiling tools
    • Objects state/logics debug
    • Spawner
    • Task debugging
    • Teleportation
    • Treasures debugging
    • Weather debugging tools
    • Game UI debugging tools
  • Added unit testing with coverage checker
    • Added fengari lua VM for direct lua functionality checks
  • Added loadouts presets for generating character profiles / loot

Modding

  • Added game engine documentation
  • Added game engine typing and according checks
  • Added tools for generation of html file with game conditions/effects documentation based on JSDoc
  • Fully rewritten game script engine with typescript
  • Adding extensions support [WIP]
    • UI to reorder / enable / disable extensions
    • API to work with community extensions
  • Added events management system with numerous game callbacks
  • Added lua marshal lib and typing for it
  • Added lua lfs lib and typing for it
  • Added custom lua extensions lib and typing for it (based on CoC)
  • Added fixtures for game API testing
  • Added support for ts based ltx configs building (allows build-time logics and generation)
  • Added shared utils lib to reduce code duplication and simplify frequently used logics
  • Added managers abstraction for game logics control
  • Updated schemes abstraction for easier testing/extending/sharing/updating of game logics schemes
  • Add support for dynamic files with marshal lib, ability to save dynamic custom data without 16K limit

Tools

  • Added spawn pack/unpack/verify in CLI
  • Added LTX files formatting and verification in CLI
  • Added spawn file inspector in tools application
  • Added spawn file utilities in tools application

TODO

For todos check following git projects:

🌓 Installation

Pre-requirements

Setting up development environment

  • DOWNLOAD the game
  • RUN git clone https://github.com/xray-forge/stalker-xrf-engine.git - clone repository
  • RUN cd stalker-xrf-engine - cd to project folder
  • RUN npm install - install all the dependencies
  • RUN npm run setup - set up the project, install submodules
  • RUN npm run cli link - link gamedata to the game folder
  • RUN npm run cli engine use release - link open xray with game
  • RUN npm run cli build - build gamedata to the destination
  • RUN npm run cli start_game - start game and test changes

Checking issues

$ npm run cli verify project - will check whether project is set up and ready to start developing

Updating submodules

From time to time update of submodules is needed to load latest assets:

git submodule update --recursive

🌍 XRF Engine

What is

The xray forge engine is custom script engine rewritten using TypeScript.
The project utilises variety of tools to simplify process of development and automate some steps.

🥑 Building

Building is process of compiling all the XRF project code and assets into x-ray engine format.
It uses set of ordered sets to transform different parts of engine in a right way.

Command

  • npm run cli build
  • npx xrf build

Options

  • -i, --include <targets...> - include build targets (default: include all targets)
  • -e, --exclude <targets...> - exclude build target
  • -v, --verbose - print verbose build logs
  • -l, --language <language> - language to use when building mod
  • -f, --filter <targets...> - filter files with regex (default: [])
  • -c, --clean - perform target clean before build
  • --nl, --no-lua-logs - strip all lua logs from target build
  • --na, --no-asset-overrides - skip step with building additional assets
  • -h, --help - display help for command

Build steps

  • cleanup - clean target destination before build start
  • dynamic_scripts - build typescript based game scripts into lua
  • dynamic_ui - build JSX based forms into static XML forms
  • static_ui - copy static XML forms
  • dynamic_configs - build dynamic typescript based configs into ltx
  • static_configs - copy static LTX configs
  • dynamic_translations - build JSON based multi-language translation files in xml
  • static_translations - copy static XML based translation files
  • static_resources - copy game assets (textures, sounds, levels, shaders etc.)
  • collect_metadata_and_log - collect build result size/timing summary, collect build process log file

Separate modules

To make development smoother and faster, it is recommended to rebuild only needed assets. Example: changing ui forms, no need to rebuild configs, translations and other parts. In this case building -i ui is better variant.

npm run cli build -- -i ui

Watch mode

Examples

  • npm run cli build - start regular build of xrf engine
  • npm run cli build -- -c - start clean build of xrf engine
  • npm run cli build -- -e resources - build everything except static resources
  • npm run cli build -- -i scripts configs - build only game scripts and configs
  • npm run cli build -- -i configs -f system.ltx - build only game configs that have system.ltx in part of their name

Output

Example of resulting gamedata

gamedata_tree

Example output of successful build command:

20:09:51:793 [BUILD_ALL] XRF build: stalker-xrf-engine 3/11/2024, 8:09:51 PM
20:09:51:795 [BUILD_LUA_SCRIPTS] Build lua scripts
20:10:00:576 [BUILD_LUA_SCRIPTS] Built lua scripts: 8.781 sec
20:10:00:577 [BUILD_UI_DYNAMIC] Build dynamic UI schemas:
20:10:00:581 [BUILD_UI_DYNAMIC] Found dynamic UI XML configs: 230
20:10:10:187 [BUILD_UI_DYNAMIC] UI TSX files processed: 187
20:10:10:187 [BUILD_UI_DYNAMIC] UI TSX files skipped: 43
20:10:10:188 [BUILD_UI_STATIC] Copy static UI schemas
20:10:10:188 [BUILD_UI_STATIC] No static UI XML configs found
20:10:10:189 [BUILD_CONFIGS_DYNAMIC] Build dynamic configs:
20:10:10:195 [BUILD_CONFIGS_DYNAMIC] Found dynamic LTX configs: 12
20:10:10:537 [BUILD_CONFIGS_DYNAMIC] Dynamic LTX files processed: 3
20:10:10:537 [BUILD_CONFIGS_DYNAMIC] Dynamic LTX files skipped: 9
20:10:10:538 [BUILD_CONFIGS_DYNAMIC] Found dynamic XML configs: 21
20:10:11:638 [BUILD_CONFIGS_DYNAMIC] Dynamic XML files processed: 6
20:10:11:638 [BUILD_CONFIGS_DYNAMIC] Dynamic XML files skipped: 15
20:10:11:639 [BUILD_CONFIGS_STATICS] Copy static configs
20:10:11:656 [BUILD_CONFIGS_STATICS] Found static configs: 1384
20:10:11:794 [BUILD_CONFIGS_STATICS] Configs processed: 1384
20:10:11:794 [BUILD_TRANSLATIONS_DYNAMIC] Build translations
20:10:11:795 [BUILD_TRANSLATIONS_DYNAMIC] Found json files: 34
20:10:12:563 [BUILD_TRANSLATIONS_DYNAMIC] Files processed: 34
20:10:12:563 [BUILD_TRANSLATIONS_DYNAMIC] Languages processed: 8
20:10:12:564 [BUILD_TRANSLATIONS_DYNAMIC] Build static translations
20:10:12:564 [BUILD_TRANSLATIONS_DYNAMIC] Found static translations: 12
20:10:12:567 [BUILD_TRANSLATIONS_DYNAMIC] Translations processed: 12
20:10:12:567 [BUILD_ASSET_STATICS] Build resources
20:10:12:568 [BUILD_ASSET_STATICS] Process folders with resources: 2
20:10:14:881 [META] Build metadata
20:10:15:028 [META] Collecting gamedata meta: E:\Documents\Projects\stalker-xrf-engine\target\gamedata
20:10:15:029 [META] Collected files count: 15234
20:10:15:029 [META] Collected files size: 4975.106 MB
20:10:15:177 [META] Timing stats:
20:10:15:177 [META] * SKIP_CLEANUP:  0.1% 0.017 SEC
20:10:15:177 [META] * BUILT_DYNAMIC_SCRIPTS:  38.0% 8.782 SEC
20:10:15:177 [META] * BUILT_DYNAMIC_UI:  41.6% 9.611 SEC
20:10:15:177 [META] * BUILT_STATIC_UI:  0.0% 0.001 SEC
20:10:15:178 [META] * BUILT_DYNAMIC_CONFIGS:  6.3% 1.45 SEC
20:10:15:178 [META] * BUILT_STATIC_CONFIGS:  0.7% 0.155 SEC
20:10:15:178 [META] * BUILT_DYNAMIC_TRANSLATIONS:  3.3% 0.77 SEC
20:10:15:178 [META] * BUILT_STATIC_TRANSLATIONS:  0.0% 0.003 SEC
20:10:15:178 [META] * BUILT_STATIC_RESOURCES:  10.0% 2.314 SEC
20:10:15:178 [META] * TOTAL:  100.0% 23.103 SEC
20:10:15:178 [META] Included engine mod metadata: E:\Documents\Projects\stalker-xrf-engine\target\gamedata\metadata.json
20:10:15:179 [BUILD_ALL] Successfully executed build command, took: 23.103 sec
20:10:15:181 [BUILD_COLLECT_LOG] File log collected: E:\Documents\Projects\stalker-xrf-engine\target\xrf_build.log

🥑 Build clean up

Clean is build parameter to purge target gamedata directory before starting assets building. Remove artifacts from the target directory that XRF tools has generated in the past.

🥑 Building scripts

Building scripts step is serving two purposes:

  • build typescript based scripts and generate corresponding lua
  • copy lua based scripts

Watch mode

Allows TSTL compiler to watch over your project's source for changes, and rebuild typescript when they occur. As result, there is no need in running build command every time scripts change.

To run scripts build in watch mode, following command can be used:

  • npm run watch:scripts

Typescript-to-lua

A generic TypeScript to Lua transpiler is used to power XRF project. It allows writing typescript and transpiling it into lua.

For most questions up-to-date TSTL documentation should be used.

Type definitions

Xray engine has set of API methods declared as global classes, enums and methods. To access them from typescript codebase, type definitions are needed.

Custom transformers

Since luabind offers very specific OOP functionality, which includes vtables and layer of pointer transformation when exchanging data between lua and c++, built-in TSTL metatable based classes cannot be used. To solve this problem, custom luabind class transformers are implemented.

Marking class with @LuabindClass() decorator tells transpiler to use luabind class system.
Instead of default metatables based classes code close to following is generated:

local Example = class("Example")(Base)

Example.__name = "Example"

function EvaluatorSectionActive.__init(self)
  Base.__init(self)
end

____exports.Example = Example

lualib_bundle.script

Lualib is file providing shared libraries used in process of code transformation. It declares generic transformers for typescript-lua interoperability. Various javascript standard methods are implemented here such as Array.at, Array.concat, Object.assign and many others.

🥑 Building forms

todo;

Custom forms and UI

Notes:

  • When creating forms, use JSX
  • When the engine mod compilation happens, JSX is transformed to valid XML
  • All coordinates with (x, y) are based on 'attach' parent (not XML child, rather script register parent) and related
  • Use preview command to preview forms and develop faster, example: npm run preview menu

For examples check: src/engine/forms.

Filtering form assets

todo;
todo;
todo;

16x9 vs 4x3

todo;
todo;
todo;

🥑 Building configs

todo;
todo;
todo;

Filtering config assets

todo;
todo;
todo;

Dynamic (typescript) configs

todo;
todo;
todo;

Diff checking

todo;
todo;
todo;

🥑 Building translations

todo;
todo;
todo;

Selecting current language

todo;
todo;
todo;

Including different locales

todo; link to additional assets
todo;
todo;

Used encodings

todo; link to additional assets
todo;
todo;

Multi language *.json vs *.locale.xml

todo; link to additional assets
todo;
todo;

🥑 Building resources

todo;
todo;
todo;

Filtering build resources

todo;
todo;
todo;

Diff checker

To optimize build times, diff checker is used for static assets. When rebuilding the project not in clean mode, cli checks diff between source and resulting files and decides whether new copy with replacement is needed. As result, building static assets may take few seconds instead of few minutes.

Additional assets

Additional assets repository can be cloned manually or with shortcut command:
npm run cli clone *name* (extended, locale-eng, locale-ukr, locale-rus)

Cloning additional resources

todo;
todo;
todo;

Configuring additional assets usage

todo;
todo;
todo;

🧪 CLI

todo;

Commands

Complete list is here.

todo;
todo;
todo;

Idea commands

todo;
todo;
todo;

Linking global xrf

todo;
todo;
todo;

Commander

todo;
todo;
todo;

🎡 CLI configuration

todo;
todo;
todo;

Config json scheme

todo;
todo;
todo;

Different locale

todo;
todo;
todo;

Custom game path (non-steam version of game)

todo;
todo;
todo;

🏗️ Project commands and scripts

$ npm run COMMAND_NAME

  • cli - run cli scripts
  • setup - setup project and submodules
  • verify - verify project configuration and integrity
  • build - build project gamedata with all assets
  • pack:mod - build complete mod package in target/mod_package folder
  • watch:scripts - build scripts in watch mode, recompile on changes
  • test - run jest tests
  • typecheck - verify typescript types
  • format - reformat TS code and lint it
  • lint - lint TS code with eslint utils

$ npm run cli COMMAND_NAME

  • verify
    • project - verify project setup and links
    • ltx - verify ltx configuration files
  • format
    • ltx - format ltx configuration files
  • link - link target/gamedata and logs folder and stalker folder for faster development
  • unlink - unlink target/gamedata and logs folder and stalker folder
  • engine
    • list - print list of available x-ray engines
    • use - use one of available x-ray versions
    • rollback - rollback to back up version of the engine
    • info - print details about current used engine
  • open_game_folder - open game folder in explorer
  • start_game - start game with debug flag
  • build - build project gamedata with all assets
  • pack
    • game - build complete game package
    • mod - build complete game package
  • clone - clone additional resources
  • parse - parsing utils to collect documentation or JSON summaries
  • help - print list of commands and information about them

🏗️ Shorter alias

todo: describe npx xrf global alias
todo: describe npx xrf global alias
todo: describe npx xrf global alias

Commands

Clone

🔨 Compress

todo;
todo;
todo;

Why

todo;
todo;
todo;

Arguments

todo;
todo;
todo;

References

  • https://github.com/exdingbat/xrCompress-helper - xrCompress usage / docs

💽 Engine

todo;
todo;
todo;

Linking

For linking details and instructions check reference.

Engine info

todo;
todo;
todo;

Engine use

todo;
todo;
todo;

Engine rollback

todo;
todo;
todo;

Engines list

todo;

Gold

todo;
todo;
todo;

Release

todo;
todo;
todo;

Mixed

todo;
todo;
todo;

Debug

todo;
todo;
todo;

Engine for packaging

todo; About configured engine used for custom game packages
todo;
todo;

☔️ Formatting

todo;

Typescript formatting

Prettier is used as main formatting tool for XRF codebase.

todo;
todo;
todo;

LTX formatting

Custom script is used as main formatting tool for LTX configs codebase.

todo;
todo;
todo;

⚙️ Link

todo;
todo;
todo;

Custom script is used to link game, assets, engines and logs in one working system.

Linking engine

todo;
todo;
todo;

Linking game assets

todo;
todo;
todo;

Linking logs

todo;
todo;
todo;

Linking non-steam game

todo;
todo;
todo;

☔️ Linting

todo;

Typescript linting

Eslint is used as main linting tool for XRF typescript codebase.

todo;
todo;
todo;

Logs

Open

🏗️ Pack

todo;
todo;
todo;

Packaged vs unpacked build

todo; link to additional assets
todo; link to additional assets
todo; link to additional assets

Mod vs game pack

todo; link to additional assets
todo; link to additional assets
todo; link to additional assets

️️ Building custom game package

XRF template provides CLI and utils for creation of custom game repacks.
Instead of building gamedata folder and distributing it as a separate zip, mods can be packed in .db archives and bundled together with custom engine.

Pre-requirements

Comparing to normal gamedata builds the only needed thing is full assets list.
To build package you will need extended assets and one of locales packs, for example eng.

After cloning suggested repositories or providing custom assets, you should list them in 'config.json' if paths are different from already suggested.

Running build

If assets are downloaded and configured correctly, the only needed thing is one of following:

npm run cli pack game -- --clean --optimize

# or
npm run cli pack game -- -c -o

# or
npm run pack:game

As result, new package will be created in target folder.

If you want to 'just build' package for testing from existing assets without full build/compress cycle, you can use alternative:

npm run cli pack game -- --engine release --no-build

️️ Building custom mod package

todo; link to additional assets
todo; link to additional assets
todo; link to additional assets

todo;

todo; link to additional assets
todo; link to additional assets
todo; link to additional assets

Link.
todo; link to additional assets
todo; link to additional assets
todo; link to additional assets

Parse

Spawn

💡 Start

Custom script to start game instance for playing or testing.

todo;
todo;
todo;

🚦 Test

Jest package is used for typescript testing and verification.

todo;
todo;
todo;

Jest

todo;
todo;
todo;

Fixtures

todo;
todo;
todo;

Lua VM for testing

todo;
todo;
todo;

Checking coverage

todo;
todo;
todo;

Translations

Verify

🍇 Extensions (WIP)

XRF engine allows adding custom modular extension to the game that can be toggled on/off from game menu any time.

LTX configurations

Variant of modular game extensions with strictly defined interface and optional loading.
Extensions can load with root register method, use shared game utils and services.

What can be done

  • Optional loading for extensions
  • Ordering and in-game configuration of extensions list
  • Usage of shared utils, configs, managers and schemes
  • Adding custom logics and configuration
  • Overriding system ini sections/fields

Todo / research

  • Custom translations sources / build steps to prepare translations from extensions
  • Custom configs / build steps to transpile extension configs
  • Automated way to load system ini overrides and apply to existing system ini file
  • Save data about active extensions and warn when loading game with invalid extensions list
  • Add requires fields when extensions depend on each other

🔨 XRF tools

todo;
todo;
todo;

🔨 Tools application

main window

todo;
todo;
todo;

Available tools

🔨 Archive editor

todo;
todo;
todo;

todo

todo;
todo;
todo;

🔨 Dialog editor

todo;
todo;
todo;

todo

todo;
todo;
todo;

🔨 Config editor

todo;
todo;
todo;

todo

todo;
todo;
todo;

🔨 Exports viewer

todo;
todo;
todo;

todo

todo;
todo;
todo;

🔨 Icon editor

todo;
todo;
todo;

todo

todo;
todo;
todo;

🔨 Spawn editor

todo;
todo;
todo;

todo

todo;
todo;
todo;

🔨 Tools cli

Command line tools to assist with xray engine development.

Available Commands

  • pack-spawn - Command to pack unpacked spawn files into single *.spawn
  • repack-spawn - Command to repack provided *.spawn into another file
  • unpack-spawn - Command to unpack provided *.spawn into separate files
  • verify-spawn - Command to verify provided *.spawn file
  • info-spawn - Command to print information about provided *.spawn file
  • format-ltx - Command to format ltx and ini files
  • verify-ltx - Command to verification ltx and ini files
  • help - Print this message or the help of the given subcommand(s)

Details

🔨 Archive

todo;
todo;
todo;

Commands

todo;
todo;
todo;

🔨 LTX

todo;

Commands

  • verify-ltx - todo
  • format-ltx - todo

Format

todo;

  • path - todo
  • check - todo
  • silent - todo

Verify

todo;

  • path - todo
  • verbose - todo
  • silent - todo
  • strict - todo

Scheme

Scheme definition and how to describe schema documented here.

🔨 Spawn

todo;
todo;
todo;

Commands

  • pack-spawn - todo
  • repack-spawn - todo
  • unpack-spawn - todo
  • verify-spawn - todo
  • info-spawn - todo

Pack

todo;

  • path - todo
  • dest - todo
  • force - todo

Repack

todo;

  • path - todo
  • dest - todo

Unpack

todo;

  • path - todo
  • dest - todo
  • force - todo

Verify

todo;

  • path - todo

Info

todo;

  • path - todo

🔨 Translations

todo;
todo;
todo;

Commands

  • build-translations - todo
  • parse-translations - todo
  • verify-translations - todo

Build

todo;

Parse

todo;

Verify

todo;

🍌 Useful utils and resources

Development utils

  • https://github.com/revolucas/AXRToolset - set of utilities for mod development (unpack gamedata)
  • https://github.com/OpenXRay/xray-16 - open x-ray project
  • https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701 - windows terminal
  • https://developer.nvidia.com/nvidia-texture-tools-exporter- nvidia texture tools exported, useful for work with textures
  • https://igigog.github.io/anomaly-modding-book/ - anomaly based modding docs
  • https://github.com/themrdemonized/STALKER-Anomaly-modded-exes - dltx as source of ideas / openxray updates
  • https://github.com/vika-sonne/xray-skls-file-browser - animations converter

🍊 Game SDK

todo;
todo;
todo;

🍉 Lua debugger

todo;
todo;
todo;

Setting breakpoints

todo;
todo;
todo;

Building custom VS extension?

todo;
todo;
todo;

todo;

https://github.com/WheretIB/LuaDkmDebugger
https://github.com/WheretIB/LuaDkmDebugger/pull/26

AI and logics

todo;
todo;
todo;

Capturing NPC in game

To capture NPC following steps should be applied:

  • Run game in mixed or debug mode (use mixed engine)
  • Hold left alt and click on NPC

As result, you will see game world from perspective of captured NPC.

Using ai_dbg_stalker on starts rendering object details for stalkers.

Ai debug preview

Using ai_dbg_monster on starts rendering object details for stalkers.

Ai debug preview

GOAP displaying in logs

todo;
todo;
todo;

Getting action planners states

todo;
todo;
todo;

Profiling performance:

To profile performance of scripts / c++ scheduler of AI etc following steps are required:

  • Enable rendering of stats: rs_stats on
  • Enable rendering of ai profiling: ai_stats on

After execution following information will be visible:

Ai profile preview

Meaning

Stats have 7 columns displayed in such format:

[name][min_time][avg_time][max_time][call_rate][call_count][total_time]

AI debug console commands:

List of commands.

todo;
todo;
todo;

🏗️ Engine debug (C++)

Setup C++ engine project

Follow one of links to run custom game engine locally in debug mode:

Using Lua/C++ debugger

To attach a debugger to Lua/C++ code, follow these steps:

  • Use Visual Studio
  • Install the LUA debug extension for Visual Studio. (fixes A + B required)
  • Set up the engine project
  • Link the game by running npm run link and targeting the folder of xrf
  • Run the game in mixed/release mode directly from Visual Studio

Limitations

  • It is not possible to debug TypeScript directly. Instead, attach a breakpoint and observe the transpiled Lua code.
  • It is not possible to attach to luabind declared classes and userdata (unfortunately, lua debug tools were not maintained in OXR for 10+ years)

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

🧰 Logs

Logging is the simplest and most accessible debug feature in xray engine.
By default, logs are enabled for all engine variants expect gold and display in (1) game console, (2) dedicated log file, (3) visual studio console.

Checking XRF logs

To enable XRF logging make sure the GameConfig logging flag is set to true.
It is enabled by default.

Depending on how you run the game, you can use the following approaches to check the log:

With pre-built engine

  • Make sure you are using the custom engine. If not, switch to the mixed/release variant: npm run engine use release
  • Link the application logs folder with the target directory: npm run link (if it is not linked already)
  • Start the game (npm run start_game)
  • Check files in target/logs_link directory -> opexray_%username%.log is default openxray log file

With visual studio

  • Just run the project and check Output window of application

Checking custom log files

If lua loggers are explicitly declaring output as file, not game log, then you should check target/logs_link for other log files. Usually names look like xrf_%module%.log.

Writing logs

In game console / log

todo;
todo;
todo;

In custom .log file

todo;
todo;
todo;

Flushing logs

todo;
todo;
todo;

Printing logs with CLI

todo;
todo;
todo;

🧃 Debugging UI forms

todo;

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

References

🚜 Generating externals doc

todo;
todo;
todo;

Running command to generate externals

todo;
todo;
todo;

Updating jsdoc

todo;
todo;
todo;

🚧 Stats

todo;
todo;
todo;

Displaying rendering and scripts stats

todo;
todo;
todo;

Displaying fps chart

todo;
todo;
todo;

🌩 Weather

todo;
todo;
todo;

Changing with console command

todo;
todo;
todo;

Activating IMGui debug tools

todo;
todo;
todo;

References

Using XRF debug panel

todo;
todo;
todo;

Turning on and off console commands

todo;
todo;
todo;

Manipulating / dumping object info

todo;
todo;
todo;

Spawning items

todo;
todo;
todo;

Spawning squads and NPC

todo;
todo;
todo;

Teleporting

todo;
todo;
todo;

Dumping system ini

todo;
todo;
todo;

🧷 Game engine

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

⛱ Command line arguments

todo;
todo;
todo;

Command line flags for xr-engine

Engine command line flags: link

todo

todo;
todo;
todo;

🌑 Console commands

todo;
todo;
todo;

AI debug console commands

ai_debug [on/off]

todo;
todo;
todo;

ai_debug_doors [on/off]

todo;
todo;
todo;

ai_dbg_alife [on/off]

todo;
todo;
todo;

ai_dbg_anim [on/off]

todo;
todo;
todo;

ai_dbg_brain [on/off]

todo;
todo;
todo;

ai_dbg_cover [on/off]

todo;
todo;
todo;

ai_dbg_destroy [on/off]

todo;
todo;
todo;

ai_dbg_dialogs [on/off]

todo;
todo;
todo;

ai_dbg_frustrum [on/off]

todo;
todo;
todo;

ai_dbg_funcs [on/off]

todo;
todo;
todo;

ai_dbg_goap [on/off]

todo;
todo;
todo;

ai_dbg_goap_object [on/off]

todo;
todo;
todo;

ai_dbg_goap_script [on/off]

todo;
todo;
todo;

ai_dbg_goap_inactive_time [on/off]

todo;
todo;
todo;

ai_dbg_goap_infoportion [on/off]

todo;
todo;
todo;

ai_dbg_goap_monster [on/off]

todo;
todo;
todo;

ai_dbg_goap_motion [on/off]

todo;
todo;
todo;

ai_dbg_goap_node [on/off]

todo;
todo;
todo;

ai_dbg_goap_serialize [on/off]

todo;
todo;
todo;

ai_dbg_goap_sight [on/off]

todo;
todo;
todo;

ai_dbg_goap_stalker [on/off]

todo;
todo;
todo;

ai_dbg_goap_vision [on/off]

todo;
todo;
todo;

🧰 Execution flow

todo;
todo;
todo;

Scripts execution flow

-> Game .exe start

  • Game files and core initialize
  • Main menu forms and scripts initialized, instance of main menu is created

-> New game start

  • Loading assets

  • Resolving globals, registering callbacks

  • Registering game server classes bindings

  • Registering and calling 'start' game callbacks

  • Registering scheme implementations

  • Reading all.spawn file, start spawning and creating items

  • Execute main game update loop

  • When items appear on client side, use ini files binders path and create new binder classes

✉️ Known / popular xray engine forks

todo; include links and brief description
todo; include links and brief description
todo; include links and brief description

List

  • Monilith (anomaly)
  • OpenXray
  • Call Of Chernobyl engine
  • Oxygen

📸 Lifecycle

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

🧺 Luabind

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

What is 'class' and 'super' in luabind

It is 'luabind' part defined as globals

lua_setglobal(L, "class");

lua_pushcclosure(L, &make_property, 0);
lua_setglobal(L, "property");

lua_pushlightuserdata(L, &main_thread_tag);
lua_pushlightuserdata(L, L);
lua_rawset(L, LUA_REGISTRYINDEX);

lua_pushcclosure(L, &deprecated_super, 0);
lua_setglobal(L, "super");

🧺 Lua extensions

Brief description.

🧺 Custom

Describe custom lua methods from oxray luajit custom builds.

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

🧺 Marshal

Marshal lib brief descriptionn.

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

🧺 LFS (lua file system)

Lfs lib brief description and links.

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

todo;

todo;
todo;
todo;

🥙 Online and offline

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

📞 Updates and scheduling

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

⚖️ Script engine

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

🌋 Assets

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

🍆 Configs

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

🔨 LTX scheme

todo;

Defining schema

todo;
todo;
todo;

Available types

  • string
  • section
  • tuple
  • condlist
  • f32
  • u32
  • i32
  • u16
  • i16
  • u8
  • i8
  • bool
  • vector
  • enum
  • unknown
  • any

Arrays

todo;
todo;
todo;

Enums

todo;
todo;
todo;

Tuples

todo;
todo;
todo;

Strict

todo;
todo;
todo;

Examples

todo;
todo;
todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;
todo;
todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

Patrols

  • todo
  • todo
  • todo

☎️ Patrol flags system

To control patrol movement / staying on some point flags system is implemented.
Following parameters can be used to affect patrolling logics.

🔨 path_walk

a=state

  • body state when moving on a patrol

p=percent

  • percent probability to stop on a patrol point (0-100), it is 100 by default

sig=name

  • set signal on waypoint arrival (without look check and correct), for the following check with the logic system field on_signal
  • -to set a signal after turning, use the corresponding flag for a path_look waypoint

🔨 path_look

a=state

  • body state when stand/sit at place

t=msec

  • time to stay idle when on point and look
  • * means unlimited time
  • valid values are in the range [1000, 30000], 5000 by default
  • for terminal waypoints of path_walk that have no more than one corresponding path_look, the value of t is always considered infinite and does not have to be set

sig=name

  • set signal on path_look waypoint with the given name after turning towards the point

syn

  • flag to wait whole team before setting signal as complete, used to wait others and stay idle before gathering
  • this flag will halt setting the signal until all characters with the given team arrive
  • the team is set as a text string in customdata, the given character will be play its idle animation until the others arrive

sigtm=signal

  • set signal on time callback from state manager
  • if t=0, signal is set right after playing init animation

💊 Examples

Button press

Play press animation and emit scheme signal:

  • wp00 | a=press | t=0 | sigtm=pressed
  • on_signal = pressed | another_scheme@section

todo:

  • Check docs from links and integrate more

⛽️ References

  • http://sdk.stalker-game.com/en/index.php?title=Logic
  • http://sdk.stalker-game.com/ru/index.php?title=%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_%D0%BB%D0%BE%D0%B3%D0%B8%D0%BA%D0%B8_%28%D1%87%D0%B0%D1%81%D1%82%D1%8C_1%29

🏀 UI elements

Base classes bindings to work with UI interface elements.

🧩 C_UI_CORE

Core classes for work with UI elements.

🧩 C_XML

Base classes for work with xml parsing.

🧩 C_UI_INTERFACE

Base classes for creation of UI elements and windows.

🧱 CUIWindow

Base element for representation of nested components. Basically grid.

🧱 CUIStatic

Any static element in ui that represents simple label, animation or image. Example: main menu background.

screenshot

🧱 CUIButton

Base button core with logic, normally 'CUI3tButton' is preferred (?).

🧱 CUI3tButton

Generic button element used everywhere, from settings to different modal windows. Example: any action button.

screenshot

🧱 CUICheckButton

Generic checkbox button for settings true/false values. Example: settings options.

🧱 CUIComboBox

Generic combobox with list of items for selection. Example: settings selection.

screenshot

🧱 CUICustomEdit

Generic component with text or number input. Example: login inputs for multiplayer, cd key input.

screenshot

🧱 CUICustomSpin

todo;

screenshot

🧱 CUIDialogWnd

todo;

screenshot

🧱 CUIScriptWnd

todo;

screenshot

🧱 CUIEditBox

todo;

screenshot

🧱 CUIFrameLineWnd

todo;

screenshot

🧱 CUIFrameWindow

todo;

screenshot

🧱 CUILines

todo;

screenshot

🧱 CUIListBox

todo;

screenshot

🧱 CUIListBoxItem

todo;

screenshot

🧱 CUIListBoxItemMsgChain

todo;

screenshot

🧱 CUIMMShniaga

todo;

screenshot

🧱 CUIMapInfo

todo;

screenshot

🧱 CUIMapList

todo;

screenshot

🧱 CUIMessageBox

todo;

screenshot

🧱 CUIProgressBar

todo;

screenshot

🧱 CUIPropertiesBox

todo;

screenshot

🧱 CUIScrollView

todo;

screenshot 1 ### 🧱 CUISleepStatic

todo;

screenshot

🧱 CUISpinFlt

todo;

screenshot

🧱 CUISpinNum

todo;

screenshot

🧱 CUISpinText

todo;

screenshot

🧱 CUITabButton

todo;

screenshot

🧱 CUITabControl

todo;

screenshot

🧱 CUITrackBar

Generic slider used for settings adjustments. Useful to set configs in specific range.

screenshot

🧱 CUITextWnd

todo;

screenshot

🧱 CServerList

Default UI modal element for multiplayer list of servers display.

screenshot

Schemes

todo;
todo;
todo;

todo

todo;
todo;
todo;

todo

todo;
todo;
todo;

abuse

Scheme is implementing abuse state for objects.
Stalkers hit actor if you click them for a lot.

ini parameters


Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

animpoint

Scheme is implementing animated idle state or activity of objects.
Support scenario of different animations.

Example: traders standing constantly, cop sitting constantly, first scenario in Yanov.

ini parameters

cover_name - string
use_camp - boolean
reach_movement - string
reach_distance - number
rawAvailableAnimations - Array<string>

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

camper

Scheme is implementing camper state for stalkers.
Stalkers try to sneak or come closer just to hit actor with guaranteed kill.

ini parameters


Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

cover

Scheme describing cover points usage.
Stalkers can enter smart covers and sit / lay / stand in them.

ini parameters

smart - ?
anim - ?
sound_idle - ?
radius_min - ?
radius_max - ?

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

gather_items

Scheme is implementing state toggle for stalkers.
Allows control of whether object is lootable or not.

ini parameters


todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

meet

  • todo
  • todo
  • todo

ini parameters

close_distance - ?
close_anim - ?
close_snd_distance - ?
close_snd_hello - ?
close_snd_bye - ?
close_victim - ?
far_distance - ?
far_anim - ?
far_snd_distance - ?
far_snd - ?
far_victim - ?
snd_on_use - ?
use - ?
meet_dialog - ?
abuse - ?
trade_enable - ?
allow_break - ?
meet_on_talking - ?
use_text - ?

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

mob_home

Scheme is implementing home location binding for mobs.

ini parameters

state - optional string
path_home - optional string

gulag_point - optional boolean
aggressive - optional boolean

home_min_radius - optional number
home_mid_radius - optional number
home_max_radius - optional number

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

ph_idle

description

ini parameters

hit_on_bone - ?
nonscript_usable - ?
on_use - ?
tips - ?

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

ph_on_death

Generic scheme to handle death events for physical objects as part of logics.

ini parameters

Only logics field is used for the scheme.

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

ph_hit

Scheme to handle hits for physical objects.

ini parameters

No parameters except logics are handled for the scheme.

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

ini parameters

joint - ?
period - ?
force - ?
correct_angle - ?

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

sleeper

Scheme to handle sleep patrols.
Objects captured by this scheme will walk to sleeping place and start sleeping.

ini parameters

path_main - ?
wakeable - ?
path_walk - ?
path_walk_info - ?
path_look - ?
path_look_info - ?

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

sr_crow_spawner

Scheme to describe logics of crows spawner.
From time to time spawns crows for declared paths based on maximal possible crows count.

Listens for game update event and synchronizes count of spawned crows with count of maximal crows.
Expects to have only one crow spawner restrictor per level.

Type

Restrictor scheme.

ini parameters

❄️ max_crows_on_level

Maximal count of crows spawned on level at once

  • Type: number
  • Default: 16
  • Example: 10

❄️ spawn_path

Stringified list of patrols (paths) to spawn crows at.

  • Type: string, list
  • Default: ""
  • Example: pri_crow_spawn_1, pri_crow_spawn_2, pri_crow_spawn_3, pri_crow_spawn_4, pri_crow_spawn_5

Usage

  1. Create restrictor object in level editor
  2. Assign sr_crow_spawner section as active logic in ltx file

Examples

zat_crow_spawner.ltx

[logic]
active = sr_crow_spawner

[sr_crow_spawner]
max_crows_on_level = 7
spawn_path = zat_crow_spawn_1, zat_crow_spawn_2, zat_crow_spawn_3, zat_crow_spawn_4, zat_crow_spawn_5

jup_crow_spawner.ltx

[logic]
active = sr_crow_spawner

[sr_crow_spawner]
max_crows_on_level = 7
spawn_path = jup_crow_spawn_1, jup_crow_spawn_2, jup_crow_spawn_3, jup_crow_spawn_4, jup_crow_spawn_5

sr_cutscene

Scheme is implementing cutscenes and scenarios.
Helps to disable actor input and control camera for some time periods.

Type

Restrictor scheme.

ini parameters

point - string [required]
look - string [required]
global_cameffect - boolean
pp_effector - string
cam_effector - string [required]
fov - number [required]
enable_ui_on_end - boolean
outdoor - boolean

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Type

Restrictor scheme.

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Type

Restrictor scheme.

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

sr_light

Scheme to control stalkers torches light mode.

Type

Restrictor scheme.

ini parameters

light_on - ?

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

Scheme describing monsters waiting for actor in some specific place.
When actor is in zone, play few warning sounds and then force monster to attack.
Used for boards in clear sky swamps.

Type

Restrictor scheme.

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

sr_no_weapon

Scheme to describe no weapon logics for restrictors.
Forces actor to hide weapon and shows custom UI messages.

todo;
todo;
todo;

Type

Restrictor scheme.

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

sr_particle

todo;
todo;
todo;

Type

Restrictor scheme.

ini parameters

name - ?
path - ?
mode - ?
looped - ?

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

sr_postprocess

todo;
todo;
todo;

Type

Restrictor scheme.

ini parameters

intensity - ?
intensity_speed - ?
hit_intensity - ?

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Type

Restrictor scheme.

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

sr_silence

Scheme to define some smart zones and silence places.
Dynamic combat music cannot be played in such places, usually safe areas.

Type

Restrictor scheme.

ini parameters

Only logic field is applied to try to switch current section.

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

sr_teleport

Scheme is implementing teleportation when reaching specific restrictor.
Example: teleports in stalker ShoC last zone, teleports at Zaton burning village, escape bridge teleport is CS.

Supports up to 10 different teleport locations (i = 0...10).

Type

Restrictor scheme.

ini parameters

❄️ timeout

Timeout before teleporting.

  • Type: number, milliseconds
  • Default: 900
  • Example: 0, 1000, 3000

❄️ point[i], look[i], prob[i]

List of possible teleportation destinations.
Just fields with i prefix, where i is number from 1 to 10.

point

Name of teleport patrol to teleport actor on timeout.
Requires patrol with at least one point.

  • Type: string
  • Default: none
  • Example: zat_b20_quest_teleport_walk

look

Name of teleport patrol to set actor look after teleporting.
Requires patrol with at least one point.

  • Type: string
  • Default: none
  • Example: zat_b20_quest_teleport_look

prob

Probability of point i usage when teleport timeout activates.

  • Type: number
  • Default: 100
  • Example: 25, 50, 100

Usage

todo;
todo;
todo;

Examples

zat_b20_teleport_logic.ltx

[logic]
active = sr_teleport

[sr_teleport]
point1 = zat_b20_quest_teleport_walk
look1 = zat_b20_quest_teleport_look

example.ltx

[logic]
active = sr_teleport

[sr_teleport]
point1 = example_teleport1_walk
look1 = example_teleport1_look
prob1 = 25
point2 = example_teleport2_walk
look2 = example_teleport2_look
prob2 = 25
point3 = example_teleport3_walk
look3 = example_teleport3_look
prob3 = 50

sr_timer

Scheme is implementing timers on screen and allows using timed logic.
Example: in ShoC everything related to time near psy-labs, bloodsuckers lair, helicopters evacuation limits etc.

Type

Restrictor scheme.

ini parameters

❄️ type

Type of timer to activate.
Increment will count from 0 to value, decrement is backwards timer.

  • Type: enum [inc, dec]
  • Default: inc
  • Example: dec

❄️ start_value

Start value of timer to count from.
Required for decrement timers.

  • Type: number, milliseconds
  • Default: 0 for increment, required for decrement
  • Example: 0, 1000, 60000

❄️ on_value

Logics descriptor of how to handle different values of timer.

  • Type: number | condlist
  • Default: null
  • Example: 0 | {+some_info_portion} section@first, section@second

❄️ timer_id

Identifier of used timer form element.
Provides XML selector for rendering in UI hud.

  • Type: string
  • Default: hud_timer
  • Example: hud_timer

❄️ timer_id

Identifier of used timer form element.
Provides XML selector for rendering in UI hud.

  • Type: string
  • Default: hud_timer
  • Example: hud_timer

❄️ string

Optional text value to display with timer.
Displayed in hud_timer_text XML form element

  • Type: string
  • Default: null
  • Example: st_custom_timer_label, not translated text

Usage

todo;
todo;
todo;

Examples

pri_a28_sr_evac.ltx

[sr_timer@got_one_minute]
type = dec
start_value = 60000
on_value = 0 | {+pri_a28_evacuation_end =actor_in_zone(pri_a28_scene_end_zone)} sr_idle@cut_1_save, %+pri_a28_helis_leave%
on_info = {-pri_a28_evacuation_end =actor_in_zone(pri_a28_scene_end_zone)} %+pri_a28_evacuation_end =scenario_autosave(st_save_pri_a28_evacuation_end)%
on_info2 = {+pri_a28_helis_leave !actor_in_zone(pri_a28_scene_end_zone)} sr_idle@cut_2_save

zat_b57_gas_timer.ltx

[sr_timer@gas]
type = dec
start_value = 45000
on_value = 0 | sr_idle@end {!squad_exist(zat_b38_bloodsuckers_sleepers)} %+zat_b57_gas_running_stop +zat_b57_den_of_the_bloodsucker_tell_stalkers_about_destroy_lair_give%

walker

todo;
todo;
todo;

ini parameters

path_walk - string [required]
path_look - string
team - string
team - sound_idle
team - boolean
def_state_standing - string
def_state_moving - string

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

Examples

todo;
todo;
todo;

scheme_name

todo;
todo;
todo;

Configuration

todo;
todo;
todo;

Usage

todo;
todo;
todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo;

todo; supported languages, format, limits