Role Playing Game > PC > X-Men Legends II : Rise of Apocalypse > Skin Editing Instructions by Youngblood0000
Last Updated : July 9th, 2006
This skin guide was written by Youngblood0000 and can be found on his X-Men Legends for PS2 fan site on this page. I have made appropriate formatting changes throughout this guide.
-Texture Finder:
http://www.trlcsoft.com/TRTOOLS/TEXTUREFINDER/texture_finder.htm
At the time of this writing, this is a free downloadable program.
-A painting program that can load bitmaps (there are many, but some examples are Paint Shop Pro and Microsoft Paint)
These may require a purchase or may be included on your computer
-DXTBmp (to convert bitmaps to dds format which the game can read):
http://www.mnwright.btinternet.co.uk/download/dxtbmpx.EXE
At the time of this writing, this is a free downloadable program.
-A hex-editor (XVI32 is the one the authors use):
http://thegamersjournal.com/rpg/pc/xmenlegends2/hex.php
At the time of this writing, this is a free downloadable program.
-X-Men Legends II: The Rise of Apocalypse, pc version
This program must be purchased.
While the focus of this guide is not primarily on the editing of skins, but rather how to get access to them and reinsert them into a usable format, skin editing will consume a great deal of time. My main advice to remember about skin editing is to stay within the lines of the preexisting body parts as best as you can. Whatever you do, do not change the image size of 256X256. This will make it impossible to reinsert into the game properly.
4. Open the file you just saved with your hex-editor, and go to the 127 decimal place in the ASCII panel (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). The decimal place of the cursor appears in the bottom left-hand corner (it says Adr. dec:) . Then, go to "Edit" "delete to cursor" so that you delete the first 128 decimal places (0-127), which are not actually part of your image; they’re kind of an unnecessary tag at the beginning of the file. Once this has been deleted, save the file.
5. Note: this step doesn’t accomplish anything; it’s just to help you make sure you don’t screw up. Go to the original skin file (the one you edited; I’ll use the Original Cyclops costume skin for example, which is file 0120.IGB in the Actors folder) and scroll all the way down to the very last character in the ASCII panel. Select it with your cursor and read off the decimal place. Write this number down - this is the size of the skin file. When you’ve made changes by inserting your images in place of the preexisting ones, your end product must match this file size, or your game will crash if you try to select that skin.
6. Then, go to your Texture Finder and look at the original skin file again. Change the shift until the very first pixel of the file is the first pixel of the 256x256 texture, as you did when originally viewing it. Now, write down the value of the offset (the offset is a value found on the second red bar below the camera button)- this is the decimal place at which the 256x256 texture starts.
7. Now, open the .dds file you created in step 3 and deleted the first 128 bytes out of in step 4. The first 65536 bytes of this file (decimal values 0 through 65535) correspond to the 256x256 texture image. Go to the first character in the ASCII panel (decimal value 0) and hit CTRL-B on your keyboard once. Then go to the last character of the 256X256 image (decimal value 65535) and hit CTRL-B once. This should highlight the entire file in red. Then, hit CTRL-C to copy it onto your clipboard.
8. Next, open the original skin file and located the decimal position that you found in step 6 (decimal place 35677 for the Original Cyclops example). This is where the 256 x256 texture starts in the .igb file. Hit CTRL-B once at that decimal location.
9. Now add 256x256 - 1 = 65,535 (the size of the texture) to the decimal value to get the decimal position of where the texture ends. Go to this decimal position (you can use CTRL-G if you want) and then hit CTRL-B. You should now have a block of code highlighted in red. (For my Original Cyclops example, 35677 + 65535 = 101212, so you’d go to decimal place 101212.)
10. Hit CTRL-D to delete this block of code. Then immediately afterwards, hit CTRL-V to paste the code from your edited .dds file into the place of the code you just deleted. Then, save the file under a name of your choice in the Actors folder, making sure you don’t save it as the name of something that already exists there.
11. What you've just done is replaced the 256x256 texture in the skin file with your own modified texture. However, the skin file also contains a 128x128 texture, a 64x64 texture, a 32x32 texture, and maybe even a 16x16 texture. And, unfortunately, each of them does have an impact on how your skin looks, so you need to replace them. Before replacing them, you need to find out where they start in the igb file, and calculate their end point. To do this, first repeat step 6 (where you found the starting point of the 256X256 image) except when you use the Texture Finder, be sure to set the width of the finder equal to the width of the texture you're looking for (128, 64, 32, or 16). The starting points for the 128X128 and 64X64 images are typically easy to locate, as they just are smaller versions of the image you saw in step six, but it can be difficult to see the 32X32 and 16X16 images, as they are tiny. It may take some time to find each of these, but stick with it and try your best. Write all the starting points down. Now, you may want to pull out your computer’s calculator to find the end point for each image. A 128X128 image consists of 16384 bytes (128 multiplied by 128 = 16384), a 64X64 image has 4096 bytes (64 multiplied by 64= 4096) , a 32X32 image has 1024 bytes (32 multiplied by 32= 1024), and a 16X16 image has 256 bytes (16 multiplied by 16= 256). Understanding that, and that the first byte of each image is the offset you wrote down, add one less than the image size to the starting point to get the ending point for each image. Using the Cyclops example, for the 128X128 image you’d have a starting offset of 130593+16383=146976, which is the end point; for his 64X64 image, you’d have 146977+4095=151072; for his 32X32 image, it would be 151073+1023=152096; and for his 16X16 image, you’d have 32893+255=33148.
12. After all your math is complete, return to your .dds file that you copied your 256X256 image from. This file contains not only your 256X256 image, but a 128X128 image, a 64X64 image, a 32X32 image, and a 16X16 image of your edited skin as well, as you’ll recall from step 3. Since you’ve already taken care of replacing your 256X256 image (in steps 7-10), you don’t need that section of the file anymore. To delete it, first go to the first decimal place (Adr. dec: 0) and press CTRL-B. Now go to Adr. dec: 65535, and press CTRL-B again, which will highlight all that code in red, just like when you copied it before. Instead of copying it, however, this time you can simply delete it by pressing CTRL-D. Save the file. Now, the new Adr. dec: 0 is the first byte of the 128X128 image. Press CTRL-B at that location, and go to Adr. dec: 16383 (the last byte of the 128X128 image) and press CTRL-B again to highlight it. Press CTRL-C to copy it.
13. Open the file you inserted your 256X256 image into, and replace the bytes which composed the 128X128 image in it (which you found the starting points for in Texture Finder and calculated ending points for in step 11). You replace the code the same way you did in steps 8-10, but using the values for the 128X128 image. (Using the Cyclops example, the starting point for the 128X128 image was Adr. dec: 130593, where you’d go and press CTRL-B to start highlighting code. Then, you’d go to Adr. dec: 146976, where, you’d press CTRL-B again. You’d press CTRL-D to delete the old code, and then press CTRL-V to paste the 128X128 image you took from your edited image.) You’d then save your file.
Note: After successfully inserting one image, like the 256X256, I like to save that one with a descriptor of which image I just completed, such as OriginalCyclops256. You can then check and see if it worked in the X-Men game by reskinning your edited skin over an existing skin (see Nightcrawler’s guide at Drath’s Gamer’s Journal {website link at the end of the instructions} for reskinning instructions). If successful, then go back and insert the 128X128 image in the proper location, and save that as OriginalCyclops128. Reload your X-Men game and see if this worked. If your game crashes, you can tell what size image you screwed up on, and only have to start over as far back as you need to. It stinks if you’ve saved your skin as the same name the whole time, and screwed up on the starting point of a smaller image, thereby having to start all over again.
14. Follow the previously described steps on the 64X64, 32X32, and 16X16 images. Here’s the speedy version of these steps, as you should now understand the logic behind it:
Delete the now-unneeded 128X128 images from the file you copied it from. Save the file. Press CTRL-B at the new Adr. dec.: 0 and again at the end of the 64X64 image, Adr. dec.: 4095. Open the file that has both the 256X256 and 128 images successfully inserted. Go to the 64X64 image’s proper starting point (146977 in the Original Cyclops example) and press CTRL-B. Go to the end point (151072 in the example) and press CTRL-B again. Hit CTRL-D to delete the old 64X64 image and CTRL-V to paste in your 64X64 image in the old image’s place. Save your file (I’d save it as OriginalCyclops64). Load your X-Men game to see if you successfully inserted the image.
Delete the now-unneeded 64X64 image from the file you copied it from. Save the file. Press CTRL-B at the new Adr. dec: 0 and again at the end of the 32X32 image, Adr. dec: 1023. PRECAUTIONARY NOTE: IF YOU USE CTRL-G (THE ‘GO TO’ FUNCTION IN THE HEX-EDITOR) TO GO TO 1023, IT WILL ACTUALLY TAKE YOU TO 1029. DOING SO WOULD RESULT IN HAVING TOO BIG A FILE UPON INSERTING IT, CAUSING THE GAME TO CRASH. YOU’LL HAVE TO GO TO THE 1023 DECIMAL PLACE BY SCROLLING DOWN MANUALLY TO AVOID THIS.) Open the file that has the 256X256, 128X128, and 64X64 images successfully inserted. Go to the 32X32 image’s proper starting point (151073 in the Original Cyclops example) and press CTRL-B. Go to the end point (152096 in the example) and press CTRL-B again. Hit CTRL-D to delete the old 32X32 image and CTRL-V to paste in your 32X32 image in the old image’s place. Save your file (I’d save it as Original Cyclops32). Load your X-Men game to see if you successfully inserted the image.
Note about 16X16 images:
Not all characters have 16X16 images. This is often true of non-playable characters. If everything looks fine on your character (both on the character select screen and in gameplay) when loaded in the game after inserting the 32X32 image successfully) don’t worry about doing the 16X16 image.
Now, if you need to insert it, here are the instructions for that:
Delete the now-unneeded 32X32 image from the file you copied it from. Save the file. Press CTRL-B at the new Adr. dec: 0 and again at the end of the 16X16 image, Adr. dec: 255. Open the file that has the 256X256, 128X128, 64X64, and 32X32 images successfully inserted. Go to the 16X16 image’s proper starting point (32893 in the Original Cyclops example) and press CTRL-B. Go to the end point (33148 in the example) and press CTRL-B again. Hit CTRL-D to delete the old 16X16 image and CTRL-V to paste in your 16X16 image in the old image’s place. Save your file (I’d save it as Original Cyclops16). Load your X-Men game to see if you successfully inserted the image. If so, you’re done! Congratulations on your hard work and ability to follow instructions.
Drath’s Gamer’s Journal
http://thegamersjournal.com/rpg/pc/xmenlegends2/
Nightcrawler’s Hex-Editing Guide on Drath’s Gamer’s Journal
http://thegamersjournal.com/rpg/pc/xmenlegends2/hex.php
Youngblood’s Skin Editing Website
www.geocities.com/xmenlegendsps2/