-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magicylsm: NPCs can now teach spells #34709
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple things: A lot more of these temporary variables can be const
, because quite a few of the functions you're using in spell
are const
.
In addition, if all you need is the name or other values from the spell_type
you can simply do spell_id->name.translated() or similar, instead of getting the spell
object.
Also, there are a couple of auto
s hanging around
Co-Authored-By: Curtis Merrill <[email protected]>
Co-Authored-By: Curtis Merrill <[email protected]>
Co-Authored-By: Curtis Merrill <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge conflict caused some weirdness , will fix. |
Summary
SUMMARY: Features "Magicylsm: NPCs can now teach spells"
Purpose of change
Magicylsm: NPCs can now teach spells
Describe the solution
Added a json field for NPC classes, that list spells and levels, like player professions do.
THe NPC then has them added to their "spellbook" when they are spawned.
The NPC spells ar ethen added to the list of things that can be taught in dialogue.
This starts the usual training activity, but with learning a spell at the end of it.
Also fixed a bug in the process that I dont think has been reported, where you can start training with one NPC, then resume it with a different one.
NPCs cant cast spells yet, thats coming, this just lets them know and teach spells.
Describe alternatives you've considered
N/A
Testing
Tested saving/loading with NPC spells, added a debug menu option to print to console what spells each NPC knows.
Tested interrupting and resuming training activity.
Tested time taken for spells to be learned via training
tested spells that are known by the player and spells that arenot.
tested declining to be locked out of wizard type class when training finishes.
Additional context
N/A