Revelation Online

How to translate the files of a game
moehell
Posts: 3
Joined: Tue Nov 15, 2016 4:25 am

Revelation Online

Post by moehell »

Hello guys,

I am very new to this whole thing. been reading about the strength of this tool and trying to learn how to use it effectively.

I picked a game that is not getting much attention atm for what ever reason and trying to work from there. the game is Revelation Online chinese version.


after lots of reading, it seems like I need to unpack 2 files from that game and translate them and repack them, the files are entities.pg and gui.pg

I tried using quickbms script that was made for revelation online:
* 1gab 2gab Bag . 1gab / 2gab / bag / ytpg (script 0.2.1) . lzo1x . 0x62616731 . 0x62616732 . 0x70677479 . aes . revelation_online . 0x5a5a5a5a

I am getting an error and program does not go any further.

Image


I used hex editor and got this:
Image
ytgp, the script file says ytpg.

so I realize the script is outdated, my question is, how to make scripts myself so I dont have to bother people everytime the game is updated?
and yes I am only on the first step right now, unpacking the files. still did nothing for translation and repacking. learning slowly :p

Thank you for your help guys
moehell
Posts: 3
Joined: Tue Nov 15, 2016 4:25 am

Re: Revelation Online

Post by moehell »

this is the script that I am using atm, was made by Ekey a while back i believe. got it from google seraching

Code: Select all

# 1gab / 2gab / bag / ytpg (script 0.2.1)
#   Dragon Sword, JianLong, Revelation Online, TianYu
#   thanks Ekey :)
# script for QuickBMS http://quickbms.aluigi.org

quickbmsver "0.7.5"
comtype lzo1x

math VER = 0
get MAGIC long
get dwTotalFiles long
get dwTableOffset long
    math XOR_FILES = 0
    math XOR_OFFSET = 0
    math XOR1 = 0
    math XOR2 = 0
    math XOR3 = 0
if MAGIC == 0x62616731
    math XOR_FILES = 0xe7356461
    math XOR_OFFSET = 0xcb449442
    math XOR1 = 0x698346BD
    math XOR2 = 0x867389FE
    math XOR3 = 0xABEDC59D
elif MAGIC == 0x62616732
    math VER = 1
    math XOR_FILES = 0x27252421
    math XOR_OFFSET = 0x3b343432
    math XOR1 = 0x5953565D
    math XOR2 = 0x6663696E
    math XOR3 = 0x7B7D757D
elif MAGIC == 0x70677479    # ytpg
    math VER = 1
    math XOR_FILES = 0x20141203
    math XOR_OFFSET = 0x6F61A5EA
else
    print "Error: unsupported magic signature %MAGIC|x%"
    cleanexit
endif
math dwTotalFiles  ^ XOR_FILES
math dwTableOffset ^ XOR_OFFSET

if MAGIC == 0x70677479
    encryption aes "\x51\x04\xcf\x12\x17\x97\xcb\xce\xd6\x33\xa1\x90\xd4\xff\xf4\xbf"
    comtype revelation_online
endif
xmath TMP "dwTotalFiles * (4 * 6)"  // 6 or more elements for the future
get ARCHIVE_SIZE asize
math ARCHIVE_SIZE -= dwTableOffset
if TMP u> ARCHIVE_SIZE
    math TMP = ARCHIVE_SIZE
endif
log MEMORY_FILE dwTableOffset TMP
encryption "" ""

for i = 0 < dwTotalFiles
    savepos ENTRY_OFF MEMORY_FILE

    math ENTRY_OFF += dwTableOffset
    if MAGIC == 0x70677479
        math ENTRY_OFF = 0
    endif

    get NAME_CRC long MEMORY_FILE
    xmath NAME_CRC "NAME_CRC ^ ENTRY_OFF ^ XOR1"

    if VER >= 1
        get NAME_CRC2 long MEMORY_FILE  # ???
    endif

    get OFFSET long MEMORY_FILE
    xmath OFFSET "OFFSET ^ ENTRY_OFF ^ XOR2"

    get ZSIZE long MEMORY_FILE
    xmath ZSIZE "ZSIZE ^ ENTRY_OFF ^ XOR3"

    goto OFFSET
    math ZIP = 0
    if ZSIZE >= 0x20
        getdstring DUMMY 0x18
        if MAGIC == 0x70677479
            math ZIP = 0x5a5a5a5a
        else
            get ZIP long
        endif
        if ZIP == 0x5a5a5a5a
            get SIZE long
            if SIZE u> 0x01000000   # try to guess if the file is not compressed
                math ZIP = 0
            endif
        endif
    endif

    if ZIP == 0x5a5a5a5a
        savepos OFFSET
        clog "" OFFSET ZSIZE SIZE
    else
        log "" OFFSET ZSIZE
    endif
next i
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Revelation Online

Post by aluigi »

That one is my script http://aluigi.altervista.org/bms/1gab_2gab_bag.bms
You have to provide the archive.
moehell
Posts: 3
Joined: Tue Nov 15, 2016 4:25 am

Re: Revelation Online

Post by moehell »

but what if the archive keep changing everytime game update.

how did you come up with that script from the old archive? I want to learn how to do it more than just do it :p
williammc
Posts: 5
Joined: Thu Nov 24, 2016 11:33 am

Re: Revelation Online

Post by williammc »

aluigi wrote:That one is my script http://aluigi.altervista.org/bms/1gab_2gab_bag.bms
You have to provide the archive.



When I'm going to extract the .pg files from this error.