Spellbooks!
Posted: Wed Jun 07, 2017 6:44 am
As loot, bought and sold in stores, found on dead mages and such. This was an intended feature of the original game (hence why you have a spellbook, and why selling it means you can't cast spells).
So, just posting my interest and a few ideas.
1) Spellbooks could contain any circinate spell, depending on the level of the spellcaster and what type they are. This could be done using levelled lists.
2) Spellbooks could also contain random spells. These would be generated by taking the level of the NPC, and their skills, and running some formulas. So, for example, one generator might determine "3 Destruction spells of this gp and SP for each, 2 Alteration spells of this gp and SP for each, ...", and the Destruction spell generator could pull a template formula from somewhere (a list, or more advanced, a template generator), and say, "3-5 damage per level for 5-7 seconds at range" and roll some numbers.
3) NPCs could use the spells in the spellbook, and their AI could take them into account. This would require writing up a templated sub-AI for each type of spell, and could be made easier by adding tags to types of spells. For example, protection spells could be tagged as good for the start of the fight, while healing spells could be tagged as good when damaged. Area damage spells could be tagged as dangerous to user and allies. Some of these tags could be generated automatically, such as a danger zone for area spells.
By my estimation, #1 is fairly easy; mostly making levelled lists and making sure they're assigned and used properly. #2 is harder, partly in making sure the templates are sane, partly in making sure the generators are sane, and partly in avoiding meta-template madness. #3 is hardest, especially with #2. Making AI use spells reasonably is a hard problem, and one few games succeed at.
I think a mod to add spellbooks to the appropriate levelled lists, stores, loot, and such (in short, #1) would be a good place to start, and would be a complete mod by itself.
So, just posting my interest and a few ideas.
1) Spellbooks could contain any circinate spell, depending on the level of the spellcaster and what type they are. This could be done using levelled lists.
2) Spellbooks could also contain random spells. These would be generated by taking the level of the NPC, and their skills, and running some formulas. So, for example, one generator might determine "3 Destruction spells of this gp and SP for each, 2 Alteration spells of this gp and SP for each, ...", and the Destruction spell generator could pull a template formula from somewhere (a list, or more advanced, a template generator), and say, "3-5 damage per level for 5-7 seconds at range" and roll some numbers.
3) NPCs could use the spells in the spellbook, and their AI could take them into account. This would require writing up a templated sub-AI for each type of spell, and could be made easier by adding tags to types of spells. For example, protection spells could be tagged as good for the start of the fight, while healing spells could be tagged as good when damaged. Area damage spells could be tagged as dangerous to user and allies. Some of these tags could be generated automatically, such as a danger zone for area spells.
By my estimation, #1 is fairly easy; mostly making levelled lists and making sure they're assigned and used properly. #2 is harder, partly in making sure the templates are sane, partly in making sure the generators are sane, and partly in avoiding meta-template madness. #3 is hardest, especially with #2. Making AI use spells reasonably is a hard problem, and one few games succeed at.
I think a mod to add spellbooks to the appropriate levelled lists, stores, loot, and such (in short, #1) would be a good place to start, and would be a complete mod by itself.