Jump to content

adding new portrait icons from spells


pro5

Recommended Posts

Is it possible to use new custom portrait icon for use with Effect #142: Display Portrait Icon?

 

I've tried appending STATDESC.2DA with new icon description string, and using BAM Workshop to insert new icon into STATES.BAM. The result is that I'm getting the correct icon only on character portrait in main game screen; the character sheet just displays new description string, with no icon.

Link to comment

<<<<<<<<asdfasdf.asdfasdf
>>>>>>>>

COPY - ~asdfasdf.asdfasdf~ ~override~
 INSERT_BYTES 0x0 0x4
 SAY		  0x0 @1
 READ_LONG	0x0 "1"

COPY_EXISTING ~statdesc.2da~ ~override~
 PATCH_IF SOURCE_SIZE BEGIN
COUNT_2DA_ROWS 0x2 "entries"
INSERT_2DA_ROW "entries" 0x2 ~%entries% 999999~
REPLACE 999999 @1
INNER_ACTION BEGIN
  COPY_EXISTING ~stats.bam~ ~override~
	APPEND_FILE ~mymod/singleframebamsthaticompressedalready/stat~
END
 END
UNLESS ~[0-9]+ %1%~
BUT_ONLY

 

/edit

 

I'm skipping the whack patching language you'll have to apply to stats.bam, but I'm sure you're up to it :)

Link to comment

STATDESC.2DA stuff is obvious, I'm interested in this part:

COPY_EXISTING ~stats.bam~ ~override~
	APPEND_FILE ~mymod/singleframebamsthaticompressedalready/

For this to work, I also need to update the number of frames/cycles in BAM header.

I'm skipping the whack patching language you'll have to apply to stats.bam, but I'm sure you're up to it :)

Problem is, I can't apply any whacky patches to compressed BAM. :) If you mean actually decompressing it, then you assume too much of me. :(

Link to comment
Problem is, I can't apply any whacky patches to compressed BAM. :) If you mean actually decompressing it, then you assume too much of me. :(
:) You can do this.

INNER_ACTION_BEGIN
 COPY_EXISTING ~stats.bam~ ~override~
READ_ASCII 0x0 ~header~ (0x8)
 ACTION_IF (~header~ STRING_EQUAL ~BAMCV1~) BEGIN
COPY_EXISTING ~stats.bam~ ~override~
  DELETE_BYTES 0x0 0xc
AT_NOW ~mymod/decompress_stats_via_zlib.bat~
COPY_EXISTING ~stats.bam~ ~override~
  APPEND_FILE ~mymod/NOTcompressed.bam~
  PATCH_STUFF
COPY_EXISTING - ~stats.bam~ ~override~
  SET "decompressed_file_size" = SOURCE_SIZE
AT_NOW ~mymod/compress_stats_via_zlib.bat~
COPY_EXISTING ~stats.bam~ ~override~
  INSERT_BYTES 0x0
  WRITE_ASCII  0x0 ~%header%~
  WRITE_LONG   0x8  "decompressed_file_size"
 END ELSE BEGIN
COPY_EXISTING ~stats.bam~ ~override~
  APPEND_FILE ~mymod/NOTcompressed.bam~
  PATCH_STUFF
 END
END

Link to comment
states2.bam is for the character record screen, states.bam is for the portrait icons - as the two files are identical, you can probably get away with supporting just the one (though I don't know that this is true in all IE games)

 

Nice to know.

Offers completion of the portrait icon tweak - blank states.bam and shazzam, job done.

Link to comment

Archived

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

×
×
  • Create New...