Skip to content

Items from old mods to add to EET game - help, please!

SeiSei Member Posts: 18
Hi,

Maybe some good souls here will be able to help me.


How do I go about extracting only items from old mods to add them to, say, Ribald's store?

They are all for BGII (not the enhanced edition) and I'd like to use them or have the option of choosing them in my EET playthroughs.

I have 5 mods from which I would like to extract the items and from what I've checked, they are not actively supported for either EET or BG2EE, or BG2.

One of the mods has the item store added to Amkethran, and it's just an item store, so maybe there is any chance to update it to EET compatibility with some minor changes?


This is for my personal use, as I don't think publishing an amalgamation of items from some few mods would be in good taste.

I recently made a post on G3 about the possibility of converting the whole mods, but alas, I'm not up to par for the task, nor do I have the time.

And I would just really, really like the items. ;_;

Plz help? *puppy eyes*

Comments

  • SeiSei Member Posts: 18
    Maybe somebody could show me / direct me with 1 setup file, 1 / 2 stores and 2 items? I'm trying to check, compare and do something in my free time, but just nothing is working.

    The mods I've had in mind:


    Please... Don't judge. It's pure cheese, but I really like it. o:)

    1) MunchMod by Sigwald, resurrected by hlidskialf
    2) Enhanced BG2 v1.1 by Damian S. (don't want to write his full name for the sake of his privacy, it's in the mod readme though)
    3) Heroes of Amn v1.0 by Kallen
    4) The Magnificient Magic Store by Tapio Kivikkola
    5) The Improved Volcano! Pack by Baronius

    Basically, I'd at least like to get the items from these mods and if adding the stores from those mods is not possible, then to add them to some existing store in BG2. Could be Ribald's, could be at Amkethran (probably would make more "sense" for these items), if someone could guide me through the process I will do the menial, repeatable stuff.

    I can also do exchange, e.g. translate something from English to Polish and vice versa, do some minor graphic editing (hair / eye colour change, small scar erasure, some other modifications to an extent).

    2ylghmul4h5y.gif
  • jasteyjastey Member Posts: 2,671
    This is probably not what you were hoping for, but maybe you could get an idea what you need to extract from the said mods by having a look at an item mod tutorial: http://www.shsforums.net/topic/55875-making-a-weidu-mod-with-your-custom-item/
  • SeiSei Member Posts: 18
    jastey wrote: »
    This is probably not what you were hoping for, but maybe you could get an idea what you need to extract from the said mods by having a look at an item mod tutorial: http://www.shsforums.net/topic/55875-making-a-weidu-mod-with-your-custom-item/

    Hi,

    Thank you for your reply.
    And this tutorial is EET compatible?

    Sorry for a dumb question, but I want to make sure. :D

  • jasteyjastey Member Posts: 2,671
    I would think so. There is the following for items in EET that would differ for the classic engine (for which the tutorial was probably written):
    1. in EE(T), there is much more possibilities with effects and stuff. But all items that work on the classic engine also should work on the EE.
    2. EET has a continuous chapter system that starts in BG1. This would only affect if you had some chapter sesitive content in your item mod (e.g. a merchant that should only spawn in chapter x).
    3. if it's a BG1 item (mod), it gets a bit more complicated to read in the correct strings (if game strings are being used). But BGII strings are the same numbers in BG2 and EET.

    It gets complicated if you want to mod the Bg1 part of EET. The BGII part is mostly the same resource names, except for teh chapter numbers and some additional things for NPC mods.
  • SeiSei Member Posts: 18
    I don't want to give up just yet on adding the goddamn whole store from the 5th mod from my list, so I'm still blindly trying to change I don't even know what, and - pretty obviously too - it's not working. :D:'(:D

    I tried, like, copying some code from another store mod, and I just straight up get errors in Weidu, and I don't understand why.

    upttmzctb6o0.png
    zb5cughnas3c.png


    I tried checking some .itm file from the mod, but I can't, because if I try to open .itm file in NI let's say, but without installing it on BG2EE (because the mod, predictably, won't install), it doesn't have any strings so there's just some gibberish.

    Probably something obvious, but I've no first clue.
  • jmerryjmerry Member Posts: 3,829
    Parse error at line 30. Translation: either that or what comes immediately before it is an error. In this case, slightly obscured by bad indentation, you're missing an END. Here, let me repackage that code with some extra comments and different indentation:
    ALWAYS
    	/* other bits redacted */
    	ACTION_DEFINE_ARRAY r#_noconvert BEGIN END // Defines an empty array. Fill later?
    	LAF HANDLE_CHARSETS // Bad indentation; this function should be on the same level
    		INT_VAR // These variables belong to the function, so give them an indent level
    		infer_charset = 1
    		STR_VAR
    		tra_path = EVAL ~%MOD_FOLDER%/lang~
    		noconvert_array = r#_noconvert // Guess we're not filling that array
    		reload_array = r#_reload
    	END // This ends the function declaration
    // There needs to be another END here for the ALWAYS block.
    
    AUTO_TRA ~volcano/lang/%s~ // WeiDU expects END or an action suitable for the ALWAYS block. Error.
    

    Running into errors ... it's just part of the process. I had to fix dozens of syntax errors when I updated my tweak mod not too long ago, and that was just an update to something that already mostly worked.
  • jasteyjastey Member Posts: 2,671
    It took me two hours straight to fix (and find!) my very first weidu error message - it was a missing tilda. You're doing good!
  • jmerryjmerry Member Posts: 3,829
    And using a sensible process. Ever tried to debug code in a text editor that doesn't do line numbering? I have, and it got painful. These days, I copy into something designed for code (TexShop) at the bug-hunting phase so I can at least find the offending lines.
  • SeiSei Member Posts: 18
    Yay, thank you both!

    @jmerry thank you, can't say how many times I did something with "END", but never added a second one. :D
    jmerry wrote: »
    ACTION_DEFINE_ARRAY r#_noconvert BEGIN END // Defines an empty array. Fill later?
    		noconvert_array = r#_noconvert // Guess we're not filling that array
    

    1) Made me laugh.
    2) I copied it from another mod's setup file so I actually don't know what it actually does. Could you maybe explain / post link to where it's explained / give an example? :tongue:

    Also, from the *redacted bits* and the fact that it's working at all I gather those "outer_set" and "include" are unnecessary, I thought the 1st one is some type of game detection trigger? Is it useful at all or unneccessary at this point? I want to make it work on EET.
    ACTION_IF GAME_IS BG2EE THEN BEGIN
      LOAD_TRA ~xxx/%LANGUAGE%/setup_ee.tra~ // Is it in this case "auto_tra" block instead of "load_tra"? Does it make any difference?
    END
    

    BTW any specific thing that needs to be done for my "//" code comments to be greyed out?

    ---

    @jastey thank you for your words of encouragement, tips and all! Though I wish it was just 2 hours. Or even 6 hours... xD :lol::cry::lol:

    ---

    The good news is that now it was possible to install this and it even somehow works in English on pure BG2EE.

    The "bad" news is there are still some issues,

    1) 1 item has "not usuable by" / "usable by" blocks in 1 item descritpion
    2) 1 item has "not usable by" twice and it differs
    3) the seller's name is "Blue Basilisk +2"

    1 & 2) "Not usable by" is in the setup descriptions and it's to be deleted, since EE does this already.
    But is there a "usable by" in game too and I just don't remember? Can both blocks be in 1 item description? If I don't want both of them, should it be changed in .itm file?
    If the "not usable" block dictated by EE is different than the one dictated by description and I want restrictions from description, this should be changed in the .itm file, too, yes?

    3) Do I think correctly that this can be because in non-EE setup files some of the strings are kind of repeated and in EE setup files they are not?

    As in:

    @20 = ~Zodesak~
    @21 = ~Cryonax~
    @22 = ~The Blue Basilisk +2~
    @23 = ~The Blue Basilisk +2

    [rest of description
    stats]~

    The @22 string should be erased? I think it should from what I read but am not sure.

    Last thing is that this mod originally requires game language declaration and if you change your mind, you've got to tinker in 1 Weidu file and re-install all mods. Is there a way to avoid it, as in, have the mod "adapt" to game language change?
  • jmerryjmerry Member Posts: 3,829
    Sei wrote: »
    2) I copied it [noconvert] from another mod's setup file so I actually don't know what it actually does. Could you maybe explain / post link to where it's explained / give an example? :tongue:
    I have no experience with the function myself (since I work strictly with the EE and everything's already standardized to UTF-8, but just from the name I expect r#_noconvert is a list of files to exclude from the conversion process. Which, as the comment above what I quoted notes, should be none of them.
    Sei wrote: »
    Also, from the *redacted bits* and the fact that it's working at all I gather those "outer_set" and "include" are unnecessary, I thought the 1st one is some type of game detection trigger? Is it useful at all or unneccessary at this point? I want to make it work on EET.
    Not at all. I just redacted them because they're irrelevant to this error. The fact that this is the ALWAYS block and that needs an END is important, the fact that there are earlier actions in the ALWAYS block is irrelevant.
    Sei wrote: »
    ACTION_IF GAME_IS BG2EE THEN BEGIN
      LOAD_TRA ~xxx/%LANGUAGE%/setup_ee.tra~ // Is it in this case "auto_tra" block instead of "load_tra"? Does it make any difference?
    END
    

    BTW any specific thing that needs to be done for my "//" code comments to be greyed out?
    I wouldn't know on the WeiDU coding question, as I've never used auto_tra - I build my tra files manually. during the coding process.
    As for the formatting of code blocks on this forum ... it's using conventions from some programming language which isn't WeiDU. There's some overlap, but not everything matches. And sometimes it just goes crazy seeing things like those keywords in the comment you quoted there. I didn't do anything special, and I mostly just use code blocks because it's a monospaced font and allows you to indent things properly.
    Sei wrote: »
    3) Do I think correctly that this can be because in non-EE setup files some of the strings are kind of repeated and in EE setup files they are not?

    As in:

    @20 = ~Zodesak~
    @21 = ~Cryonax~
    @22 = ~The Blue Basilisk +2~
    @23 = ~The Blue Basilisk +2

    [rest of description
    stats]~

    The @22 string should be erased? I think it should from what I read but am not sure.
    No, @22 should be there. It's the item's name on its own, and that gets a reference directly in the item file. But the EE standard doesn't have the item's name in the description string; the first two lines should be removed from @23, leaving only that "[rest of description stats]". (Does the EE add the item's name to the description in gameplay?

    @21 can also potentially be removed; Cryonax is a monster in ToB, and ToB is always included in BG2EE. It was an expansion, so the old mod had to account for people with BG2 but not ToB; that's not an issue for the EE. If you wanted to, you could use the existing string (#72806 or #72807).
  • JohnBobJohnBob Member Posts: 128
    edited March 2023
    Hello @Sei ,

    From a beginner to another !

    Here is the mod adapted for BG2TOB, BG2EE and EET... (hopefully...)

    I will detail the steps so that you can apply them to other mods :

    I didn't push my tests very far but the mod installs on BG2EE and everything seems to work.

    1....

    For adapt the text to EE, you need several things.

    - IconV, it is the tool that make the dialog and description working for both engine.

    - In association with the fonction Handle Charset, this function has several forms in several mods but does the same things.

    You need to make attention on the files path, in this case in lang folder, so all language have to be in this folder.

    The folder Autotra is not mandatory, you can adapt the file path for it or not, and place IconV in the Autotra folder or in the Lang folder, depending on your choice.

    2....

    For adapt description to EE

    - Only restricted items should be handled.

    - The gw_fonction.tpa from Gwendolyne is used for that part.

    So you have to look in dialog.tra for items with restriction.

    And change the associated lines in tp2 this way.

    Depend if the description is identified or not :

    - LPF ~GW_WRITE_EE_ITM_DESCRIPTIONS~ STR_VAR GW_undesc_to_update = "@ xx" END
    - LPF ~GW_WRITE_EE_ITM_DESCRIPTIONS~ STR_VAR GW_desc_to_update = "@ xxr" END
    In volcano every thing is identified so only the latter is necessary.

    Nope one item use both, because it need to be identified.

    For this to work you need to add some lines in every setup.tra for every existing languages in the mod

    You can get the lines for all language here.


    3....

    For Volcano_pack some items and spells were duplicated in tp2, I removed them...

    You have to compare the tp2 before and after to see which entries are affected.

    Old mod have often some oddities...

    4....

    An item was not placed in the store, so I add it as follows...

    You can choose is position in the store and if the item is identified or not.

    For weidu everything writed after // or between /* xxxxx */ is not used but is convenient for display informations to other modders.

    So the last block in tp2 is only a example.

    5....

    The tp2 can go inside the mod folder and is better to update the .exe with the last version.




    This is a short summary, if you need more details don't hesitate!


    Edit : If your not familiar with github, for downnload the mod you need to click on Code (green button) and Download Zip

    Edit 2 : I forgot a duplicated item, I will remove it later...

    - ANGBOW.ITM here and here

    Edit 3 :
    Sei wrote:
    Last thing is that this mod originally requires game language declaration and if you change your mind, you've got to tinker in 1 Weidu file and re-install all mods. Is there a way to avoid it, as in, have the mod "adapt" to game language change?

    No, you can't, the texts are installed on one language (dialog.tlk), if you change the language in BG the game switches to another dialog.tlk and all lines added by mods appear as "Undefined string".
    Post edited by JohnBob on
  • SeiSei Member Posts: 18
    :0 WOW. A big thank you, I will be checking and comparing it for sure and I probably will have questions at some point, but for now - thank you! : )
  • SeiSei Member Posts: 18
    Hi again, guys & gals :D

    It's only partially related, but I thought I will write here.

    I tried changing Ring of Gaxx / making my own and, for the most part, I got it well enough.
    There's just one thing that's not how it's supposed to be.

    I made changes to the item abilities - instead of 1x Invisibility & 3x Haste I changed it to 2x Invisibility, 2x Haste, 1 / 2x (undecided) Regeneration/Sanctuary.

    1) The charge for Invisibility, no matter what I do, stays at x1 instead of x2 when I test it by getting it through CluaConsole. Charges for Haste and/or Regeneration/Sanctuary are fine. After rest, the Invisibility charge corrects itself and is x2 as planned. Any idea why that might be and how to correct it so that the charge is x2 from the get-go?

    2) Related to Regeneration/Sanctuary - is there any way to cast a spell from an item on a specific target that is not yourself* a Sanctuary portrait icon that I just can't find? If yes, what's its name?

    3) Some items get a bit bigger when you pick them up and smaller when you put them down. And so picking them up / putting them down is visibly differentiated. Some items (rings, mostly, from what I've noticed) don't have that. Is there any way to add this effect?

    *Figured it out after all.
  • jmerryjmerry Member Posts: 3,829
    #1:
    When you create an item through that command/script action, there are several optional arguments for the initial number of charges. The first such argument defaults to 1, so you'll get one charge of Invisibility by default. If you want two charges, you'll have to explicitly set that to 2 in the creation command. C:CreateItem(%yourring%,2,2,1) for 2, 2, and 1 charges of the abilities in order.

    #2:
    There's no explicit portrait effect in Sanctuary, likely because that spell's effect has tricky ending conditions. If there's a Sanctuary portrait icon, it would be somewhere in STATES.BAM, and hardcoded to the Sanctuary effect. The string references associated with the icons in STATES.BAM are in STATDESC.2DA ... all right, searching now. No instances of "Sanctuary" there. And checking the IESDP, the Sanctuary opcode has a visual effect associated with it (SANCTRY.BAM) but no mention of a portrait icon. Looks like there's no portrait icon.

    #3:
    ... Ask someone else.
  • SeiSei Member Posts: 18
    #1: Aaaa, right. So if I were to add it to some store, it will automatically have the charges stated in the .itm file?

    #2: Thank you, I found it. I actually made the icon in the meantime.
    0a6b8940b5p1.png
    Only to discover that I won't be able to add it anywhere. :D Oh well. But at least thanks to you and some tinkering in the states.bam the realisation came quicker than usual.

    #3: Maybe you have someone in particular in mind? : P
  • jmerryjmerry Member Posts: 3,829
    Items in store files have those charge parameters. What will they be when you add the item? Well, that depends on how you do it.

    Sell an item to a store in-game, and it will be fully recharged (the numbers in the ITM file) unless an instance of the item is already present with different charge numbers.

    Use the AddStoreItem script action ... that gets messy. That action doesn't have a parameter for charges, only count. It doesn't exactly do what you'd think, restocking to a given level instead of just adding items. And it behaves particularly oddly with charged items. Any items added will be either fully charged or charged the same as those already in the store, but the "count" is divided by the maximum number of charges for the first ability and rounded down. Discussed and figured out here.

    Use WeiDU's ADD_STORE_ITEM command? That has mandatory parameters for the charge numbers.

    Use WeiDU's ADD_STORE_ITEM_EX function? That has optional parameters for the charge numbers, defaulting to zero.

    (Someone in particular? No, that was just me saying that I don't really know about that stuff. And I don't know who does, either. I've always been more focused on the mechanics than the cosmetic elements of the game.)
Sign In or Register to comment.