Jump to content


Adding New Spell Effect Icon on Portrait

7 replies to this topic

#1 vanatos

  • Members
  • 46 posts

Posted 16 February 2017 - 11:55 PM



In regards to adding new spell effect icons (modifying States2.bam) can this be done in weidu in a manner that would not cause mod conflicts with other spell mods (Like Revisions)?

The tutorials i have read suggest to create a modified copy of States2.Bam with your .bam added in the sequence, but that seems like it would not be compatible with any other mod that has States2.Bam.
Basically does weidu have any functionality to append to .bam?

Edited by vanatos, 16 February 2017 - 11:56 PM.

#2 argent77

  • Modders
  • 756 posts
  • Gender:Male

Posted 17 February 2017 - 02:53 AM

Modifying STATES.BAM (and STATES2.BAM) is doable, but a very complicated task. I don't think WeiDU provides a function for this. If you don't have to consider backwards compatibility with original games you can simply create your own BAM file with the portrait icon and add it together with a description to STATDESC.2DA.

#3 K4thos

  • Modders
  • 1057 posts
  • Gender:Male

Posted 17 February 2017 - 03:12 AM

if this mod is for EE games only (patch 2.x) than modifying STATES.BAM is no longer needed. You can reference new icons as standalone BAM files via STATDESC.2DA. Examples:

188        25904           SPWI417D
189        103062          SPPR150D
190        103078          SPPR750D
191        103117          SPSH004D

edit: didn't notice the reply.

Edited by K4thos, 17 February 2017 - 03:21 AM.

#4 vanatos

  • Members
  • 46 posts

Posted 17 February 2017 - 03:31 AM

Cheers guys that'll work, the mods for private use on EE.

#5 vanatos

  • Members
  • 46 posts

Posted 17 February 2017 - 08:19 PM

Oops one other question, i'm currently using weidu to add an entry into this statdesc.2da


I'm trying to figure out a dynamic way of doing it so that the first column of the entry i add has the correct next incremented value (ie 192 off the game without mods).


Or should i not bother and just put in a number and hope no other mod is going to use that number?

#6 kjeron

  • Members
  • 84 posts

Posted 17 February 2017 - 10:04 PM

COUNT_2DA_ROWS cols rows
SET max = 0
FOR (i = 0; i < rows; ++i) BEGIN
READ_2DA_ENTRY i 0 cols num
PATCH_IF num > max BEGIN max = num END
SET max += 1
INSERT_2DA_ROW rows cols ~%max%   %strref%   %filename%~

Edited by kjeron, 17 February 2017 - 10:05 PM.

#7 vanatos

  • Members
  • 46 posts

Posted 18 February 2017 - 02:55 AM

Your a champ.


One more question :p How do i put in a TRA string symbol in INSERT_2DA_ROW?


Basically i want to do something like INSERT_2DA_ROW rows cols ~%max%   %@19%   %filename%~


Where @19 is from the TRA file, but i'm not sure how to do it properly.


I do already have a workaround by doing 


INSERT_2DA_ROW rows cols ~%max%   9999   %filename%~

COPY_EXISTING ~statdesc.2da~ ~override~

   REPLACE ~9999~ @19


Just wondering if i can do it more cleanly.

#8 argent77

  • Modders
  • 756 posts
  • Gender:Male

Posted 18 February 2017 - 04:30 AM

You can resolve the tra reference beforehand with

SET strref = RESOLVE_STR_REF(@19)

followed by

INSERT_2DA_ROW rows cols ~%max%   %strref%   %filename%~

Reply to this topic


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users