Skip to content

Modding

Linkatplug edited this page Dec 5, 2026 · 5 revisions

Mods and HD pack

🇺🇸 English · 🇫🇷 Français (reference) · Step-by-step tutorial: HD textures

Mods add or replace content without modifying the game files: the engine reads a mod's files instead of the originals during play. Nothing is redistributed with the project. The mods/ folder is excluded from the git repository, because the HD images are derived from each player's game files.

Location

By default, the game looks for mods/ next to the executable, then in the parent folder (the case of build\tucker.exe: mods/ at the root of the project), then in the current folder. The [mods] dir key of settings.ini or the --mods FOLDER option point to another folder (see SETTINGS.en.md).

mods/
  hd_upscayl/              one mod = one folder (its name is its identifier)
    mod.ini                optional: name, author, description (read by the launcher)
    hd/
      LOC01.png            HD background for LOC01.PCX
      LOC03A.png           room in several pieces: one PNG per piece
      LOC03B.png
      SHEETS/BUD_1.png     HD sprite sheet (characters, objects, cursor)
      SPRITES/A01_04.png   HD sprites of an SPR file
  voix_fr/
    files/
      SPEECH/SAM0001.WAV   replaces the game file with the same path
  • files/: each file replaces the game file with the same relative path. Case does not matter. Any file the game opens for reading can be replaced: images, sounds, texts, etc.
  • hd/: HD images of the backgrounds (see below). The name is that of the original PCX, with the .png extension. hd/SHEETS/ and hd/SPRITES/: HD sprites (see "HD sprites").
  • Mods are applied in alphabetical order of their folder name. For the same file, the last one wins. Prefix them, for example 10_, 20_, to set the order.
  • A folder whose name starts with _ or . is ignored, which lets you set a mod aside.
  • [mods] disabled=name1,name2 disables mods without moving them. [mods] enabled=0 or --sans-mods disables them all.

The log (standard error) lists the mods found (actif = active, fichier(s) remplacé(s) = replaced file(s), image(s) HD = HD image(s)):

[mods] hd_upscayl : actif
[mods] 0 fichier(s) remplacé(s), 122 image(s) HD

mod.ini (optional)

The game does not read this file. It is reserved for the launcher, to display the mods:

[mod]
name=HD backgrounds (Upscayl)
author=…
description=Backgrounds upscaled ×4 with Real-ESRGAN

HD pack

The HD pack replaces the game's backgrounds on screen with high-definition images, at any resolution, and, if the pack provides them, the sprites: characters, animated objects, cursor (see "HD sprites"). The game keeps running at 320×200: the action panel, the texts and whatever the pack does not provide remain the game's own and are laid on top.

How it works

  1. When the game opens a background LOCxx.PCX for which a mod provides hd/LOCxx.png, the engine decodes the original PCX. Rooms in several pieces (LOC03A, LOC03B…), opened one after the other, form a strip 640, 960 or 1280 pixels wide.
  2. On each frame, the engine looks for this background, and its scroll offset, in the game's 320×200 screen.
  3. Every screen pixel identical to the pixel of the original background lets the HD image show through. The other pixels (characters, objects, panel) stay the game's own.
  4. Palette fades (entering and leaving a room, night…) are applied to the HD image.

The engine needs no knowledge of the game, and an incomplete pack works: a background without a PNG stays at 320×200. The nearest, smooth and xbr filters apply to the game layer. The crt filter shows the original picture, without the HD pack. In the F12 menu, "Pack HD (mods)" (key hd_pack) turns the whole pack on or off during play; below it, "Décors HD" (HD backgrounds, hd_decors) and "Personnages et objets HD" (HD characters and objects, hd_sprites) turn off only part of it, for example to keep the HD backgrounds with the original sprites.

Rules for the images

  • One image per PCX, same framing as the original: the whole 320×200 picture, including the bottom part.
  • Any size, 16:10 ratio: 1280×800 (×4) is a good choice, 2560×1600 works too. All the images of the same room must have the same size.
  • 8- or 16-bit PNG: RGB, RGBA, greyscale or palette, non-interlaced. The alpha channel is ignored.
  • If a mod replaces a PCX through files/, the HD image with the same name is matched against the replaced PCX: a mod that redraws a background must also provide its HD PNG, or be used without the HD pack.
  • The areas where the game draws animated objects with their own background (clock, lamp…) stay in low resolution without HD sprites: the game draws there itself.

Creating a pack with Upscayl

Upscayl (Real-ESRGAN) upscales the backgrounds ×4 in a few seconds. If Upscayl is installed, one command creates a complete pack from the game files:

python tools/hd_export.py ..\extracted\iso\TUCKER mods\hd_upscayl\hd --upscayl
  • --upscayl MODEL picks the model. Default digital-art-4x, suited to drawn backgrounds. Other models: ultrasharp-4x, remacri-4x, high-fidelity-4x, upscayl-standard-4x, upscayl-lite-4x, ultramix-balanced-4x.
  • Upscayl is looked for in Program Files, in %LOCALAPPDATA%\Programs, or at the location given by UPSCAYL_BIN or --upscayl-bin PATH.
  • To compare two models, generate them into two mods and disable one with [mods] disabled=.

Creating a pack with another tool

python tools/hd_export.py ..\extracted\iso\TUCKER export_png

This command exports the backgrounds as 320×200 PNGs. Upscale them with the tool of your choice (retouching by hand, waifu2x, ESRGAN…), then put them in mods/<name>/hd/ under the same name. --echelle 2 or --echelle 4 (scale) directly produces a Scale2x upscale, without blur, to try a pack right away. --motif (pattern) selects the files (default LOC*).

HD sprites

Sprites (characters, objects, cursor) are drawn by the game from two kinds of images, which the engine recognises at drawing time:

  • the PCX sheets cut up by the game (BUD_1.PCX to BUD_6.PCX for Bud, SCROBJ*.PCX for the room objects, POINTER.PCX for the cursor…): HD image hd/SHEETS/NAME.png, same framing as the 320×200 sheet (1280×800 for ×4);
  • the SPR files (animations of the other characters, A01_04.SPR…): their frames are laid out in a sheet whose layout is set by the engine, hd/SPRITES/NAME.png (and NAME_P1.png, NAME_P2.png… if it spills over a 1024×1024 page). Only hd_export.py knows how to produce this layout.

How it works

  1. Each sprite drawn by the game is recorded with its sheet and its original rectangle.
  2. On each frame, the engine looks, pixel by pixel, for the last sprite still visible: whatever was drawn on top afterwards (foreground, another sprite, text) stays the game's.
  3. The HD sprite is drawn over the HD background in place of the original sprite. Its colours follow the game's palette at that moment: the object sheets serve every room of a part, each with its own palette, and fades change the palette. The difference between the export palette and the game palette is corrected per original index, and smoothed over the HD image.
  4. An object drawn with its own background (opaque rectangle) gives back to the HD background the part of that background that has the colour of the original background.
  5. HD images are read and compressed (DXT5) by a loading thread: a sprite that appears is drawn in low resolution while it loads (a few tens of milliseconds), without stutter. The least recently seen sheets are freed beyond 48 MB of textures.

A sprite without an HD image stays as the game drew it. An HD image whose size does not match the export (other layout) is ignored, with an "à réexporter" (re-export) message in the log.

Creating the HD sprites

python tools/hd_export.py ..\extracted\iso\TUCKER mods\hd_upscayl\hd --sans-decors --planches --sprites --upscayl
  • --planches [PATTERN] (sheets) exports the PCX sheets into SHEETS/. Default pattern: BUD_*,BUDL00_*,PEG_*,MAC_*,SCROBJ*,PANOBJS*,POINTER,CHARSET*,CHAR2,CLIO*,COGS*.
  • --sprites [PATTERN] exports the SPR files into SPRITES/ (all by default).
  • --sans-decors (no backgrounds) does not export the backgrounds (already done).
  • Transparent pixels are exported with the colour of their neighbours, so that upscaling does not create a dark fringe; the alpha channel keeps the transparency.
  • Requires numpy (pip install numpy).
  • Use the same Upscayl model as for the backgrounds, in the same mod: two different models do not upscale colours the same way, and the objects' background would show as a rectangle over the background.
  • The object sheets have their own palette, different from the rooms': upscaling is done with this palette, then corrected in game. The result is faithful for the colours, a little less so for the outlines of objects whose palette differs a lot.

For the launcher

  • Listing the mods: subfolders of mods/ whose name starts with neither _ nor ., with mod.ini for the displayed name. A mod has HD backgrounds if it contains hd/*.png.
  • Enabling or disabling a mod: write the list into [mods] disabled in settings.ini. The list is taken into account on the next launch.
  • HD pack on/off: [display] hd_pack key, also adjustable in game (F12). Sub-settings: hd_decors (HD backgrounds) and hd_sprites (HD characters and objects), no effect if hd_pack=0.
  • A mod has HD sprites if it contains hd/SHEETS/*.png or hd/SPRITES/*.png.
  • Options for a single session: --mods FOLDER, --sans-mods, --sans-hd.

Page générée depuis docs/MODS.en.md.

Clone this wiki locally