I hope you all are doing well and staying safe.
I am in the process of trying to understand how SuperScape stored data in their .VCA/LCA format, so I can extract the original SHAP and PAL data from the Lego Creator Knights Kingdom game using Python and Noesis.
Actions I have done so far:
- Downloaded an older version of the program (5.60 VRT) via archive . org
- Installed onto a Win 7 32-Bit VM
- Went through the documentation to glean any insight which they used for reference material
- Used the default objects in the program and edited via Shape Editor then compared differences in Hex Editor
- Consulted other forums for insight
- Also consulted ChatGPT/Copilot/Bing Chat (which have been surprisingly useful)
- Used APITrace which gleaned some results, but nothing related to model rendering.
From here I was able to better understand their structure, and how they store the data in the files, but not necessarily how they retrieve it.
SuperScape uses three things for Lego KK:
- LegoKK.exe (executable which launches main program)
- SSWATCH.exe (plugin used for interacting with ActiveX-IE)
- SS3DLEGO2000.EXE (application which views and interacts with 3D models/actions)
If you run ProcessExplorer by Microsoft, you can see that LegoKK.exe explicitly calls SSWATCH.exe with some plugin number
"C:\Program Files (x86)\LEGO Media\Constructive\LEGO Creator Knights Kingdom\3D Control/SSWatch.exe" 263466
And SSWATCH.exe calls lego3d2000.exe with a dynamic plugin number as well as parameters
"C:\Program Files (x86)\LEGO Media\Constructive\LEGO Creator Knights Kingdom\3D Control\SS3DLEGO2000.EXE" /plugin:5769736 /BackgroundPalette /HideFrame /HideMovementBar /idle C:\Users\amoebame\AppData\Local\Temp\vis2.xvr
Each .LCA file contains a minimum of four (4) files within it:
- .VRT (holds the file headers: NOTNAMED.SHP, NOTNAMED.PAL, NOTNAMED.WLD, etc.)
- .SHP (Shape file contains points/lines/facets/associated colors/animated colors/etc.)
- .PAL (Palette file contains colors)
- .WLD (Unsure how this exactly fits in, but probably contains animation data)
- It can also contain .SPRT, which I believe holds animation commands. (example below)
Taking a look at the differences in target vs source I could tell how the data was being stored.
Using reference material, I was able to understand the context of the SHAP files and the calculations used.
Which can be seen more clearly in this example below.
I had asked around, and was graciously given help by others as a stepping stone to further glean from. They had noticed that the offset from .VRT (10C in this case)
Could be used to subtract from where the SHAP/PAL/WRLD are located to find the HEX values which is is after the NONAMED.SHP/PAL/WLD. (0144, 05AD, 11B7).
I am not sure if anyone has seen/experienced any file type similar to this before. But my major problem really is trying to make sense of the data, how the script knows what is a point versus line, and what type of point/etc. it is. I am guessing this information is stored at the end of the SHP file somehow.
I noticed that after .VRT, there are exactly 10 bytes between text which as stated earlier, holds address data.
I also noticed the pattern ...'...'...' correlates to &... TEXT . below which if you look at the script, is what pulls the title for each group and object name.
If anyone has any insight as to where I can go from here, I would be extremely grateful. I have tried alternative means to extract the model information, but does not accurately retrieve 3D information, just DirectDraws onto a 2D plane. From what I had asked around, at the time was an efficient way to do optimize the code (though 3D data still exists) for game performance.
Thank you in advance!
I have started using Ghidra/x32dbg for dynamic and static analysis. The ss3dlego2000.exe imports functions from dlls and activex controllers (.ocx/.vis/.dev). I am currently looking into DLL Injection and seeing if that will bear any fruit. Because the program uses ActiveX, and has way too many imported files, trying to make sense of what goes where is extremely mind-numbing. But my goal is to get this obtained by end of year. If you all have any resources which I could use for starting off small with print statements, would kindly appreciate it!