Jump to content

Mana Sorcerer


Recommended Posts

Turns out the power was in me all along.  (What ever happened to those little thread 'subtitles' we used to have?  That was a thing, right?)

So, I only recently realized that a system I had developed and used in several other mods could be adapted relatively easily to create a points-based caster.  Sure enough, after a grand total of about 3 hours, I have converted it.  The result, for now, is this little kit mod called the "Mana Sorcerer."

I don't know where this will end up going - it could stay just one little kit folded into a different mod, or the underlying casting system could be the basis for a series of kits, or maybe it will lead to a magic system total conversion mod, enabling all casters in the game to use a points-based system instead of the traditional, somewhat straitjacketed Vancian system.  We're still talking it over.  In the meantime, any adventurous souls might want to just give this kit a try and see how it plays.

The concept, at this point, is simple: it is a sorcerer, but it uses mana points instead of spell slots to control how many spells can be cast.  Sorcerers are already more flexible than mages - they can use the spell slots of a given spell level for any known spells of that level, instead of having to memorize particular instances of this or that spell.  This kit just takes that a step further.  If you want to use all your magical energy on a short burst of massively powerful 9th-level magic, you can do so.  If you would rather dribble it out in a hundred Magic Missiles, you can do that instead. 

Here's how you play the kit:

  • First, for technical reasons, it is actually a mage kit, not a sorcerer kit.  So when rolling a character, choose mage as your class, and Mana Sorcerer as your kit. EDIT - this is no longer true.  As of 0.3 you play a regular sorcerer and can choose in-game to use this casting method.
  • During character generation, you will be asked to choose a bunch of mage spells to know and to memorize.  Just choose any, it doesn't matter; upon starting the game they will all disappear. EDIT - as of 0.3, choosing to cast via mana points will wipe out your known spells and you can/must learn them again.
  • When you start the game you will have an innate ability, "Initialize Sorcerer Casting."  Use it, and you will then get an item ability for learning spells.  The item ability can be used as many times as needed, until you know as many spells as you can for your level.  (The number of spells you can know at any given level is controlled by the vanilla SRCSPLKN.2da table.)  EDIT - I just realized that I didn't block this kit from learning spells from scrolls.  Don't bother doing that - any such spells will appear in your spellbook, but you won't actually "know" them - you won't be able to cast them, unless you learn them from the item ability.  And it you learn it from a scroll it will fool the item ability into thinking you already know it, and you won't be able to actually learn it.  So resist the temptation to learn from scrolls - it just won't work. EDIT - as of 0.3 learning from scrolls is properly disabled
  • You get 3 mana points per level up to level 20, and then 2 points per level up to level 39, for a total of 98 points.  Whenever you cast a spell, your point total will be reduced by the spell's level.  So, when I start a game in SoA at 7th level, I have 21 points.  If I cast "Protection from Normal Missiles," I will be left with 18 points.  If I then cast Mirror Image, I will have 16 points left.  Etc.  You get the idea.
  • Points are restored when you have a full night's sleep, or otherwise rest such that your Fatigue drops to 0.
  • You can see your current mana point tally by pressing the "cast spell" button in the main screen; just as a sorcerer can see how many times they can cast spells of each level by looking at the little number on the spell icon, this kit has its current point total in a little number on every spell icon.  It takes about one second for this number to be recalculated after you cast a spell; if you look and the number seems screwy, you might have just pressed the "cast" button too soon after casting a spell.  Click something else a wait a second, then click "cast" again, and the number should then be correct.
  • You cannot cast "Identify."  Some hard-coded UI stuff means that it cannot work from the inventory screen.  Get yourself some Glasses of Identification instead.  EDIT - I'm working on this... Identify might be possible in 0.4
  • You cannot use Sequencers and Contingencies, unless you first install option #5 of Tome & Blood's "Innate Sequencers" component.
  • As far as install order, this should go after any mods that add wizard spells; immediately after Tome & Blood; and... that's all I can think of right now.
  • This is for EE 2.0+ only.  Sorry, but the points-based spontaneous casting system is very dependent on technologies introduced in the 2016 patch(es).

Some pics:
 

Spoiler

 

...852872796_ScreenShot2020-01-09at10_21_24PM.thumb.png.d9c7aef4e0082a54f97c7e4a12e16773.png

 

1270645331_ScreenShot2020-01-09at10_21_47PM.thumb.png.d7d668e4e1d587b3c816d0b8a0b4e373.png

 

2110472207_ScreenShot2020-01-09at10_23_33PM.thumb.png.39bc2afdf5744bee4b48e493644e79e9.png

 

657748373_ScreenShot2020-01-09at10_23_59PM.thumb.png.bc2595d48e29afa36c5f85168deb957a.png

 

1362187263_ScreenShot2020-01-09at10_24_16PM.thumb.png.c3f7f9840b868284bbe263f53b4db7db.png

...

 

As I say, we're not yet sure how this might end up.  It wouldn't be great for normal casters, since they can know a lot of spells and therefore would have a LOT of icons to sort through every time they wanted to cast a spell.  They might need some kind of "spell preparation" ability, to cast a prepared subset of their known spells.  I've done such a thing before, but it is a little clunky.  So, we'll see.  Another possibility is, this system could be used for a psionics mod - it would be quite easy to use a set of custom abilities instead of wizard spells with this kind of caster. 

but for now, it's just a little would-be sorcerer.  If anyone wants to kick the tires a bit, go ahead.  Let us know what you think, tell us if you think there should be balance adjustments (especially with the number of mana points given per level), etc.  And have fun.

Edited by subtledoctor
Link to comment
6 hours ago, Arthas said:

Did you mimic the mana caster mod released on SHS?

No - I didn't know about that.  I see it now... interesting.  My idea came to me in the course of another conversation, and as I say, it uses code that I have developed in various other mods, that have already been around for a year or two.  Those mods, like the TnB Multiclass Sorcerers and the MnG Revised Bards, use proficiencies to track spell slots and enable spontaneous sorcerer-style casting based on those proficiency values.  Here, I realized I could create a points-based caster by only tracking a single stat value instead of nine different ones for nine different spell levels.  If anything, it is a simplified version of what is already in TnB and MnG and FnP. 

Glancing at the Youtube video in that other mod's post, it seems like it uses local variables to track mana and scripts to make the system work.  And it works for the normal Vancian casting kits, but not sorcerers.  It's interesting, but you know I have a severe allergy to scripts and invisible creatures and all that stuff.  This system only uses spell effects, that's it.  It just uses lots of spell effects, to connect various game mechanics that are not usually connected.  The result is a points system that doesn't rely on scripts at all:cooool:

 

Quote

Also, wasn't this "points-based caster." already added by Kwiat with his psion mod?

My only recollection of that mod is

  • it was never finished
  • it represents a vision of psionics that I didn't like
  • it currently doesn't work :p

This current kit mod is basically just an alternate way of playing the bog-standard vanilla Sorcerer.  If the system gets used for psionics that would be cool, but it won't be done by me - I already have my own hit point-based psionic system, which I prefer.

Edited by subtledoctor
Link to comment
22 minutes ago, Arthas said:

You talk about a hit point based psionic system - but didn't you stop working on your own take of psion time ago? I remember I poked you and grammarsalad about it.

Yeah... it's more or less done - I played through BGEE with it once - but it has bugs, and I only got about 75% through the bug-fixing before life took me away from it.  I still like it (the idealized, finished, bug-free version of it) better than other systems (the idealized, finished, bug-free versions of them).  :laugh:

Link to comment

Actually, the evolution of this is sort of interesting.  Obviously I think it's interesting to learn new techniques and put them into effect within the limited confines of a very old video game; therefore it might be edifying to recount how those techniques feed into each other.

This all started very simply.  In my mod thieves can take a feat that gives them an innate ability to cast one of five Illusion spells.  This is easy: just use opcode 214 to choose from a set of spells listed in a .2da text file.  This is how the 5th-level Spell Immunity spell works.  In my case, I wanted some of the Illusion spells to only be available when you are at higher level; this is also easy, just give the spell multiple extended headers with different "minimum level" values, and point each one at a different .2da list.  This way you get a defined progression as you level up:

  • Reflected Image
  • Reflected Image + Invisibility
  • Reflected Image + Invisibility + Nondetection
  • Etc.

That's fine, but it is rigid; there is no flexibility to get abilities in a different order.  That's what I wanted when I gave thieves the ability to learn psionic abilities: to choose from five different abilities, and then later, maybe, if you wanted to, spend a feat to choose another from the remaining four abilities, and so on.  This was hard: each I give the player increases the complexity of the setup exponentially.  I set up .2da lists of every possible combination of the five abilities, and kept track of which ones the player had chosen to make sure the correct .2da list was referenced every time you press the "psionics" button.  My math is rusty but I'm pretty sure it's something like 5!, which is 120 different possibilities.  Or maybe it's (5! - 4!) which would be 96 possibilities.  Something like that anyway.  Players were like "can you add this 6th psionic power?" and I was like "hell no!"  It worked, but it was inflexible and annoying and time-consuming to set up.

Then I wanted to do a similar thing with druid shapeshifting.  But the number of animals to use is pretty high, and I wanted different kits to be able to choose from a different set of animals, etc.  There was no way I could use static .2da lists for that.  But then I stumbled upon what is still an amazingly useful trick: instead of using opcode 214 like Spell Immunity, you can use it like Nahal's Reckless Dweomer. Casting NRD presents the player with a list of every wizard spell they know in their spellbook.  So... what if a druid casts NRD?  Druids do not have access to the wizard spellbook, but they can learn wizard spells. If you add a wizard spell - or, importantly, a custom spell ability with its "type" value set to "wizard spell," you won't be able to see them but they will be in the druid's wizard spellbook.  And casting a spell like NRD will let the druid choose from all such spells.  This was amazing.  I made a bunch of shapeshift abilities, set them as wizard spells, and set up a dialogue so that druids could choose whichever ones they wanted.  Different dialogues let different kits choose from a different list of abilities.  Then, a single innate ability could be shared among all those kits, coded very simply to cast one of your "known wizard spells."  Give each kit different "wizard spells" and that single spell will progress and work with you whenever you "learn" new abilities, regardless of which abilities you learn.  The only weird thing is, because they are coded as wizard spells, the Athkatla Cowled Wizards would attack whenever your druid tries to shapeshift.

The next iteration was when I wanted to expand the psionic abilities into their own dedicated mod.  I made five different psionic disciplines, and when you press the "ude psionic ability" button, I only wanted it to show you the powers from one particular discipline.  This meant permanently learning a wizard spell and having the "use ability" spell choose from all known wizard spells would be insufficient, because it could not distinguish between different disciplines.  I was unwilling to go back to static .2da lists, so I needed a new technique.  The answer was to track your known abilities with a couple proficiencies.  Everytime you press the "use psionic ability of this discipline" button, it would delete all your known wizard spells; and then populate your wizard spellbook with the psionic powers you have learned so far from that particular discipline; and then let you cast one of those abilities by letting you choose from "all known wizard spells."  Press "Telekinesis" and it would show you the six telekinetic abilities you have learned; press "Telepathy" and it would show you the three telepathic abilities you have learned.  This technique of deleting known spells and then adding them on the fly, combined with opcode 214's "choose from known wizard spells," made a situation where you could learn powers in any order, and use them spontaneously the same way a sorcerer casts spells.

But the long-standing reliance on opcode 214 had a problem.  If you press the "use ability" button while the game is paused, nothing will happen.  You have to let the game clock run for a split second in order just to see the resulting choice of spells.  Even worse, if while you are looking at your choice of spells you decide to click away and order a different character to perform an action, you will lose the chance to cast a spell from the list with that first character.  And you cannot easily see what spells/abilities are even available to cast.  Think about it: with a normal mage/cleric/sorcerer, you can press the "cast spell" button and see what spells are available, but you don't have to cast anything.  In my system, just to look at what is available you have to actually cast a spell, and if you want to want and not cast anything in that moment... too late, you've already used up one casting.  So it works for unlimited abilities like druid shapeshifting, but not for abilities you want to limit to casting "x times/day."

Furthermore, the more spells/abilities you want this system to cover, the more stats you need to track which one have been learned by the player.  Luckily the answer was already there.  The the psionics system deletes your known spells and gives you back the ones you have learned, is by giving you back ALL the spells in the system... and having permanent spells in place which block that process.  When you "learn" a spell it removes the corresponding blocking spell.  I realized, there is no need to track known spells with stats; the list of blocking spells that are canceled automatically tracks which ones you have learned.  Therefore, there is no real need to use opcode 214 and check for known wizard spells - if every time you begin to cast a spell, it gives you every spell possible that isn't blocked, it can give you innate abilities on the fly to represent your known spells.  And if we don't use opcode 214, there is no need to use the hidden wizard spellbook for known spells.

If the learning/casting system relies only on innate abilities and blocking spells, then we can use proficiencies for something else... like tracking spell slots.  And if the wizard spellbook doesn't need to be a hidden part of the system, then it can be used for display purposes, to give you a visual indicator of which spells you know.  And since the spells you actually cast are innate abilities which can be under the "cast spell" button, then you have the ability to press that button just to check which spells you can cast and how many times you can cast them, just like normal casters.  In short, by using innate abilities and blocking spells, and deleting/adding those innate abilities every time you cast a spell, adding them a number of times that tracks a stat which represents your current spell slots, then this system can replicate, very faithfully, sorcerer-style spontaneous casting for non-sorcerer classes.  I immediately applied it to fighter/mage, cleric/mage, and mage/thief kits, and the result is multiclass sorcerers. 

From there it wasn't too hard to apply the same system to divine casting, enabling multiclass shamans.  And once I was rewriting the code for that purpose, I shoehorned it into a kit-independent function, instead of being related to a particular kit.  Now we can make any divine-casting kit use sorcerer-style casting with a simple variable that says "apply this function when the kit is installed."  The main complication there was making sure the spell-learning system could work within our sphere system.

That brings us to now.  A I said this iteration is, if anything, a simplification.  Instead of using seven or nine different stats to track spell slots for different spell levels, we can use a single stat to track an overall mana pool, and instead of adding known spells as many times as their level's slots, we add all spells as many times as you have mana points. 

Sorry for the wall of text but I think it's interesting - even just for me, to lay it out clearly - to see the evolution of this concept and code.  There has been a straight line from a small thief ability, through druids and psionics, and sorcerers and shamans, to this points-based casting system.

So: where do we go next?  My current thought is to once again expand it from a single kit to an ability that lots of kits can take advantage of.  Maybe utilize @argent77's excellent new ADD_KIT_EX function to make points-based clones of all sorcerer kits, and give them ability to choose in-game whether they want to play as a normal spell-slots-based caster, or as a points-based caster.  That would be cool.  Then, maybe consider whether and how to apply it to all casters.  (That would probably entail giving mages and clerics a "spell preparation" ability, to choose a subset of their total known spells that can be cast on a given day, just like how they can memorize a certain subset of spells now.)

Edited by subtledoctor
Link to comment

Enough pontification, back to nuts and bolts: I have updated the mod to v0.3

There is no longer a kit you have to choose: instead, you play a normal (unkitted!) sorcerer.  You will have an innate ability called "Change Casting Method."   Use it, and you can choose to stay as a vanilla-style sorcerer, or to cast spells by mana points.

This ability is only given to the base Sorcerer.  It is not given to the Dragon Disciple, multiclass Sorcerers, or mod-added Sorcerer kits.  As I say, the next step would be to extend this ability to all Sorcerers... all in good time.

Edited by subtledoctor
Link to comment

I’ve updated this to v0.5, this is a critical update if you also want to use Tome & Blood’s Multiclass Sorcerers - v0.4 was rendering multisorcerers unable to cast spells. 

Possibly to come: if TnB Level 1 cantrips is installed, all spells will cost one point less - so a 9th-level spell will cost 8 mana points, and a 1st-level spell will cost zero points. (That might also require a different point distribution as you level up.)

Also possible: some kind of ‘restorative meditation’ ability that restores ~1 point per character level, after combat. 

Or maybe something like, one point spent per spell can be restored after combat. So if you go nova and spend 45 points on five 9th-level Meteor Swarms, you can restore 5 mana points afterward; but if you spend 45 points on 15 3rd-level Fireballs instead, you can get 15 points back. Something like this should reduce - but not eliminate - the need to rest between fights. 

Edited by subtledoctor
Link to comment

Update to version 0.6.  I was playing with one, and was a bit frustrated by the speed at which I would tend to run out of points.  With v0.6, you gain points a bit faster: three per level through level 10, four per level through level 20, and 3 per level through level 30 (still capped at 99 points total).

Also, there is now a 'Restorative Meditation' ability which can be used outside combat, which will restore one mana point for each spell you cast recently.  So if you limit yourself to using 1st-level spells, you can keep restoring them and cast all day.  If you use higher-level spells, the meditation will only restore a few points.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...