Okage [PS2 Game] Script Files unpacking?

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Rintron
Posts: 13
Joined: Fri May 20, 2016 9:13 pm

Okage [PS2 Game] Script Files unpacking?

Post by Rintron »

https://www.dropbox.com/s/yj5tvqg42fozu ... D.PME?dl=0
Hello. The above file contains lotsa (not all of it) text from the game. There's couple more files like this one with story text.
The text is plainly visible in a text or hex editor. In fact, all of the script commands which govern the dialogue seem to be there.
However, no matter how I edit the text, be it with less characters or more, the game then either refuses to load any text, or loads it... simply wrong.
So I dunno if this belongs in this section or not, but I'm hoping that maybe someone can do a quickbms to unpack the text (bonus points if it can be reinserted with the new reimport2 function, since it would help with translating the game).
You guys are literally my last resort, after hours of trying, testing and the like.
In worst case, the game simply is ultra strict with how it handles its text and without actually reverse engineering its code and creating a whole separate tool, it might be impossible to make progress with text editing. But I hope I'm wrong.

Thank you for your time.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Okage [PS2 Game] Script Files unpacking?

Post by aluigi »

Try this script for quickbms, use the latest version if possible (just in case):

Code: Select all

idstring "KOME_RXUI_DATA  "
get STRINGS long
for i = 0 < STRINGS
    get ID long
    get SIZE long
    putarray 0 ID SIZE
next i
get NUM long
for i = 0 < NUM
    get DUMMY long
    get DUMMY long
next i
for i = 0 < STRINGS
    getarray SIZE 0 i
    slog "" -1 SIZE
next i
Rintron
Posts: 13
Joined: Fri May 20, 2016 9:13 pm

Re: Okage [PS2 Game] Script Files unpacking?

Post by Rintron »

Hello! Thank you! This works wonderfully with dumping the script. Shame that reimport2 will not accept this (sequential) and the original reimport will throw the usual errors if any of the text strings are too big(which frankly is a huge problem because in case of translating, longer strings are often a given).
Can something be done about this or is this the end of the road?
Thank you once more.
Delutto
Posts: 561
Joined: Tue Oct 13, 2015 1:26 pm

Re: Okage [PS2 Game] Script Files unpacking?

Post by Delutto »

OKAGE: Shadow King PME Tool
By Delutto
See Readme.txt for instructions.
OKAGE_Shadow_King_PME_Tool_By_Delutto.7z

Note: Not tested in game.

By the way, this is a subject for Game Localization.
Rintron
Posts: 13
Joined: Fri May 20, 2016 9:13 pm

Re: Okage [PS2 Game] Script Files unpacking?

Post by Rintron »

Thank you so much! And yeah, I apologize. I suppose this does belong in Game Localization.
Now I need to do thorough testing of how much can you stretch the script before it starts breaking. in game I mean.
Thank you once more!