Jump to content

Sorcerer-style-casting for innate abilities


Recommended Posts

More fledgling modding questions from me - and another 'is it possible' question.

Let's say I have a handful of spells-as-innate-abilities at level 1, is it possible for them all to draw from the same 'charges' pool, like sorcerers spells do, so that using a single cast of something will take away a use from every other ability at the same level? I have worked out one way of doing this, but it requires that I click on an ability (let's call it 'level 1 spells') and select the spell I want to cast from a list.


While this is sort of ok, it's lead to a few problems in game, and it's a pain having to click twice to access spells and check the initial ability to remind myself what spell is in what grouping.

What I'm talking about more directly reflects how sorcerers cast spells.

Link to comment

Opcode 214 is the most obvious way, and pretty simple. It has some interesting benefits too: if this is for a class that cannot use arcane magic (and cannot dual-class to mage), then you can have the opcode 214 spell "choose from all known (wizard) spells." Now you can add wizard spells to the character whenever you want (learn at level-up, learn from a magic item, choose from a dialogue, grant it at scripted points in the game, etc.) and they all will be available in the "pool" of abilities. 

Opcode 214 has some problems though:

  • Cannot choose an ability while the game clock is stopped
  • Cannot simply look at the available abilities without burning a use
  • If you do the wizard spell thing above, it calls the Cowled Wizards down on you in early BG2

The best way to do this, I have already implemented.  The way multiclass sorcerers work in our Tome & Blood is actually to create an innate ability corresponding to each spell available to sorcerers, and have the multisorcs use those innates instead of spells. Functionally, in-game, it is completely indistinguishable from a normal sorcerer casting spells. But under the hood it is very different.  (It enables some interesting stuff too, like using a mana system instead of spell slots, and adding always-available spells sort of like 3E Domain Spells. But that's neither here nor there.)

Problem is, it is also very complicated to implement. Doing it for a handful of innate abilities, instead of recreating the entirety of sorcerers' spellcasting, would be a bit simpler. But still not actually simple.  Off the top of my head:

  • Figure out a way to track the number of uses (points, or whatever)... best bet here is to use the Tracking stat and opcode 95.
  • For each innate ability in the pool, set up the following: 1) the innate spell itself; 2) an .EFF with opcode 171 granting the innate spell; 3) a spell with opcode 206 blocking the .EFF; and 4) a spell with opcode 321 canceling the 206 spell. (EDIT: 3 & 4 are only necessary  if you want to include the ability to add new abilities to the pool.)
  • Set up a spell with a bunch of opcode 177 effects, triggering all of the .EFFs above.
  • Set up a spell with 1) a 172 effect for every innate ability in the pool; and 2) several opcode 326 effects, polling the Tracking stat, and casting the 177 spell once for each 'point' of the stat's value.
  • Set up a spell that uses opcode 95 to reduce the Tracking stat by 1.
  • Every innate ability in the system will have, in addition to its normal functions, an opcode 146 effect which casts the 95 spell, and then another 146 effect that casts the 172/326 spell. (The order of those effects is important.)
  • Apply a permanent repeating spell or effect on the character which uses opcode 326 to poll the Fatigue value. If it ever finds the Fatigue stat is <1, then it casts a spell that will 1) set Fatigue to 1; and 2) use opcode 321 to cancel the 95 spell; and then 3) cast the 172/326 spell.

Now you have a pool of abilities that work exactly like sorcerer casting: they all appear together in the UI and they all show the same number of uses on their button; and when you cast one of them, that number is reduced by one on all of their buttons. When you rest, the number is restored whatever the value of the Tracking stat is... you can increase it over time upon leveling up, or however you want.  You can place the abilities behind the 'innate abilities' button, or if the class has the 'cast spell' button then you can  place these abilities there, making it really like sorcerers' casting.

Not for the faint of heart. But the result is slick. I've been meaning to use a system like this in my Feat System mod, for the "Shadow Pool" and "Illusion Pool" spellcasting  feats. Best thing would be write up a portable function, so any mod could drop some spells into it and it would spit out a custom ability pool. But alas, I have not gotten around to doing so, and I have no idea when I might...

Edited by subtledoctor
Link to comment
17 hours ago, subtledoctor said:

Opcode 214 is the most obvious way, and pretty simple. It has some interesting benefits too: if this is for a class that cannot use arcane magic (and cannot dual-class to mage), then you can have the opcode 214 spell "choose from all known (wizard) spells." Now you can add wizard spells to the character whenever you want (learn at level-up, learn from a magic item, choose from a dialogue, grant it at scripted points in the game, etc.) and they all will be available in the "pool" of abilities. 

Opcode 214 has some problems though:

  • Cannot choose an ability while the game clock is stopped
  • Cannot simply look at the available abilities without burning a use
  • If you do the wizard spell thing above, it calls the Cowled Wizards down on you in early BG2

The best way to do this, I have already implemented.  The way multiclass sorcerers work in our Tome & Blood is actually to create an innate ability corresponding to each spell available to sorcerers, and have the multisorcs use those innates instead of spells. Functionally, in-game, it is completely indistinguishable from a normal sorcerer casting spells. But under the hood it is very different.  (It enables some interesting stuff too, like using a mana system instead of spell slots, and adding always-available spells sort of like 3E Domain Spells. But that's neither here nor there.)

Problem is, it is also very complicated to implement. Doing it for a handful of innate abilities, instead of recreating the entirety of sorcerers' spellcasting, would be a bit simpler. But still not actually simple.  Off the top of my head:

  • Figure out a way to track the number of uses (points, or whatever)... best bet here is to use the Tracking stat and opcode 95.
  • Set up the following for each spell in the system: 1) the innate spell itself; 2) an .EFF with opcode 171 granting the innate spell; 3) a spell with opcode 206 blocking the .EFF; and 4) a spell with opcode 321 canceling the 206 spell.
  • Set up a spell with a bunch of opcode 177 effects, triggering all of the .EFFs above.
  • Set up a spell with 1) a 172 effect for every innate ability in the pool; and 2) several opcode 326 effects, polling the proficiency or Tracking stat, and casting the 177 spell once for each 'point' the character has.
  • Set up a spell that uses opcode 95 to reduce the Tracking stat by 1.
  • Every innate ability in the system will have, in addition to its normal functions, an opcode 146 effect which casts the 95 spell, and then another 146 effect that casts the 172/326 spell. (The order of those effects is important.)
  • Apply a permanent repeating spell or effect on the character which uses opcode 326 to poll the Fatigue value. If it ever finds the Fatigue stat is <1, then it casts a spell that will 1) set Fatigue to 1; and 2) use opcode 321 to cancel the 95 spell; and then 3) cast the 172/326 spell.

Now you have a pool of abilities that work exactly like sorcerer casting: they all appear together in the UI and they all show the same number of uses on their button; and when you cast one of them, that number is reduced by one on all of their buttons. When you rest, the number is restored whatever the value of the Tracking stat is... you can increase it over time upon leveling up, or however you want.  You can place the abilities behind the 'innate abilities' button, or if the class has the 'cast spell' button then you can  place these abilities there, making it really like sorcerers' casting.

Not for the faint of heart. But the result is slick. I've been meaning to use a system like this in my Feat System mod, for the "Shadow Pool" and "Illusion Pool" spellcasting  feats. Best thing would be write up a portable function, so any mod could drop some spells into it and it would spit out a custom ability pool. But alas, I have not gotten around to doing so, and I have no idea when I might...

Oof. That second route is way over my head. The Shadow/Illusion Pool route will be the one for me, I think. I just might need to live with the frustrations of those particular limitations.

Thanks yet again for your help 🙂

Edited by SJT_VY
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...