Jump to content

SubtleMods: NPC_EE - in-game customization for NPCs


Recommended Posts

Guest Morgoth

This is a very good mod. The only thing I would like to ask is the following - can you add a cheating ability? For example, I would like to turn anomen into a berserker/cleric. I seem to remember he has a too low wisdom to do that, but I still would like my 13/X dual class to happen. Can I still do it ?

Link to comment
2 hours ago, Guest Morgoth said:

... Can I still do it ?

Yes, just set his Wisdom to at least 17 when you want to dual him into a cleric. Just like with any human. EEKeeper, Near Infinity and other tools can help, but you could also just cheat in a few books of Wisdom. And he of course needs to have 15 Strenght, but he has that naturally.

Link to comment
5 hours ago, Abel said:

what I'm missing is code to generate all combinations from a number of kits. Basically, I've coded every single multikit I wanted which is not ideal.

I isn't pretty, and it isn't easy. I was working from the code I already wrote to make multiclass copies of cleric kits, here. Some of that is particular to Faiths & Powers, since it has a .2da list of all cleric kits and that list has pointers determining which cleric kits get multlclassed with which other classes. But even limited to that one class, you can see the code is rather long and complicated. Like I say, I went some way toward stripping out the FnP-specific stuff and broadening it to kits from other classes. But I only got it as far as ranger kits combined with cleric, and druid kits combined with fighter. And it is only designed for having one kit, as I noted - not for combining two. Extending that to double the kits in each combination, and to all the other multiclass combinations, would be SO much more work.

If you're only concerned about the vanillla kits, that's only three kits per class. Honestly I would just do each one manually at that point. Most of it would be copy-and-paste work, only the QD_Multi stuff would really need tailoring to each combo.

5 hours ago, Abel said:

I'm also interested to know if you found a way to deal with the limitations of the library that I mention there and there (internal ability naming length).

There's no good way to circumvent that issue. The QD_Multi function works by creating an .EFF file from each applied kit ability .SPL, with the ' # ' simple appended to the end. Since the .EFF file can only be 8 characters long, that means applied kit abilities can only be 7 characters long. Could you come up with an .EFF naming scheme that works a different way, perhaps by substituting some letters in the filename? Sure... but then you could not be sure the substitution would lead to the same result. (E.g. try replacing the first two letters: "BD_SHADO.spl" and "D5_SHADO.spl would both become "QD_SHADO.spl" and thus it would be wrong for one kit or another.) My advice would be to simply look at the kit ability tables, and if there is some ability that is 8 characters long, clone it to a new file with 7 characters, and replace the reference in the kit table. Then run QD_Multi, and it will work. It would need to be done manually but I can't imagine there are more than a handful of such abilities.

Link to comment
5 hours ago, Guest Morgoth said:

For example, I would like to turn anomen into a berserker/cleric. I seem to remember he has a too low wisdom to do that, but I still would like my 13/X dual class to happen.

Isn't Anomen already dual-classed? I'm not sure I get the question. Just recruit Anomen, and he should be a fighter 7/cleric 10 or whatever. Use the kit-choice ability, choose Berserker as your kit, and the Berserker kit should be applied to his fighter side. Should work right now.

If you want to do more exotic stuff, then you get into the realm of EEKeeper or Near Infinity being more useful.

Link to comment

Thanks, subtledoctor, your remarks are useful!

1 hour ago, subtledoctor said:

If you're only concerned about the vanillla kits, that's only three kits per class. Honestly I would just do each one manually at that point. Most of it would be copy-and-paste work, only the QD_Multi stuff would really need tailoring to each combo.

Yes, that's what I've done so far with the mod. The only drawback is that options are fixed and players cannot choose their own multikit options.

1 hour ago, subtledoctor said:

There's no good way to circumvent that issue. The QD_Multi function works by creating an .EFF file from each applied kit ability .SPL, with the ' # ' simple appended to the end. Since the .EFF file can only be 8 characters long, that means applied kit abilities can only be 7 characters long. Could you come up with an .EFF naming scheme that works a different way, perhaps by substituting some letters in the filename? Sure... but then you could not be sure the substitution would lead to the same result. (E.g. try replacing the first two letters: "BD_SHADO.spl" and "D5_SHADO.spl would both become "QD_SHADO.spl" and thus it would be wrong for one kit or another.) My advice would be to simply look at the kit ability tables, and if there is some ability that is 8 characters long, clone it to a new file with 7 characters, and replace the reference in the kit table. Then run QD_Multi, and it will work. It would need to be done manually but I can't imagine there are more than a handful of such abilities.

Good points! I thought renaming would be the solution, in the end. You're right, I only had a problem with the Thief Evasion ability.

Link to comment

Incidentally I am SO close to making version 5.0 of this mod work! I've got it able to do full class changes in-game, and drop you to level zero and choose proficiencies/spells/skills as if a level 0 character. It's great.

BUT, there seems to be some weirdness with proficiencies. I tried changing both Imoen and Jaheira into fighters at the beginning of BG2, and it properly turned them into level 0 fighters... but it only gave them two proficiency points to spend, instead of four.  I have no earthly idea why that would be.  @kjeron, any potential insight here?

If I can sort that out, and get it working with 5E spellcasting (which could be a whole other can of worms, I haven't even looked at it yet) then it would be ready for release and it would be glorious.

(Only other caveat, this sort of thing will never work well with dual-class characters... I'm not sure what the solution is here, other than maybe removing the dual-class flag from every NPC, and then if the player wants someone to be dual-classed they will have to do it by hand. This would not be a problem if Beamdog gave us a way to modify the OriginalClass flags via script, which I requested from them literally ten years ago. But Beamdog has been unresponsive, and there is no other option.)

Edited by subtledoctor
Link to comment
1 hour ago, subtledoctor said:

BUT, there seems to be some weirdness with proficiencies. I tried changing both Imoen and Jaheira into fighters at the beginning of BG2, and it properly turned them into level 0 fighters... but it only gave them two proficiency points to spend, instead of four.  I have no earthly idea why that would be.  @kjeron, any potential insight here?

IIRC, you only get 1st level proficiency values when going from level 0 to level 1.  If you jump from level 0 to any other level, you skip the 1st level proficiency gains.

Link to comment
3 hours ago, kjeron said:

IIRC, you only get 1st level proficiency values when going from level 0 to level 1.  If you jump from level 0 to any other level, you skip the 1st level proficiency gains.

Oh interesting. Well, actually maybe not so bad then, because I put hours into creating a 1st-level proficiencies-by-dialogue innate ability before I figured out how to set the NPC to level 0. Perhaps the effort was not wasted! (EDIT - though I wonder if the same is true of thief skills. Guess that needs testing.)

(Of course, I never actually got the proficiency dialogue working... so some effort is yet required.)

Dual-class NPCs are still a problem. Maybe what I'll do is this:

  1. Prevent dual-class NPCs from using the class-choice dialogue
  2. Give the player an install-time choice to strip dual-class NPCs of their OriginalClass flags, which will convert them into multiclass NPCs (and probably have to reduce their level and stats to prevent problems when their levels even out) and will allow them to make use of the class-change option.

That way the player can leave Imoen alone and just use the mod to give her a kit; or they can choose to make her a level 7/7 multiclass mage/thief, and then the player can change her class... they can make her a single-class thief, use the console to go to level 7, and then dual-class to mage; or they can make her a single-class ranger, and then dual-class to cleric.

Means I would need a list of all mod NPCs that are dual-classed... presumably some of these people with super mega installs can help with that.

Edited by subtledoctor
Link to comment

I've got the new proficiencies-by-dialogue working. It's super cool, going to have to port it back to SoB.

As of now in my v5 builds any NPC can:

  • Choose any class
  • Set the value for Str/Dex/Con/Int/Wis/Cha to anything you want
  • Choose any valid kit for the new class (and any kit for either underlying class if multiclassed)
  • It sets you to level 0, removes all proficiencies, and empties your spellbook
  • You can then level up to whatever XP level the NPC already had, and choose new spells/skills/proficiencies

All from a "tome" item. It's kind of like the old "Kit Tomes" mod, but on super-steroids. (So for those complaining that NPCs get these options by Charname doesn't, now you can just give an NPC's tome to Charname.)

One downside: there is no longer any way to only change out weapon proficiencies while leaving everything else the same. The only way to switch proficiencies is to do a class-change (you can choose the same class you already had) and go to level 0, and rebuild the character from the ground up. You can, however, use this solely to change your kit - if you choose "no class change" it will keep you at the same level and keep all your spells/skills/proficiencies, and do a simple kit change.  EDIT - actually, this is problematic since you could, for example, spend a lot of proficiency points and then change to a kit that cannot use that weapon. I'm just going to set it such that, if you want to make any changes, you have to start from level 0 and build the NPC up how you want.

Unfortunately, I have myself designed several rather complicated kits that have various abilities and characteristics initialized in indelible ways that cannot be so easily stripped away. Need to figure out how to make this compatible with them before I can release it.

Edited by subtledoctor
Link to comment

I have uploaded a beta version of v5.0. This completely changes the mod:

EDIT - re-reading this, the below makes it sound complicated. But it's not, really. The long and short of it is this: you uses an item and it lets you rebuild the character from the ground up. What you could do while installing Level1NPCs, you can no do in the in-game dialogue. But unlike SCS, where every NPC you meet is automatically level 0 and has to be rebuilt, here you have the option to leave them as-is and just play.

  • All of the individual NPC class-change components are gone (FYI @AL|EN - although I have marked it as a pre-release so PI should still be downloading the last v4 commit)
  • Now class changes are done in-game, by dialogue.
  • NPCs no longer have an innate ability, instead they get a tome in their inventory that can trigger the dialogue.
  • The dialogue does not work with dual-class NPCs...
  • ...so there are four new components to change dual-class characters to multiclass, so that they can use the tomes. (Note however that until you use the tomes, they might be a bit weird, e.g. Nalia will go from being a thief 4/mage 10 to a level ~8/8 mage/thief.
  • Making class changes will drop you to level 0, with 2 hit points; then you can level up and build up the character from scratch.
  • Leveling from 0 to level 2 or higher will skip the initial options to choose spells and your level 1 proficiencies. This is not a problem for proficiencies - you will get an innate ability to use those points. It is not a problem for clerics - they get spells automatically from leveling up. And it is not a big problem for mages - they can learn spells from scrolls. But it might be a problem for sorcerers and shamans. I need to test them more.
  • For a sorcerer or shaman, you can use the console to change your XP to 1 after the NPC_EE dialogue ends, and then level up to level 1 and choose spells. Then use the console again to change your XP to what it was, and level up the rest of the way.
  • if you want to use this to build an NPC into a dual-class, you can do the same thing: use the dialogue to choose their first class, then use the console to set their first-class XP to whatever you want. Then dual-class, and then use the console again to set their XP in their second class.

I've marked this as a beta and it should not show up for automatic mod tools like Project Infinity or BWS. But if you want to kick the tires, I think it is super cool. You can build NPCs up from scratch to be anything, with any stats, right within the game. You can even do it multiple times with the same NPC - though, if you do that, they will get extra proficiencies that cannot be removed so it ends up being a teensy bit cheaty.

NOTE: if you try to break things, you will probably be able to, in this or that way. If you let me know where it can break, I'll work on it. But hopefully, if you use this in a simple and obvious way, it works fine.

Edited by subtledoctor
Link to comment

Sorry if this was asked elswhere, but can I change the class for mod-added classes? I assume yes, but wanted to confirm it. 

The new version looks great! I must admit I'm not a fan of changing classes/stats via dialogue or using special items, it lack immersion for me, but I understand there is no other way to make it happen, so I happily accept that 😉 I'm also more of a multiclass than dualclass guy, so the more problematic route of building dual-class character is also no problem for me. All and all this looks really spiffy, as you said. 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...