OpenNaja / cobra-tools

A suite of GUI tools for extracting and modifying OVL and OVS archives, as well as editing the associated in-house file formats. Also includes a model plugin for Blender. For downloads, guides, and FAQs visit:
https://opennaja.github.io/cobra-tools/
GNU General Public License v3.0
98 stars 28 forks source link

Work on .bin/.isl/.blueprint, aternatively saved files from JWE1/JWE2/PZ/[PC?] #270

Open ilodev opened 1 year ago

ilodev commented 1 year ago

Going to start working in the modules for parsing these files, which are strictly related to the landscape prefab that loads the corresponding voxelskirt.

So far I have a working template that parses data for the main game files (JWE1/2 and PZ), but..

So I'll guess for now I'll ignore all the containers and work only on the CobraSav struct, we will add wrappers later on

ilodev commented 1 year ago

first course of action is their own encoding system for data. They use a custom varint that has a special case 0xFX 0xF0 is a followed by 4 byte int 0xF3 is a followed stringz haven't found yet 0xF1 and 0xF2 but chances are one of them is float values 0x0X to 0xBX is byte sized 0xCX is 2 bytes sized 0xDX is 3 bytes sized 0xEX is 4 byte sized 0xF0 is 5 bytes sized I'll implement this first, it is needed to process the entire .bin/.isl file

ilodev commented 1 year ago

I made this 010 editor template to process all known saved files, including blueprints, PZ park data, JWE1/2 ISL data, and PZ/JWE12 saved data. CobraSav.bt.txt

This is a PZ saved park data image

This is a JWE1 saved island data image

a Planet Zoo blueprint image

and a Planet Coaster saved park data image

ilodev commented 1 year ago

I've been doing some reversing on the serialized Lua tables:

5 Float [4 bytes] 6 Int64 [8 bytes] 7 Table [4 bytes count] 8 String [2 bytes length] [ascii] 9 Int32 [4 bytes] (usually referenced to the strings table) 0a Byte/Bool [1 byte] 0b Short [2 bytes] 0c vector2 (unconfirmed)[4b float][4b float] 0d vector3 [4b float][4b float][4b float]

ACSE 00 00 00 01 09 00 00 00 02 07 00 00 00 00

00000001 (element count) [ 09 00000002 > points to the name in the strings table = tComponents 07 00000000 > empty table. ] ACSE = { tComponents = {} }

for more references https://discord.com/channels/680909673607463131/811666483385860117/1037021568011870278