Jump to content


Photo

WMP - new area icons


  • Please log in to reply
28 replies to this topic

#21 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 02 July 2010 - 06:47 PM

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 GeN1e, 02 July 2010 - 06:47 PM.

Retired from modding.


#22 sotona

sotona
  • Member
  • 58 posts

Posted 02 July 2010 - 11:46 PM

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.

They aren't the same. Now I need this function to get this 'optimised' palette from the source file!

Edited by sotona, 02 July 2010 - 11:47 PM.

Whoa lord, it's hard to be humble, when you're perfect in every way.

Altered Knock Spell

#23 Kwiat_W

Kwiat_W
  • Modder
  • 290 posts

Posted 03 July 2010 - 02:36 AM

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.

icon11.gif W_GUI - a GUI replacement for Baldur's Gate 2/TUTU/BGT/CA
icon11.gif W_PackMule - Your own pack mule for Baldur's Gate 2/Tutu/BGT/CA, BGEE and BG2:EE

icon11.gif Psionics Unleashed - play as a Psion, mod for Baldur's Gate 2/Tutu/BGT/CA

 


#24 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 03 July 2010 - 02:36 AM

They aren't the same. Now I need this function to get this 'optimised' palette from the source file!

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]

It 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 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


#25 sotona

sotona
  • Member
  • 58 posts

Posted 03 July 2010 - 05:36 AM

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.

You're right, if anyone would do it, it isn't any better than overwriting.

It 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.

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!l :)

Edited by sotona, 03 July 2010 - 06:01 AM.

Whoa lord, it's hard to be humble, when you're perfect in every way.

Altered Knock Spell

#26 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 03 July 2010 - 03:27 PM

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).

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.


Regarding palettes, I'd prefer not having to support conversions, but I may look into it. There are only a couple different palettes being used now:

  • The vanilla ToB worldmap uses the one in 25mapic.bam.
  • If ToB is not installed, the SoA worldmap uses the one in the biffed mapicons.bam.
  • If ToB is installed, the SoA worldmap uses the one in mapicons.bam from the override. This palette is also used by Tutu, BGT, and the Worldmap mod (where it can replace the ToB worldmap as well), so it is definitely the most common.
BAM Workshop I (available here) can easily import a sequence from another .bam (and it will automatically format the sequence to use the palette of the current file).

Edit: it turns out BAM Workshop doesn't perform miracles. The imported sequences look perfect when imported, but once you save the file and reload, they get really ugly.

Edited by Mike1072, 04 July 2010 - 02:15 PM.


#27 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 04 July 2010 - 02:27 PM

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.

Attached Files


Edited by Mike1072, 23 November 2015 - 10:19 PM.


#28 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 05 July 2010 - 03:17 AM

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.

Eh... how does it do that exactly?

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


#29 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 05 July 2010 - 01:03 PM

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.

Eh... how does it do that exactly?

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.