- Jan 31, 2010
Map Size Reduction Tutorialby Apheraz Lucent
Content of Tutorial:I: Lost and mirror files
II: Deleting files that don't work
III: Passive/Auto-Cast Ladder Icons
IV: Loading Screen & Map Preview
V: Skin Optimization
VI: Model Optimization
VII: Hidden Resources
VIII: Optimizing Triggers
IX: WE Only Files
X: Vexorian's Optimizer Tool
I have seen quite a lot of maps with neat idea and stunning gameplay, but also with tremendous map size. Hosting is easy, but waiting for all the players to download the map is just... painful. Even with the fact that I prefer no to very few imports, I'm not trying to say that you shouldn't use any imported files in order to maximize speed of download, I'm just telling that without them, your map has much more potential to get hosted by others, especially if you're advertising it through Garena, Game Ranger or other clients. And it can still be nice.
I decided to help you by sharing the experience I gained during my mapping years. These are simple but effective tips that can help you out to reduce your maps' file size at no or low costs. Whether you need to break down your map's size, or get some room for more imports.
At the end of each step is the MSD meter (MSD - Map Size Decrement), showing you how much you can loose.
So, let's get started!
I: Lost and mirror filesThis method is often over-sighted, and perhaps it won't do miracles on your map, but it could help you to save some space to grab other icons and models to take the "lost" place. This method will most likely grow in effect the longer the map is developed. First, open your map, the Object Editor and the Import Manager. Comb slowly through the list of imported files, and look for alternatives of your resources. This is a usual thing I see every day; A user has imported an icon for a skill, and then imported a new, better one for the same skill. The old icon still lingers around, taking up your valuable space. Make sure to go to Object Editor (F6), and go to the fields of Model Edit and Icon Edit for a random unit, like, let's say, a peasant. Go to the fields I mentioned above, and scroll through the imported files. Sometimes, there can be two same models or other resources, under different names (Example: LightningStrike.mdx and StormBlast.mdx). This applies to icons as well. Try to remove all the resources you have mirrored, and even if you think that "Well, this old version could be useful in future versions of the map for some other thing", delete it from the map, but export those resources in one folder first. Out of the map, in to the folder.
Overall MSD - minor, but can grow with time.
II: Deleting files that don't workDuring your session of the scrolling through the files and searching for lost and mirrored files, you maybe have noticed that some of the resources are not working, no matter what you do to them. This can be a result of corrupted files, or not correctly patched textures. Since they are just standing still in your map doing nothing except taking your space, you should delete them. Expecting a wonder that will make your resources work is as silly as waiting for Warcraft 4. This also applies to some troubled resources, such as models with Omnilights that will make the whole in-game screen white if you select them, icons that will escape to a random corner when you hover over them, and generated textures that will make units invisible (errors with Alpha Channels). If you can't repair them - replace them or remove them.
Overall MSD - minor, but often overseen so it can be beneficial.
III: Passive/Auto-cast Ladder IconsIf you need a passive icon for Abolish Magic (or any other icon which has no passive or auto-cast borders in Warcraft, but it has a disabled version), and you're not using the standard BTN icon in your map, you will probably import two files: PASAbolishMagic and DISPASAbolishMagic. Doing that is wrong. Instead, import only one icon, the PASAbolishMagic, and then write down the texture path of it for an enabled version (BTN preferable). It will replace the icon and you can access it through search within fields. What we have done with this? Well, we just made your ladder icon with new borders use the already integrated disabled version of it. This decreases roughly 8 kilobytes per imported icon which has a disabled version in game. This also works for Auto-cast icons, PAS to BTN, and other.
Example: Original file: ReplaceableTextures\CommandButtons\BTNAbolishMagic.blp
Passive Import: ReplaceableTextures\CommandButtons\BTNAbolishMagic.blp
Overall MSD - minor, but can save some kilobytes for other imports.
IV: Loading Screen & Map PreviewIf you use it in your map, you should consider of reducing it's quality a bit. 512x512 is way too much for a map preview, and it's hard to tell where is difference between it and 256x256 one, since most computers have their graphic requirements set to low or medium settings. You can do this via Warcraft 3 Viewer, whose link is at the bottom of the page. Since a loading screen usually takes up the most space in your map, you can also use the one that matches your map's terrain out of Warcraft's ones, effectively saving up to 1000 KBs! This also applies to the Map Preview, however, since Map Previews are using around 100 kilobytes or less, you can save them in your map, and just reduce their quality. If you have, non-detailed, missmatching Map Previews that are quite blurred or noneffective, you should consider of making a clearer one, or deleting it. Same applies to Loading Screens.
Overall MSD - none or a lot.
V: Skin OptimizationUse the upper mentioned Warcraft 3 Viewer to reduce quality of your skins. Base quality is usually around 85%, and I always go with 60-80%, depending on skin's visibility, usage and it's base quality. Don't go with too much, because you will end up with a big smudged blob and lose a lot more than you could get. Some people will make their skins (that they upload to the Hive) with the best optimization as possible, going from 150 kbs to 50-70 kbs. Best examples can be seen by the Hive's top skin artist: 67_chrome and his Watcher skins, which have details, aren't smudgy, and are of very low map size.
Overall MSD - depends on usage of skins, medium.
VI: Model OptimizationSame for skins. Since I don't know much about modeling, I guess that the best tool is Model Squisher, or the MDX/M3 Optimizer (link at the bottom of the page). It can really stack up some free space in your map, if you use a lot of imported models. I've heard that animations on models can increase it's size, too. You can ask a modeler to cut down the size for your imported models. There are some models, especially recolored Bird Attack Missiles, for example (Sorceress', Priest's and Cenarius' attack missiles) that are 50 kb "heavy". Delete them right this moment, please. Attack missiles, on average, "weight" about 5 to 15 kbs. Always seek alternatives for your models on the Hive. You can always force the models to use in-game textures, which can, again, dramatically reduce the size, and sometimes there is no difference in quality between imported or internal files!
Overall MSD - depends on usage of models, medium to high.
VII: Hidden ResourcesYou had probably heard about them. Not much to say in here, since there are several lists on this site that contain every hidden resource that exists (again, link of referenced tutorials or tools at the bottom of the page). Instead of using a new model for a unit, use one of hidden ones to successfully reduce map size. Same for the icons, and most of them are really nice. However, this possesses a drawback; there are not too many models to use, and some require an imported fitting icon, and the list is not endless.
Overall MSD - can chip out some map size, low.
VIII: Optimize TriggersMake sure to squish as many triggers as you can. This values for Map Initialization the most. Triggers and customs in Object Editor take up the most space in your map, and if Jass scripts takes up less space than GUI triggers, you should better take up the Jass ones. You should also learn to use Integer A & Integer B, Arrays and Re-definable Variables. See the links I provided at the end of the tutorial for the best results. Also, instead of doing this manually, you can use one of the map size optimization tools I've linked at the bottom of the page.
Overall MSD - medium to high.
IX: WE Only FilesBefore releasing a version of your map, delete all the Editor Suffixes and World Editor-only names. Delete just about anything that can't be seen in-game, such as some units and skills you were experimenting with, but are not usable in-game. Quite sure that the community won't use them in-game, and they can stack up some size in map. There is a nice tool which can easily do this for you, and I will talk about it soon.
However, this tool won't remove unused data from the map - you'll have to do it manually by yourself. Make sure to save the backup of the map, and chip out unused data only for releases.
Overall MSD - huge.
X: Vexorian's Optimizer ToolThis little tool will allow you to remove as much unused data as possible in few clicks. What this tool does is to squish your map for up to 50% of map saving! There is already a huge Read Me document included when you download this tool which explains every option you can use, and more important, how to use. My usual map size squishing is about 25% to 40%. Vexorian's tool also has a dandy feature of damaging the map in a way that it can no longer be opened in WE (can be disabled).
Overall MSD - extreme.
Useful tools:Model Optimization:
- Model Squisher
- MDX/M3 Optimizer
- Warcraft III Viewer
- Vexorian's Wc3 Map Optimizer