Jump to content


[Not an issue] Looking for some code

1 reply to this topic

#1 Ascension64

  • Members
  • 452 posts

Posted 28 October 2011 - 11:13 PM

In short, I'm being very lazy about a bug reported in BGT-WeiDU. That is, starting a new mage in SoA leaves the character with very few known spells. I was wondering whether L1NPC has any code about picking known spells that I might be able to ungracefully pilfer. I don't need anything fancy, just something to get back to the equivalent of 89000 XP worth of known spells, which really is (7/6/5/(5 if single class) +1 (if specialised)).

#2 Miloch



  • Modders
  • 4750 posts
  • Gender:Male
  • Location:At Large

Posted 29 October 2011 - 09:46 AM

There is some pretty cumbersome code around line 3350 in the tp2, after "// add wizard spells". The funny thing is, I don't think most of it ever really gets executed - at least not past level 1, since by definition, the mod resets NPCs to level 1 and the player gets to choose spells when they level up the mages after they join the party. (At least I think that's how it works - I don't play mages that often.)

Note that this probably only works for vanilla spells. If someone has spell-adding or -changing mods, it won't account for those spells. It could in theory, but that's something I didn't really want to mess with. Probably not much of an issue for BGT as it gets installed early. L1NPCs uses a slightly more dynamic approach for innate abilities (under the section around line 4820 "// rebuild class/kit abilities"). But those are defined in the kit tables, so it can figure those out more easily.

Edited by Miloch, 29 October 2011 - 09:48 AM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett

Reply to this topic


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users