- Joined
- Nov 11, 2006
- Messages
- 7,591
Preface:
Requirements:
Usage:
Fix:
Batch Fix (Faster):
Prevention:
Exceptions:
Source Code:
Credits:
Download:
Warcraft III on a Mac has a lot of downsides. One of the bigger issues is that
Warcraft III will crash when trying to load a BLP with particular settings.
Those settings are outlined here:
http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/blp1-mac-computers-235604/#C
Although the rule is not 100% final (yet), I decided to make a tool to scan a map
for those faulty BLP's. This only scans the map for faulty BLP's, it does not
fix them. The process of fixing is explained later in this post.
Warcraft III will crash when trying to load a BLP with particular settings.
Those settings are outlined here:
http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/blp1-mac-computers-235604/#C
Although the rule is not 100% final (yet), I decided to make a tool to scan a map
for those faulty BLP's. This only scans the map for faulty BLP's, it does not
fix them. The process of fixing is explained later in this post.
Requirements:
This program currently runs only on Mac OS X (pretty stupid, huh?).
However, I will be porting it to Windows soon. I just posted this since the Mac
version is essentially complete. If you want me to test a map, I'll be happy to
run it through the program for you.
However, I will be porting it to Windows soon. I just posted this since the Mac
version is essentially complete. If you want me to test a map, I'll be happy to
run it through the program for you.
Usage:
- Download the ZIP.
- Double click it in Finder. Move it to the applications folder if you want (so it'll show up on launchpad).
- Open it up. You'll be met with this screen:
- Click the image well in the center to browse for the map you want to check (alternatively, go to "File -> Open")
- Select the map, and a table will appear:
- The table will list several things:
Plain Name - The plain name of the file within the map. This is just the file
without the directories (e.g. it excludes ReplaceableTextures/CommandButtons/ and other paths like that)
Compatibility - If it shows "Yes", then it most likely won't crash. If it shows "No",
then chances are that it will crash. All the "No"'s are shown first.
Format - JPEG or Paletted/Paletted Alpha. JPEG's cause the crash, paletted are ignored.
Mip Maps - Number of mip maps defined in the BLP header. Real mipmaps represent
the "true" mip map count. The fake ones just point to a real mip map. For compatibility, the file must either
be Paletted or "Real" must be greater than or equal to the "Required" slot.
Fix:
Fixing BLP's is a tedious process. The faulty ones are usually just icons that were converted with ButtonManager.
To fix them, you need to download BLPLab.
To fix them, you need to download BLPLab.
- First, extract the BLP file from your map either with an MPQ editor or through WE.
- Open it in BLP lab and look at the mip-map count.
- There are two ways to fix it. You can either resave it as Paletted (no need to change
the number of mip maps), or you can resave it with the mip map number on the left. In the pic above,
that would be "7" (or you can look in the program and check the "Required" slot):
- Select a location to save it (click the ...) and then save.
- Import the new BLP into your map under the same path.
The sad part is that you have to do that for every "faulty" BLP (at least until I learn more
about writing to BLP's).
If you have a mac, you can run BLP Lab through WineBottler (google).
about writing to BLP's).
If you have a mac, you can run BLP Lab through WineBottler (google).
Batch Fix (Faster):
This method will allow you to fix them a bit faster.
- Extract all the BLP files labeled as "incompatible" from your map.
- Put them in a separate folder.
- Make a separate folder called "Output" or something (it can be inside the other folder).
- Open up BLP Lab.
- Go to "Tools -> Batch Converter".
- Check "BLP" as the source format, uncheck the others.
- Destination format should be BLP1.
- Select the source folder as the folder containing the faulty BLP's.
- Select the destination folder as the "Output" folder.
- Click "File Format Options" in the bottom left.
- For mip maps, choose "16". Alternatively, you can check "Paletted" if you
don't want to edit the mips.
Adjust the quality as desired. - Press "OK", then "Convert". The fixed files should be in the "Output" folder.
- Import them into your map, replacing the old ones. Save and it should be fixed.
Prevention:
This is obviously a tedious process, so to save yourself some time,
just convert with better options. If you are using BLP Lab, convert your BLP's as either paletted
or put enough mip maps so that there aren't any fake ones generated (if you use JPEG compression).
If you are using button manager, then adjust the settings like so:
http://www.thehelper.net/threads/mac-certain-map-crash-on-selection.130633/#post-1140701
just convert with better options. If you are using BLP Lab, convert your BLP's as either paletted
or put enough mip maps so that there aren't any fake ones generated (if you use JPEG compression).
If you are using button manager, then adjust the settings like so:
http://www.thehelper.net/threads/mac-certain-map-crash-on-selection.130633/#post-1140701
Exceptions:
This tool isn't guaranteed to find all faulty BLP files. It'll find all that don't match up with
the "rule" I posted, but there may be other options that cause crashes. For example, I scanned
Gaia's Retaliation and all of them returned as compatible, but it crashes on a mac.
As such, this tool and the rule are still considered WIP.
the "rule" I posted, but there may be other options that cause crashes. For example, I scanned
Gaia's Retaliation and all of them returned as compatible, but it crashes on a mac.
As such, this tool and the rule are still considered WIP.
Source Code:
I'm not releasing the source for this release. Perhaps in the future if I clean up the code.
It isn't because I'm protective or anything, it is just that my code honestly lacks organization and
proper names. There are still tons of commented debug code (I was still learning how to make apps
at the time). Once I recode it in python for Windows, I'll release the source.
If you really need the source, just PM me.
It isn't because I'm protective or anything, it is just that my code honestly lacks organization and
proper names. There are still tons of commented debug code (I was still learning how to make apps
at the time). Once I recode it in python for Windows, I'll release the source.
If you really need the source, just PM me.
Credits:
- Weep - Initial rule
- Ladislav Zezula - StormLib
- Sam Wilkins - StormLib OS X Port
- Shadow Daemon - BLP Lab
Download:
Remember, this currently runs on a mac only. I'll bump the thread once I have a
Windows version running. If you need me to run your map through it, PM me or post here. It
is always good for me to get extra material to test.
Windows version running. If you need me to run your map through it, PM me or post here. It
is always good for me to get extra material to test.