I wanted to take a look into cinematics.
For reverse engineering, it's best to start with a piece that's small and (supposedly) easy to understand.
I looked a bit into INCIDENT.S00, especially into INCIDENT.S00-ContainerBlock078-ContainerGroup-
PlaneGroup-ScriptGroup-OffsetChunk.bin
ContainerBlock 078 deals with the short cutscene right after clicking "New Game" up to destroying the Tiger's Claw.
Prince Thrakath talking to the Emperor is not part of this anymore.
So, what we see in this cinematic is
- A background of stars
- The words "ORIGIN Presents..."
- "A Chris Roberts game"
- "Directed by Stephen Beeman"
This is far from complete, but I just wanted to keep track of what I'm doing. And everyone loves updates, right?
The content of the .bin file mentioned above is as follows
Code:
02 00 FF FF FF FF 04 00 00 00 79 00 08 79 00 09 79 00 0A 23 0E FE FF
All the relevant XML is shown below.
I found out the following about the .bin file:
- I think the 02 00 at the beginning refers to "backdrop" and "bigscreen" of PlaneGroup/ScriptGroup
- The FF FF FF FF seems to be some kind of placeholder. I don't think it's actually interpreted.
- 04 00 00 00 might refer to 4 blocks that are following. These 4 blocks are as follows
- 79 00 08
- 79 00 09
- 79 00 0A
- 23 0E FE FF
The 08, 09 and 0A at the end refer to SpriteGroup/ScriptGroup SymbolItems and describe the index of the Sprite.
If you replace the 08 with 10 (which is actually 16, as it's all hex numbers here), you wouldn't see the background of stars scrolling up, but the sprite holding the word "game" from "A game by Chris Roberts".
So, 08 is tigerscreen, 09 is starfield, and 0A is starfield2
starfield and
starfield2 actually refer to the same image (the second image stored in field.v00).
I have no idea, what 23 0E FE FF mean.
Changing 79 to 78 or 80 crashed the game
Changing the 23 0E to anything else crashed the game.
I think the FE FF is just some kind of terminator to end the datablock
I also checked INCIDENT.S00-ContainerBlock078-ContainerGroup-
SpriteGroup-ScriptGroup-OffsetChunk.bin
The 16 00 at the beginning seems to be an offset to when data actually starts (FF FF x 16)
After that, we have numbers like 38 00 00 00 3F 00 00 00 etc. 14 of them in total.
14 matches the SpriteGroup/ScriptGroup SymbolItems, when ignoring the __slot ones.
What could these 38, 3F, 45 mean?
Well, I think they are lengths for the datablocks that are following these 14 values.
I'm pretty sure they match the list of sprites again.
The blocks are:
Code:
24 00 46 25 90 01 47 23 0E FE FF #tigerscreen
24 00 46 24 00 47 23 0E FE FF #starfield
24 00 46 25 C8 00 47 23 0E FE FF #starfield2
24 3C 46 24 40 47 9E 00 78 01 00 00 03 23 0E FE FF #origin
25 8C 00 46 24 40 47 9E 00 78 01 01 00 03 23 0E FE FF #presents
24 32 46 24 46 47 9E 00 78 01 02 00 03 23 0E FE FF #asprite
24 47 46 24 46 47 9E 00 78 01 03 00 03 23 0E FE FF #chris
25 83 00 46 24 46 47 9E 00 78 01 04 00 03 23 0E FE FF #roberts
25 DC 00 46 24 49 47 9E 00 78 01 05 00 03 23 0E FE FF #game
24 5A 46 24 37 47 9E 00 78 01 06 00 03 23 0E FE FF #directed
25 BE 00 46 24 3A 47 9E 00 78 01 07 00 03 23 0E FE FF #by
24 46 46 24 4F 47 9E 00 78 01 08 00 03 23 0E FE FF #stephen
25 A0 00 46 24 4C 47 9E 00 78 01 09 00 03 23 0E FE FF #beeman
24 14 46 24 03 47 9E 00 78 01 00 00 02 23 0E FE FF #logosprite
To take one example, I was pretty sure I figured out some more details:
Code:
24 32 46 24 46 47 9E 00 78 01 02 00 03 23 0E FE FF #asprite
32 could be the x-position of the sprite. It matches my measures from screenshots.
Changing that value actually moved the sprite, but just to x-pos=0, not to the position I specified... (see two screenshots attached to see the result)
47 could be the y-position, but just changing it didn't show the expected results.
These x and y values match the coordinates of all 14 sprites, so I'm pretty convinced it's something related to that.
23 0E FE FF is at the end of each line, just like in the other .bin file I described before.
In general: FileEntryItem-Identifier in FileEntryItem always refers to the index of FileEntryNameItems in FileChunk.Names.
So, Block="0" Identifier="0" refers to the first entry in tiger.v00 (which one that is can be read in tiger.v00.xml when using xmlunpack on it)
As I said, not too much to see here, but in case anyone else is looking into this, I wanted to share my findings.
Things still missing:
- investigating SequenceGroup
- investigating SceneGroup
They probably keep information about timings, actual actions (like scroll up, fade-in, display, remove, ...)
@UnnamedCharacter let me know if you prefer things like these to be in a separate thread.
Code:
<ContainerBlock.Chunks>
<ContainerGroup>
<TextGroup>
<SymbolChunk>
<SymbolChunk.Items>
<SymbolItem Text="TCS Tiger's Claw.
On attack approach to K'Tithrak Mang,
Kilrathi Sector HQ." />
</SymbolChunk.Items>
</SymbolChunk>
</TextGroup>
<ShapeGroup>
<FileChunk>
<FileChunk.Entries>
<FileEntryItem Block="0" Identifier="0" />
<FileEntryItem Block="1" Identifier="1" />
<FileEntryItem Block="0" Identifier="2" />
<FileEntryItem Block="0" Identifier="3" />
</FileChunk.Entries>
<FileChunk.Names>
<FileEntryNameItem Name="tiger.v00" />
<FileEntryNameItem Name="field.v00" />
<FileEntryNameItem Name="logo.v00" />
<FileEntryNameItem Name="titles.v00" />
</FileChunk.Names>
</FileChunk>
</ShapeGroup>
<FilmGroup>
<FileChunk>
<FileChunk.Entries>
<FileEntryItem Block="48" Identifier="0" />
</FileChunk.Entries>
<FileChunk.Names>
<FileEntryNameItem Name="series.s00" />
</FileChunk.Names>
</FileChunk>
</FilmGroup>
<SpriteGroup>
<ScriptGroup>
<OffsetChunk file="INCIDENT.S00-ContainerBlock078-ContainerGroup-SpriteGroup-ScriptGroup-OffsetChunk.bin" />
<SymbolChunk>
<SymbolChunk.Items>
<SymbolItem Text="__slot0" />
<SymbolItem Text="__slot1" />
<SymbolItem Text="__slot2" />
<SymbolItem Text="__slot3" />
<SymbolItem Text="__slot4" />
<SymbolItem Text="__slot5" />
<SymbolItem Text="__slot6" />
<SymbolItem Text="__slot7" />
<SymbolItem Text="tigerscreen" />
<SymbolItem Text="starfield" />
<SymbolItem Text="starfield2" />
<SymbolItem Text="origin" />
<SymbolItem Text="presents" />
<SymbolItem Text="asprite" />
<SymbolItem Text="chris" />
<SymbolItem Text="roberts" />
<SymbolItem Text="game" />
<SymbolItem Text="directed" />
<SymbolItem Text="by" />
<SymbolItem Text="stephen" />
<SymbolItem Text="beeman" />
<SymbolItem Text="logosprite" />
</SymbolChunk.Items>
</SymbolChunk>
</ScriptGroup>
</SpriteGroup>
<PlaneGroup>
<ScriptGroup>
<OffsetChunk file="INCIDENT.S00-ContainerBlock078-ContainerGroup-PlaneGroup-ScriptGroup-OffsetChunk.bin" />
<SymbolChunk>
<SymbolChunk.Items>
<SymbolItem Text="backdrop" />
<SymbolItem Text="bigscreen" />
</SymbolChunk.Items>
</SymbolChunk>
</ScriptGroup>
</PlaneGroup>
<SequenceGroup>
<ScriptGroup>
<OffsetChunk file="INCIDENT.S00-ContainerBlock078-ContainerGroup-SequenceGroup-ScriptGroup-OffsetChunk.bin" />
<SymbolChunk>
<SymbolChunk.Items>
<SymbolItem Text="removeall" />
<SymbolItem Text="showslot" />
<SymbolItem Text="hideslot" />
<SymbolItem Text="delmediumslot" />
<SymbolItem Text="setupmediumslot" />
<SymbolItem Text="mediumshot" />
<SymbolItem Text="setupuniform" />
<SymbolItem Text="setupbackdrop" />
<SymbolItem Text="setupbackground" />
<SymbolItem Text="initshardrun" />
<SymbolItem Text="talking" />
<SymbolItem Text="settalker" />
<SymbolItem Text="vidit" />
<SymbolItem Text="printit" />
<SymbolItem Text="closeup" />
<SymbolItem Text="restoredefaultfont" />
<SymbolItem Text="removeperson" />
<SymbolItem Text="addplanet" />
<SymbolItem Text="removeplanet" />
<SymbolItem Text="narrating" />
<SymbolItem Text="doshow" />
<SymbolItem Text="sidewaysthrusters" />
<SymbolItem Text="__flicker__" />
</SymbolChunk.Items>
</SymbolChunk>
</ScriptGroup>
</SequenceGroup>
<SceneGroup>
<ScriptGroup>
<OffsetChunk file="INCIDENT.S00-ContainerBlock078-ContainerGroup-SceneGroup-ScriptGroup-OffsetChunk.bin" />
<SymbolChunk>
<SymbolChunk.Items>
<SymbolItem Text="doit" />
</SymbolChunk.Items>
</SymbolChunk>
</ScriptGroup>
</SceneGroup>
</ContainerGroup>
</ContainerBlock.Chunks>
</ContainerBlock>