Jump to content


Photo

Looking for some code


1 reply to this topic

#1 Ascension64

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

Miloch

    Barbarian

  • Modders
  • 4720 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.

Mod Contributions
Aurora (new release!) * BG1 NPC * Gnomes * Haiass * Level 1 NPCs * Lost Items * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * In Progress: Adjusted Portraits * DSotSC (Tutu)
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * PSPad Highlighters * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Wherefore do ye toil; is it not that ye may live and be happy? And if ye toil only that ye may toil more,
when shall happiness find you?" -H.P. Lovecraft, The Quest of Iranon



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users