Jump to content

SubtleMods: NPC_EE - in-game customization for NPCs


Recommended Posts

7 hours ago, Terminus Est said:

With 6.3, the issue is now reversed! You can put multiple pips in proficiency straight from the book but only one pip if using the innate.

Wait… have I been misunderstanding this? Is the problem that you can’t reach specialization using the dialogue? I.e. it runs multiple times but limits how high you can raise each proficiency? Or is the issue that it only runs once, period?

Can you go to /weidu_external/npc_ee/compile, open d5cprff.d and d5nprff.d, and copy the first 15 or so lines from each one to a post here? (You can put then in <> code tags with the little button up there.)

Link to comment
9 minutes ago, subtledoctor said:

Wait… have I been misunderstanding this? Is the problem that you can’t reach specialization using the dialogue? I.e. it runs multiple times but limits how high you can raise each proficiency? Or is the issue that it only runs once, period?

The dialog runs multiple times but in one instance I can select, say, long sword each time but in the other instance long sword can only be selected once. It is no longer an option in subsequent runs.

Here's d5cprff.d

BEGIN ~d5cprff~

IF ~True()~ THEN BEGIN d5cprff
SAY @2091

IF ~GlobalGT("D5_PROF_89","LOCALS",0) ProficiencyLT(Myself,89,1)~ THEN REPLY #25000 GOTO d5cprff_189
IF ~GlobalGT("D5_PROF_89","LOCALS",1) Proficiency(Myself,89,1) CheckStatGT(myself,0,LEVEL)~ THEN REPLY #25000 GOTO d5cprff_289
IF ~GlobalGT("D5_PROF_89","LOCALS",2) Proficiency(Myself,89,2) CheckStatGT(myself,1,LEVEL)~ THEN REPLY #25000 GOTO d5cprff_389
IF ~GlobalGT("D5_PROF_89","LOCALS",3) Proficiency(Myself,89,3) CheckStatGT(myself,4,LEVEL)~ THEN REPLY #25000 GOTO d5cprff_489
IF ~GlobalGT("D5_PROF_89","LOCALS",4) Proficiency(Myself,89,4) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25000 GOTO d5cprff_589
IF ~GlobalGT("D5_PROF_89","LOCALS",5) Proficiency(Myself,89,5) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25000 GOTO d5cprff_689
IF ~GlobalGT("D5_PROF_90","LOCALS",0) ProficiencyLT(Myself,90,1)~ THEN REPLY #25001 GOTO d5cprff_190
IF ~GlobalGT("D5_PROF_90","LOCALS",1) Proficiency(Myself,90,1) CheckStatGT(myself,0,LEVEL)~ THEN REPLY #25001 GOTO d5cprff_290
IF ~GlobalGT("D5_PROF_90","LOCALS",2) Proficiency(Myself,90,2) CheckStatGT(myself,1,LEVEL)~ THEN REPLY #25001 GOTO d5cprff_390
IF ~GlobalGT("D5_PROF_90","LOCALS",3) Proficiency(Myself,90,3) CheckStatGT(myself,4,LEVEL)~ THEN REPLY #25001 GOTO d5cprff_490
IF ~GlobalGT("D5_PROF_90","LOCALS",4) Proficiency(Myself,90,4) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25001 GOTO d5cprff_590
IF ~GlobalGT("D5_PROF_90","LOCALS",5) Proficiency(Myself,90,5) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25001 GOTO d5cprff_690
IF ~GlobalGT("D5_PROF_91","LOCALS",0) ProficiencyLT(Myself,91,1)~ THEN REPLY #99258 GOTO d5cprff_191

and d5nprff.d

BEGIN ~d5nprff~

IF ~True()~ THEN BEGIN d5nprff
SAY @2091

IF ~GlobalGT("D5_PROF_89","LOCALS",0) ProficiencyLT(Myself,89,1)~ THEN REPLY #25000 GOTO d5nprff_189
IF ~GlobalGT("D5_PROF_89","LOCALS",1) Proficiency(Myself,89,1) CheckStatGT(myself,0,LEVEL)~ THEN REPLY #25000 GOTO d5nprff_289
IF ~GlobalGT("D5_PROF_89","LOCALS",2) Proficiency(Myself,89,2) CheckStatGT(myself,1,LEVEL)~ THEN REPLY #25000 GOTO d5nprff_389
IF ~GlobalGT("D5_PROF_89","LOCALS",3) Proficiency(Myself,89,3) CheckStatGT(myself,4,LEVEL)~ THEN REPLY #25000 GOTO d5nprff_489
IF ~GlobalGT("D5_PROF_89","LOCALS",4) Proficiency(Myself,89,4) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25000 GOTO d5nprff_589
IF ~GlobalGT("D5_PROF_89","LOCALS",5) Proficiency(Myself,89,5) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25000 GOTO d5nprff_689
IF ~GlobalGT("D5_PROF_90","LOCALS",0) ProficiencyLT(Myself,90,1)~ THEN REPLY #25001 GOTO d5nprff_190
IF ~GlobalGT("D5_PROF_90","LOCALS",1) Proficiency(Myself,90,1) CheckStatGT(myself,0,LEVEL)~ THEN REPLY #25001 GOTO d5nprff_290
IF ~GlobalGT("D5_PROF_90","LOCALS",2) Proficiency(Myself,90,2) CheckStatGT(myself,1,LEVEL)~ THEN REPLY #25001 GOTO d5nprff_390
IF ~GlobalGT("D5_PROF_90","LOCALS",3) Proficiency(Myself,90,3) CheckStatGT(myself,4,LEVEL)~ THEN REPLY #25001 GOTO d5nprff_490
IF ~GlobalGT("D5_PROF_90","LOCALS",4) Proficiency(Myself,90,4) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25001 GOTO d5nprff_590
IF ~GlobalGT("D5_PROF_90","LOCALS",5) Proficiency(Myself,90,5) CheckStatGT(myself,8,LEVEL)~ THEN REPLY #25001 GOTO d5nprff_690
IF ~GlobalGT("D5_PROF_91","LOCALS",0) ProficiencyLT(Myself,91,1)~ THEN REPLY #99258 GOTO d5nprff_191
Link to comment

I should have said that the dialog runs for however many times the character has unassigned pips. Once only for mages, four times for fighters, etc. If it allows me to assign multiple pips, then it properly limits the number if the kit is so limited, e.g., a ranger can only assign up to two pips per weapon.

Link to comment

Okay, well, from what I can see in my testing, this seems to be working fine. What I did:

  • Install NPC_EE v6.3 on BG2EE v2.6
  • Have Imoen use the tome immediately, change her to a fighter
  • She goes from level 0 straight to level 7; she gets two pips for fighter level 3 and 6 (the game engine is a bit busted here and doesn't give you your first-level pips... the innate ability - the entire reason I made the "DialProf" function! - is just to get around this engine bug)
  • I put those pips into specialization with longsword
  • Then Imoen has a "Restore First-Level Proficiencies" innate ability
  • Using that gives her four pip via dialogue (the four pips from fighter level 1)
  • I use the dialogue to progressively get Imoen up to 4 pips in short swords.

Seems to be working as expected.

If for whatever reason this isn't working for you, there is a workaround: before using the Tome, use the console to reduce Imoen's XP to ~10. Now use the tome, drop to level 0, become a fighter. Now, you will level up from 0 to 1, and the game engine will properly give you your four 1st-level pips in the normal UI. After that, use the console to restore Imoen to her normal XP - 89,000 or 161,000 or whatever - and level up from 1 to 7 as a fighter, and here again the game engine will let you choose the correct amount of proficiencies in the normal UI. So if you mess around with your XP a bit, you can use this mod to build the NPCs however you like without dealing with the proficiency dialogue at all.

3 hours ago, mickabouille said:

Uh, thank you! I did the easy part :D

Oh right, I guess that came from @Alywena. Thanks Alywena!

Link to comment
2 hours ago, Terminus Est said:

Aha! You need to level up before you run the innate. I was using the innate at level 0, before leveling up. Everything works as expected now.

Oh yeah, sorry. When it drops you to level 0 you are in an odd state and you should not do anything except immediately level up. Unfortunately it’s hard for the mod to address that. I’ll see if I can alter this particular ability so the order won’t matter… if I can manage to do it without disturbing other things. 

Link to comment
3 hours ago, subtledoctor said:

If for whatever reason this isn't working for you, there is a workaround: before using the Tome, use the console to reduce Imoen's XP to ~10. Now use the tome, drop to level 0, become a fighter. Now, you will level up from 0 to 1, and the game engine will properly give you your four 1st-level pips in the normal UI. After that, use the console to restore Imoen to her normal XP - 89,000 or 161,000 or whatever - and level up from 1 to 7 as a fighter, and here again the game engine will let you choose the correct amount of proficiencies in the normal UI. So if you mess around with your XP a bit, you can use this mod to build the NPCs however you like without dealing with the proficiency dialogue at all.

Does your current version also support this method for "re-customizing" already "used" NPCs?(*) I'm still on 5.9.9 and tried this with Xzar, who's already a Sorcerer in my game. His proficiencies aren't removed when leveling up (again) from level 0; same with spells(**) and innates. I think you mentioned previously that this wasn't supported, and I'm wondering why. Is there a difference in "cleaning up" a freshly recruited NPC from a "used" one?

(*) I'd find this useful. I'm sometimes in the mood to changes classes for an NPC in the middle of a game. This is somewhat doable with EEKeeper (which I no longer use), and a total pain with Near Infinity.

(**) freshly recruited NPCs also keep known mage spells from a previous class when becoming a Sorcerer, in addition to new ones - this can be abused to make Mages totally pointless (no criticism, just an observation)

Link to comment
1 hour ago, subtledoctor said:

Oh yeah, sorry. When it drops you to level 0 you are in an odd state and you should not do anything except immediately level up. Unfortunately it’s hard for the mod to address that. I’ll see if I can alter this particular ability so the order won’t matter… if I can manage to do it without disturbing other things. 

Wouldn't just writing a warning in the consoloe (dunno if it's possible) that you should level-up before doing anything else help?

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...