Tutorial Squishing The Map Size To The Last Byte

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Surely a lot of map makers are trying to engage in ORPG, and a lot of them plans to import a lot of things to make the game more unique in its way. There may be a lot of things we want to import into our map, but we just can't do so. There is the so called "4MB Filesize Limit for 1.24 below" and "8MB Limit for 1.24 above" so let's see what we can do to squish the size of the things we import and have the chance to squeeze in some more imports.

WHY MAKE THIS: Despite General - Map Size Management: Saving the Last Byte already exists, it is quite old and not up to date. This tutorial includes some procedures and tools that are not discussed in MSM.

Overview:

1.) Model Compression
2.) Texture Compression
3.) Sound File Compression
4.) Map Compression

1.) Model Compression

There are a lot of models of different shapes and SIZES and of course you must think twice before importing it into your map. First let us see how the models filesize works.

A.) The model's filesize is directly proportional to its polycounts. So if the models shape is pretty finely defined, then expect a bigger filesize.

B.) Animations take up size as well. If there are a lot of animations included in the model, then it should have a bigger filesize as well.

C.) Custom textures increase the amount in the storage of the model. Some models use custom textures (BLP) to work, so the BLP would most likely be a part of the model. The two main types of models are the ones which uses custom textures and the one that doesn't, instead it uses in-game textures (the ones included in your default MPQs in your Warcraft III directory)

Now let us see what we can do to deflate the size of the storage consumptions of our model files. Click on the name of the tool to download it by the way.

A.) Compressing the MDX using MDX Squisher - This tool lowers the amount of space the MDX uses when it is imported. You won't see a significant difference on the original MDX and the squished MDX until you import the file and save the map, the filesize difference can be seen in the map's filesize itself. The compression won't usually cause major changes to the model. If I base it on my experience it does so little changes to the quality of the model that it looks the same.

How to use
Simply open the .exe file and click on the button "Squish MDX" a dialog box will appear and choose the model you want to squish. It will then create an MDX file which has a suffix "_squished" on it.


B.) Removing unwanted animations using MDLX Converter and Animation Remover - Sometimes we download such models with animations that we don't even need or like. With these two tools we can completely deflate the MDX's filesize. You can remove animations with the Model Editor as well, though my last experience of doing so the following steps will save more bytes.

How to use
First of all we need to convert the MDX to MDL using the MDLX Converter. Open MDLX Converter and simply click the "Convert" button and then choose the MDX file you want to modify. An MDL version would then appear.

Next would be the animation removal. Open up the Animation Remover and the "Input" part should be the MDL file. On the "Remove" drop down list, there are the list of animations, choose one that you want to remove from the list, you can only remove 1 animation at a time. The "Output" is the file that would be saved with the animation removed from it, note that you can't overwrite the input file with the output.


C.) Next would be an optional thing, though this would cause some obvious changes though there is an alternative. What I'm refering to is that when you download some models they sometimes include the portrait. You have the choice of not importing the portrait, pros is that you get to save some space, cons you have a lousy portrait for the unit, sometimes no portrait at all. Though you simply add a camera to the MDX which will serve as the units portrait, this is further explained in this tutorial.

D.) The last one would be compressing the filesize of the custom textures that the model uses. This would be explained in the next topic.

2.) Texture Compression

Textures include different things, mainly BLPs which comes in textures for models or as icons. Though compression of textures is pretty much the same depending on the format of the texture.

A.) Compressing BLP files (Icons, Loading Screen, Custom Textures, Fade Filters, Skins) using BLP Lab - Compressing textures means that you would reduce its quality to save some space. Though you might say that you want an HQ texture, think again it depends actually on the intensity of compression you choose that affects the quality of the textures. Sometimes you won't even notice a difference in the compressed version.

How to use
First of all open BLP Lab, then click on file and open, choose the BLP file that you want to compress. After opening the file click on file and choose "Save As" I recommend that you save it with another filename if you are not yet familiar of how BLP Lab compresses textures. Click save after naming the compressed texture. After clicking a dialog box named "BLP Options" will appear, you will then see 2 radio buttons.

The first radio button named "Compressed" will reduce the quality of the texture as you set the % quality. Setting it to 50% would usually cause a minor quality reduction though a large amount of decrease in the filesize.

The second one which is "Paletted' will set the number of colors present in the textures.

Though I would recommend to use the Compressed since it is more efficient and takes a little time of adjusting to have the quality and filesize that you want for the output.

TIP: When compressing DISBTNs you can take it to a very low quality and it would still look like a disabled button.


B.) Compressing TGA (Minimap Preview) files with Paint.net - Usually the TGA file in your map would be its minimap Preview. And the only experience I had in compressing TGAs was with the use of Paint.net. You may experiment with other photo edditing tools but I will just share to you how it's done in Paint.net.

How to use
Open the TGA file with paint.net and then click on file and choose "Save As". You may overwrite your TGA file. Then the Settings Configuration will appear. Check "Compress RLE" and click on "24-bit" and click OK. The filesize usually drops by about half its original size.

I still don't know the downside of compressing the TGA, though when I upload my map at epicwar.com the preview won't work. I still don't know if it has something to do with this compression.


3.) Sound File Compression

You might want to decide to import some sound files, and warcraft uses .wav files for the sounds. Well you might just think it would have been a lot less space consumer if it were a .mp3 instead. Well you can actually use mp3 as a wav file. How you say, simple just give the mp3 a wav heading and it is now disguised as wav. Open the spoiler to learn how to compress the sound file. Taken from "General - Map Size Management: Saving The Last Byte" by Doomhammer

4) Sound-files

size saving potential: ~ 50% - 80% per sound file

tools needed:

BeSweet
http://www.doom9.org/
go to download
go to audio tools
click BeSweet 1.5 to download the file


Lame compressor
http://www.doom9.org/
go to download
go to audio tools
click Lame 3.95.1 to download the file


BeSweet GUI
http://besweet.notrace.dk/BeSweetGUIv0.7b4.zip

Alternative path for the package BeSweet + BeSweetGUI + Ac3Machine:
http://rapidshare.com/files/50817755...izardv02b1.rar


Note: for this procedure it is important to use DSPGuru's official GUI. The other BeSweet GUI, BeLight does not include the desired options.

Sound files in Wc3 are saved as 22,050 khz, 16 bit, 1 channel pcm wave files. When you import your own sounds, they have to apply to these specifications, with the exception of music, which is saved in mp3 format.
Wouldn't it be great to import other sounds as mp3, too? Unfortunately, that's not possible. Yet there is a trick, so you can import your sounds with mp3 compression, yet "disguised" as *.wav file. We can nonetheless get hold of the benefits of audio compression using the mp3-wave format, which is mp3 compressed sound attached to a *.wav fileheader. Out of the wide range of commercial and non-commerical audio converters out there, I have found one which is free, very efficient, has an enormous functionality, and can be installed and used within a few minutes.


The great thing with besweet is that it can all be done using the command line. Yet as we're all born with a computer mouse in the craddle, I'll explain the GUI setup and procedure. The setup routine poses a few minutes of work. Fortunately you only have to set it up once.

Setting it up:

1) Extract the BeSweet package to a new directory. Let's call it "BeSweet".

2) Extract the GUI files into your BeSweet directory. Confirm overwriting the *.dll

3) Extract the Lame compressor into your BeSweet directory

4) Open the GUI

5) Set the Besweet.exe file path to the BeSweet.exe

6) Click on Lame1 and set the lame.exe file path


Audio Conversion:

That's for the file setup. As follows what it takes to convert your wave file to mp3-wave

1) select your input file

2) Check through the settings pages:

- Azid1: leave as is; if your sound is too loud, have a play with the normalizing values

- Azid2: uncheck if any is checked

- SSRC: leave as is, or set to 22050

- Lame1: Set "Mode" to mono if your input file is mono, to "Stereo" if your input file is stereo; optionally: check "Turn ATH down to a Flat Noise Factor"

- Lame2: Check "Error Protection", Now the important part: Set "CBR" to 96 (or 128 for slightly higher quality)

- Lame3: Uncheck all

- 2Lame: Leave as is

- BeSweet: Uncheck SRRC, uncheck Boost; important: under Lame set MP3-WAVE
the OTA options should all be unchecked

3) Select output file. Make sure to set a different folder or filename than the original

4) Let's go: Press WAV to WAV

The settings will be saved, btw. I'd yet recommend to save your
settinsg as custom setting profile. Now listen to your soundfile with audioplayer/winamp/other


Links:

Tutorial on custom sound import
http://www.thehelper.net/forums/showthread.php?t=39614

4.) Map Compression

Well here you are now, ready to release your map. But wait, there is still another thing you can do for it. You can still compress it. Thanks to Vexorian's Map Optimizer - The map optimizer cleans up your map from unnecessary files that makes it bigger, it also locks the map which makes it unopenable with WE. Though you must be careful always have a backup for your original map to prevent loosing it.

How to use
Well, I usually check everything and it does not cause any in-game problems with me. For the "Tweaks" well that is for the map's scripts, I also check everything in there except for "Custom charmap" thing which made an error for my map the last time I used it.

REMEMBER: DO NOT Delete your original map file you CANNOT open the optimized version of it.


Thanks for reading. Hope I helped you squeeze in some more imports. Please don't hesitate to leave some comments, suggestions, tips or even corrections to the tutorial.

More Tutorials

Speed Up Your Map Making - A simple guideline for you to ease you map making. Loaded with some tips that makes yo familiarize with WE as well.
 

silentgamerz

New Member
Reaction score
0
the sound file compression part doesn't work for me i always get the error "this does not appear to be a valid sound file" when i try it on WE.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top