Jump to content

Changing BAM Source: Display Issue


Bill Bisco

Recommended Posts

I have the following code here, from my mod where I am trying to add a new item to the game, but I am having trouble getting it to work. The proper Inventory Icon is not displaying.

 

COPY ~Erevain/Bams/DBIITM01.BAM~ ~override~
COPY ~Erevain/Bams/IBIITM01.BAM~ ~override~
COPY ~Erevain/Items/BIITM01.ITM~ ~override~
SAY NAME1 ~Erevain's Elven Plate +2~
SAY NAME2 ~Erevain's Elven Plate +2~
...
WRITE_ASCII 0x003a ~IBIITMT01.BAM~ // 8 (resref) Inventory icon
WRITE_ASCII 0x0044 ~GPLAT01.BAM~ // 8 (resref) Ground icon
WRITE_ASCII 0x0058 ~DBIITM01.BAM~ // 8 (resref) Description icon
I used NearInfinity, copied CHAN19.ITM and its associated BAMs, modified the .ITM properties, and renamed the ITM and BAMs. Now, I am telling the mod to use these renamed BAMs and map the new BAMs to the ITM.
The Inventory Icon is not appearing correctly as you can see:
LWfgc5.png
The original ToB ICHAN19.BAM displays fine, but for some reason. Copying it is failing me. Can anyone tell me why?
Link to comment

You seem to be including file extension into the strref - which likely corrupts the file because you didn't specify the write length.

WRITE_ASCII offset ascString [ #requiredSize ]

 

The ASCII ascString is written to the file starting at offset. If you specify a requiredSize then exactly that many bytes are written (if ascString is smaller, it is padded with NULs; if ascString is larger, it is truncated). If you do not specify a requiredSize, the terminating NUL is not written.

WRITE_ASCII 0x003a ~IBIITMT01~ #8 // 8 (resref) Inventory icon

WRITE_ASCII 0x0044 ~GPLAT01~ #8 // 8 (resref) Ground icon

WRITE_ASCII 0x0058 ~DBIITM01~ #8 // 8 (resref) Description icon

 

Also note that "IBIITMT01" is 9 characters long, rather than 8 max.

Link to comment

Thank you Ardanis! I changed the characters back to 8 and added #8 and the display error is gone! For some reason GPLAT01 doesn't display correctly, but I can correct this in NearInfinity with no issue.

 

Sincere thanks. I really appreciate it.

Link to comment

Archived

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

×
×
  • Create New...