Skip to content

RQ MOD 2.64.0 Public Beta

Choose a tag to compare

@github-actions github-actions released this 22 Nov 12:56
· 13 commits to main since this release

Mod support for Rance Quest Magnum: mods in Lua, loaded at runtime. RQ MOD is a fork of xsystem4; see CREDITS.md.

Public beta: the tools that help make new content are not done yet.

Install: extract the zip into the game's folder and start xsystem4\xsystem4.exe. Put each mod's folder under mods. The install guide has the details, and where the logs are when something goes wrong.

Docs and the API reference: https://rq-modding.github.io/rq-modding-docs/ (the reference is also in the zip, offline: xsystem4\api.html; RQ-MOD-README.txt has the steps).

Community: RQ MOD on Discord, the official server (also the Discord icon by the version on the main menu); Rance & Alicesoft Western Community on Discord; Moru on X (Twitter).

In the zip

In the game's xsystem4 folder, beside the engine (xsystem4.exe):

  • Rance Browser 1.3.0 (rance-browser.exe): the game's pictures, Flash files, music, sounds, 3D models and names, each with the Lua line that changes it. Guide: Looking through the game's files.
  • RQ Scene Editor 1.0.1 (rq-scene-editor.exe): writes a mod's scene files and plays them in the game. Guide: Writing scenes in the scene editor.
  • rqmod-aff (rqmod-aff.exe): makes and checks a mod's Flash animations. Guide: Animations.
  • rqmod-ctl (rqmod-ctl.exe): drives the running game from a script; run alone, it lists its commands.

New in this release

RQ MOD 2.64.0 follows 2.62.2 and brings 2.63.0 with it (2.63.0 was not released on its own). Mods can now bring Flash animations of their own and put new pictures or colours on the game's 3D models, and three programs in the zip help make them.

The programs, and what is new in them

  • rqmod-aff (new, xsystem4\rqmod-aff.exe): a mod's Flash animations, on the command line.

    • build turns a folder of PNG frames (any drawing program's export) and WAV sounds into an .aff the game plays, at 1 to 30 frames a second, each sound started at its frame, and with --size on the stage of a game file it takes the place of.
    • check reads an .aff or a SWF and lists every problem the game would meet, each with its frame and what to do.
    • unpack writes a plain SWF that other viewers open, also straight from the game's archive, and list names the game's files as rq.image takes them.

    Guide: Animations.

  • Rance Browser 1.3.0 (xsystem4\rance-browser.exe; 1.0.1 in RQ MOD 2.62.2):

    • The Flash tab plays a file as the game plays it: its frames at the game's 30 a second, its actions, its sounds and its blend modes, and says whether the game would play it, each problem with its frame. It opens a mod's own .swf or .aff from disk (a button, or a file dropped on the window), with its rq.image.add_flash and rq.image.play_flash lines.
    • A new 3D models tab: the game's 647 models (the monsters and figures, the rooms, the fight backgrounds, the props) drawn by a copy of RQ MOD's own 3D renderer, so as the game draws them; a monster's motions as a fight plays them, on one of the game's fight backgrounds with its shadow and the fight's camera. Export the model as glTF (.glb) opens it in Blender with its textures, skeleton and motions.
    • A model's textures: listed as rq.image.textures lists them. Try a PNG... and Colours... show a picture, or colours by numbers, on the model as the engine would draw them (refused in the engine's own words where it would refuse them), with the rq.image.texture or rq.monster.model line to copy. Save the UV map... gives the shapes to paint over.

    Guides: Looking through the game's files, Learning 3D, Game models in Blender, A monster in new colours.

  • RQ Scene Editor 1.0.1 (xsystem4\rq-scene-editor.exe): the world map's place tag plays on Rance Browser's Flash player, at the game's 30 frames a second (it played slower, at the file's own 24) and drawn as the game draws it; Play from here's sounds come from Rance Browser's mixer. Guide: Writing scenes in the scene editor.

For mods

  • Flash animations of a mod's own (2.63.0): rq.image.add_flash puts an .aff or a SWF in the place of one of the game's (a skill's effect, a mark, a cut-in) or under a new name, checked first by the game's rules; rq.image.play_flash plays one on screen; rq.sprite.new{ flash = ... } makes a sprite that plays one, with its sounds. Guide: Animations.
  • New pictures and colours on the game's 3D models (2.64.0): rq.image.texture puts a PNG (a PNG per frame for an animated texture) or colours by numbers in HSL on one of the game's textures, wherever a model uses it; rq.image.textures lists a model's textures; rq.monster.model's textures gives a mod's monster model pictures of its own. Guide: A monster in new colours.
  • Every kind of PNG for rq.image.add, replace and flash_bitmap (16-bit, grey, palette, interlaced); a broken one is refused with the reason instead of closing the game.

For players

  • RQ MOD works in a game folder whose name has accents or Japanese characters (Coleção, ゲーム): there a mod's music did not play, the settings mods keep were not kept and screenshots were not saved, and in a folder whose name the system's code page cannot spell no mod loaded.
  • The game's battle effects, marks and cut-ins with soft edges look as the game's art draws them: their glows came out darker.
  • A Flash file, the game's or a mod's, can no longer close the game by being cut short or strange.
  • RQ MOD's programs use Windows' Universal C Runtime, which Windows 10 and 11 have (Windows 7 and 8.1 with Microsoft's update for it).
  • A mod with no id in its mod.json, in a folder named outside ASCII, now has its folder's name in UTF-8 as its id, so the settings it kept under the old one are not found (an id in mod.json keeps them).

The details of every change are below.

Changes since 2.62.2

2.64.0

A mod's pictures on the game's 3D models: a monster, a prop, a room or a fight background in new colours.

  • rq.image.texture(path, picture): a PNG from the mod's folder on one of the game's 3D textures, by its path in the game's archive (Data/PolyData/Chara/gokiburi/gokiburi.png), wherever a model uses it. A texture the game animates takes a list of PNGs, one per frame. Any kind of PNG, up to 4096 pixels a side. The game's alpha kind stays: on a texture the game draws solid the picture is drawn solid, and a picture without alpha on a texture with alpha takes the game's alpha, so the model's holes stay where they were. nil gives the game's own back. The last call on a path wins, whichever mod made it, and the log names each change. A change made at a mod's top level shows from the first load; one made while the game runs shows the next time the game loads the model and holds no copy of it (the next fight, the next area of a quest's map, the next visit to the girls' room; a fight background keeps its pictures while fights follow on it). Each load reads the file again, and a file gone or broken by then logs a warning once and the game's picture is drawn. The call checks the texture and the pictures as the game takes them and refuses with the reason; a call that raises changes nothing.
  • Colors by numbers: rq.image.texture(path, { hue = 200, saturation = 1.1, lightness = 0.9 }) changes the game's own picture, every frame, in HSL. Grey, white and black stay grey. Colour textures only.
  • rq.image.textures(model): a model's textures by its folder or a model number, each with its path, kind ("color", "alpha", "light", "normal", "specular"), whether it is its own alpha map, its frames, its size and alpha, and what a mod put there (mod, picture or colors, own, used).
  • rq.monster.model's textures: a mod's model with pictures of its own, by texture name, a list for frames or colors; "*" takes colors for every colour texture of the model (refused on a base with none). The game loads such a model apart from its base, so the base and the game's monsters on it keep their pictures. rq.monster.models() lists a model's textures.
  • A mod's model (with textures or not) plays its base's attack effects and waits for its hits as its base does: the game's effect table and hit timing know the game's model numbers only, and a mod's model got no effect and the default timing. The effect table is read for the base's number unless it has a row for the model's own.
  • Every kind of PNG for rq.image.add, replace and flash_bitmap: 16-bit, grey, palette, interlaced and with a transparent colour. They closed the game or were refused; a broken or cut-off PNG is refused with the reason instead of closing the game, and a picture over 16384 pixels a side is refused before it is read; a QNT, AJP or other game format is sized from its header first, so a broken one is refused too. A file under 32 bytes is refused as no picture.
  • Paths in UTF-8 everywhere: in a game folder named outside ASCII (Coleção), rq.ui.shot saved nothing, a mod's music did not play, rq.store kept nothing and the log mixed two encodings; in one whose name the system's code page cannot spell (ゲーム on a Western Windows), the loader found no mods folder. The loader's folders, rq.game_dir, rq.mods_dir, the log, every file a mod's calls read and Lua's io, os.remove, os.rename, require, dofile and loadfile now take UTF-8 (Lua's file calls go through Windows' wide calls, a change in Lua's own code); a name that is not UTF-8 is still read in the code page. A mod with no id in its mod.json takes its folder's name as its id: a folder named outside ASCII gives that id in UTF-8 now, so what such a mod kept under the old id (rq.store, rq.savedata, its settings) is not found; an id in mod.json keeps it. rq.mods_dir never ended in a backslash, as its doc said, and rqmod-ctl shot saves to any path, though its help said ASCII.
  • Rance Browser 1.3.0 in the package: the 3D models tab lists a model's textures as rq.image.textures does (their kinds, sizes, frames and alpha), saves each one's UV map to paint over, and tries a PNG (a PNG per frame) or colours by numbers on a texture, or colours on every colour texture as textures["*"], drawn as the engine draws a mod's picture and refused in the engine's words, with the rq.image.texture or rq.monster.model line; the 3D textures tab gives a picture's rq.image.texture line, and the export writes what is tried. On the command line: --texture, --colors, --view-only, --uv-map, --save-texture.
  • The Lab: model-textures (every call, the alpha kinds, frames, colours, two mods on one path, a change at a mod's top level, the effect table, every PNG drawn 1:1, the refusals) and texture-places (a fight background and a map's chest), with check-model-textures.py counting each monster's colours in the shots.

2.63.0

A mod's own Flash animations: made from pictures, checked, played in the game.

  • rqmod-aff (in the game's xsystem4 folder, beside rqmod-ctl): build FRAMES OUT.aff turns a folder of PNG frames (any program's export) and WAV sounds into an .aff the game plays: each frame cut to its visible pixels, a frame like the one before held, --fps from 1 to 30 with each frame held for whole game frames, --sound FILE.wav[@FRAME] started at a frame (a WAV the format cannot hold as it is, 48000 Hz or 24-bit or floats, is converted to 44100 Hz 16-bit; MP3 and Ogg are refused with how to export a WAV), --size WxH a stage larger than the frames with them in its middle, the file compressed and wrapped as the game's. check FILE reads an .aff or a SWF and lists every problem the game would meet, each with its frame, its tag and what to do, and what the file is (size, frames, length at 30 frames a second, pictures, sounds, blend modes); --game DIR NAME checks one of the game's (its size, for a file in its place), --all every one, --json for a program. unpack writes a plain SWF other viewers open, from a file or straight from the game's archive (--game DIR NAME, or --all), and list --game DIR names the game's files as rq.image takes them. Exit 0 when the game plays the file, 1 when it would not, 3 when it cannot be read.
  • rq.image.add_flash(key, path): an .aff or a SWF (plain or zlib) from the mod's folder, under a game file's name to replace it wherever the game plays it (a skill's effect, a mark, a cut-in) or under a new name. It is checked first by the same rules as rqmod-aff check, so a file the game would not play, or that would close it, is refused with the first problem and how many more, and nothing of it reaches the game. A file in the place of one of the game's keeps that file's size, since the game places it as its own (a battle effect's 400 by 400 stage over its target); the log says when the sizes differ. Up to 64 MB a file and 32 million pixels in its pictures, 256 MB for all. rq.image.remove_flash(key) takes it away; rq.image.flash_info(key) says what the game plays under a name (a mod's file or its own): its size, frames, length, pictures and sounds.
  • rq.image.play_flash(key, opts): a Flash file played once on screen, as the game plays its effects, at x, y, z or on a card, removed after its last frame; loop, from, to, on_end, and wait in a job from rq.spawn. The game's own files play too, by name.
  • rq.sprite.new{ flash = key }: a sprite that plays a Flash file, at 30 frames a second on the game's clock (fps and clock as for a GIF), with the file's actions (stop, play, gotoFrame), its sounds at their frames (sound = false keeps them quiet), its blend modes and colours under the sprite's. s:play, stop, frame and playing take it; get gives flash, frame, frames, fps, playing and sound. Up to 64 at once and 64 million pixels in all.
  • rq.image.flash_bitmap and flash_bitmaps take a mod's own file from add_flash under a name the game does not have; a game file a mod replaced still plays the mod's file with none of the game's bitmaps.
  • rq.sound.play_flash and flash_info take a mod's own file from add_flash, as the game plays it, and read a file's sounds again after a mod added, replaced or removed the file under its name (the sound read first stayed); a bare name and its full path are one file there.
  • The registry of mod animations holds 1024 files with the GIFs and the marks' pictures (it held 128).
  • The game's Flash pictures are read as the format stores them: a picture's colours with soft edges come multiplied by its alpha, in every one of the game's files, and the engine drew them as they were, so glows and soft edges came out darker than the game's art. Every battle effect, mark and cut-in with soft edges looks brighter now, as drawn. GIFs from add_gif and the marks' pictures are written the same way.
  • A Flash file's gotoFrame lands on its frame (it went one early), a jump forward goes on after it (it walked the same frames again without end), and a jump back, also to the frame just shown, plays from the start with the sounds of the frames before it quiet. Frames that jump to each other no longer stop the game (their jumps were followed without end): 64 jumps are followed in one frame, then the file goes on, as in Rance Browser's player. No file of the game jumps; a mod's may.
  • A Flash file can no longer close the game by being short or strange: a tag the engine does not know is freed (freeing it closed the game, even unplayed), and a tag or a header past the end of the file, an empty file, an .aff under 8 bytes, a compressed size over 512 MB and an action list with no end are no longer read past their end.
  • Rance Browser 1.2.0 in the package: the Flash tab plays a file as the engine plays it (its frames at the game's 30 a second, its actions, its sounds at their frames, its blend modes and colours), says whether the game would play it, each problem with its frame and its tag, and opens a .swf or .aff from disk (a button, a file dropped on the window, or its path on the command line) with the Lua lines rq.image.add_flash and rq.image.play_flash. Its pictures and their PNGs show soft edges as drawn, as the engine now does. --check plays every Flash file of the game to its end.
  • Its new 3D models tab draws the game's models (the monsters and figures, the rooms, the fight backgrounds and the props) with a copy of this engine's 3D renderer, so as the game draws them: a monster's motions as a fight plays them, at 30 frames a second, a monster on one of the game's fight backgrounds with its shadow and the fight's camera, a room's walk mesh, and the Lua lines rq.monster.model, rq.battle.start's background and rq.dungeon.place's look. Each model exports as a glTF file (.glb) for Blender, with its textures, skeleton, weights and motions, from the tab or with --export; the docs' guides "Learning 3D" and "Game models in Blender" open one. The Names tab shows each monster's model, and --check draws every model through its motions.
  • RQ Scene Editor 1.0.1 in the package: the world map's place tag plays on Rance Browser's Flash player, at the game's 30 frames a second (it played at the file's 24) and drawn as the engine draws it; Play from here's sounds come from Rance Browser's mixer.
  • Built with MSYS2's UCRT64: the exes use Windows' Universal C Runtime (ucrtbase.dll), which Windows 10 and 11 have (Windows 7 and 8.1 with Microsoft's update for it).

Every version: CHANGELOG.md