I'm writing a spellbook component for tb#tweaks, and have a few requests for effect 147 (Learn Spell):
Bug: The party is granted XP when 'learning' via effect 147 a spell you already knew (this is impossible with normal scrolls, but will happen if you use apply effect 147 with an item like the attached one).
If possible, I'd also like if effect 147 enforced spell school restrictions and didn't work on Sorcerors (either by default or by setting a parameter). Again, you can use the attached item on, respectively, a Enchanter or a Sorceror to see if they learn Magic Missile.
I've brought the opcode partially in line with GemRB at the moment (need a few clarificatios, still). Here is what we have so far.
-----920 Learn Spell Mod [M]
Adds a number of flags to parameter 2 of the learn spell opcode as described below
Description
#147 (0x093) Spell: Learn Spell [147]
Parameter #1 Low: Irrelevant
Parameter #1 High: Flags
Parameter #2: Irrelevant
Description:
The targeted creature(s) tries to learn the spell specified by the resource key.
Learning is successful when 1D100 <= the INT-dependent LEARN_SPELL value in INTBON.2DA.
The LEARN_SPELL value is modified for mage specialists, with +15 for same school spells, and -15 for non-same
school spells.
The 'Flags' field modifies the behaviour of the effect in the following manners:
Bit 0: Learning the spell never gives experience (including scrolls from the inventory screen)
Bit 1: No effect (reserved for GemRB)
Bit 2: Learning is always successful (including scrolls from the inventory screen)
Bit 3: No effect (reserved for GemRB)
Bit 4: If the spell is already learnt, no experience is given (excludes inventory screen)
Bit 5: Learning the spell obeys mage school exclusions (excludes inventory screen)
Bit 6: The spell cannot be learnt by sorcerer class (excludes inventory screen)
Bit 7: Learning fails if the target has already learnt the maximum number of spells as per INTMOD.2DA for the spell's level (excludes inventory screen)
Options:
-0: disabled
-1: enabled
Edited by Ascension64, 25 February 2011 - 01:21 AM.