User:Thane5/Sandbox
On this page we keep notes on topics about the development of Redguard Unity. This could be important information on how Redguard files work, feature discussions, roadmaps, patch notes etc...
Contents
ROB File notes[edit]
It looks to me like it starts with a directory of some sort with a 4 character lump identifier, 4 character size, and 4 character offset from start of file - this would be typical for a game of the era. BSAs feel pretty similar to this just looking at it at a glance.
I'm guessing this is some permutation of the old Daggerfall BSA format that is specific to level models? The header's a little weird though
If you were to look at it yourself, you'd see "OARC" and "OARD" magic strings, and they come alongside a pair of 32-bit nums each - the second of these nums appears to be a pointer to data within the file, but there's very big gaps between them and I'm not sure what the rest of the data is supposed to be exactly
[Diema to Thane5 via Discord, 23.3.2021]
Simply forking DFU's tools won't help if we do not understand the differences with BSA
DFU would be mostly helpful as a reference for an API interfaced with Unity3D, otherwise the redguard file converter by DaveH is more helpful as a reference
[Shalval on the Team Discord channel, 30.3.2021]
I have just noticed that starting from byte #100, an ROB file looks very similar to a 3D file's header. For example, bytes 100-103 say "v5.0" (In contrast, Redguard's 3D and 3DC files use "v4.0" as the first 4 bytes). For Belltowr.rob, the next few bytes, if it's the same structure as a 3D, has a PointCount of 17, PlaneCount of 18 and a Radius of 2610.
[XJDHDR on the secondary Discord channel, 7.4.2021]
Discord chat, 5.6.2021
- ROB files are likely data archives. When you delete one from the game files, then start it, you'll get an error saying that an "archive file" is missing. The ROB files are essentially a collection of .3D files with some extra stuff around it.
- Maxnosense managed to extract the .3D data of Silver1.ROB and convert it into an FBX using Reorx converter
- The transform data, or references where these objects are placed within a scene, are likely in one of the files in the /maps folder, since many of the names are shared with the ROB files. The folder contains RGM, TSG and PVO files. Hard to say what each ending stands for at first glance.
Getting the CD data from the GOG version of Redguard[edit]
There exist two versions of Redguard that are broadly available: The Original on CD, and the GOG version. The CD version stores music and cinematics on the play disk (aka disk 2). The GOG version stores that data in a disk image in the game's folder.
Ideally we are able to support both versions. While it would be easy to access the CD data from the original (once it's in the Cd drive), the disk image is seemingly not as easy to access, and possibly has to be converted by the player after the installation process. Obviously Dosbox has some smart method to read from the disk image directly, otherwise the GOG version wouldnt work, but we dont know how it does that yet.
Right now, the best way to open the disk image is this process:
1. Install 7-zip, and a plugin that lets 7-zip open disk images: https://www.tc4shell.com/en/7zip/iso7z/
2. go to Redguard's directory, locate the game.ins file (it's just a renamed .cue file) and make sure that game.gog is in the same folder too (this is the .bin disk image).
3. Right-click on the game.ins file, and go to 7-zip -> Open.
Then you can see the files directly through 7zip and copy them to a new folder for easy access.
Texture Files Notes[edit]
- looks like world.ini specifies palette files based on world maps
Playing Smacker videos[edit]
Redguard's cinematics are saved on the Play disk as smacker (.smk) video files. To decode them, we could use something like this: https://sourceforge.net/projects/libsmacker/
We've also been thinking about remaking the cinematics in "HD" (same visual style, just with more pixels). Remaking the audio of those would be too hard (need voice actors and composers for that), but we also can't just copy the audio from the original cinematics and add them to the new HD video files. A workaround would be to only play the audio from the original files on top of our remade cinematics.
List of magic numbers and descriptions from EXE[edit]
- note : this is the order they were in in the exe. They appear to be sorted by file type. "end of file marker" had no magic number attached but it may be a secondary use for ENDF
BMHD : header chunk
GXSA : GX standard chunk
GXSI : GX icon chunk
GXSF : GX font chunk
GXSE : GX extended chunk
BPAL : palette chunk
BDLT : delta chunk
BBMP : bitmap data chunk
EXHD : extended information chunk
FORM : form data chunk
ENDF : form end chunk
: end of file marker
FPAL : font file palette
FBMP : font file data
FNHD : font file header
FXHD : sound FX file header
FXDT : sound FX data
BACK : backup data
RDAT : repeat conversion data
INFO : information chunk
MPHD : map header chunk
MPDT : map data chunk
MPAT : map block attributes chunk
MPED : map edit settings chunk
MPMK : map marker chunk
AIHD : soup386 ai header chunk
AIAT : soup386 ai attribute chunk
AIHK : soup386 ai hook chunk
AISC : soup386 ai script chunk
AIAN : soup386 ai animation chunk
AILC : soup386 ai location chunk
AIEX : soup386 ai extra data chunk
SVGM : save game header chunk
SVGF : save game global flags chunk
SVWD : save game world chunk
SVOB : save game object chunk
SVPL : save game player chunk
Can't we just directly copy reverse engineered code from Redguard?[edit]
Yes, we could, but not without possibly getting into trouble. enderdrag64 asked Cartogriffi (from the Bethesda Community team) on Discord, and apparently it would not be possible to get permission to do that without involving their legal department (And that would be " not a bear you want to poke").
Still, it looks like there are two safe methods to proceed that, while not as effective, would allow us to do some shortcuts by using the original exe
- "Clean room design" reverse engineering, where you need two teams: one analyses the original code, then tells the other what it does and roughly how to implement it
- we could also use RGFX.exe as a sort of archive, and simply access some data that is in there directly