Editing paperdolls?
#1 -Rhaka-
Posted 17 July 2006 - 01:06 PM
Using Near Infinity, I'm able to extract the file, and I can edit it with MOSWorkShop. However, when used in-game, the colours are all sorts of screwed up. I'm assuming this is because it didn't get the proper pallete data.
Any assistance with this would be greatly appreciated, as I have no clue where to start.
#2 -Guest-
Posted 26 July 2006 - 04:16 AM
Paper Dolls are stored in the PLT files, not BAMs or MOS files. MOS Workshop (at least my copy) has no idea what to do with one.I'm trying to make a minor edit to the BG2 (and, if succesful, later on the BG1) paper dolls: specifically, to remove the fugly beard from the human male wizard.
Using Near Infinity, I'm able to extract the file, and I can edit it with MOSWorkShop. However, when used in-game, the colours are all sorts of screwed up. I'm assuming this is because it didn't get the proper pallete data.
Any assistance with this would be greatly appreciated, as I have no clue where to start.
Paper dolls have a very simple header; By changing that first 24 byte header to the following, and renaming the file .DIB, I was able to get a reasonably workable image in paint; getting it back will be another story.
42 4D 42 A0 00 00 00 00 00 00 42 00 00 00 28 00
00 00 80 00 00 00 A0 00 00 00 01 00 10 00 03 00
00 00 00 00 00 00 C3 0E 00 00 C3 0E 00 00 01 00
00 00 00 00 00 00 FF 00 00 00 00 F0 00 00 00 0F
00 00
What this does is call it a Bitmap using the first byto for the red channel, the second byte split between blue and green. When you bring this into Microsoft Paint (under XP at least) it manages to interpret it correctly enough - you get a red background image with the appropriate thing showing fairly clearly in red-washed grey. At least it would let one check one's work, or decide HOW to modify something.
#3 -Guest-
Posted 26 July 2006 - 04:49 AM
Perhaps a paint program "brush" file format would be close... nah. bother.
#4
Posted 26 July 2006 - 05:57 AM
MOS Workshop 1.0.0.7 works with PLT files; it seems to treat them as greyscale with transparency channels, which is definately wrong. I was able to make something fairly useful by doing cut and paste on an existing PLT, though I have not yet tried working up a new one. I'm not sure how it maps colors to the PLT, either, which is why the greyscale in MOS workshop worries me so. For instance, using the existing WPMD2INV.PLT with just cut and paste to make a WPMD1INV.PLT for a buckler, my buckler uses the palette colors for the character's skin, rather than those of a shield.It appears a PLT file is in reverse order, that is, top of file is highest Y scan line. Very odd, but this appears to be a hold-over from windows BMP or DIB format.
Perhaps a paint program "brush" file format would be close... nah. bother.
Edited by WizWom, 26 July 2006 - 06:08 AM.
#5
Posted 26 July 2006 - 09:48 AM
The first byte is intensity; this is mapped, it seems, to the color intensity profiles applied by the various colors selected. An intensity of 255 indicates transparent.
The second byte for each pixel is the color.
For a character portait paperdoll:
0: Skin
1: Hair
2: Metal
3: Armor
4: Leather
5: Clothing Minor Color
6: Clothing Major Color
7-127: Shadow (intensity ignored)
these colors seem to cycle again after 128; which probably means the high bit is a flag of some sort.
So, now to make some sort of translator...
Edited by WizWom, 26 July 2006 - 10:00 AM.
#6 -Guest-
Posted 26 July 2006 - 12:58 PM
#7
Posted 26 July 2006 - 01:31 PM
#8
Posted 26 July 2006 - 02:11 PM
Heh, Silly typo :-)Link doesn't work
http://mysite.verizo...wom/PLT2BMP.exe
http://mysite.verizo...wom/bmp2plt.exe
color mapping:
Reds: Belt
Greens: hair
Blues: skin
Cyans: Main Armor
Magentas: Main Clothing
Yellows: secondary clothing
Black: shadow
pure white: transparent
#9
Posted 26 July 2006 - 02:28 PM
The first word after the file version is not garbage, it is the paperdoll type:[http://mysite.verizo...wom/PLT2BMP.exe
http://mysite.verizo...wom/bmp2plt.exe
0 = character
8 = equiptment (like a shield or a helmet)
I think this keeps you shield from coming in in the color of your character's skin. But it appears to have no discernable effect at all.
I'll look into having a command line option to set this. I suppose one could just hack it in after for now.
It looks like the weapons still have BAM paperdolls.
Edited by WizWom, 26 July 2006 - 03:08 PM.
#10
Posted 26 July 2006 - 03:30 PM
Heh - it's good to chuckle over... The Marilith needs a paper doll ASAP :-)
#11
Posted 26 July 2006 - 04:52 PM
Tired of Bhaal? Try some classics mods instead:
Classic Adventures
Official Classic Adventures Website
#12
Posted 27 July 2006 - 12:27 AM
Hlid used to talk about a paperdoll nude he had of Imoen
It was funny. I still have this minimod in my Backups.
#13
Posted 27 July 2006 - 04:12 AM
Well, let's see... how would one do something like that?Hlid used to talk about a paperdoll nude he had of Imoen
It was funny. I still have this minimod in my Backups.
Take photo; Split out the hair from the skin; convert hair to greyscale, put at green channel; convert skin to greyscale; put as blue channel; trim to size; convert BMP to PLT.
Hm. I thkn I'll try it for a Sirine. MSIRINV.PLT is just aching to be done...
#14
Posted 27 July 2006 - 04:32 AM
I noticed that your color id's are different than this picture
note the blues and yellows
I am not sure if BWS1 messed the pallete (like avenger says it does) and that is what I am seeing or what.
Edited by Sir-Kill, 27 July 2006 - 04:34 AM.
#15
Posted 27 July 2006 - 06:55 AM
That's the color mapping for a BAM; you can make you paper dolls in a BAM just as easily. My color mapping was done by taking the color options (only 7) and using eash of the 3 bits to indicate a color channel. And since color 0 was valid (and color 7 was shadow), I incremented by 1 before doing that. Matching that color mapping would not be hard; a translation table is just as valid a way to map colors from an index to RBG.cool utility, hopefully it might prove usefull.
I noticed that your color id's are different than this picture
note the blues and yellows
I am not sure if BWS1 messed the pallete (like avenger says it does) and that is what I am seeing or what.
And that would make it more simple to convert a PLT to BAM and vice versa...
#16
Posted 27 July 2006 - 08:22 AM
Color # Elf Fighter, Armor3 Dwarf Thief, Armor 2 Gnome Fighter, Armor 1 Helm 5 0 Skin skin skin 1 Hair hair hair 2 Metal Armor Edge of clothes belt buckle main 3 Belt & highlights Belt & highlights edge 4 Boots & sec. armor Boots and main armor boots & sash 5 codpiece bracers & codpiece pants studs 6 cowl & pants shirtWell, OK, I guess I can work with this.
Using the metal color for the edge of the cowl on the thief is, well, odd, but I didn't do it :-)
Colors used by BAM
Color BAM Blue Armor Red Belt, Straps, Edging Green hair Yellow skin Cyan Bracers Magenta Main clothes White BucklesNote: because it's paletteized, they might be using other colors, so there might be more tha 7 mapped. Hm. No, the palette seems to be 7 groups of 12 grades for each color I've listed, and that seems to be all they used.
And that's why the PLT file is superior: 254 shades of each color vs 12. much smoother. But over a 128x160 pixel area, who would notice?
#18
Posted 27 July 2006 - 08:54 AM
#19
Posted 29 July 2006 - 03:00 PM
And with the hair color and skin soloration of the "target", too.. Although the "blue skin" viconia looks mighty strange, what with white hair and all.
#20
Posted 30 July 2006 - 03:06 AM
The first word after the file version is not garbage, it is the paperdoll type:
0 = character
8 = equiptment (like a shield or a helmet)
I think this keeps you shield from coming in in the color of your character's skin. But it appears to have no discernable effect at all.
I have yet to see a paperdoll without 0x8 on the first byte!
Please tell me an original paperdoll which has no 0x8 there.