Jump to content

SubtleMods: 5E Spellcasting Rules Conversion


Recommended Posts

Okay, I managed to look at those savegames in NI, and everything actually seems to have initialized correctly aas far as the mod goes. What jumps out at me is, in all three savegames your bard is wearing armor.

The 5E system removes all of the 5E innate abilities when an arcane caster puts on armor. And gives them back when you remove it. I confess I haven't tested what happens when you are wearing armor when the system itself initializes in the first moments of a game.

From a glance at your weidu.log you do not seem to have installed any "cast spells in armor" mods. If you do, be warned, I have not tested compatibility with many and I cannot recall off-hand at this minute how the mod would react to them. The mod has to take great pains to adjust armors to prevent arcane casting and allow divine casting. It does so on thee asumption that the base game behavior holds: armor blocks arcane spellcasting.  Two caveats related to that:

  • I'm pretty sure it IS compatible with Tome & Blood's "bards can cast spells in leather armor" component. There is code specifically designed to handle that.
  • It IS compatible with the YARAS component of Scales of Balance, which allows arcane spellcasting in armor. YARAS has fairly flexible .ini settings (IMHO) so you could tweak it to be close to another mod's handling of casting in armor if you like.

EDIT -

I just tested your earlier weidu.log (just 5E casting installed) and started up a ToB game since ToB unfortunately puts armor on Blades at the very start of the game. As you describe, my spellcasting button was never enabled, and even after I took the armor off my spells did not appear. I had to:

  • take the armor off
  • 'prepare spells'
  • rest, and keep the armor off while resting (this is important to avoid inconvenient hard-coded behavior)
  • wake up,  wait a few seconds

Then my spells appeared. Now I could put the armor back on, and my spells disappeared; and then I took the armor off and my spells returned as expected. So wearing armor at the beginning of the game can screw things up for the first waking period; but after resting things work as normal.

Edited by subtledoctor
Link to comment

That is a good callout regarding armor; however, I originally had the issue on a different save without armor. That one was done when I changed Imoen from a thief to a blade using eekeeper (blade level set to 0 so it should level appropriately). Something else may be the cause, but that is a pretty unique edge case.

Link to comment
Just now, morpheus562 said:

I originally had the issue ... when I changed Imoen from a thief to a blade using eekeeper (blade level set to 0 so it should level appropriately)

I'm guessing the system just didn't like that you did this. The initialization routine permanently sets a spellstate and casts several subspells that get permanent 206 immunity applied; even when set to level zero, if a character still has that spellstate and/or those 206 immunities, various parts of the initialization routine (including basic stuff like, getting spell slots) will not happen when levelling from zero to one in the new class. To do that well you would need to strip out eeeeeverything affecting the character, really carefully; or, as I say, just use Level One NPCs or NPC_EE. You should see the lengths I go to to strip applied effects from characters when they are set to level zero by NPC_EE (lines 1392 to 1724 there). Every applied or granted spell from every kit ability table in the game (which can be a lot depending on the player's mod loadout), plus several hundred effects and spells that would escape the kit table sweep. Like, for example, when you choose a feat from MnG, it sets permanent 206 immunity against the applied feat ability in the kit table; so if you remove the feat and re-set the character to level zero, when you level up you won't be able to choose new feats to replace it! There are lots of instances of stuff like that.

Link to comment

Can you tell me how to reproduce that? Looks like it's at the beginning of SoA... did you start a game, prepare new spells, rest, and wake up? Tell me the exact sequence of events to reach the result in the picture.

Also, what other mods installed?

EDIT - for instance, I just:

  • created an Invoker, memorized some spells during generation
  • started the game
  • walked over to the golem room
  • used the 'prepare spells' ability
  • set some spells to be prepared
  • rested

...and when I woke up, I could cast my prepared spells. No bugs. What is different in your game that led you to see that?

Edited by subtledoctor
Link to comment

WeiDU.logAttached is my WeiDU log.

Started new game . clicked on the prepare spells ability , and rested for it to refresh . after rest, I noticed that the AI did cast stoneskin as part of the auto buff AI sleep , but I could not find the spell on the action bar. 

I then noticed that alot of the spell I did not memorized (and did not "know" ) appear in the action bar, but some of the spell I did prepare do not. 

One thing of note is that I modify the bonusINT.2da ,d5cstwiz.2da and d5cstwiz_un.2da in the data folder before installation in order to give wizards more spell slots , could that have messed up to order of the spells somehow ?

 

EDIT : uninstalled the MOD , copied the original folder (unmodified 2da) ,and reinstalled - same results. it's not related to the 2da files

Edited by kaiiak
Link to comment

How quickly are you pressing the ‘prepare spells’ ability? Maybe if you do that too fast it messes up the initialization? I can try to delay that being added to your innates bar, but also... why are you doing that so quickly in the game? When you create a character, you will be prompted to memorize spells during character generation, and after you start the game you will be able to cast those spells. What reason is there to change your memorized spells before you’ve been through at least a few fights? 

That could be why you see spells you didn’t prepare. Though that might not be a bug at all - if you are a specialist you will be able to cast all spells in your school even if you didn’t prepare them. 

As forStoneskin, it seems like you have an aggressive AI script casting the spell in the split second when you wake up; which means that when the script converts your memorized spells to prepared spells, Stoneskin is no longer memorized. Either turn off party AI altogether, or change your mage’s script to ‘no script.’ (Scripts cannot do anything with a 5E caster anyway, unless you use Morpheus’, so there’s no reason to have a script active on s 5E caster.)

Link to comment
39 minutes ago, subtledoctor said:

How quickly are you pressing the ‘prepare spells’ ability? Maybe if you do that too fast it messes up the initialization? I can try to delay that being added to your innates bar, but also... why are you doing that so quickly in the game? When you create a character, you will be prompted to memorize spells during character generation, and after you start the game you will be able to cast those spells. What reason is there to change your memorized spells before you’ve been through at least a few fights? 

That could be why you see spells you didn’t prepare. Though that might not be a bug at all - if you are a specialist you will be able to cast all spells in your school even if you didn’t prepare them. 

As forStoneskin, it seems like you have an aggressive AI script casting the spell in the split second when you wake up; which means that when the script converts your memorized spells to prepared spells, Stoneskin is no longer memorized. Either turn off party AI altogether, or change your mage’s script to ‘no script.’ (Scripts cannot do anything with a 5E caster anyway, unless you use Morpheus’, so there’s no reason to have a script active on s 5E caster.)

I just want to note that my scripts are still in development and not ready for use with 5e spellcasting. I think I will add a delay in my scripts, so after resting characters wait a round or two before casting any spells. This will give time for the spells to convert over to 5e to avoid the issue described with stone skin. @subtledoctor, would you have a preference between a one or two round delay after resting before spells are cast? I lean toward two rounds, but defer to your judgement.

Edited by morpheus562
Link to comment
48 minutes ago, morpheus562 said:

I just want to note that my scripts are still in development and not ready for use with 5e spellcasting. I think I will add a delay in my scripts, so after resting characters wait a round or two before casting any spells. This will give time for the spells to convert over to 5e to avoid the issue described with stone skin. @subtledoctor, would you have a preference between a one or two round delay after resting before spells are cast? I lean toward two rounds, but defer to your judgement.

I'm pretty sure the spell conversion usually happens in less than three seconds... but I can't 100% guarantee it won't be as many as seven seconds on some weird random mornings.  So I would recommend 12 seconds or so, just to be on the safe side. I mean, unless I'm missing something there is no pressing need to cast spells faster than that, right?

12 seconds is about how long my mods take before changing the fatigue value, to allow for '7th party member' mods to recognize it; and that is the delay I have recommended for those mods to allow these mods to recognize it. So - for no particular reason other than "two rounds sounds like a reasonable amount of time to spend waking up" - that sounds best to me.

53 minutes ago, kaiiak said:

I prepare spells to customize  other NPC spellbooks. I do it 3 to 5 min (real time) after the beginning ,so i dont think its initialization issue.does initialization require the AI to be on ?

No, it just takes between 2 and 9 seconds, or so, from the moment someone joins the party.  So i advise you just wait a couple rounds after someone joins before using it. I'll see if I can't tighten it up to make sure there's no way to interrupt it. (Also, I'm not actually sure it is being interrupted; there is a particular spell that needs to be applied with a few hundred op206 effects, and that spell is critical to the system working. But I'm pretty sure that spell is cast every time you sue the 'Prepare Spells' ability, so it's entirely possible there is no problem with that. If that gets interrupted, then you would see something like, you could cast every single wizard spell instead of the ones you prepared. (Including Stoneskin! So that's probably not an issue here.) If you can cast your prepared spells, plus a few others, then something like being a specialist and this being intended behavior is more likely.

Edited by subtledoctor
Link to comment
1 hour ago, kaiiak said:

problem seems to go a way if I'm NOT specialist mage . So you are right the issue seems to be related to the  specialist mage spells somehow...

What is your specialization, and precisely which spells are you seeing that you think are the “issue?”

1 hour ago, kaiiak said:

noticed that with 5E opcode 261 (restore lost spells) does not seem to work  (or maybe it works but the gui does not get updated) . Is there a different way to restore spells slot ? or do I need to do something to refresh the gui ? 

Opcode 261 restores memorized spells. 5E spells are not memorized in the same way, they are converted to sorcerer-style casting when you wake up. So op261 has no effect.

I have converted instances of bonus spells to the new system (e.g. the Wondrous Recall spell, rings of wizardry, etc.). This system counts spellcasting slots by a proficiency value: increase the proficiency to gain an extra casting at a certain spell level; decrease the proficiency when you cast a spell. When you rest all those increases and decreases are canceled opcode 321 so you start the next day with your appropriate proficiency value, i.e. the appropriate number of casting slots. So you cannot restore a certain number of slots; you can only grant a number of extra slots, or cancel all instances of the slots being reduced. (That’s what the modified Ring of Evermemory does: lets you cancel all of the reductions of your spent 1st-level spells, so you get all those slots back again.)

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