I spent half a night trying to get mine to work, all to naught due to some typo or whatever. Got dead tired in the end, went off in frustration to watch Angel Beats (good shit, btw, check on it, guys).
Edited by GeN1e, 02 July 2010 - 06:47 PM.
Posted 02 July 2010 - 06:47 PM
Edited by GeN1e, 02 July 2010 - 06:47 PM.
Retired from modding.
Posted 02 July 2010 - 11:46 PM
They aren't the same. Now I need this function to get this 'optimised' palette from the source file!Open both BAMs with DLTCEP and edit the palettes. Are they exactly the same, same order and everything? Could be when you inserted your frames to the BAM (using BAM Workshop or however you did it) it reoptimised the palette.
Edited by sotona, 02 July 2010 - 11:47 PM.
Posted 03 July 2010 - 02:36 AM
W_GUI - a GUI replacement for Baldur's Gate 2/TUTU/BGT/CA
W_PackMule - Your own pack mule for Baldur's Gate 2/Tutu/BGT/CA, BGEE and BG2:EE
Psionics Unleashed - play as a Psion, mod for Baldur's Gate 2/Tutu/BGT/CA
Posted 03 July 2010 - 02:36 AM
That could get nasty, because different mods could overwrite the palette several times, probably hosing the frames that other mods have added, and possibly vanilla mapicon frames as well. [Edit: what Kwiat_W said]They aren't the same. Now I need this function to get this 'optimised' palette from the source file!
Edited by Miloch, 03 July 2010 - 02:37 AM.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
Posted 03 July 2010 - 05:36 AM
You're right, if anyone would do it, it isn't any better than overwriting.If you are going to modify the palette then what is the purpose of patching the file instead of overwriting it? If each mod would modify the palette then frames added by all other mods would be corrupted.
Interesting, but as it turned out, it's not my case! Mike's functions works as it should be. The bug with palette turned out to be my mistake (I deleted the original mapicons.bam from override before trying the function, and thus the function got the one from the biff, with the palette slightly different). Well, curse me for a foo!lIt would be better if this function allowed insertion of frames as bitmaps. There is code in BAM Batcher that does this (builds BAMs from BMPs). Then you could export a frame from the vanilla mapicons.bam, edit it without changing the palette to make your new frame *or* export the palette from Paint Shop or Photoshop, then apply the palette to your existing frames with "nearest colour" matching. Should look more or less the same. But then you know you're going to have exactly the same palette. The problem with importing frames from BAM Batcher is that I think it reorganises the palette every time you do that. You might be able to avoid that with DLTCEP instead - not sure.
Edited by sotona, 03 July 2010 - 06:01 AM.
Posted 03 July 2010 - 03:27 PM
Let's just say that it didn't work flawlessly on my first attempt, and I had to rewrite my offset adjustment / byte-adding code.Mike, just curious, did it take short time for you to write?
I spent half a night trying to get mine to work, all to naught due to some typo or whatever. Got dead tired in the end, went off in frustration to watch Angel Beats (good shit, btw, check on it, guys).
Edited by Mike1072, 04 July 2010 - 02:15 PM.
Posted 04 July 2010 - 02:27 PM
Edited by Mike1072, 23 November 2015 - 10:19 PM.
Posted 05 July 2010 - 03:17 AM
Eh... how does it do that exactly?Okay, the function now automatically converts the new icons to use whatever palette the existing map icon file has, so you don't have to worry about them at all.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
Posted 05 July 2010 - 01:03 PM
For each palette entry in the icon file you provide, the nearest matching entry in the existing file is calculated (Euclidean distance). Then, the frame data that's being added is altered, with each index into the old palette being replaced with the index of the nearest match.Eh... how does it do that exactly?Okay, the function now automatically converts the new icons to use whatever palette the existing map icon file has, so you don't have to worry about them at all.