Jump to content

[BGEE] BAM V2 file format


argent77

Recommended Posts

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.

Link to comment

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?

Link to comment

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

Link to comment

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?

Link to comment

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.

Link to comment

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.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...