Eastward .g file

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
canboy
Posts: 42
Joined: Fri Jun 26, 2020 3:24 pm

Eastward .g file

Post by canboy »

Eastward game war release today and i found out that it has many .g archive file
could anyone help me unpack it?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Eastward .g file

Post by aluigi »

Code: Select all

# Eastwar G

comtype zstd
get DUMMY long  # 0x6a37
get FILES long
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get ZIP long    # 2
    get SIZE long
    get ZSIZE long
    if ZIP != 2
        print "Error: unsupported ZIP %ZIP%, contact me"
        cleanexit
    endif
    clog NAME OFFSET ZSIZE SIZE
next i
canboy
Posts: 42
Joined: Fri Jun 26, 2020 3:24 pm

Re: Eastward .g file

Post by canboy »

aluigi wrote:

Code: Select all

# Eastwar G

comtype zstd
get DUMMY long  # 0x6a37
get FILES long
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get ZIP long    # 2
    get SIZE long
    get ZSIZE long
    if ZIP != 2
        print "Error: unsupported ZIP %ZIP%, contact me"
        cleanexit
    endif
    clog NAME OFFSET ZSIZE SIZE
next i

i open this file and it show up like this

Code: Select all

  offset   filesize   filename
--------------------------------------
Error: unsupported ZIP 0, contact me

- 0 files found in 0 seconds
  coverage file 0     0%   57         89385272   . offset 00000039

Can u fix it?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Eastward .g file

Post by aluigi »

I think that ZIP 0 is uncompressed, try this updated script:

Code: Select all

comtype zstd
get DUMMY long  # 0x6a37
get FILES long
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get ZIP long    # 2
    get SIZE long
    get ZSIZE long
    if ZIP == 0
        log NAME OFFSET SIZE
    elif ZIP == 2
        clog NAME OFFSET ZSIZE SIZE
    else
        print "Error: unsupported ZIP %ZIP%, contact me"
        cleanexit
    endif
next i

If you can provide the G file that gave you that problem, it would help.
canboy
Posts: 42
Joined: Fri Jun 26, 2020 3:24 pm

Re: Eastward .g file

Post by canboy »

aluigi wrote:I think that ZIP 0 is uncompressed, try this updated script:

Code: Select all

comtype zstd
get DUMMY long  # 0x6a37
get FILES long
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get ZIP long    # 2
    get SIZE long
    get ZSIZE long
    if ZIP == 0
        log NAME OFFSET SIZE
    elif ZIP == 2
        clog NAME OFFSET ZSIZE SIZE
    else
        print "Error: unsupported ZIP %ZIP%, contact me"
        cleanexit
    endif
next i

If you can provide the G file that gave you that problem, it would help.

Oh its works
btw here is that .g file https://drive.google.com/file/d/1E1Ce_D ... cSoad/view
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Eastward .g file

Post by aluigi »

Ok, I confirm that the script is correct ;)
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

Re: Eastward .g file

Post by sinnerclown380 »

aluigi wrote:Ok, I confirm that the script is correct ;)


Hi aluigi, which is the localization file?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Eastward .g file

Post by aluigi »

The files in locale.g contains all the texts.
The extracted files indeed are just json (check the "en" files), open them with a text editor and have fun.
reimport2.bat should work in reinjecting the edited files back in the archive (if you want to translate the game).
canboy
Posts: 42
Joined: Fri Jun 26, 2020 3:24 pm

Re: Eastward .g file

Post by canboy »

aluigi wrote:The files in locale.g contains all the texts.
The extracted files indeed are just json (check the "en" files), open them with a text editor and have fun.
reimport2.bat should work in reinjecting the edited files back in the archive (if you want to translate the game).

Oh but the font image seems have some issues
I found that it have pgf header not as png file as said in index and fnt file
I tried around with some pgf viewer but can't open it, so it seems have some encryption.
Could u give it a look?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Eastward .g file

Post by aluigi »

Not my field. Try asking in the Graphics section.
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

Re: Eastward .g file

Post by sinnerclown380 »

aluigi wrote:The files in locale.g contains all the texts.
The extracted files indeed are just json (check the "en" files), open them with a text editor and have fun.
reimport2.bat should work in reinjecting the edited files back in the archive (if you want to translate the game).



- 0 files reimported in 0 seconds
- 90 files or logs left original, not available in the folder
coverage file 0 0% 4718 1951984 . offset 0000126e

Gave such an error aluigi ?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Eastward .g file

Post by aluigi »

Are you sure you used it in the correct way?
You must select the SAME file and folder you selected during extraction.
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

Re: Eastward .g file

Post by sinnerclown380 »

aluigi wrote:Are you sure you used it in the correct way?
You must select the SAME file and folder you selected during extraction.


Error: incomplete input file 0: D:\tools\tools\quickbms yeni\d06eebd5bfbe30f6ad73b65303a94e21\en
Can't read 1 bytes from offset 00006029.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.

coverage file 0 100% 24617 24617 . offset 00006029

Last script line before the error or that produced the error:
5 get NAME string
coverage file 0 100% 24617 24617 . offset 00006029




yes i did it wrong the error i got now
saker
Posts: 2
Joined: Sun Sep 19, 2021 12:10 pm

Re: Eastward .g file

Post by saker »

sinnerclown380 wrote:
aluigi wrote:Are you sure you used it in the correct way?
You must select the SAME file and folder you selected during extraction.


Error: incomplete input file 0: D:\tools\tools\quickbms yeni\d06eebd5bfbe30f6ad73b65303a94e21\en
Can't read 1 bytes from offset 00006029.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.

coverage file 0 100% 24617 24617 . offset 00006029

Last script line before the error or that produced the error:
5 get NAME string
coverage file 0 100% 24617 24617 . offset 00006029




yes i did it wrong the error i got now


I've got the same issue, can't reimport the files, did you find a fix?
canboy
Posts: 42
Joined: Fri Jun 26, 2020 3:24 pm

Re: Eastward .g file

Post by canboy »

Work fine with reimport2
saker
Posts: 2
Joined: Sun Sep 19, 2021 12:10 pm

Re: Eastward .g file

Post by saker »

Alright, I was doing something wrong, I managed to get it done right now. Thanks!
Zolodei
Posts: 36
Joined: Sat Sep 16, 2017 6:34 pm

Re: Eastward .g file

Post by Zolodei »

Program for packing and unpacking * .G files

Example: ConsoleProgram_Eastward.exe -e NameFile
Example: ConsoleProgram_Eastward.exe -i NameDirectory

https://cloud.mail.ru/public/Wa6Z/s9ypByze3
Last edited by Zolodei on Tue Sep 21, 2021 8:42 am, edited 1 time in total.
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

Re: Eastward .g file

Post by sinnerclown380 »

Zolodei wrote:Program for packing and unpacking * .G files

Example: ConsoleProgram_Eastward.exe -e NameFile
Example: ConsoleProgram_Eastward.exe -i NameDirectory

https://cloud.mail.ru/public/KEb4/JqMiEy9HZ



Thank you so much.
EagleAce
Posts: 1
Joined: Thu Sep 23, 2021 3:49 am

Re: Eastward .g file

Post by EagleAce »

aluigi wrote:I think that ZIP 0 is uncompressed, try this updated script:

Code: Select all

comtype zstd
get DUMMY long  # 0x6a37
get FILES long
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get ZIP long    # 2
    get SIZE long
    get ZSIZE long
    if ZIP == 0
        log NAME OFFSET SIZE
    elif ZIP == 2
        clog NAME OFFSET ZSIZE SIZE
    else
        print "Error: unsupported ZIP %ZIP%, contact me"
        cleanexit
    endif
next i

If you can provide the G file that gave you that problem, it would help.


Sooo yeah, I'm getting into coding recently (1-2 years, I'm still a very very noob coder) mostly in python, c# and c++ (A little bit of assembly), but I can't quite get what language is this script made of. Would it be possible to get some information on that so that I can use this script? Thanks a lot. :D
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Eastward .g file

Post by aluigi »

It's a script for quickbms:
http://quickbms.com

It's a stand-alone tool without dependencies.