gamemaster76 Posted March 20, 2022 Posted March 20, 2022 (edited) I have a mod that adds more Dragon Disciple kits for each element. I have everything working except for renaming the original kit. Right now I'm just rewriting the string. Sloppy but I can't figure out how else to do it. Except now I decided to install the Enhanced Edition Trilogy mod to merge both Baldur's Gate games into one. And now the mod doesn't recognize it has either BG2EE or BG1EE ( the mod is in the BG2EE directory). The code is: "REQUIRE_PREDICATE GAME_IS ~BGEE BG2EE IWDEE~ ~This component can only be installed on BGEE, BG2EE, and IWDEE games.~ /....\ ACTION_IF GAME_IS ~BGEE~ THEN BEGIN // For BG1EE STRING_SET 31976 ~dragon disciple (fire)~ // Changes original kits name in character creator STRING_SET 31977 ~Dragon Disciple (Fire)~ END ELSE ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN // For BG2EE STRING_SET 74302 ~dragon disciple (fire)~ // Changes original kits name in character creator STRING_SET 74303 ~Dragon Disciple (Fire)~ END ELSE ACTION_IF GAME_IS ~IWDEE~ THEN BEGIN // For IWDEE STRING_SET 37252 ~dragon disciple (fire)~ // Changes original kits name in character creator STRING_SET 37254 ~Dragon Disciple (Fire)~ END " So either how do I skip the need to check what game and just have it look for the kit name an rewrite it; Or how do made this code work with EET? Edit: the error message I get is: This component can only be installed on BGEE, BG2EE, and IWDEE games. weidu_external/lang/english/ubsetup.tra file not found. Skipping... Edited March 20, 2022 by gamemaster76 Quote
gamemaster76 Posted March 20, 2022 Author Posted March 20, 2022 (edited) 25 minutes ago, DavidW said: Read in the strings from clastext.2da Ok? Do you mean rewrite the name in the clastext.2da file? I'm not sure if that would be different then the other files. Would it be something like this?: COPY_EXISTING ~clastext.2da~ ~override~ SET_2DA_ENTRY 58 ~ Dragon Disciple (Fire)~ Would this change it both places were the name is referenced? Edited March 20, 2022 by gamemaster76 Quote
subtledoctor Posted March 20, 2022 Posted March 20, 2022 That entry needs to be a string reference, not a string, so you need to use RESOLVE_STR_REF first, and SET_2DA_ENTRY to the resulting variable. Quote
DavidW Posted March 20, 2022 Posted March 20, 2022 You need to read the string out of the clastext file, then set it. Something like this: COPY_EXISTING - "clastext.2da" nowhere // we're read-only, no need to write the file COUNT_2DA_COLS colcount READ_2DA_ENTRIES_NOW clastext_data colcount FOR (row=0;row<clastext_data;++row) BEGIN READ_2DA_ENTRY_FORMER clastext_data row 0 kitname PATCH_IF "%kitname%" STR_EQ "DRAGON_DISCIPLE" BEGIN READ_2DA_ENTRY_FORMER clastext_data row 3 lower READ_2DA_ENTRY_FORMER clastext_data row 5 mixed row=clastext_data // done now, no point keeping going END END STRING_SET lower ~dragon disciple (fire)~ STRING_SET mixed ~Dragon Disciple (Fire)~ Quote
jastey Posted March 20, 2022 Posted March 20, 2022 5 hours ago, gamemaster76 said: Or how do made this code work with EET? The check for EET is ~eet~. You'd need to include it into your game checks. As for the content, I'd assume the BGII:EE content should work with EET as well, but you best check whether the kit uses the same string in EET. 5 hours ago, gamemaster76 said: weidu_external/lang/english/ubsetup.tra file not found. Skipping... It looks like you have a reference in your mod to that tra file somewhere. If it's not intentional you need to replace it with an own tra file / text. Quote
gamemaster76 Posted March 20, 2022 Author Posted March 20, 2022 3 hours ago, jastey said: The check for EET is ~eet~. You'd need to include it into your game checks. As for the content, I'd assume the BGII:EE content should work with EET as well, but you best check whether the kit uses the same string in EET. It looks like you have a reference in your mod to that tra file somewhere. If it's not intentional you need to replace it with an own tra file / text. That did it! thanks! I was trying to put BGEET and it didn't work but EET only worked. That's the thing, no where in my code it references a .tra file 3 hours ago, DavidW said: You need to read the string out of the clastext file, then set it. Something like this: COPY_EXISTING - "clastext.2da" nowhere // we're read-only, no need to write the file COUNT_2DA_COLS colcount READ_2DA_ENTRIES_NOW clastext_data colcount FOR (row=0;row<clastext_data;++row) BEGIN READ_2DA_ENTRY_FORMER clastext_data row 0 kitname PATCH_IF "%kitname%" STR_EQ "DRAGON_DISCIPLE" BEGIN READ_2DA_ENTRY_FORMER clastext_data row 3 lower READ_2DA_ENTRY_FORMER clastext_data row 5 mixed row=clastext_data // done now, no point keeping going END END STRING_SET lower ~dragon disciple (fire)~ STRING_SET mixed ~Dragon Disciple (Fire)~ there we go. Thanks! Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.