0.4 - Feybreak compatibility
I haven't had the time to work on this project, so just documenting issues with raw data parsing:
New issues:
- https://github.com/cheahjs/palworld-save-tools/issues/192
- Group RawData has new fields
- Unknown Work parsing
Previous updates:
- https://github.com/cheahjs/palworld-save-tools/issues/178
- https://github.com/cheahjs/palworld-save-tools/issues/187
Additional new issue: New worldSaveData object added when random Pal mode is enabled, which results in this exception
File "D:\project\palworld-save-tools\palworld_save_tools\gvas.py", line 131, in read
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 386, in properties_until_end
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 399, in property
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 534, in struct
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 561, in struct_value
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 386, in properties_until_end
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 399, in property
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 534, in struct
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 561, in struct_value
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 386, in properties_until_end
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 475, in property
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 575, in array_property
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 561, in struct_value
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 386, in properties_until_end
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 495, in property
File "D:\project\palworld-save-tools\palworld_save_tools\archive.py", line 528, in prop_value
Exception: Unknown property value type: UInt32Property (.worldSaveData.RandomizerSaveData.RegionRandomizeSpawnerHashList.RegionRandomizeSpawnerHashList.RemapRowNameHashList.Key)
I was able to resolve this error by updating the prop_value methods in FArchiveReader to
def prop_value(self, type_name: str, struct_type_name: str, path: str):
if type_name == "StructProperty":
return self.struct_value(struct_type_name, path)
elif type_name == "EnumProperty":
return self.fstring()
elif type_name == "NameProperty":
return self.fstring()
elif type_name == "IntProperty":
return self.i32()
elif type_name == "BoolProperty":
return self.bool()
elif type_name == "UInt32Property":
return self.u32()
else:
raise Exception(f"Unknown property value type: {type_name} ({path})")
and FArchiveWriter to
def prop_value(self, type_name: str, struct_type_name: str, value):
if type_name == "StructProperty":
self.struct_value(struct_type_name, value)
elif type_name == "EnumProperty":
self.fstring(value)
elif type_name == "NameProperty":
self.fstring(value)
elif type_name == "IntProperty":
self.i32(value)
elif type_name == "BoolProperty":
self.bool(value)
elif type_name == "UInt32Property":
self.u32(value)
else:
raise Exception(f"Unknown property value type: {type_name}")
I ran into an exception in group.py -> 'decode_bytes()'. For group_type == "EPalGroupType::Guild", the player count read as a large number, the hexadecimal of that number is the same as the UID of the admin player.
I was able to workaround the exception be making the following change on line 63 of rawdata/group.py:
if group_type == "EPalGroupType::Guild":
guild = {
"admin_player_uid": reader.guid(),
"unknown_guid": reader.guid(), # Line 63
"players": [],
}
player_count = reader.i32()
What @topblast mentioned got it working on the PalWorld 0.4.12. Much thanks.
Had an issue that I fixed when converting back:
I edited line 251 from writer.write(bytes(p["transform"]["raw_data"])) to print(type(p["transform"]["raw_data"]), p["transform"]["raw_data"])