Jump to content

Photo

[BGEE] BAM V2 file format

bgee bg2ee

15 replies to this topic

#1 argent77

argent77
  • Modders
  • 826 posts
  • Gender:Male

Posted 18 November 2013 - 10:38 AM

The new BAM V2 format has been introduced in BG2EE and BGEE patch 1.2. It is similiar to the new MOS V2 format described here in more detail.

BAM V2 header:
Offset    Size    Description
0x0000    4       Signature ('BAM ')
0x0004    4       Version ('V2  ')
0x0008    4       Number of frames
0x000C    4       Number of cycles
0x0010    4       Number of data blocks
0x0014    4       Start offset of frame entries
0x0018    4       Start offset of cycle entries
0x001C    4       Start offset of data blocks

Frame entry:
Offset    Size    Description
0x0000    2       Frame width
0x0002    2       Frame height
0x0004    2       Frame center x coordinate
0x0006    2       Frame center y coordinate
0x0008    2       Start index of data blocks
0x000a    2       Number of data blocks in this frame

Cycle entry:
Offset    Size    Description
0x0000    2       Number of frame entries in this cycle
0x0002    2       Start index of frame entries in this cycle

Data block:
Offset    Size    Description
0x0000    4       PVRZ page
0x0004    4       Source (PVRZ) x coordinate
0x0008    4       Source (PVRZ) y coordinate
0x000C    4       Width
0x0010    4       Height
0x0014    4       Target (BAM) x coordinate
0x0018    4       Target (BAM) y coordinate

BAM V2 resources refer to MOSxxxx.PVRZ files, where xxxx is a four-digits decimal number (PVRZ page). The transparency information required by most of the BAMs is stored in the pixel data of the PVRZ files itself.

#2 Mike1072

Mike1072
  • Gibberling Poobah
  • 2539 posts
  • Gender:Male
  • Location:Canada

Posted 18 November 2013 - 01:49 PM

0x000C 4 Number of cycles

= practically unlimited amount of state icons!

#3 argent77

argent77
  • Modders
  • 826 posts
  • Gender:Male

Posted 18 November 2013 - 01:55 PM


0x000C 4 Number of cycles

= practically unlimited amount of state icons!

Yes, but you have only as many as 9999 PVRZ files where you can fetch the icons from. ;)

#4 PapySilk

PapySilk
  • Members
  • 9 posts

Posted 20 November 2013 - 01:33 AM

So it is normal if my new BAMs are ignored by BG2EE ? (I just created one with bamworkshop2 - a simple recolor - and it's blank in game)

#5 Kaeloree

Kaeloree

    beluga

  • Modders
  • 833 posts
  • Gender:Male

Posted 20 November 2013 - 01:44 AM

Description bams are not currently supported; you have to use 24bit BMPs with transparency. A version of DLTCEP that can save bams as this type of bmp should be out soon if it's not already. :)

If you're talking about item icon bams, that should be working fine. Are you sure you've created your bam correctly?

Edited by Kaeloree, 20 November 2013 - 01:45 AM.


#6 PapySilk

PapySilk
  • Members
  • 9 posts

Posted 20 November 2013 - 01:50 AM

It's a spell BAM. I took the 813 wizzard icon (exported via NI), changed slightly the color, saved it. Doesn't work. But NI said it was corrupted somehow so I guess it's normal.

Waiting for a new version of NI then.

Edited by PapySilk, 20 November 2013 - 01:50 AM.


#7 Wisp

Wisp
  • Modders
  • 1142 posts
  • Gender:Male

Posted 20 November 2013 - 02:05 AM

If all you did with NI was exporting the file, it is highly unlike that's what corrupted it. I'd sooner look to whatever tool you used to edit the BAM.

#8 PapySilk

PapySilk
  • Members
  • 9 posts

Posted 20 November 2013 - 02:29 AM

NI considers it corrupted like all spell BAM. I can still export it even though it says it's corrupted.

So I exported it anyway, modified it, saved it. Doesn't work. If the BAM format changed, maybe it's the BAM workshop update I need.

#9 argent77

argent77
  • Modders
  • 826 posts
  • Gender:Male

Posted 20 November 2013 - 03:25 AM

NI considers it corrupted like all spell BAM. I can still export it even though it says it's corrupted.

So I exported it anyway, modified it, saved it. Doesn't work. If the BAM format changed, maybe it's the BAM workshop update I need.

Yes, the official NearInfinity version w1.3.0 cannot display many BG(2)EE icons correctly (if at all). This issue has already been addressed in the current development branch.

If you are really desperate, you can use this development version of NI. It doesn't yet support the new BAM format, but it should display the spell icons correctly. Please note that the current development versions may break compatibility with older NI versions under certain circumstances (i.e. you may have trouble starting older NI versions after using the current one).

Edit: updated link

Edited by argent77, 24 November 2013 - 02:40 AM.


#10 Avenger

Avenger
  • Modders
  • 3806 posts
  • Gender:Male
  • Location:Hungary

Posted 20 November 2013 - 08:37 AM

DLTCEP supports the description BMP, but it doesn't have much idea about the new BAM/MOS stuff.

#11 Kwiat_W

Kwiat_W
  • Members
  • 7 posts
  • Location:Poland

Posted 21 November 2013 - 12:37 AM


0x000C 4 Number of cycles

= practically unlimited amount of state icons!

If someone is going to release a mod with a custom states.bam and thus incompatible with other mods that do the same, they could probably find a way to make it work with limitations of old bams. It would be much more useful if beamdog would modify opcode 142 (Display Special Effect Icon) to allow use of custom bam files.

Does bgee engine allows bam frames grater than 256x256?

#12 Mike1072

Mike1072
  • Gibberling Poobah
  • 2539 posts
  • Gender:Male
  • Location:Canada

Posted 21 November 2013 - 01:42 PM



0x000C 4 Number of cycles

= practically unlimited amount of state icons!

If someone is going to release a mod with a custom states.bam and thus incompatible with other mods that do the same, they could probably find a way to make it work with limitations of old bams.

You can patch new cycles into a .bam file.

#13 PapySilk

PapySilk
  • Members
  • 9 posts

Posted 23 November 2013 - 12:27 AM

Well, anyway, the last patch made all BAM modifications impossible as long as a tool as not been updated. (BAM Workshop I believe)

Am I right ?

(If not, can you explain me how to make a new HLA / innate icon ?)

#14 argent77

argent77
  • Modders
  • 826 posts
  • Gender:Male

Posted 23 November 2013 - 09:56 AM

Well, anyway, the last patch made all BAM modifications impossible as long as a tool as not been updated. (BAM Workshop I believe)

Only a selected few BAMs have been converted into the new BAM V2 format (about 100 out of 16000 for BG2EE). You should have not trouble modifying the majority of BAMs (including states.bam), theoretically.

#15 igi

igi

    IESDP Guardian

  • Gibberlings
  • 1221 posts
  • Gender:Male

Posted 24 November 2013 - 02:05 AM

Added to local copy. The PVRZ format would be kind of useful to detail...



Reply to this topic



  



Also tagged with one or more of these keywords: bgee, bg2ee

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users