Jump to content


Photo

differentiating between joinable and non-joinable NPCs


33 replies to this topic

#31 subtledoctor

subtledoctor
  • Modders
  • 2145 posts
  • Gender:Male

Posted 16 September 2017 - 06:08 PM

Okay, I need to re-open this discussion if possible.  For a completely different mod, which adds a divine sphere system to the game, I need to wipe the memorized divine spells from joinable NPCs.  Apparently if the .cre file has spells memorized but not in their spellbook, it ends up blocking spell slots from being used.

 

But, this same problem arises: what if the NPC is set to turn into an enemy if they don't join the party?  Or otherwise act in combat?  If I strip out their spells then they will be weakened. 

 

I guess I could do it in-game as an effect in their clab table - those only take effect upon joining the party.  But, is that possible?  It seems like opcode 244 only works on arcane spells.  Any ideas?


Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#32 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6205 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 16 September 2017 - 11:24 PM

@subtledoctor: Suggestion: INCLUDE ~spell_rev/components/fix_spellbooks.tpa~

Spoiler


Edited by Jarno Mikkola, 16 September 2017 - 11:25 PM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#33 Mike1072

Mike1072
  • Gibberling Poobah
  • 2359 posts
  • Gender:Male
  • Location:Canada

Posted 16 September 2017 - 11:35 PM

Pretty sure that code doesn't work with sphere systems and I don't think it's what subtledoctor is looking for anyway.

#34 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6205 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 16 September 2017 - 11:56 PM

@Mike, does it matter if it works WITH the sphere system, if you install that after the removal of spells from NPCs ? Pretty sure that's the whole point of the thing.

Aka you won't use the opcode 244 as it doesn't work WITH divine spells, but edit the .cre's, and then have the NPCs regain spells from the kits clab tables. You could even do it so that the vanilla char is unchanged, but the NPC that joins according to the npclevel.2da are the only ones that are changed. ...

So you use the above, but quote out this section:
// adds new spells to spellbook ... up until the LAUNCH_PATCH_FUNCTION'es.

... if you notice, I put the whole file to the spoilers so it can be referenced from here, and not from the mod, as only a part of it would be used, but I didn't say which parts subtledoctor would need.


Edited by Jarno Mikkola, 17 September 2017 - 12:07 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.



Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users