Cabal Online - Texture Extraction [Solved]

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
AceAngel
veteran
Posts: 115
Joined: Sun Feb 08, 2009 5:45 pm
Has thanked: 35 times
Been thanked: 7 times

Cabal Online - Texture Extraction [Solved]

Post by AceAngel » Mon Jun 01, 2009 9:22 pm

Hello to all,

I'm hoping this is a quick process since most of the tools are already created, courtesy of RageZone.com site.

Anyway, here is the issue, just like some games which use GamEbryo in Nif format, which have 'embedded' textures, Cabal Online is the same. It uses EBM files which have embedded textures. There is a blender script which allows you import EBM files + Textures, but cannot export them.

WIP Paint Program for extraction (doesn't extract all the files, only a few select): http://forum.ragezone.com/f458/mr-paint ... ta-542094/

EBM Blender Importer: http://forum.ragezone.com/f458/ebm-blen ... er-449555/
If you want to modify a texture inside an EBM/ECH, just open the file in a hex editor.

Then, find the name of the texture (*.dds), place you cursor before the following "DDS |", select until the end of the file, and then click on File -> Save selection as...

(NOTE: This is how you do it in Hex Workshop, but shouldn't be much different from any other hex editor).
Anyone could create a quick and dirty batch extractor for EBM files?
Last edited by AceAngel on Sat Apr 09, 2011 4:29 am, edited 1 time in total.

User avatar
chrrox
Moderator
Posts: 2601
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1358 times

Re: Cabal Online - Texture Extraction

Post by chrrox » Tue Jun 02, 2009 1:29 am

This is the best I could figure out while keeping the name.
quick BMS script

Code: Select all

getdstring ID 0x2
get FILES short
#I can't find the file num so just add "math FILES += X"
#without the "" and replace X with how many dds files over 3 you want to check for.
goto 0x12
for i = 0 < FILES
getdstring NULL 0x5E
get NLENGTH short
getdstring NAME NLENGTH
get SIZE long
savepos OFFSET
log NAME OFFSET SIZE
getdstring DDS 0x3
if DDS == "DDS" then
math OFFSET += SIZE
goto OFFSET
next i
else
cleanexit
endif
I can write a script to extract that could be better but would loose the names.

AceAngel
veteran
Posts: 115
Joined: Sun Feb 08, 2009 5:45 pm
Has thanked: 35 times
Been thanked: 7 times

Re: Cabal Online - Texture Extraction

Post by AceAngel » Tue Jun 02, 2009 2:03 pm

Wow, that was quick, thanks ^^

I'm no expert, so how I can I use the code? BMS is kinda a new word for me, hehe.

User avatar
chrrox
Moderator
Posts: 2601
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1358 times

Re: Cabal Online - Texture Extraction

Post by chrrox » Tue Jun 02, 2009 10:25 pm

just download it from here and follow the instructions.
http://aluigi.org/papers.htm#quickbms

AceAngel
veteran
Posts: 115
Joined: Sun Feb 08, 2009 5:45 pm
Has thanked: 35 times
Been thanked: 7 times

Re: Cabal Online - Texture Extraction

Post by AceAngel » Sun Jun 07, 2009 9:29 pm

Thank you mate, much appreciated =D

PS: Sorry for the delay in response...

AceAngel
veteran
Posts: 115
Joined: Sun Feb 08, 2009 5:45 pm
Has thanked: 35 times
Been thanked: 7 times

Re: Cabal Online - Texture Extraction

Post by AceAngel » Fri Jun 12, 2009 8:41 pm

The contents of this post was deleted because of possible forum rules violation.

User avatar
chrrox
Moderator
Posts: 2601
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1358 times

Re: Cabal Online - Texture Extraction

Post by chrrox » Fri Jun 12, 2009 9:11 pm

Sorry here is a better script.

Code: Select all

#locate first header
findloc RES_START string "X9´;"
goto RES_START
savepos RES_START
math FILES += 0xFFF

for i = 0 < FILES
getdstring NULL1 0x14
get NSIZE short
getdstring NAME NSIZE
get SIZE long
savepos OFFSET
log NAME OFFSET SIZE
math RES_START += SIZE
goto RES_START
findloc RES_START string "X9´;"
goto RES_START

next i
if you want them to be extracted into a folder named what the compressed file is let me know.

AceAngel
veteran
Posts: 115
Joined: Sun Feb 08, 2009 5:45 pm
Has thanked: 35 times
Been thanked: 7 times

Re: Cabal Online - Texture Extraction

Post by AceAngel » Fri Jun 12, 2009 9:35 pm

Hey, thanks for the new script.

I tried it, but here is what happens:

Models that have only 1 .dds texture = no extract
Models that have more than 1 .dds texture = extract only first texture.

Is the script broken by any chance? Because it feels like the last part is missing.

Anyway, take your time. It's not an emergency to make it right now :wink:

User avatar
chrrox
Moderator
Posts: 2601
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1358 times

Re: Cabal Online - Texture Extraction

Post by chrrox » Fri Jun 12, 2009 9:50 pm

I just did this on the sample file you gave me and it extracted all 3 files
what version of quickbms are you using?

Code: Select all

QuickBMS generic files extractor 0.2.2
by Luigi Auriemma
e-mail: aluigi@autistici.org
web:    aluigi.org

- open input file barlog_s.ebm
- open script test.bms
- set output folder New Folder

  offset   filesize   filename
------------------------------
  00000085 65664      balog_blade.dds
  00010174 524416     balog_a.dds
  00090263 65664      balog_b.dds

- 3 files found

AceAngel
veteran
Posts: 115
Joined: Sun Feb 08, 2009 5:45 pm
Has thanked: 35 times
Been thanked: 7 times

Re: Cabal Online - Texture Extraction

Post by AceAngel » Fri Jun 12, 2009 10:14 pm

Ooops, my mistake, didn't download the latest version.

Yes, the latest script does extract the textures from Balrog, but I tried a few other models and no go. It says "0 files found".

The old script does work however for these models, but not the Balrog.

PS: Uploaded a sample model.
You do not have the required permissions to view the files attached to this post.

Post Reply