Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[WeiDU Mod] NPC Renamer

ErgErg Member Posts: 1,756
edited March 2014 in BG:EE Mods
BG Version: This mod works with BG:EE and BGII:EE (credit and thanks for the BGII:EE component go to @CrevsDaak )
Languages: English only
Version: 3

Mod Description:
This mod allows to rename NPCs through an (hopefully) easy to use textual menu. It will work for both new and ongoing games.

Using the textual menu, one can rename several NPCs, or several times the same NPC (e.g. to fix a typo), by just selecting their corresponding number(s), until one is fully satisfied with the changes and ready to proceed with the installation.

However, once the mod has been installed, further name changes are only possible by uninstalling or re-installing. In both cases all NPCs will revert to their original names (e.g. if the mod has been installed, one can't just rerun the installer and rename only one NPC while retaining custom names for the others).

Installation instructions:
See the enclosed ReadMe file.

This mod has been inspired by this discussion.

Many thanks to @CrevsDaak (for writing) and to @TheFanxza (for testing) the BGII:EE component of this mod.

Edit: this is how the textual menu looks like
image

Post edited by Erg on
zupskyKilivitzIllustairEudaemoniumMarkyStradlinCrevsDaakPantalionXcidiumTheFanxzaartificial_sunlightGrammarsalad

Comments

  • CrevsDaakCrevsDaak Member Posts: 7,081
    Mr. spoiler sounds funny! But I have guessed who you are talking about already. Now I can get the chance to easy rename Imoen to Immy the walking plothole.

    ErgGrammarsalad
  • CrevsDaakCrevsDaak Member Posts: 7,081
    @Erg are you going to make a BG2:EE version of this mod?

  • TheFanxzaTheFanxza Member Posts: 6
    I would love something like this to work on BG2EE !!!

  • ErgErg Member Posts: 1,756
    edited March 2014
    @CrevsDaak @TheFanxza‌

    I can't make a version of this mod for BG2:EE as I don't have BG2:EE, so I would not be able to properly test it.

    However, if someone else wants to do it, without starting from scratch, they are free to use the code in my tp2 file and change it and/or improve it as they see fit.

    CrevsDaakTheFanxza
  • CrevsDaakCrevsDaak Member Posts: 7,081
    edited March 2014
    @Erg thank you, when I get home I'll take a look :D
    Edit: I took a look and updated it, I haven't tested it but it *should* work.
     BACKUP ~Erg_NPC_Renamer_v1/backup~
    AUTHOR ~Erg, at http://forum.baldursgate.com~
    VERSION ~v1.1~

    BEGIN ~Erg's NPC Renamer, BG1EE~
    REQUIRE_PREDICATE GAME_IS ~bgee~
    ~This mod only works with BGEE!~

    ACTION_CLEAR_ARRAY erg_npcs_array
    ACTION_DEFINE_ARRAY erg_npcs_array BEGIN
    ~~ ~AJANTI~ ~ALORA~ ~BRANWE~ ~CORAN~ ~DORN~
    ~DYNAHE~ ~EDWIN~ ~ELDOTH~ ~FALDOR~ ~GARRIC~
    ~IMOEN1~ ~JAHEIR~ ~KAGAIN~ ~KHALID~ ~KIVAN~
    ~MINSC~ ~MONTAR~ ~NEERA~ ~QUAYLE~ ~RASAAD~
    ~SAFANA~ ~SHARTE~ ~SKIE~ ~TIAX~ ~VICONI~
    ~XAN~ ~XZAR~ ~YESLIC~ ~BAELOTH~
    END

    ACTION_CLEAR_ARRAY erg_original_array
    ACTION_DEFINE_ARRAY erg_original_array BEGIN
    ~~ ~Ajantis~ ~Alora~ ~Branwen~ ~Coran~ ~Dorn~
    ~Dynaheir~ ~Edwin~ ~Eldoth~ ~Faldorn~ ~Garrick~
    ~Imoen~ ~Jaheira~ ~Kagain~ ~Khalid~ ~Kivan~
    ~Minsc~ ~Montaron~ ~Neera~ ~Quayle~ ~Rasaad~
    ~Safana~ ~Shar-Teel~ ~Skie~ ~Tiax~ ~Viconia~
    ~Xan~ ~Xzar~ ~Yeslick~ ~Baeloth~
    END

    OUTER_SET choice = 30

    OUTER_WHILE (%choice% != 0) BEGIN

    PRINT ~Which NPC would you like to rename?

    1. Ajantis 2. Alora 3. Branwen
    4. Coran 5. Dorn 6. Dynaheir
    7. Edwin 8. Eldoth 9. Faldorn
    10. Garrick 11. Imoen 12. Jaheira
    13. Kagain 14. Khalid 15. Kivan
    16. Minsc 17. Montaron 18. Neera
    19. Quayle 20. Rasaad 21. Safana
    22. Shar-Teel 23. Skie 24. Tiax
    25. Viconia 26. Xan 27. Xzar
    28. Yeslick 29. Mr. Spoiler

    Please enter an integer between 1 and 29 (or
    0 if you are happy with your current choices
    and ready to proceed)~

    ACTION_READLN choice

    ACTION_IF NOT(IS_AN_INT %choice%) THEN BEGIN
    OUTER_SET choice = 30
    END

    ACTION_IF (%choice% < 30 AND %choice% > 0) THEN BEGIN

    OUTER_SPRINT erg_original_name $erg_original_array("%choice%")
    OUTER_SPRINT erg_npc $erg_npcs_array("%choice%")

    ACTION_IF ((FILE_EXISTS_IN_GAME ~%erg_npc%.CRE~)) THEN BEGIN

    COPY_EXISTING ~%erg_npc%.CRE~ override
    READ_LONG 0x8 erg_strref
    BUT_ONLY_IF_IT_CHANGES

    ACTION_GET_STRREF %erg_strref% erg_current_name
    PRINT ~Current Name for %erg_original_name%: %erg_current_name%~
    PRINT ~Enter a new name for %erg_original_name% (or just
    press ENTER to keep the current name)~
    ACTION_READLN erg_new_name

    ACTION_IF NOT(~%erg_new_name%~ STRING_EQUAL ~~) THEN BEGIN
    STRING_SET_EVALUATE %erg_strref% ~%erg_new_name%~
    END

    END

    END

    END

    BEGIN ~Erg's NPC Renamer, BG2EE~
    REQUIRE_PREDICATE GAME_IS ~bg2ee~
    ~This mod only works with BG2EE!~

    ACTION_CLEAR_ARRAY erg_npcs_array
    ACTION_DEFINE_ARRAY erg_npcs_array BEGIN
    ~~ ~AERIE6~ ~ANOMEN6~ ~CERND10~ ~NEERA10~ ~DORN9~
    ~JAN10~ ~EDWIN11~ ~KORGAN12~ ~HAER10~ ~OHHFAK8~
    ~IMOEN10~ ~JAHEIR8~ ~KELDORN10~ ~OHHEX8~ ~WILSON13~
    ~MINSC10~ ~RASAAD10~ ~VICONI10~ ~VALYG10~ ~YOSHI10~
    ~MAZZY12~ ~NALIA15~ ~SAREVOK~
    END

    ACTION_CLEAR_ARRAY erg_original_array
    ACTION_DEFINE_ARRAY erg_original_array BEGIN
    ~~ ~Aerie~ ~Anomen~ ~Cernd~ ~Neera~ ~Dorn~
    ~Jan~ ~Edwin~ ~Korgan~ ~Haer'Dalis~ ~Hexxat~
    ~Imoen~ ~Jaheira~ ~Keldorn~ ~Hexxat~ ~Wilson~
    ~Minsc~ ~Rasaad~ ~Viconia~ ~Valygar~ ~Yoshimo~
    ~Mazzy~ ~Nalia~ ~Sarevok~
    END

    OUTER_SET choice = 23

    OUTER_WHILE (%choice% != 0) BEGIN

    PRINT ~Which NPC would you like to rename?

    1. Aerie 2. Anomen 3. Cernd
    4. Neera 5. Dorn 6. Jan
    7. Edwin 8. Korgan 9. Haer'Dalis
    10. Faxxat 11. Imoen 12. Jaheira
    13. Keldorn 14. Hexxat 15. THE Bear
    16. Minsc 17. Rasaad 18. Viconia
    19. Valygar 20. Yoshimo 21. Mazzy 22. Nalia 23. Mr. Anchev

    Please enter an integer between 1 and 23 (or
    0 if you are happy with your current choices
    and ready to proceed)~

    ACTION_READLN choice

    ACTION_IF NOT(IS_AN_INT %choice%) THEN BEGIN
    OUTER_SET choice = 24
    END

    ACTION_IF (%choice% < 24 AND %choice% > 0) THEN BEGIN

    OUTER_SPRINT erg_original_name $erg_original_array("%choice%")
    OUTER_SPRINT erg_npc $erg_npcs_array("%choice%")

    ACTION_IF ((FILE_EXISTS_IN_GAME ~%erg_npc%.CRE~)) THEN BEGIN

    COPY_EXISTING ~%erg_npc%.CRE~ override
    READ_LONG 0x8 erg_strref
    BUT_ONLY_IF_IT_CHANGES

    ACTION_GET_STRREF %erg_strref% erg_current_name
    PRINT ~Current Name for %erg_original_name%: %erg_current_name%~
    PRINT ~Enter a new name for %erg_original_name% (or just
    press ENTER to keep the current name)~
    ACTION_READLN erg_new_name

    ACTION_IF NOT(~%erg_new_name%~ STRING_EQUAL ~~) THEN BEGIN
    STRING_SET_EVALUATE %erg_strref% ~%erg_new_name%~
    END

    END

    END

    END

    Post edited by CrevsDaak on
    ErgTheFanxza
  • TheFanxzaTheFanxza Member Posts: 6
    Thank you Erg and Crevs!
    I am unfortunatelly not as good as you guys are with mods... but i can test it, just tell me how and i will :D

    CrevsDaakErg
  • CrevsDaakCrevsDaak Member Posts: 7,081
    @TheFanxza‌ copy the codes I posted to your clipboard (just like normal copy action), go to the TP2 file fron @Erg's mod, open it with a light text editor like Notepad, and paste what I posted by replacing all the other stuff in it. Run the .EXE and it should work as before but for both games.

    Erg
  • ErgErg Member Posts: 1,756
    edited March 2014
    @CrevsDaak‌ your modified code should be fine.

    Also, you should add yourself as AUTHOR (if you want to).

    Post edited by Erg on
    CrevsDaak
  • TheFanxzaTheFanxza Member Posts: 6
    Aaaaalright. If i copy the whole script it and run it, it goes by:
    "ERROR: problem parsing TP file [ERG_NPC_RENAMER_V1.TP2]: Failure ("No rule to identify BG2EE")
    FATAL ERROR: Failure ("No rule to identify BG2EE")

    If I divide the script, starting from just the part for BG2EE it unfortunately does not work either.
    The reason is the same.

    If you need a quicker reply I can send you my Skype or email.

  • ErgErg Member Posts: 1,756
    edited March 2014
    TheFanxza said:

    Aaaaalright. If i copy the whole script it and run it, it goes by:
    "ERROR: problem parsing TP file [ERG_NPC_RENAMER_V1.TP2]: Failure ("No rule to identify BG2EE")
    FATAL ERROR: Failure ("No rule to identify BG2EE")

    If I divide the script, starting from just the part for BG2EE it unfortunately does not work either.
    The reason is the same.

    If you need a quicker reply I can send you my Skype or email.

    @TheFanxza that's my fault :)

    In fact, I haven't updated the WeiDU file in my mod in a while.

    I will upload soon an updated version. Alternatively, if you don't want to wait, you can download the most recent version of WeiDU and replace the exe file yourself.

    Edit: uploaded the new version.

    Post edited by Erg on
  • TheFanxzaTheFanxza Member Posts: 6
    edited March 2014
    Here we go, almost made it!
    The first part of the tp2 made the program not work, i cut the reference to BGEE and left just the one on the BG2EE. (Update: Using the corrected Crevs part in full it works)
    The program works but somehow it changes the name to selected NPC (Korgan and imoen got renamed, Yoshimo, Minsc and Keldorn couldn't ).
    For the ones that it did not change the name, this is what happens:
    It just poses the question on which character is to be changed again, skips the proper question on how to name it.
    I thought it could have been something related on the fact that imoen is in both games...but then why Korgan got renamed and minsc didn't?
    I will try again without the changes on the p2 file but we are getting close!

  • TheFanxzaTheFanxza Member Posts: 6
    edited March 2014
    Update: I found that installing the program again creates a folder "Erg_NPC_Renamer_v1" (as in the V1) of the program. In both version of the script (with or without the part referring to BGEE).
    That probably refers to the first part of the script with the reference backup folder.

    Post edited by TheFanxza on
  • ErgErg Member Posts: 1,756
    edited March 2014
    TheFanxza said:

    Update: I found that installing the program again creates a folder "Erg_NPC_Renamer_v1" (as in the V1) of the program. In both version of the script.
    That probably refers to the first part of the script with the reference backup folder.

    @TheFanxza‌ there shouldn't be anymore the version number in the folder name. Be sure to use the modified tp2 I've uploaded few hours ago. It is a slightly modified version of @CrevsDaak file.
    TheFanxza said:

    The program works but somehow it changes the name to selected NPC (Korgan and imoen got renamed, Yoshimo, Minsc and Keldorn couldn't ).

    This is due to the fact that I don't have BG2:EE, so I was unable to check the exact file names for the NPCs CRE files.

    @CrevsDaak‌ can you please update erg_npcs_array, in the BG2:EE component, with valid file names? It should be something like

    ACTION_DEFINE_ARRAY erg_npcs_array BEGIN
    ~~ ~AERIE6~ ~ANOMEN6~ etc.

    You can choose freely one name among the existing ones, i.e. you can use either AERIE7 or AERIE6, if the corresponding CRE files are both present.

  • TheFanxzaTheFanxza Member Posts: 6
    edited March 2014
    Ok perfect, done. The problem, of course, still persists on the npc file name.
    In case I could go look for it if you tell me how to do it and post them here below, I guess they may be needed not just for us. :D

    Update: I may have found the files, for now the program is working with this correction in that part:

    ~~ ~AERIE10~ ~ANOMEN6~ ~CERND10~ ~NEERA8~ ~DORN8~
    ~JAN8~ ~EDWIN7~ ~KORGAN8~ ~HAER10~ ~OHHFAK11~
    ~IMOEN~ ~JAHEIR8~ ~KELDOR8~ ~OHHEX8~ ~WILSON13~
    ~MINSC7~ ~RASAAD8~ ~VICONI8~ ~VALYG8~ ~YOSHI7~
    ~MAZZY8~

    I took the .cre of the lower number since I remember they were connected on the levels.

    Tried it and it works like a charm... for now, I need double check from someone who can actually do these stuff :D

    Post edited by TheFanxza on
    Erg
  • CrevsDaakCrevsDaak Member Posts: 7,081
    edited March 2014
    @Erg oh, thanks, I corrected it by using this BG2:EE creature list.
    I updated them all, added Sarevok and Nalia (that were missing).

    Erg
  • ErgErg Member Posts: 1,756
    @CrevsDaak and @TheFanxza

    Thanks for all the help. I really appreciate it.

    I've updated the first post and uploaded version 3 of the mod. It contains slightly modified tp2 and ReadMe files.

    CrevsDaak
  • KitkatzKitkatz Member Posts: 1
    edited August 2014
    I cant seem to get this to work, followed instructions on readme and tried renaming Imoen without any luck. I go ingame and her name is still the default name. Any clues?

    WeiDU v 23600 Log

    C:\Program Files (x86)\Steam\SteamApps\common\Baldur's Gate Enhanced Edition\setup-Erg_NPC_Renamer.exe
    [./chitin.key] loaded, 498152 bytes
    [./chitin.key] 197 BIFFs, 35164 resources
    [.\weidu.conf] loaded, 17 bytes
    [lang\en_us/dialog.tlk] loaded, 4582838 bytes
    [lang\en_us/dialog.tlk] 32302 string entries
    WARNING: parsing log [WeiDU.log]: Sys_error("WeiDU.log: No such file or directory")

    Using lang\en_us/dialog.tlk
    BIFF may be in hard-drive CD-path [./lang/en_us/DATA/AREAS.BIF]
    BIFF may be in hard-drive CD-path [./cache/DATA/AREAS.BIF]
    [./DATA/AREAS.BIF] 2279736 bytes, 457 files, 0 tilesets
    BIFF may be in hard-drive CD-path [./lang/en_us/DATA/EXPAREAS.BIF]
    BIFF may be in hard-drive CD-path [./cache/DATA/EXPAREAS.BIF]
    [./DATA/EXPAREAS.BIF] 310040 bytes, 47 files, 0 tilesets
    BIFF may be in hard-drive CD-path [./lang/en_us/DATA/OH1000.BIF]
    BIFF may be in hard-drive CD-path [./cache/DATA/OH1000.BIF]
    [./DATA/OH1000.BIF] 1000 bytes, 1 files, 0 tilesets

    Post edited by Kitkatz on
  • ErgErg Member Posts: 1,756
    edited August 2014
    @Kitkatz, can you please post the full .DEBUG file? The relevant information is below the portion that you have posted.

    To do it, you can either attach SETUP-ERG_NPC_RENAMER.DEBUG here, but it must be zipped (or rared or 7zipped, etc.) first or you can simply copy paste the whole content, preferably under a spoiler tag.

    CrevsDaak
  • artificial_sunlightartificial_sunlight Member Posts: 572
    I have no clue why I would use this mod, but I like the idea.

    Can I mod this mod, so I can rename all NPC's. I want to rename commoners !

    Erg
  • ErgErg Member Posts: 1,756
    edited August 2014

    Can I mod this mod, so I can rename all NPC's. I want to rename commoners !

    Feel free to do so :)

  • @Erg I'm still working on my own mod's but when they are tested by the community and bug free, I might pick it up.

    Erg
  • AmmarAmmar Member Posts: 785
    Interesting mod. Out of curiousity, which of the following items are affected besides the NPC name in the character menu:
    • Character biographies
    • Character epilogues
    • Dialogue
    • Item descriptions

  • Wise_GrimwaldWise_Grimwald Member Posts: 2,045
    Just wondering. If I use this mod would I be able to continue party members into Dragonspear that are currently excluded? If Coran's name were changed for instance would he be part of the party found in the Ducal Palace? Or is it the numbers and not the names that decide that?

  • AionZAionZ Member Posts: 2,764
    @Wise_Grimwald

    The game always checks for death variables, which are unaffected. So no.

  • Kanvarro_IounKanvarro_Ioun Member Posts: 1
    Greetings,

    I have run into a problem with this mod. When I try to change Keldorn's name it just enters into a loop of asking me to select an interger between 1-23 or 0 to confirm changes already made.

  • level9redlevel9red Member Posts: 1
    Has anyone had a problem with this mod once installing Siege of Dragonspear?

  • Wise_GrimwaldWise_Grimwald Member Posts: 2,045
    edited July 2018

    @Wise_Grimwald

    The game always checks for death variables, which are unaffected. So no.

    Coran however isn't dead!

  • AionZAionZ Member Posts: 2,764
    @Wise_Grimwald

    Not sure if serious or not, but the death variable is essentially the internal script name for the creature. You can name the creature whatever you want, but its death variable will always be CORAN.

Sign In or Register to comment.