Page 1 of 2

How-To: Reskin an Ewok with BViewer and BCompiler

Posted: Wed Oct 27, 2004 5:04 am
by Nimlot
In anticipation of the release of BCompiler, I have decided to put together a quick tutorial on how to reskin or texture an object or model in game. In order to follow along with this tutorial you will need a copy of BViewer, BCompiler, and a hex editor, like UltraEdit.


Import and export the ewok2 textures:
In this tutorial, I will show how you would go about replacing an ewok texture, specifically the information in the ewok2 texture. The following is a picture of my steps in BViewer.

Image

Step 1: I first navigated my open path to the Star Wars directory, and then to the SIDE\ folder.

Step 2: I then selected and double clicked on ewk.lvl to import it, as the ewok texture data is stored in this lvl.

Step 3: After the file imports, a list of textures within that file will be displayed in this box. I will edit ewok2 texture, so I will double click on that item.

Step 4: After BViewer is done formating and saving the .dds data, you should see output similar to this, with exported files displayed here.

Edit the file:
You can figure this out! No, but really, edit the .dds file to whatever art you want, but keep the size and the format the same. If the texture consisted of multiple formats, you will need to edit both(in the same way) as each is displayed on different hardware.


Convert the DDS back to Battlefront:
Now that the new art is done, you can import the file into BCompiler and it will automatically be converted back into Battlefront format. The following is general picture of BCompiler.

Image

Step 1: Navigate the open directory to the location of your edited .dds files. Select the edited files, one at a time, and double click them to export the formated file. For both files a like named .lvl file will be created and placed in the same location as the selected dds.

Editing the Game Files:
Here is where the process starts to get messy. It is not hard, but takes some practice. I strongly urge you to head over to Rileys reference site at this point and study the structure of a texture chunk. Knowledge of this is essential if you want to select the correct sections. If you think you got it, read on.

Because we are editing the ewok2 textures, which are located in ewk.lvl, we will open this up in our Hex editor. We will also open up the first BCompiler generated lvl file. Note the size in bytes of the generated file, and go back to ewk.lvl. The following is a visual guide of how to replace a file with RGB(R5G6B5) format. The same process must be used to replace all texture files.

Image

Step 1: First I will determine the size in bytes of ewok2_RGB.lvl file(format information generated by BCompiler) to get an idea of what I will need to paste over. This is one possible pitfall, this size may not be the same as the destination, if its bigger only copy the right size, if its smaller don't paste over the target as much.

Step 2: If the size is correct(check byte size charts) select and copy the bytes of the file.

Image

Step 1: Now go into ewk.lvl and search for the texture file name, in this case ewok2.

Image

Step 1: Next, you will need to find the correct format to edit. Do a search for the FMT_ marker. In most cases, the DXT1 format will be before R5G6B5 formats, so as I am searching for the RGB version, I will search for the second occurance within the ewok2 chunk.

Image

Step 1: Next I will move to the first LVL_ marker, which should be just a few bytes after the FMT_. I will then begin selecting, including the LVL_, down the file the rest of the texture format.

Image

Step 1: After going all the way the length of the format, which should be right around the same amount of bytes as the size from the BCompiler exported lvl, I will make sure I have selected the right area. One tip to select everything well is to select the start and then to hold shift as you click on the later bytes. After you have selected the correct area, which can be aided by a new marker at the end of the selection(another FMT_, TEX_, etc.), paste the copied BCompiler output over the origonal. If you have replaced the correct amount the file size will not change. It is unknown if a different file size will work, but to be safe, try to keep it all the same. Save everything and try loading it up. :)

Remember to make back ups of all the files you edit. If you have any questions about this, or if any part is unclear, be sure let us know, so we can try and fill in the blanks.

RE: How-To: Reskin an Ewok with BViewer and BCompiler

Posted: Wed Oct 27, 2004 5:42 am
by guru
My results from this are :

Image


Image




Image

RE: How-To: Reskin an Ewok with BViewer and BCompiler

Posted: Wed Oct 27, 2004 8:13 am
by Niteshift
It looks like where u wrote IMAGE, the image is not coming up :)

*edit* Never mind it was just my computer :)

Posted: Wed Oct 27, 2004 10:07 am
by vindictive
Thank you. Can't wait!! :lol:

Vinny

Posted: Fri Oct 29, 2004 12:12 pm
by SithLordz
Well I don't understand a thing of it...

Search for this then for that copy this paste that.

I'm really confused :(

Posted: Fri Oct 29, 2004 8:54 pm
by vindictive
Here's my first mod. :lol:
Image

Vinny

Posted: Fri Oct 29, 2004 9:34 pm
by vindictive
Image

Posted: Fri Oct 29, 2004 10:13 pm
by kungfublue
maybe i missed somting... i didnt see how to change the textures like make that ewok red... i mean do you use someking or paintshop program... if so what do you use...
also if this is a dumb question ive NEVER modded or even skinned anykind of file for any game :mrgreen:

Posted: Fri Oct 29, 2004 10:50 pm
by guru
Nice work Vindictive! I love the crosseyed devil sniper! Hoot Woot! What up with the floor tiles in game? Your texture for the in game shot looks like he is in cartoon hell, hhahaha! You have vid setting to stickman or what?

Posted: Fri Oct 29, 2004 10:54 pm
by vindictive
just a low res image.
Oh, and thank you guys for the work you did. I wish I knew some language work. I'm just a graphic guy.


Vinny

Posted: Fri Oct 29, 2004 10:56 pm
by guru
Ah cool , well keep up the good work , if you get more and want to join in a skin pack release let me know. I want to offer up skins for those who are so mortified by the whole hex editing process. It could be nice to offer up say 3 alternative skins per unit for all the various maps :)

Posted: Sat Oct 30, 2004 1:51 am
by vindictive
Image

Posted: Sat Oct 30, 2004 2:04 am
by guru
We could have a real M&M caper here, ive got some red and yellow ewoks :) Nice lime Trooper!

Posted: Sun Oct 31, 2004 2:59 am
by Aries
Man,i could add a zebra ewok(a zwok) to the combination if I could get the hex editing part.

Posted: Sun Oct 31, 2004 3:22 am
by guru
Aries wrote:Man,i could add a zebra ewok(a zwok) to the combination if I could get the hex editing part.
Make the pic I will be glad to hex it on :) I have it down to about 3 minutes a mod now....

Posted: Sun Oct 31, 2004 10:10 am
by nitro
love the idea , how about creating a whole zebra mod ?? just imagine zebra stormtroopers lol :P

Posted: Sun Oct 31, 2004 2:08 pm
by Aries
Now,i have a question about hexing. Do I have to put in both the DXT1 and the RBG or just the RBG?I saw places for both i think in the .lvl file.Oh well, mine never usually come out the same size.

http://www.freewebs.com/nmg19/ewok2_DXT1.dds

http://www.freewebs.com/nmg19/ewok2_RGB.dds

Alright,thanx for your time.

Posted: Sun Oct 31, 2004 8:03 pm
by guru
Aries , you will need to put the dxt1.dds hexed in 1st then just below it at the next LVL_ is where you paste in your rgb :) Happy modding...

Posted: Sun Oct 31, 2004 11:00 pm
by Aries
Crud,i just suck at hexing then, still can't get it :( I do have a question though, you guys are working on a program to skip the hexing part right?

Posted: Sun Oct 31, 2004 11:12 pm
by guru
[quote="Aries"]Crud,i just suck at hexing then, still can
Yes, Nimlot our labmaster is producing a Bviewer that replaced Bcompilers process. Not sure how soon for release but I would guesstimate less than a week.