Jump to content


Photo

Creating custom paperdoll items


  • Please log in to reply
10 replies to this topic

#1 Erephine

Erephine

    leit að lífi

  • Member
  • 1912 posts

Posted 22 July 2004 - 09:17 AM

Well, Sir-Kill has asked me how to do this in a PM, so (as I had to write it anyway) there's no reason not to post it here ;)

Before you read the stuff below, to prevent any misunderstandings... We?re talking about the items that appear on the paperdoll if you equip an item (for example, the shield/helmet/sword, etc. graphics)

Generally, a word of warning if you?re going to create extra paperdoll art. BG2 has only so-much paperdoll graphics for a reason. It is NOT wise to put in thousands of different paperdoll item graphics, and especially unique items should normally be avoided. However, if you?re completely sure you want to add it (and feel it?s necessary), heres what you?ll have to do:

You?ll need:

- An item that makes use of it (duh!)
- One set of game avatar animations (you can use one of the stock ones if you don?t care)
- Your paperdoll graphic (i.e. the thing you want to add to the game)

I. Your Item

When you open your item in NearInfinity, change to the Edit tab. There you?ll see a field called ?inventory icon?. Let?s presume you?d want to create a ?shield of the magical triangle? which looks like a triangle on the paperdoll if you equip it. You probably used a shield as a base for your item, so this should have a value of something like D4 or so. You will have to change this to a unique identifier name for your item. Make sure your designation is only TWO characters long, and is NOT used by any of the stock graphics. You could probably use something like PP (for example). Change that field to your identifier (i.e. PP in our example).

Your item should now successfully crash the game if you equip it in-game.

II. The in-game animations

An in-game avatar set in BG2 consists of several BAM files with the names:

WQ + Size + Identifier + animation part

For example shield graphics have the animation parts A1, A3, A5, G1, and SS. This will vary in different item categories though.

Theres three sizes of species in Baldurs Gate. S stands for small, M for medium and L for large. BG2 also has a fourth size called N, although one of BG2?s sizes is redundant and not used at all by the game. As I?ve forgotten which one that is (sue me :P) you?ll better make sure to have all the four of them.

If you want the same in-game graphics like the item had before, look for the files with the appropriate names and export them. In our example this would be

WQLD4A1.BAM
WQLD4A3.BAM
WQLD4A5.BAM
WQLD4G1.BAM
WQLD4SS.BAM
WQMD4A1.BAM
WQMD4A3.BAM
WQMD4A5.BAM
WQMD4G1.BAM
WQMD4SS.BAM
WQSD4A1.BAM
WQSD4A3.BAM
WQSD4A5.BAM
WQSD4G1.BAM
WQSD4SS.BAM
WQND4A1.BAM
WQND4A3.BAM
WQND4A5.BAM
WQND4G1.BAM
WQND4SS.BAM

Replace the identifier with your custom one and place them in your override folder (reason one why to keep this to a minimum, you?ll be flooded with thousands of files):

You?ll now have the following files in your override:

WQLPPA1.BAM
WQLPPA3.BAM
WQLPPA5.BAM
WQLPPG1.BAM
WQLPPSS.BAM
WQMPPA1.BAM
WQMPPA3.BAM
WQMPPA5.BAM
WQMPPG1.BAM
WQMPPSS.BAM
WQSPPA1.BAM
WQSPPA3.BAM
WQSPPA5.BAM
WQSPPG1.BAM
WQSPPSS.BAM
WQNPPA1.BAM
WQNPPA3.BAM
WQNPPA5.BAM
WQNPPG1.BAM
WQNPPSS.BAM

Your item should now no longer crash the game as it would have done before, but will have no visible paperdoll image.

III. The paperdoll graphic

The thing you initially wanted to add :)

First off, BG2 has a new format called PLT for inventory graphics. This format sucks though, and theres no good editor around for it. However, BG2 still has support for comfortable BAM files, so i?d recommend anyone to stick to those. I would like to point out there?s no way known to me to make PLT paperdoll items work properly, and even stock BG2 uses some of the paperdoll art in BAM form (namely weapons).

BG2 handles it?s inventory graphics still in the old BG1 naming convention system, which uses the prefix WP instead of BG2?s WQ:

WP + Size + Identifier + animation part

Search for the animation parts ?INV? with said naming convention, and extract it. In our case that would be:

WPLD4INV.BAM
WPMD4INV.BAM
WPND4INV.BAM
WPSD4INV.BAM

One-handed weapons have both INV and OIN files. The OIN file is for the second hand.

You?ll now create your own paperdoll graphics.

This is how they?re managed:

The paperdoll screen is split in an upper and a lower half. Any INV (or OIN) BAM will have two frames.

Frame 0 is for the upper half of the paperdoll. (i.e. hands-up)
Frame 1 is for the lower half of the paperdoll (below the hands)

Note that Frame 0 will ONLY be visible in the upper half, and Frame 1 ONLY in the lower half. If it reaches into the other half that part will be invisible.

An inventory graphic has one sequence with:

Frame 0
Frame 0
Frame 1
Frame 1

You?ll have to make sure everything stays in the appropriate half of the image. For example, shields will have to be ?split up? in the middle, as half of them is above, and half below the hands. This is absolute rubbish for the OIN graphics, as the second hand usually is lower than the left one, making you have to split the weapon graphic at odd points. Still, you?ll have to do this. My suggestion, however, is to use the full graphic for both frames, and then adjusting them (with the BAM placement values) so they match up. The redundant parts will be invisible anyway, and not slow you down. The advantage is, your sanity will be kept intact :P

As for the graphic itself. You will HAVE to use the exact palette from one of the INV files (just pick one). You?ll note the palette has different ?spectres? of colours, each representing a colour index that can later be set in your item file with ?Set Item Colour?. For example, the inner part of a shield uses the first purple scale, the rim uses the first blue scale (also used for sword blades). The wooden handles on weapons use the first red scale. Theres more, but that?s just to give you an idea. So, you?ll have to draw your item in ?false-colour? using the different colour ranges for the different parts of your object. You will then be able to use the item ability ?Set Item Colour? to set the colours to your desired colourisation. You?ll have to make sure you hit the right ?locations?. I suggest NearInfinity to set everything up.

Now, in our shield example, we would probably be using a BG1 shield inventory graphic as a base (as PLT sucks and cannot be used in any way) and thus be using the same colours for the parts of our new and shiny shield paperdoll image. On BG1 shields these locations are:

Unknown (034) ? inner part of the shield (PURPLE PART)
Unknown (037) ? shield knob (GREY PART)
Unknown (032) ? outer part of the shield (BLUE PART)

Place the inventory files in your override dir. You?ll have to adjust the BAM positioning so they appear on the correct part of the paperdoll (you don?t want a sword floating left of your hand, do you? ;) ), you will have to repeat this step for each character size (S, M/N, L).

If you?ve done all that, and didn?t make a mistake along the road, your item should now show up correctly in-game.

Congratulations, you?ve made your own (and working!) inventory paperdoll graphics!

Reminder: Keep in mind that BG2?s PLT files use a whole different system for colouring, and that you can NOT use them as a reference or copy from them. They?re completely useless, and screw up if you use BAMs for ANY of the other inventory graphics (for example my paperdoll fix). Do not waste your time with PLT. Take my advice and stick to BAM, and you will be happy.

崇高滑稽
·


#2 Sir-Kill

Sir-Kill
  • Member
  • 906 posts

Posted 22 July 2004 - 09:42 AM

Thank you kind sir.
Live Free Or Die

#3 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 07 May 2017 - 10:34 PM

Theres three sizes of species in Baldurs Gate. S stands for small, M for medium and L for large. BG2 also has a fourth size called N, although one of BG2?s sizes is redundant and not used at all by the game.
I realise it's too late to ask Erephine, but may be someone knows: while there is indeed S, M, L & N types of the same animation, there's also H type not covered by the quote above. Is it unused too like N type?

Edited by Creepin, 07 May 2017 - 10:36 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#4 Sam.

Sam.
  • Administrator
  • 1334 posts

Posted 08 May 2017 - 02:28 PM

Theres three sizes of species in Baldurs Gate. S stands for small, M for medium and L for large. BG2 also has a fourth size called N, although one of BG2?s sizes is redundant and not used at all by the game.
I realise it's too late to ask Erephine, but may be someone knows: while there is indeed S, M, L & N types of the same animation, there's also H type not covered by the quote above. Is it unused too like N type?

Look through Erephine's Dev Notes.

 

**** INVENTORY SIZE CLASSIFICATIONS ****

 ___
|   |
|L+N|
| M |
|H+S|
|___|

-= H =-

male halflings
male gnomes
female gnomes


-= L =-

male half-orcs
male humans

-= M =-

male elves
female elves

-= N =-

female half-orc
female humans

-= S =-

female halflings
female dwarves
male dwarves

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#5 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 08 May 2017 - 02:31 PM

Fantastic, thanks a lot Sam.:)


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#6 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 02 July 2017 - 12:15 PM

Much like community prefix list works, I'd like to claim all "C*" identifiers for naming paperdoll items (minus vanilla and those taken by Erephine naturally). This is 21 free identifier as of today, some might say it's too much, but hey you've got another 700 or so! Considering this is not very popular line of modding (did anyone but Erephine ever bothered with such?) that should be enough until BG4 release and some more :)

Edited by Creepin, 03 July 2017 - 12:36 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#7 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 14 November 2017 - 01:35 PM

Note that Frame 0 will ONLY be visible in the upper half, and Frame 1 ONLY in the lower half. If it reaches into the other half that part will be invisible.

Just wanted to say that this is not so, at least for me. I found it more convenient to operate a whole picture within a single bmp, thus my bam's 1st frame contains the whole picture and 2nd frame contains 1x1 green dot. Still works perfectly.


Edited by Creepin, 14 December 2017 - 08:46 AM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#8 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 14 December 2017 - 08:46 AM

An observation regarding z-buffering: it seems like frame 1 of the equipped item renders above PLT paperdoll but below frame 2 of BAM paperdoll.


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#9 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 06 January 2018 - 04:31 PM

I have found out that Erephine's size classification is not entirely true when it comes to weapons:
Spoiler

Here's how it works for weapon paperdoll:
Spoiler

The difference being that H size creatures uses S size main hand weapon paperdoll, while H size main hand weapon paperdoll seems to be unused by the game. Tested in both vanilla and 1PP (in case 1PP uses some exe hack to change size layout).

Edited by Creepin, 08 January 2018 - 12:23 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#10 Sir-Kill

Sir-Kill
  • Member
  • 906 posts

Posted 18 March 2021 - 10:41 PM

I'm looking to add some new paperdoll images specifically using plt but reading notes it seems like you can't assign a new armor ppd the 2 character index w/o having a ton of bams for the avatar. I am not looking to do anything with avatars.

Is there some way to circumvent this something like "hey game just use these that are all ready and waiting" but you know in computer speak.

I was thinking that having more than one human male fighter plate armor type (as an example)

chmf4inv
chmf5inv...
chmfJinv...

I have already done one chmf4inv.plt that turned out better than the original.plt and better than the bam
I also did 1 chmf4inv.bam that format sucks, that turned out uh, passable.

Edited by Sir-Kill, 19 March 2021 - 08:01 AM.

Live Free Or Die

#11 Sir-Kill

Sir-Kill
  • Member
  • 906 posts

Posted 19 March 2021 - 04:18 PM

I was thinking cdtweaks 'avatar morphing script', or 1pp smart 'avatar and armor switching' has something like what I am asking (I think).
Live Free Or Die