Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sprites

sprites wraps sprite tooling from cli/bin/tools/xrf-cli. It packs and unpacks the equipment sprite and the UI texture description sprites using project paths from cli/config.json.

npm run cli -- sprites <command>

Commands

CommandReadsWrites
sprites unpack-equipmentsrc/resources/textures/ui/ui_icon_equipment.dds and src/engine/configs/system.ltxsrc/resources/textures_unpacked/ui/ui_icon_equipment
sprites pack-equipmentunpacked equipment icons and system.ltxsrc/resources/textures/ui/ui_icon_equipment.dds
sprites unpack-descriptionUI texture descriptions and packed texturessrc/resources/textures_unpacked
sprites pack-descriptionUI texture descriptions and unpacked texturessrc/resources/textures

Options

All sprite commands support:

  • -v, --verbose: print verbose logs.
  • -s, --strict: enable strict mode.

Description commands also support:

  • -d, --description <name>: process one file under src/engine/forms/textures_descr.

Examples

npm run cli -- sprites unpack-equipment
npm run cli -- sprites pack-equipment --strict
npm run cli -- sprites unpack-description --description ui_actor.xml
npm run cli -- sprites pack-description --description ui_actor.xml

Workflow

Unpack before editing a sprite’s icons or checking generated sprite coordinates. Pack after editing the unpacked files or texture descriptions. Use --description when working on a single UI texture description file instead of the whole description set.

Equipment commands are tied to the equipment sprite. Description commands are tied to XML texture description files under src/engine/forms/textures_descr.

Failure notes

Equipment commands depend on valid system.ltx icon coordinates. Description commands depend on XML description names and matching source textures.