LazyDuchess / OpenTS2

Open source re-implementation of The Sims 2 in Unity
Mozilla Public License 2.0
248 stars 19 forks source link

Garbled text in xml in some dbpf files #20

Closed berylliumquestion closed 1 year ago

berylliumquestion commented 1 year ago

I think there are xml files in package files because of the presence of xml tags, however trying to understand it is a bit of challenge because of all this garbage in it. I thought maybe it might be compressed, but then if it were I shouldn't be able to tell it's xml at all. It reminds me of lua files extracted from hpks dlc in Tropico 4, but I don't think you can compile xml?

Here's an example of what I'm talking about: !��û�ê<?xml version="1.0"?>

<cGZPropertySetString&#7"ä <!--editor paramet� --çAnyUint32 key="id" type="0xeb61eE4fâ0x718c6e9a</0?v?àfoldCerã0b8bea18">

EP4Rel™atàship Is :‘�IánodeText�Kæ10 Simultaneous Pet Best FriŽÀ[end éprimaryIcon: used in UI when there is a 4s l�'à sho“)wn‡�O’2áfeedcf202�Œ6se›@Žda Štwoás, e.g.,£ if ðžs�¯�)‰ '“�¬‰�o’�®�0�®A4GBB E ¼á Flag toFG d#+min ‡fàWant$2áuld be lÖoad by(¯Aƒa“�¡bgM¸V@¤s‘K64(ç@þ!:á15 bit GvUIDàat p-o '%ÚoL^A-sáresource”A0.T�‡ŽÁ&515

‹¾ácheckTreB¿e’ƒ; /@0•€5baá>

CT - HaBžnd+FœEásimArrayª�‰àleve@‚làPowe‘@srˆ;ˆÀlcoràc264c¶712U_2 .‘�=áinfluenc‘�AŽ�=@�àNodeƒE ˆ„Ùieˆ�ÓàobjeRctT�ØàNoneœK�uàeger­�B‰�ÜBáMultipli‰)

<&‘"Ž�ˆðOdQ¥�Œ +c¤Eve‘,àBoolbean@�àntRec)qui»câcba908e1"> Fadls:’�Jádeprecat‡FZeš�D†× </ý>+

LazyDuchess commented 1 year ago

Are you using SimPE to open packages? The game does use XMLs quite a bit, yes, and resources are often compressed, though both SimPE and OpenTS2 should be able to load and decompress them correctly.

berylliumquestion commented 1 year ago

I do use SimPE, but lately it's been acting a bit janky for me, especially the newest version. As for the compression part, is it some kind of in-house EAxis compression style? I'd have thought compression would have made it look totally meaningless.

LazyDuchess commented 1 year ago

What's the file this resource is in, and its key? (instance id, group id, etc.)

You can find the DBPF compression and decompression code here: DBPFCompression.cs, and on the Sims Wiki here. It doesn't make files completely unreadable, you can kinda make out what they're about. It looks like the first few bytes might be the header of the compression?