Repository navigation
RQ MOD 2.64.0 Public Beta
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.buildturns a folder of PNG frames (any drawing program's export) and WAV sounds into an.affthe game plays, at 1 to 30 frames a second, each sound started at its frame, and with--sizeon the stage of a game file it takes the place of.checkreads an.affor a SWF and lists every problem the game would meet, each with its frame and what to do.unpackwrites a plain SWF that other viewers open, also straight from the game's archive, andlistnames the game's files asrq.imagetakes 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
.swfor.afffrom disk (a button, or a file dropped on the window), with itsrq.image.add_flashandrq.image.play_flashlines. - 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.textureslists 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 therq.image.textureorrq.monster.modelline 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.
- 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
-
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_flashputs an.affor 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_flashplays 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.textureputs 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.textureslists a model's textures;rq.monster.model'stexturesgives a mod's monster model pictures of its own. Guide: A monster in new colours. - Every kind of PNG for
rq.image.add,replaceandflash_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
idin itsmod.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 (anidinmod.jsonkeeps 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,pictureorcolors,own,used).rq.monster.model'stextures: 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'stextures.- 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,replaceandflash_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.shotsaved nothing, a mod's music did not play,rq.storekept 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'sio,os.remove,os.rename,require,dofileandloadfilenow 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 noidin itsmod.jsontakes 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; anidinmod.jsonkeeps it.rq.mods_dirnever ended in a backslash, as its doc said, andrqmod-ctl shotsaves 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.texturesdoes (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 astextures["*"], drawn as the engine draws a mod's picture and refused in the engine's words, with therq.image.textureorrq.monster.modelline; the 3D textures tab gives a picture'srq.image.textureline, 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) andtexture-places(a fight background and a map's chest), withcheck-model-textures.pycounting 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'sxsystem4folder, besiderqmod-ctl):build FRAMES OUT.affturns a folder of PNG frames (any program's export) and WAV sounds into an.affthe game plays: each frame cut to its visible pixels, a frame like the one before held,--fpsfrom 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 WxHa stage larger than the frames with them in its middle, the file compressed and wrapped as the game's.check FILEreads an.affor 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 NAMEchecks one of the game's (its size, for a file in its place),--allevery one,--jsonfor a program.unpackwrites a plain SWF other viewers open, from a file or straight from the game's archive (--game DIR NAME, or--all), andlist --game DIRnames the game's files asrq.imagetakes 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.affor 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 asrqmod-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, atx,y,zor on a card, removed after its last frame;loop,from,to,on_end, andwaitin a job fromrq.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 (fpsandclockas for a GIF), with the file's actions (stop, play, gotoFrame), its sounds at their frames (sound = falsekeeps them quiet), its blend modes and colours under the sprite's.s:play,stop,frameandplayingtake it;getgivesflash,frame,frames,fps,playingandsound. Up to 64 at once and 64 million pixels in all.rq.image.flash_bitmapandflash_bitmapstake a mod's own file fromadd_flashunder 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_flashandflash_infotake a mod's own file fromadd_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_gifand the marks' pictures are written the same way. - A Flash file's
gotoFramelands 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
.affunder 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
.swfor.afffrom disk (a button, a file dropped on the window, or its path on the command line) with the Lua linesrq.image.add_flashandrq.image.play_flash. Its pictures and their PNGs show soft edges as drawn, as the engine now does.--checkplays 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'sbackgroundandrq.dungeon.place'slook. 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--checkdraws 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