Menu
 

Tutorial: How to make wallpapers in XML2

Started by apollo, November 06, 2007, 04:27PM

Previous topic - Next topic
November 06, 2007, 04:27PM Last Edit: November 06, 2007, 04:45PM by apollo
Seen as though it was mentioned that there wasn't one, and I seemed to be making pictures into wallpapers for a few people, I thought I'd make a tutorial.

EDIT: Just realised there was a MUA one, but oh well!  :banghead:

Note: This is the way I do it, there may be a quicker, more efficient way.
   The basis of this comes from http://thegamersjournal.com/rpg/pc/xmenlegends2/skinedit.php
   Although the tutorial is about skin-editing, the process for wallpapers, once you have the image, is largely the same.

You will need;
   Hex Editor XV132 (http://www.handshake.de/user/chmaas/delphi/download/xvi32.zip)
   DXTBmp (http://www.mnwright.btinternet.co.uk/download/dxtbmpx.EXE)
   Microsoft Paint or other similar software

Optional;
   Texture Finder 2.1 (http://www.nba2kstuff.org/mua/TextureFinder.v21.zip)

1. Preparation
Open your picture in Paint (or similar program) and resize your image to 512x512.  So for a 1024x768 picture you would rescale by 50% horizontally and 67% vertically (you will then need to adjust the vertical height slightly).
Now flip the picture vertically (i.e. bottom becomes top, top becomes bottom).
Save the file.

2. DXTBmp
Open the saved file in DXTBmp and make sure that the box for 'Include when saving' is checked (This can be found on the right-hand side, under MipMaps].
Now go to File > Save As > DDS Texture and under 'Save as type', choose DDS DXT 3.
Save the file.

3. Inputing into the Hex file
    (This part is almost completely the same as the link given above)
Open your .dds file in a Hex Editor.  The hex-editor has two panels, you want to be in the right-hand panel (you can click on it with your mouse to get over there), and delete the first 128 bytes.  You can do this by going to the 127th decimal place (the number is shown on the bottom left-hand corner where it says Adr. dec:) and doing Edit > Delete to cursor.
At this point you may want to save your file (under a different name so as not to lose the original).

Now open an existing wallpaper file in your hex-editor (this should be done in a new window, as you want both the wallpaper and your .dds file open at the same time).  These can be found in your X-Men Legends II directory under Textures/loading/
I will use the Ultimate Cyclops Wallpaper, 0103.igb, as I have the offsets already, they are;
         Start   End
   512   93424   355567   Size: 262143
   256   27888    93423          65535
   128    5976    22359          16383
   64    23788    27883           4095
   32    22360    23383           1023
   16    23496    23751            255

The end point of the texture can be found by taking the starting value and adding the size of the texture to it.
The size of the texture is found by squaring the 'length' (512, 256, etc...) and subtracting 1.

The first 262143 bytes of your .dds file correspond to the 512x512 texture image. Go to the first character (decimal value 0) and hit Ctrl+B on your keyboard once.  Then go to the last character of the 512x512 image (decimal value 262143) (this can be done using the Address > Go to, or Ctrl+G) and hit Ctrl+B once.  This should highlight the block in red.  Then, hit Ctrl+C to copy it to your clipboard.

Now in the existing wallpaper file (.igb) and at the start of the 512x512 image (decimal value 93424 for 0103.igb) and hit Ctrl+B.  Now, using Ctrl+G, go to the end of the 512x512 image (decimal value 355567 for 0103.igb), and hit Ctrl+B.  This should again highlight the block in red.  Now use Ctrl+D to delete the selection and then, immediately afterwards, hit Ctrl+V, to paste the code from your edited .dds file into the place of the code you just deleted.

NB: For those using the Cyclops Wallpaper
Unfortunately, for the 512x512 image, because you are pasting into the end of the file, it moves one of the characters to the end of the file (I've tried to find a wallpaper where this doesn't happen, but alas, to no avail).
To fix this problem, go to the end of the file, and look at the right-hand panel for the last entry (this is a square/rectangle in 0103.igb).  Now look across, for the 'code' for this entry, i.e the last entry on the left-hand side ('00').  Remember the code and delete this value (the last entry).  Now go to the decimal place before the start of the 512x512 block (93423), and use Edit > Insert String.
Now enter the code that you found for the last entry and insert it here, using the Hex String option.  This problem only occurs (for Cyclops) this once.  You will not need to this again for this wallpaper.

At this point, you should save both files (under new names).  You should do this after each texture, that way if you make a mistake at a later stage, you can go back to the previous file instead of having to start from the beginning.

This should now be correct, and you can check that this image is in place by opening the file in a texture finder, setting the width to 512 and going to the offset of the start of the 512x512 texture.  You should see your image!

You can now repeat this for the other, smaller textures.

4. Testing
Once you have replaced all the textures with your own, rename your finished file (the wallpaper you have been editing) with one of the wallpapers you can access on your in-game 'Review Computer', remembering to keep a copy of anything you overwrite.  Then open up your game and see if it has worked.

This is a very long process (there must be an easier way), so if you have any problems, have a scan through http://thegamersjournal.com/rpg/pc/xmenlegends2/skinedit.php, to see if it helps.
If not, post your problem and I will try to see what I can do to help!

Apollo

You could post this in the Knowledge Base.

Quote from: Midnight Curse on November 06, 2007, 04:57PM
You could post this in the Knowledge Base.
The knowledge base is a sub forum of Marvel ultimate allaince so it can be here

Hmmm...how bout a XML2 section for Knowledge Base, Requests and Suggestions, and Technical Problems? (Will repost in Request board and delete this one)

Quote from: Midnight Curse on November 07, 2007, 01:17AM
Hmmm...how bout a XML2 section for Knowledge Base, Requests and Suggestions, and Technical Problems? (Will repost in Request board and delete this one)
yeh there is already a section for that called modding discussion unless this isnt modding discussion ??????
oh and nice tutorial apollo

I'm not spamming up anymore. Check your PM's.