Skip to content

Copying an IWD:EE item into BG:EE: advice needed

TisamonTisamon Member Posts: 209
Okay, so I happen to like Ogien's Scale +4 from IWD. I wanted to make it cosoleable in/importable into BG. I have exported OGIEN.ITM and all the linked files (the BAMs both for the armor and for Animal Rage it casts; SPL file for Animal Rage) into BG:EE/override. The result: it works. Kinda.

Two caveats:
1. The portrait status icon for Animal Rage (the red paw) doesn't show up. Probably because it doesn't exist in BG:EE, and I should put it into BG:EE/override as well. But how and where do I find the status icon in IWD:EE files?
2. The text is completely messed up. I understand that has something to do with wrong string reference, blah-blah-blah. How can I correct that?

Comments

  • sarevok57sarevok57 Member Posts: 5,975
    #1 - just like how you did the bam for the item file, you will have to find the bam for the animal rage spell, i dont know what modding tool you are using, but if its near infinity, you can go rummage around in the animal rage spell file and find the bam in there, and then just copy paste that into the bg override

    #2 - what is happening is that the description for the item is a specific string

    so lets say for example that in IWD the string reference lines for the scale armor are 10000 and 10001, what happens is, this line reference saves on the item, so when you bring it over to BG it will take the BG string lines 10000 and 10001

    so even more for example: if in IWD the string reference 10000 is Ogien's Scale +4, then BG might have: you must gather your party before venturing forth for it's string reference 10000 ( this probably isn't the EXACT case, but this is the premise on how it works)

    so what you will have to do, is make some new string reference's for the item,

    so say for example, if there is only 44551 string references in BGEE you could set 44552 as Ogien's Scale +4, and set string reference 44552 as the item description

    doing so means you need to fiddle around with the dialogue.tlk file so be careful when you do so ( i highly suggest making a back up of the dialogue.tlk before fiddling with it, just in case you horribly corrupt your dialogue.tlk )

    NI can edit the dialogue.tlk file, but again just be careful when doing so ( i've made 100s and 100s of new references with NI in the dialogue.tlk and only had a bad corruption once )
    ArunsunTisamon
  • TisamonTisamon Member Posts: 209
    Regarding #2: thanks, that's the answer I've been looking for.

    Regarding #1: I suspect we have a misunderstanding here. I _did_ extract all the BAMs from the Animal Rage file (there were two). There is no BAM reference to the portrait icon there, however: when I view the 'Display portrait icon' property, the portrait icon is only mentioned as '173 - Animal Rage', no BAM reference. Any ideas? If you have IWD:EE installed, just look up OGIEN.ITM -- you'll see what I mean.

    sarevok57
  • ArunsunArunsun Member Posts: 1,592
    edited February 2018
    Portrait Icon is the icon that is displayed on your character portrait on the top right of your screen (or in your character sheet). So you do not really need that for the spell to be functional.
    If you want the animal rage icon to be displayed you need to export the right BAM frame for the STATES.BAM in IWD and import it into the STATES.BAM of BG2.
    Alternatively you may edit the spell to change the icon (say, the Barbarian Rage icon)
    Raduziel
  • TisamonTisamon Member Posts: 209
    Arunsun said:

    Portrait Icon is the icon that is displayed on your character portrait on the top right of your screen (or in your character sheet). So you do not really need that for the spell to be functional.
    If you want the animal rage icon to be displayed you need to export the right BAM frame for the STATES.BAM in IWD and import it into the STATES.BAM of BG2.
    Alternatively you may edit the spell to change the icon (say, the Barbarian Rage icon)

    Thank you very much for the explanation. I'll take it from here. And no, of course, I don't need the correct portrait icon to be functional -- the spell is completely functional as it is, it's just that I want my character sheet to be nice-looking :)

  • CamDawgCamDawg Member, Developer Posts: 3,438
    Install IWDification, point OGIEN.itm to its version of Animal Rage (portrait icon included), and then go have a beer.
    ArunsunTisamonMathsorcerer
  • RaduzielRaduziel Member Posts: 4,714
    Arunsun said:

    Portrait Icon is the icon that is displayed on your character portrait on the top right of your screen (or in your character sheet). So you do not really need that for the spell to be functional.
    If you want the animal rage icon to be displayed you need to export the right BAM frame for the STATES.BAM in IWD and import it into the STATES.BAM of BG2.
    Alternatively you may edit the spell to change the icon (say, the Barbarian Rage icon)

    @Arunsun Can you please explain me how to do it?
  • ArunsunArunsun Member Posts: 1,592
    edited February 2018
    Raduziel said:

    Arunsun said:

    Portrait Icon is the icon that is displayed on your character portrait on the top right of your screen (or in your character sheet). So you do not really need that for the spell to be functional.
    If you want the animal rage icon to be displayed you need to export the right BAM frame for the STATES.BAM in IWD and import it into the STATES.BAM of BG2.
    Alternatively you may edit the spell to change the icon (say, the Barbarian Rage icon)

    @Arunsun Can you please explain me how to do it?
    Just googled it a bit and apparently it is simpler after v2.0. Have a look at the STATDESC.2DA file, that's where things happen. If you want to add/edit a portrait icon, just add a line, with the number you want to give to the portrait icon (e.g. animal rage is 173), the dialog.tlk reference for the name of the status.


    The third column is either a new, external bam with your portrait icon (which should be a 13*13 pixel bam with just one frame) or it will use the states.bam cycle number X (X being the number in the first column) so you would have to edit the states.bam and change the said cycle to add your frame to it. Quite tedious if you ask me so just create a new bam, now that this is possible.

    There might still be a hardcap of 255 state icons. The "Display Portrait Icon" resource number is on two bytes though so it should work up to 65535.
    Raduziel
  • CamDawgCamDawg Member, Developer Posts: 3,438
    @Raduziel IWDification adds several. The hard part is extracting the frame you want and making a new BAM for it. Once you have your new BAM, I have a macro written that will take care of the rest.
    RaduzielMathsorcerer
  • RaduzielRaduziel Member Posts: 4,714
    CamDawg said:

    @Raduziel IWDification adds several. The hard part is extracting the frame you want and making a new BAM for it. Once you have your new BAM, I have a macro written that will take care of the rest.

    That should do the trick.

    Thanks!
  • RaduzielRaduziel Member Posts: 4,714
    edited February 2018
    CamDawg said:

    @Raduziel IWDification adds several. The hard part is extracting the frame you want and making a new BAM for it. Once you have your new BAM, I have a macro written that will take care of the rest.

    @CamDawg

    Can you explain to me how to fill this macro like I was five years old?

    What I think:


    OMG, that is easy.

    I'll let my stupid and insecure question here just in case someone else is in need of a Macro-For-Dummies.

    [spoiler]
    Step 1) Create a .tpa named CDNewIcon.tpa and put it in the mod's Lib folder

    This .tpa must contain the macro per se:
    DEFINE_ACTION_FUNCTION cd_new_portrait_icon
    INT_VAR string = 0
    STR_VAR bam_file = "****"
    RET icon
    BEGIN

    COPY_EXISTING ~statdesc.2da~ ~override~
    COUNT_2DA_ROWS 3 count
    READ_2DA_ENTRY (count - 1) 0 3 icon
    SET icon += 1

    APPEND ~statdesc.2da~ ~%icon% %string% %bam_file%~

    END
    Step 2) Inside the mods .tp2 put the following command:
    ALWAYS

    INCLUDE ~%MOD_FOLDER%/Lib/CDNewIcon.tpa~

    END
    Step 3) Feeding the macro with Info...

    Let's say I have an icon called PRAYERIC.BAM, I created the string @999 = ~Prayer~ and I want to add it to BGEE...


    LAF cd_new_portrait_icon INT_VAR string = RESOLVE_STR_REF(@999) STR_VAR bam_file = PRAYERIC RET icon END

    COPY "Deities&Pantheons\Spl\Import\Tempus\#PRAYERG.spl" override //Prayer Good
    LPF ALTER_EFFECT INT_VAR match_opcode = 142 match_parameter2 = 183 parameter2 = icon END
    [/spoiler]

    That's it?

    Yes, it is.
  • TisamonTisamon Member Posts: 209
    CamDawg said:

    Install IWDification, point OGIEN.itm to its version of Animal Rage (portrait icon included), and then go have a beer.

    You are amazing. As usual :)
  • TisamonTisamon Member Posts: 209
    edited February 2018
    @CamDawg @sarevok57 @Arunsun Actually, I have a weird issue regarding the item description. Added the necessary entries to dialog.tlk and made OGIEN.ITM to refer to those strings. Now, while the BG:EE item looks like an exact copy of IWD:EE original in the NI, it has no text at all in game.
  • ThelsThels Member Posts: 1,416
    Do you have a savegame from before you ever entered the area containing the new item? If so, can you try loading that, and pick up the item again?

    String references are saved in your savegame. You may have old string references.
    Tisamon
  • TisamonTisamon Member Posts: 209
    Thels said:

    Do you have a savegame from before you ever entered the area containing the new item? If so, can you try loading that, and pick up the item again?

    String references are saved in your savegame. You may have old string references.

    I think that might be the case, yes.
  • TisamonTisamon Member Posts: 209
    Thels said:

    Do you have a savegame from before you ever entered the area containing the new item? If so, can you try loading that, and pick up the item again?

    String references are saved in your savegame. You may have old string references.

    Hmm. Apparently, that's not the case. Tried to load unrelated games, then consoled the armor in. No dice. Still no description.
  • ThelsThels Member Posts: 1,416
    Unfortunately, I'm not a modder, so I can't help you further.
  • sarevok57sarevok57 Member Posts: 5,975
    did you try a new game and importing the item in?

    also, are you 100% sure the new string references you made got saved?
  • TisamonTisamon Member Posts: 209
    sarevok57 said:

    did you try a new game and importing the item in?

    also, are you 100% sure the new string references you made got saved?

    Yes to both questions. As I said, in NI it's a perfect copy of IWD:EE's original item. The game seems to think I refer to blank strings, however.
  • sarevok57sarevok57 Member Posts: 5,975
    hmmm, something weird must be going on, because even if you already had saved game, i think the game would update with this sort of thing

    so if none of the text is showing up, that means the string you have it set to aren't available/ are written as "NO TEXT"

    try setting your item's string reference to something that is already available and see if that shows up, if it does show up, that means the custom strings that you have made are not working

    if you change the string reference to something else that should show up and doesnt, then there is something wrong with the item file
  • sarevok57sarevok57 Member Posts: 5,975
    also, did you make sure you are using the right language with your dialogue editting?

    so say for example, if you accidently editted the french dialogue.tlk file and you play the game in english, you will not see the new string references
  • TisamonTisamon Member Posts: 209
    @sarevok57 Thanks, I'll look into it.
    sarevok57
  • The user and all related content has been deleted.
    Raduziel
  • UOLegacyUOLegacy Member Posts: 153
    edited July 2018
    You can edit the text through NearInifnity for the item, unless I'm being oversimplistic. I feel the same way about "The Giving Star +3". :smile:

    P.S. I don't believe that I've ever came across your item in IWD:EE or the edtior.
Sign In or Register to comment.