Repository navigation
Modding
🇺🇸 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.
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.pngextension.hd/SHEETS/andhd/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,name2disables mods without moving them.[mods] enabled=0or--sans-modsdisables 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
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-ESRGANThe 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.
- When the game opens a background
LOCxx.PCXfor which a mod provideshd/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. - On each frame, the engine looks for this background, and its scroll offset, in the game's 320×200 screen.
- 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.
- 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. The F10 key turns the whole pack on or off during
play, with a fade (key hd_pack, saved). In the F12 menu, "Pack HD (mods)" does the same; below it, "Décors HD" (HD backgrounds, hd_decors) and
"Personnages et objets HD" (HD characters and objects, hd_sprites) and "Barre d'actions HD" (HD action
bar, hd_panel) turn off only part of it, for
example to keep the HD backgrounds with the original sprites.
- 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.
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 MODELpicks the model. Defaultdigital-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 byUPSCAYL_BINor--upscayl-bin PATH. - To compare two models, generate them into two mods and disable one with
[mods] disabled=.
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, as a comma-separated list (default: LOC* and the 24
still pictures of the cutscenes and part screens: CLIO1, MAP1, NEWS1, PT1BAK…; full list:
CINEMATIQUES in tools/hd_export.py; plus the action bar PANEL1, PANEL2). The engine shows them in HD like the backgrounds.
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.PCXtoBUD_6.PCXfor Bud,SCROBJ*.PCXfor the room objects,POINTER.PCXfor the cursor…): HD imagehd/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(andNAME_P1.png,NAME_P2.png… if it spills over a 1024×1024 page). Onlyhd_export.pyknows how to produce this layout.
- Each sprite drawn by the game is recorded with its sheet and its original rectangle.
- 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.
- 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.
- 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.
- 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. A fully transparent HD image (Upscayl sometimes produces one without reporting an error) is ignored too, and a sprite whose HD region is more than 40 % empty keeps its original picture: a character no longer disappears.
python tools/hd_export.py ..\extracted\iso\TUCKER mods\hd_upscayl\hd --sans-decors --planches --sprites --upscayl
-
--planches [PATTERN](sheets) exports the PCX sheets intoSHEETS/. Default pattern:BUD_*,BUDL00_*,PEG_*,MAC_*,SCROBJ*,PANOBJS*,POINTER,CHARSET*,CHAR2,CLIO*,COGS*. -
--sprites [PATTERN]exports the SPR files intoSPRITES/(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.
- Upscayl puts a heavy load on the graphics card: on a large batch, the driver can reset (black
screens, and in the worst case a PC to restart), and the pictures computed at that moment come out
empty.
hd_export.pytherefore goes easy on it: one picture at a time, small tiles (128 px, then 64 on retry), a short pause between two pictures, low priority; a picture that comes out empty is retried, then removed from the pack (the game keeps the original), and the export stops if three pictures in a row fail. Close games and 3D applications during the export. - For a pack made before these checks,
--reparer(repair) redoes only the empty pictures, and also resumes an interrupted export:python tools/hd_export.py ..\extracted\iso\TUCKER mods\hd_upscayl\hd --reparer --upscayl(same model as the pack). - 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.
The action bar (verbs and inventory) and the game's options panel come from two 320×200 sheets:
PANEL1.PCX (verbs as text) and PANEL2.PCX (verbs as icons). The game copies bands of rows from
them under the background, onto the bottom 60 rows of the screen; the options panel lays several of
them on top of each other, from both sheets. With hd/PANEL1.png and hd/PANEL2.png (same framing as
the sheet, 1280×800 for ×4), the engine matches each screen row with its sheet row and draws the
matching HD bands; whatever the game draws on top (inventory objects, action text, cursor) stays the
game's own or goes through the HD sprites. hd_export.py exports them by default with the
backgrounds. Setting: "Barre d'actions HD" (HD action bar) in F12 (hd_panel).
- Listing the mods: subfolders of
mods/whose name starts with neither_nor., withmod.inifor the displayed name. A mod has HD backgrounds if it containshd/*.png. - Enabling or disabling a mod: write the list into
[mods] disabledinsettings.ini. The list is taken into account on the next launch. - HD pack on/off:
[display] hd_packkey, also adjustable in game (F10, or F12). Sub-settings:hd_decors(HD backgrounds),hd_sprites(HD characters and objects) andhd_panel(HD action bar), no effect ifhd_pack=0. - A mod has HD sprites if it contains
hd/SHEETS/*.pngorhd/SPRITES/*.png. - Options for a single session:
--mods FOLDER,--sans-mods,--sans-hd.
Page générée depuis docs/MODS.en.md.