XRPG file format
The XRPG file format is a streamlined version of the . RPG format, and is used explicitly for the OHRRPGCE FMF; it will not work in CUSTOM.EXE or GAME.EXE. This section of the Wiki is intended primarily as a memory cache for the poor developer working on the OHRRPGCE FMF, although it is certainly useful to developers trying to poke around with their game if, say, it crashes when ported to the phone.
An XRPG file is simply an unlumped RPG file, with a few lumps changed. The folder's name is the same as the game's short name (e.g. "WANDER"). One can turn any .RPG file into a folder in the XRPG specification by using the java utility "RPG2XRPG" distributed with the source code to the OHRRPGCEFMF.
- A note about passwords: No, RPG2XRPG won't ask for the game's password, since this would require developers to package their games specifically for the FMF. But fear not! The XRPG file format is so confounding that no-one in their right mind would attempt to hack your game this way. It's much easier to read the password from GEN.
Byte Order and Signage
Integers are stored in two bytes as follows: YY XX such that the integer one desires = 0x100*XX + YY. In fact, this code can be seen all over the place in the OHRRPGCE FMF's source, although the developers are well aware that left-shifting is faster.
Signed integers, when they appear, are stored in two's complement notation.
Most lumps are named in accordance with the traditional .RPG conventions (e.g., WANDER.???). Eventually, this may change. The OHRRPGCE FMF developers provide one guarentee:
No XRPG lump will be named in conflict with a traditional RPG lump.
In other words, (except for internal lumps) unlumping a game and then copy+pasting all lumps into an XRPG folder will not corrupt the XRPG when it is run.
Internal lumps are declared in the same fashion as traditional RPG internal lumps.
A Moot Point
If you are a general user of the OHRRPGCE FMF, you will never see an XRPG folder. The utility used to import games into the GAME_FMF.JAR file will ensure that no temporary files are left hanging around; all game files will be zipped into the JAR file.
But you're not reading this page if you're a general user, are you?
RPG 2 XRPG Mappings
WARNING: During alpha development of the OHRRPGCE FMF, the XRPG format is subject to change at any moment, and without warning or update. The format has already changed several times.
If a lump name does not appear in this table, it means it has not been dealt with yet, and still conforms to the .RPG specification (except that it is un-lumped, of course).
|RPG Lump||XRPG Location||Comments||Bytes saved+|
|HEADER.LMP||Easier to add new headers||~20|
+ In Wandering Hamster. Other games compress to different degrees; for instance, a game which duplicated NPCs by hand (in .N) would be much larger than one that just added entries in .L.
Goal: 500KB for WH
Typical .RPG Size: 4.08MB
WH .XRPG Size: 1.74MB Uncompressed
Remaining Overflow: 35%