Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[MOD] NPC Generator: NPC creation made easy!

argent77argent77 Member Posts: 3,124
edited August 2020 in General Modding
NPC Generator: NPC creation made easy!
Install your own pregenerated or exported characters as regular NPCs.

Download from GitHub
Readme

Introduction

This mod allows you to install any number of pregenerated or exported characters as regular NPCs. They can be met at predetermined locations where you have the chance to invite them into your party or have them tag along without occupying party slots at any time in the game. Kicked out NPCs can be instructed to wait or return to the original meeting place.

Note: The mod isn't registered in the WeiDU.log and can therefore be called at any time and as often as you like to install or remove NPCs to or from the game.

The mod supports the following games and game variants:
  • Original BG2
  • Tutu/EasyTutu
  • BGT
  • BG:EE
  • SoD
  • BG2:EE
  • EET
  • IWD:EE

It is currently available in English, German and Russian.


Components

1. Add custom NPCs to the game (for BG2, Tutu, BGT, BG:EE, SoD, BG2:EE, EET and IWD:EE)

With this component it is possible to install any number of individual characters or all available characters at once.

They can be met at predetermined locations based on the game campaign:
BG1
- The Friendly Arms Inn - First floor

SoD
NPCs can be met at different locations since the campaign prevents you from returning to some of them at one point or another. Characters will move automatically to any of the locations at first visit.
- Elfsong Tavern (Baldur's Gate) - First and second floor
- Coast Way Crossing - Flaming Fist Encampment
- Troll Claw Woods - Flaming Fist Encampment
- Coalition Camp - Spread over southeastern parts of the camp

BG2:SoA
- Copper Coronet in the Slums of Athkatla

BG2:ToB
NPCs can be met at different locations since the campaign prevents you from returning to some of them at one point or another. Characters will move automatically to any of the locations at first visit.
- Saradush Tavern (Tankard Tree)
- Amkethran Inn (The Zephir)

IWD:EE
NPCs can be met at different locations since the campaign prevents you from returning to some of them at one point or another. Characters will move automatically to any of the locations at first visit.
- Winter's Cradle Tavern and Snowdrift Inn (both Easthaven)
- Root Cellar Tavern and Evening Shade Inn (both Kuldahar)
- The Whistling Gallows - first and second floor, in Lonelywood (HoW campaign only)
Note: Since the Winter's Cradle Tavern in Easthaven is used as the starting area NPCs will gather at this place only after the party leaves the tavern to avoid interference with the opening cutscene.

This component provides two installation modes:

Manual NPC installation
A character selection menu allows you to select one or more characters for installation. The mod scans the "characters" folder for exported character files and/or characters in the game resources (depending on selected option) and lists available characters with a short summary of gender, class/kit and level.

Automated NPC installation
This mode is controlled by the file "settings.tpa" which can be found in the mod's base folder. Installation requires no manual input and is therefore the best choice for mod managers or scripted mod installations.


2. Enable/Disable alignment checks for custom NPCs (not available for IWD:EE)

By default installed NPCs won't always join or follow the party right away. If their goals don't align with the party's they might ask for a fee or outright refuse to join.

With this component it is possible to toggle this check on or off. When disabled then every installed NPC will automatically join or follow your party when asked. NPCs in IWD:EE will always join or follow your party when asked.

The requirements for NPCs are as follows:
Good-aligned NPCs:
- Join for free if reputation is between 9 and 12 and the protagonist's charisma is 14 or higher.
- Join for free if reputation is 13 or higher.
Neutral NPCs:
- Join for free if reputation is between 5 and 16 and the protagonist's charisma is 14 or higher.
- Join for 250 gold if reputation is between 5 and 16 and the protagonist's charisma is 13 or lower.
- Join for 250 gold if reputation is 17 or higher and the protagonist's charisma is 14 or higher.
- Join for 500 gold if reputation is 4 or lower and the protagonist's charisma is 14 or higher.
Evil NPCs:
- Join for free if reputation is 8 or lower and the protagonist's charisma is 14 or higher.
- Join for 250 gold if reputation is 8 or lower and the protagonist's charisma is 13 or lower.
- Join for 250 gold if reputation is between 9 and 12 and the protagonist's charisma is 14 or higher.
- Join for 500 gold if reputation is between 9 and 12 and the protagonist's charisma is 13 or lower.
- Join for 1000 gold if reputation is between 13 and 16 and the protagonist's charisma is 14 or higher.


3. Remove custom NPCs from the game

This component allows you to remove installed characters from the game. You can choose whether to uninstall selected characters individually or all installed characters at once.

Post edited by argent77 on
Mantis37Necromanx2Timbo0o0o0Adam_en_tiumFlashburnGusindaSharGuidesMyHandJuliusBorisovdp85
«1

Comments

  • AWizardDidItAWizardDidIt Member Posts: 164
    Very interesting idea! I wonder, what are the limitations for a character that joins the party but does not take up a party slot as opposed to one that does?

  • argent77argent77 Member Posts: 3,124
    edited July 2020
    Very interesting idea! I wonder, what are the limitations for a character that joins the party but does not take up a party slot as opposed to one that does?
    There are already quite a number of mods which introduce the concept of a "7th party member". These NPCs should behave similarly. You can use them for exploring, fighting/casting and talking, but you can't access their inventory unless you take them (temporarily) into the party.

    There is a character limit for the "clear fog of war" effect imposed by the engine, so I wouldn't take too many followers at the same time.

  • argent77argent77 Member Posts: 3,124
    Update: NPC Generator 1.1

    Changelog:
    • NPC followers gain experience from killing creatures.
    • Automatically fixing invalid character data (kits, spells, items, etc.) when NPCs are installed.
    • Fixed typos in readme.

    Timbo0o0o0Adam_en_tium
  • GreenerGreener Member Posts: 401
    @argent77 Absolutely brilliant, thank you!

  • Mantis37Mantis37 Member Posts: 1,157
    This is great, like having your own army of torchbearers :). It would be nice if they periodically demanded extra cash, possibly when the chapter increments or when certain quests are fulfilled: “Wow, we killed Firkraag! How about a bonus?”

    Greener
  • argent77argent77 Member Posts: 3,124
    edited August 2020
    Mantis37 wrote: »
    This is great, like having your own army of torchbearers :). It would be nice if they periodically demanded extra cash, possibly when the chapter increments or when certain quests are fulfilled: “Wow, we killed Firkraag! How about a bonus?”

    That's an interesting idea. It would emphasize the mercenary nature of the NPCs. I'll see what can be done. It would probably only make sense for neutral and evil NPCs. Good NPCs are usually more idealistic.

    Mantis37
  • argent77argent77 Member Posts: 3,124
    Update: NPC Generator 1.2

    Changelog:
    • Added Russian translation (thanks yota13)
    • Internal optimizations

    Adam_en_tium
  • FlashburnFlashburn Member Posts: 1,837
    edited August 2020
    argent77 wrote: »
    You can use them for exploring, fighting/casting and talking, but you can't access their inventory unless you take them (temporarily) into the party.
    I remember reading in EEex's thread that you can use EEex to access a familiar's inventory, spellbook, and record screens. I bet the same thing could be done with NPCs added by this mod!

  • argent77argent77 Member Posts: 3,124
    Flashburn wrote: »
    argent77 wrote: »
    You can use them for exploring, fighting/casting and talking, but you can't access their inventory unless you take them (temporarily) into the party.
    I remember reading in EEex's thread that you can use EEex to access a familiar's inventory, spellbook, and record screens. I bet the same thing could be done with NPCs added by this mod!
    Interesting. I haven't tried it out yet, but it would greatly improve the usefulness of followers.

    Flashburn
  • argent77argent77 Member Posts: 3,124
    Update: NPC Generator 1.3

    Changelog:
    • Added scripted NPC/follower removal at the end of the SoD campaign
    • Added code to improve handling followers during the SoA Spellhold dream sequence
    • Fixed an installation issue in IWD:EE

    Adam_en_tiumAciferGusinda
  • SharGuidesMyHandSharGuidesMyHand Member Posts: 2,559

    This mod is incredible. I really like the fact that you can use the custom party members like familiars instead of having them use up a party slot. Now you can have a bard follow you around with his song on at all times instead of "losing" a party member every time you direct one to sing their song. Really changes the whole dynamic of the game.

    Angulimala
  • CryosaurCryosaur Member Posts: 15
    Now you can have a bard follow you around.
    LOL, I can see it now: "Sir Robin ran away. When danger reared it's ugly head, he bravely turned his tail and fled." Someone should make a mod for this called... Fickle Minstrel--a bard with a special song with chances to anger neutral foes into attacking, stun or confuse hostile foes, and enrage or panic allies.

    SharGuidesMyHand
  • argent77argent77 Member Posts: 3,124
    edited January 5
    Update: NPC Generator 1.4

    Changelog:
    • Added Project Infinity metadata
    • Added German translation for WeiDU prompts
    • Fixed potential display issues with component names in WeiDU.log and Project Infinity
    • Compatibility improvements

    Flashburn
  • SharGuidesMyHandSharGuidesMyHand Member Posts: 2,559

    I've played using this mod a fair bit, and I've really enjoyed it. However, one persistent issue I've come across is that anytime my extra party member is hit by friendly fire (i.e.: if someone charmed or confused attacks them) they turn hostile in the manner that a summoned creature would, and I can't seem to get them back under control.

    I was wondering if you could add a mechanic like the one Afaaq has that prevents him from turning hostile if you hit him (IIRC, he says something along the lines of "Please stop hitting me my lord").

    Thanks in advance.

  • argent77argent77 Member Posts: 3,124
    edited May 26
    I've played using this mod a fair bit, and I've really enjoyed it. However, one persistent issue I've come across is that anytime my extra party member is hit by friendly fire (i.e.: if someone charmed or confused attacks them) they turn hostile in the manner that a summoned creature would, and I can't seem to get them back under control.

    It looks like the game is hardcoded to assign a basic combat script to the character whenever they leave the party. I'll see what I can do.

    In the meantime you can fix it locally by executing this command in the debug console while the mouse cursor is placed over their selection circle or portrait:
    C:Eval('ChangeAIScript("",GENERAL)')
    

    It has to be done every time they switch to follower mode.

    SharGuidesMyHand
  • hybridialhybridial Member Posts: 278
    I came across this yesterday and it's a really neat idea for a mod, but I have come across an issue, playing on the 2.6 patch. The mod detected characters that were already there, but I made a new character, saved the character, made a game save with them, and the mod doesn't detect them at all.

    I also wanted to ask, given I made a new character to test this in the first place, can you write in the biography tab and have that show up in the character's biography page when you recruit them?

  • argent77argent77 Member Posts: 3,124
    hybridial wrote: »
    I came across this yesterday and it's a really neat idea for a mod, but I have come across an issue, playing on the 2.6 patch. The mod detected characters that were already there, but I made a new character, saved the character, made a game save with them, and the mod doesn't detect them at all.
    Can you be more specific? Did the new characters not appear at the meeting locations?
    I also wanted to ask, given I made a new character to test this in the first place, can you write in the biography tab and have that show up in the character's biography page when you recruit them?
    Good idea. It shouldn't be too hard to implement it.

    hybridial
  • hybridialhybridial Member Posts: 278
    argent77 wrote: »
    Can you be more specific? Did the new characters not appear at the meeting locations?

    They are not appearing in the list of options for installing characters.

  • argent77argent77 Member Posts: 3,124
    hybridial wrote: »
    argent77 wrote: »
    Can you be more specific? Did the new characters not appear at the meeting locations?

    They are not appearing in the list of options for installing characters.

    Are you sure these characters have not been added to the game already? You can double-check by opening the file "a7-npc.2da" in a text editor (or NI). The file can be found in the override folder of the game. The second column lists the character filenames (spaces in filenames might be replaced by underscores).

    If that's not the case:
    - Are the character files found in the "characters" folder of the home directory of the game (where you can find the baldur.lua file)?
    - Do the filenames meet the resource name requirements of the game (limited to max. 8 letters, .CHR extension, do not include special characters such as ?,*,<,> and possibly some more)?
    - Could you zip and attach one of these character files?

  • hybridialhybridial Member Posts: 278
    edited May 27
    Actually I should reiterate what the issue is to be clear.

    I made a character. I called that character "Test." This character works in the game, I can import the exported file of the character. Seems to be no issues.

    But when I run the NPC generator and it brings up the list of characters to select and include this character, they don't appear in the list. I made another character, and they do appear in the list.

    So the only issues it could be is either there's a problem with naming the character/file "Test", or, I did specifically write in the Biography tab with that character, that's the only difference in what I've done.

    argent77
  • argent77argent77 Member Posts: 3,124
    hybridial wrote: »
    Well, I actually made another character, and this one was actually detected. Not sure what's going on, the only difference is with the other character that doesn't work is I wrote in their biography, and I named and saved them as TEST. Could either of those things be the issue?

    I could reproduce it in BGEE with that information. The character was skipped because the game itself already contains a creature file called "TEST.CRE". This is actually intended behavior, but can certainly be improved somewhat. I have to think about how to solve it.

  • hybridialhybridial Member Posts: 278
    Okay, that makes sense, which should be something I could easily enough avoid. Otherwise, really appreciate you making this mod, it's something I could get a lot of use out of.

  • argent77argent77 Member Posts: 3,124
    Update: NPC Generator 1.5

    This version adds biography text to the installed NPC if available and fixes an issue with NPCs turning hostile when hit by friendly fire in follower mode.

    Moreover, it is now possible to define custom epilogues for the NPCs in BG2/BG2EE by providing a text file (or two) with the text that should be displayed. More details can be found in the readme.

    Changelog:
    • Added support for custom epilogues at the end of BG2:ToB for installed NPCs
    • Custom biography text is assigned to installed NPCs if available
    • Show explanatory message if NPCs are not available for installation
    • Fixed NPCs turning hostile when hit by friendly fire in follower mode

    GraionDilachhybridialFlashburnSharGuidesMyHand
  • GraionDilachGraionDilach Member Posts: 133
    Question, do the NPC party members use the reputation checks to validate happiness and/or leave the party if the reputation fells out of their toleration level?

  • argent77argent77 Member Posts: 3,124
    edited May 29
    Question, do the NPC party members use the reputation checks to validate happiness and/or leave the party if the reputation fells out of their toleration level?

    Afaik, reputation checks are made automatically by the game engine, so these NPCs should behave like regular NPC in that regard. NPCs in follower mode are not checked and should follow you regardless of reputation.

    GraionDilach
  • hybridialhybridial Member Posts: 278
    argent77 wrote: »
    This version adds biography text to the installed NPC if available and fixes an issue with NPCs turning hostile when hit by friendly fire in follower mode.

    Moreover, it is now possible to define custom epilogues for the NPCs in BG2/BG2EE by providing a text file (or two) with the text that should be displayed. More details can be found in the readme.

    Fast and above and beyond, just awesome. I think this is one of the best mod concepts that could be done for these games.

  • SharGuidesMyHandSharGuidesMyHand Member Posts: 2,559
    argent77 wrote: »
    Update: NPC Generator 1.5

    This version adds biography text to the installed NPC if available and fixes an issue with NPCs turning hostile when hit by friendly fire in follower mode.

    Moreover, it is now possible to define custom epilogues for the NPCs in BG2/BG2EE by providing a text file (or two) with the text that should be displayed. More details can be found in the readme.

    Changelog:
    • Added support for custom epilogues at the end of BG2:ToB for installed NPCs
    • Custom biography text is assigned to installed NPCs if available
    • Show explanatory message if NPCs are not available for installation
    • Fixed NPCs turning hostile when hit by friendly fire in follower mode

    I haven't had a chance to try this yet, but thanks a lot for all the hard work you've put into this amazing mod.

  • hybridialhybridial Member Posts: 278
    I've tested out the custom biographies and it seems to work correctly, I was curious if you were planning to add more recruitment locations, if that's practical to do or not. It would be nice to dot these characters all around taverns on the Sword Coast and Amn.

  • argent77argent77 Member Posts: 3,124
    hybridial wrote: »
    I've tested out the custom biographies and it seems to work correctly, I was curious if you were planning to add more recruitment locations, if that's practical to do or not. It would be nice to dot these characters all around taverns on the Sword Coast and Amn.

    I don't plan to add more locations since, in BG1, the Friendly Arm Inn is a very convenient place to meet new friends NPCs, and it's available throughout the whole game. The other game campaigns don't leave enough meaningful options to spread NPC locations further (except maybe BG2:SoA).

    However, adding new or changing existing recruitment locations is a rather simple (but possibly time-consuming) task. There is a file in the mod archive called a7-positions.2da which is a (more or less self-explanatory) text file that defines initial NPC locations. The time-consuming part consists of finding a suitable location for each potential NPC, which requires the area code and exact map coordinates.

  • hybridialhybridial Member Posts: 278
    argent77 wrote: »
    However, adding new or changing existing recruitment locations is a rather simple (but possibly time-consuming) task. There is a file in the mod archive called a7-positions.2da which is a (more or less self-explanatory) text file that defines initial NPC locations. The time-consuming part consists of finding a suitable location for each potential NPC, which requires the area code and exact map coordinates.

    Okay, that is handy to know. I presume that it's done in order, where the first entry for a game is where the first NPC you install goes to, and so on?

Sign In or Register to comment.