Playrix games (Township, Gardenscapes, Homescapes, Farmscapes etc.) - xml convert

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
SEBIX327
Posts: 18
Joined: Fri Jan 29, 2021 4:24 pm

Playrix games (Township, Gardenscapes, Homescapes, Farmscapes etc.) - xml convert

Post by SEBIX327 »

Hello!
Please help. In the games from Playrix, some game files are in .xml format, but instead of the default xml it is encoded as a PLXE string. I include the Sounds.xml file (which is from Township) and it's hard-coded.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Playrix games (Township, Gardenscapes, Homescapes, Farmscapes etc.) - xml convert

Post by Ekey »

Just compressed by ZSTD.

Code: Select all

get NAME basename
get EXT extension
string NAME += "_unpacked."
string NAME += EXT

get ZSIZE asize
math ZSIZE -= 12

comtype zstd
idstring "PLXE"
get FLAGS long
get SIZE long
savepos OFFSET
clog NAME OFFSET ZSIZE SIZE
SEBIX327
Posts: 18
Joined: Fri Jan 29, 2021 4:24 pm

Re: Playrix games (Township, Gardenscapes, Homescapes, Farmscapes etc.) - xml convert

Post by SEBIX327 »

Ekey wrote:Just compressed by ZSTD.

Code: Select all

get NAME basename
get EXT extension
string NAME += "_unpacked."
string NAME += EXT

get ZSIZE asize
math ZSIZE -= 12

comtype zstd
idstring "PLXE"
get FLAGS long
get SIZE long
savepos OFFSET
clog NAME OFFSET ZSIZE SIZE



Thanks, it works. Now how do I convert it back to PLXE?
And do you have any idea what to do with it?
viewtopic.php?f=7&t=16963
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Playrix games (Township, Gardenscapes, Homescapes, Farmscapes etc.) - xml convert

Post by Ekey »

SEBIX327 wrote:Thanks, it works. Now how do I convert it back to PLXE?


Code: Select all

comtype zstd_compress

get SIZE asize
clog MEMORY_FILE2 0 SIZE SIZE
get ZSIZE asize MEMORY_FILE2

log MEMORY_FILE 0 0
putdstring "PLXE" 4 MEMORY_FILE
set FLAGS long "0x40004"
put FLAGS long MEMORY_FILE
put SIZE long MEMORY_FILE

get NAME basename
get EXT extension
string NAME += "_packed."
string NAME += EXT

log NAME 0 12 MEMORY_FILE
append
log NAME 0 ZSIZE MEMORY_FILE2
append


SEBIX327 wrote:And do you have any idea what to do with it?
viewtopic.php?f=7&t=16963


Nah.
SEBIX327
Posts: 18
Joined: Fri Jan 29, 2021 4:24 pm

Re: Playrix games (Township, Gardenscapes, Homescapes, Farmscapes etc.) - xml convert

Post by SEBIX327 »

Ekey wrote:
SEBIX327 wrote:Thanks, it works. Now how do I convert it back to PLXE?


Code: Select all

comtype zstd_compress

get SIZE asize
clog MEMORY_FILE2 0 SIZE SIZE
get ZSIZE asize MEMORY_FILE2

log MEMORY_FILE 0 0
putdstring "PLXE" 4 MEMORY_FILE
set FLAGS long "0x40004"
put FLAGS long MEMORY_FILE
put SIZE long MEMORY_FILE

get NAME basename
get EXT extension
string NAME += "_packed."
string NAME += EXT

log NAME 0 12 MEMORY_FILE
append
log NAME 0 ZSIZE MEMORY_FILE2
append





There is a problem. With Packages.xml and Events.xml. Something like this is displayed.

https://drive.google.com/drive/folders/ ... sp=sharing