gamemaster76 Posted January 31, 2021 Share Posted January 31, 2021 (edited) I just finished a mod for the Shapeshifter kit and I realized that the kit description in the character creator needs to be updated. Where would I find the file? I found that its on StringRef: 25225 for baldurs gate 2 and icewind dale, 24311 for Baldurs gate 1 Also what code would I use to change only the description? What I have so far is: COPY_EXISTING ~#####~ ~override/#####~ // updates kit description at character creation SAY 0x50: ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers. Advantages: – May Shapeshift into the form of a lesser werewolf once per day every 2 levels (starts at 1st level with one use). – 7th level: May Shapeshift into a normal werewolf once per day. – 13th level: May Shapeshift into a greater werewolf once per day. Disadvantages: – May not wear any armor. – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~ Edited February 1, 2021 by gamemaster76 Quote Link to comment
gamemaster76 Posted February 1, 2021 Author Share Posted February 1, 2021 (edited) Nevermind, I figured it out!STRING_SET <StringRef> ~my text ~ Edited February 1, 2021 by gamemaster76 Quote Link to comment
subtledoctor Posted February 1, 2021 Share Posted February 1, 2021 Check this: https://forums.beamdog.com/discussion/comment/1122797/#Comment_1122797 Quote Link to comment
gamemaster76 Posted February 1, 2021 Author Share Posted February 1, 2021 (edited) 10 hours ago, subtledoctor said: Check this: https://forums.beamdog.com/discussion/comment/1122797/#Comment_1122797 Thanks! Although I think I'm still doing something wrong. According to the post this should work, I changed only what they said to change. It gives a parse error: ACTION_IF (FILE_EXISTS_IN_GAME ~clastext.2da~) BEGIN COPY_EXISTING ~clastext.2da~ ~override~ COUNT_2DA_COLS cols READ_2DA_ENTRIES_NOW rows cols FOR (row = 1; row < rows; ++row) BEGIN READ_2DA_ENTRY_FORMER rows row 0 ~kit_name~ PATCH_IF ~SHAPESHIFTER~ STRING_EQUAL_CASE ~SHAPESHIFTER~ BEGIN SET patch_row = %row% END END SET_2DA_ENTRY %patch_row% 5 cols RESOLVE_STR_REF ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers. Advantages: – 7th level: May Shapeshift into a normal werewolf once per day. – 13th level: May Shapeshift into a greater werewolf once per day. Disadvantages: – May not wear any armor. – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~ BUT_ONLY END ACTION_IF (FILE_EXISTS_IN_GAME ~sodcltxt.2da~) BEGIN COPY_EXISTING ~sodcltxt.2da~ ~override~ COUNT_2DA_COLS cols READ_2DA_ENTRIES_NOW rows cols FOR (row = 1; row < rows; ++row) BEGIN READ_2DA_ENTRY_FORMER rows row 0 ~kit_name~ PATCH_IF ~SHAPESHIFTER~ STRING_EQUAL_CASE ~SHAPESHIFTER~ BEGIN SET patch_row = %row% END END SET_2DA_ENTRY %patch_row% 5 cols RESOLVE_STR_REF ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers. Advantages: – 7th level: May Shapeshift into a normal werewolf once per day. – 13th level: May Shapeshift into a greater werewolf once per day. Disadvantages: – May not wear any armor. – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~ BUT_ONLY END ACTION_IF (FILE_EXISTS_IN_GAME ~kitlist.2da~) BEGIN COPY_EXISTING ~kitlist.2da~ ~override~ COUNT_2DA_COLS cols READ_2DA_ENTRIES_NOW rows cols FOR (row = 1; row < rows; ++row) BEGIN READ_2DA_ENTRY_FORMER rows row 1 ~kit_name~ PATCH_IF ~SHAPESHIFTER~ STRING_EQUAL_CASE ~SHAPESHIFTER~ BEGIN SET patch_row = %row% END END SET_2DA_ENTRY %patch_row% 4 cols RESOLVE_STR_REF ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers. Advantages: – 7th level: May Shapeshift into a normal werewolf once per day. – 13th level: May Shapeshift into a greater werewolf once per day. Disadvantages: – May not wear any armor. – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~ BUT_ONLY END Edited February 1, 2021 by gamemaster76 Quote Link to comment
The Artisan Posted February 1, 2021 Share Posted February 1, 2021 Here's a premade macro (not by me, but I can't quite remember who did it) that will do the work for you. Make sure you actually have a lib folder (library, or make it whatever you want, just make sure the paths match) with the kit_strref.tpa in it or it won't work. INCLUDE ~%MOD_FOLDER%/lib/kit_strref.tpa~ LAF ~GET_KIT_STRREF~ STR_VAR kit_name = ~SHAPESHIFTER~ RET kit_strref END STRING_SET_EVALUATE kit_strref ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers. Advantages: – 7th level: May Shapeshift into a normal werewolf once per day. – 13th level: May Shapeshift into a greater werewolf once per day. Disadvantages: – May not wear any armor. – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~ kit_strref.tpa Quote Link to comment
gamemaster76 Posted February 1, 2021 Author Share Posted February 1, 2021 (edited) 14 minutes ago, Artemius I said: Here's a premade macro (not by me, but I can't quite remember who did it) that will do the work for you. Make sure you actually have a lib folder (library, or make it whatever you want, just make sure the paths match) with the kit_strref.tpa in it or it won't work. INCLUDE ~%MOD_FOLDER%/lib/kit_strref.tpa~ LAF ~GET_KIT_STRREF~ STR_VAR kit_name = ~SHAPESHIFTER~ RET kit_strref END STRING_SET_EVALUATE kit_strref ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers. Advantages: – 7th level: May Shapeshift into a normal werewolf once per day. – 13th level: May Shapeshift into a greater werewolf once per day. Disadvantages: – May not wear any armor. – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~ kit_strref.tpa 1.96 kB · 3 downloads Awesome! it worked for BG1. But when I tried it for BG2 and IWD it doesnt work. says it cant find kit_strref.tpa even though the lib folder is there Nevermind! found the problem! Edited February 1, 2021 by gamemaster76 Quote Link to comment
subtledoctor Posted February 1, 2021 Share Posted February 1, 2021 3 hours ago, gamemaster76 said: READ_2DA_ENTRY_FORMER rows row 0 ~kit_name~ PATCH_IF ~SHAPESHIFTER~ STRING_EQUAL_CASE ~SHAPESHIFTER~ BEGIN SET patch_row = %row% END END SET_2DA_ENTRY %patch_row% 5 cols RESOLVE_STR_REF ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of... Need to change that 2nd line to PATCH_IF (~%kit_name%~ STRING_EQUAL_CASE ~SHAPESHIFTER~) BEGIN You turned the first entry (entry 0) of each row into a variable; next you need to check whether that variable matches the text string "shapeshifter." The way you had it, you were checking whether the text string "shapeshifter" matches the text string "shapeshifter," which will always return true. Also, the string after RESOLVE_STR_REF might need parens around the tildes. Maybe not... but I always put it inside parens, and it always works when I do. Quote Link to comment
gamemaster76 Posted February 8, 2021 Author Share Posted February 8, 2021 (edited) On 2/1/2021 at 11:30 AM, Artemius I said: Here's a premade macro (not by me, but I can't quite remember who did it) that will do the work for you. Make sure you actually have a lib folder (library, or make it whatever you want, just make sure the paths match) with the kit_strref.tpa in it or it won't work. INCLUDE ~%MOD_FOLDER%/lib/kit_strref.tpa~ LAF ~GET_KIT_STRREF~ STR_VAR kit_name = ~SHAPESHIFTER~ RET kit_strref END STRING_SET_EVALUATE kit_strref ~SHAPESHIFTER: This Druid is not called Shapeshifter because has access to a great variety of forms, but rather because of complete dedication to a single alternate form. This Druid has willingly allowed self to become infected with lycanthropy, but due to intense study and training has the ability to control affliction. The creature becomes is that of the werewolf, the most famous of the lycanthrope shape changers. Advantages: – 7th level: May Shapeshift into a normal werewolf once per day. – 13th level: May Shapeshift into a greater werewolf once per day. Disadvantages: – May not wear any armor. – No other Shapeshifting abilities due to the effort required in maintaining balance in primary forms.~ kit_strref.tpa 1.96 kB · 3 downloads How do I use this to change the name of a kit? It would be useful for another mod I'm making... and unfortunately I can't understand the kit_strref file Edited February 8, 2021 by gamemaster76 Quote Link to comment
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.