Jump to content

SubtleMods: 5E Spellcasting Rules Conversion


Recommended Posts

I had a couple questions/observations about this mod. I didn't see these from a quick search. Note that this stuff isn't super urgent. It's more out of interest, etc.

1. Avengers and Stalkers don't gain their bonus spells. Their spells use spdr and spra prefixes. In the op, you mentioned that spells need to use the sppr prefix. They also aren't listed in spell.ids, though you didn't mention if that's needed for this mod.

2. I noticed that priest/sppr spells ending in 51-99 aren't memorized, even though they can still be selected in the spellbook, if given to a specific kit. Unless I'm missing something, there doesn't seem to be a reason to restrict these spells. I think it would useful to include these numbers because it would allow you to add kit-specific spells to spell.ids without taking up one of the 1-49 numbers.

3. Are the Ranger and Paladin spell casts supposed to be so much lower?. For example, if you start a new game in ToB, a ranger would normally have 3 casts each of level 1, 2, and 3 spells. With 5e casting, they have 3 level 1, 2 level 2, and no level 3. A Stalker (if you made their bonus spells compatible) wouldn't even have Protection From Normal Missiles, a completely useless spell at this point.

4. Mages. I noticed that, even though the casting system is changed, the number of selectable spells before resting still takes into account op42 effects (casting slots). Normally, if you were making a mage kit and wanted it to have the same slots as a regular mage, you'd need to add a -1 to all spell slots. With 5e casting installed, this reduces the number of selectable spells to 2 less than a regular mage (since this mod gives the regular mage a +1 bonus compared to specialists). 

In my own kit mod, I've currently handled it by adding an optional component, which changes the -1 penalty to a +1 bonus. With 5e casting, a +1 bonus gives a kit the same slots as a regular mage. So my question with this is, is there a better way to handle this? If not, that's fine. My way works good enough, though you can cheat by installing this component without 5e casting.

Thanks.

Link to comment
2 hours ago, Dan_P said:

Avengers and Stalkers don't gain their bonus spells. Their spells use spdr and spra prefixes. In the op, you mentioned that spells need to use the sppr prefix. They also aren't listed in spell.ids, though you didn't mention if that's needed for this mod.

Huh, good catch. Luckily I wrote a little function that makes it super simple to add more spells that aren't caught in the initial go-round. So I'll add these and update the mod.

In fact one of the things on the  to-do list is to comb through every kit ability table, and check for every "GA_xxx" entry, and find the spell that is the subject of that entry, and check whether it is a priest spell or a wizard spell, and if so then add it to the system. This would naturally capture those Avenger and  Stalker spells, plus anything mod kits add. As you can see from that ridiculous  run-on sentence, this would be a bit complex and  so I haven't gotten around to it. But as you can also see from the run-on sentence, it is logically feasible and therefore doable. I just need to find the  time.

2 hours ago, Dan_P said:

I noticed that priest/sppr spells ending in 51-99 aren't memorized, even though they can still be selected in the spellbook, if given to a specific kit. Unless I'm missing something, there doesn't seem to be a reason to restrict these spells. I think it would useful to include these numbers because it would allow you to add kit-specific spells to spell.ids without taking up one of the 1-49 numbers.

Priests don't get the 51-99 spells by default in the base game, and the engine uses a bunch of those slots for secondary subspells and behind-the-scenes files that are not supposed to be visible to the player. So I cast a 'net' to convert priest spells that only catches ones that can actually appear in your spellbook.

This system is quite a resource hog and can, sometimes, cause slowdowns on low-end systems. So there is good reason not to be over inclusive in the conversion.Do you have any specific instance of spells not being converted?

2 hours ago, Dan_P said:

Are the Ranger and Paladin spell casts supposed to be so much lower?

Casting slots are determined by tables in 5E_spellcasting/data/5E_casting/ - in this case, d5cstpal.2da and d5cstran.2da. You can edit these files before installing the mod and have them use whatever values you want. Glancing at it... it looks like I set them to follow the FnP spell tables, with spellcasting beginning at 3rd level. At 18th level (is that the ToB start?) a ranger would have 3/3/2/1 casting slots. Maybe you need to rest in order for it to catch up and make all the casting slots work?

(I just checked my current install and the op233 effects in d5zltrn.spl are all correct - in fact, this alerted me to a bug, in that paladins and rangers are  getting too many casting slots - the function to parse this is treating the 1st row in that .2da table as level 1, when it is actually level 3. So good on you for bringing this to my attention! But the error I see is in the opposite direction from the one you see.)

2 hours ago, Dan_P said:

Mages. I noticed that, even though the casting system is changed, the number of selectable spells before resting still takes into account op42 effects (casting slots). Normally, if you were making a mage kit and wanted it to have the same slots as a regular mage, you'd need to add a -1 to all spell slots. With 5e casting installed, this reduces the number of selectable spells to 2 less than a regular mage (since this mod gives the regular mage a +1 bonus compared to specialists)

I confess I don't follow the math here, I'm not sure what you are trying to say. The way the mod works:

  • Trueclass mages get +1 memorization slot for each spell level. So at 1st level you can memorize two spells - say, Magic Missile and Shocking Grasp - and even if you only have one casting slot, you could  use that slot to cast Magic Missile or Shocking Grasp.
  • Specialists get a -1 penalty at each level. So only one memorization slot at first level. But they can cast any spell in their specialty school even if it is not memorized. So a Transmuter with only one memorization slot could memorize Magic Missile; but could use their casting slot to cast Magic Missile or Shocking Grasp or Burning Hands or Color Spray.

So specialists have fewer slots for memorizing spells generally, but because most specialty schools have more than one spell at each spell level, they are actually more flexible in using their casting slots. More flexible while still retaining focus on their specialty school, which I think it nice flavor.

But, it's only one fewer memorization slot. I don't see how you get to two fewer?

Edited by subtledoctor
Link to comment

Thanks for the response.

So with the 51-99 thing, it's not a problem, exactly. I have kits that gain some mage spells as priest spells, similar to Stalker/Avenger. Originally, I was naming them with my modder prefix. However, I switched them to be added to spell.ids with 1-49 numbers to make the spells compatible with this mod. I brought up the 51-99 numbers because I considered switching to these, since the spells aren't learnable by other casters (I also added to hidespl.2da). This would save some of the 1-49 slots for people with mega-installs. I don't actually add that many spells to my own games, so I'll never run out of the 1-49 slots. But I was thinking that someone could theoretically hit the limit of spells.

However, if you're planning to eventually scan the tables directly for spells, than that would cover that. You could then add to spell.ids with the 51-99 numbers, while still being compatible with this mod. Again, not that important. I'm fine with just keeping my spells at the 1-49 numbers, since, as I said, this doesn't actually affect me.

 

3 hours ago, subtledoctor said:

Casting slots are determined by tables in 5E_spellcasting/data/5E_casting/ - in this case, d5cstpal.2da and d5cstran.2da. You can edit these files before installing the mod and have them use whatever values you want. Glancing at it... it looks like I set them to follow the FnP spell tables, with spellcasting beginning at 3rd level. At 18th level (is that the ToB start?) a ranger would have 3/3/2/1 casting slots. Maybe you need to rest in order for it to catch up and make all the casting slots work?

Note for this one, I was talking about the actual spell cast numbers, not the memorization slots. I'll expand a bit. This is how it works, from my testing. Rangers in ToB start at level 16. Unmodded, they have 3 slots each in level 1,2,3 spells, and can cast the memorized spells. WIth 5e casting, when the Prepare Spells ability is used, they can still select 3 spells each in level 1,2,3. After rest, the spell button darkens for a second. Then, when you check your spells, you can cast level 1 spells 3 times, level 2 spells twice, with no castings of level 3 spells.

The reason I brought it up is because I wasn't sure if this was intended to work like that.

 

3 hours ago, subtledoctor said:

So specialists have fewer slots for memorizing spells generally, but because most specialty schools have more than one spell at each spell level, they are actually more flexible in using their casting slots. More flexible while still retaining focus on their specialty school, which I think it nice flavor.

But, it's only one fewer memorization slot. I don't see how you get to two fewer?

Just to note, your numbers don't actually contradict what I posted. It's just talking about it in a different way. This maybe helps explain it a bit better. Basically, with the 5e mod, specialists/kits are set to 1 slot less than a regular mage. In the unmodded game, kits are set to 1 slot higher than a regular mage. So in an unmodded game, if you want a mage kit to have the same slots as a regular mage, you need to add an op42 effect that reduces slots on every spell level by 1. This same effect with the 5e mod, will give a kit 2 fewer slots than a mage because kits also automatically get one slot less. So it's -1 from being a kit and -1 from the op42 effect.

As I posted above, my current solution for a kit was to add an optional component in my mod to change the spell modifier to a +1 bonus. With 5e casting, this gives the kit identical slots to the regular mage. This works. I've tested it in-game. I was only bringing it up in case you knew of a better way to handle it, but if not, that's fine.

Link to comment
6 hours ago, Dan_P said:

I have kits that gain some mage spells as priest spells, similar to Stalker/Avenger. Originally, I was naming them with my modder prefix. However, I switched them to be added to spell.ids with 1-49 numbers to make the spells compatible with this mod.

If they are just spells added as a bonus for a single kit and they don't need to be selectable by sorcerers trueclass shamans, then they don't really need to be ADD_SPELL'd. The best way to do this is probably your first method - just add raw spell files with your modder prefix. As I say I have a fairly simple function for adding spells to the  5E system, but I can't remember if I made it in such a way that it can be run before the 5E  mod. I need to check. But ultimately I need to get around to making that function to comb through CLAB tables.

EDIT - it looks like my function does work if used before 5E! So try this:

  1. Grab the /lib/semi_spontaneous folder and semi_spontaneous.tpa from this mod, and put them in a /lib folder in your mod
  2. Make an array of your custom spells
  3. Use the array to add them to the 5E system like so:
    INCLUDE ~%MOD_FOLDER%/lib/semi_spontaneous.tpa~
    
    ACTION_PHP_EACH mod_added_spells AS new_spl => yadda BEGIN
      LAF add_semi_spells STR_VAR new_spell = EVAL ~%new_spl%~ cast_spell = EVAL ~%new_spl%~ spell_type = ~divine~ END
    END
    
    ACTION_IF (FILE_EXISTS_IN_GAME ~d5__5E_casting_divine.d5~) BEGIN
      LAF process_semi_spells
    END

That should work whether installed before or after 5E Casting, so it should cover all bases.

6 hours ago, Dan_P said:

Note for this one [rangers], I was talking about the actual spell cast numbers, not the memorization slots

Yes - I understand,  I just cannot reproduce this. The d5cstran.2da file in the 5E mod data folder gets translated to d5zltrn.spl, which you should be able to inspect in NI. it has a header for each min_level, and at 16 it should have four op233 effects. If you right-click parameter1 and view the value as "hex," then each of those op233 effects will show your casting slots for one spell level. Spell level 1 is the leftmost value in the hex view; spell level 2 is the fourth value; spell level 3 is the third value; and spell level 4 is the 6th value. At 16th level it should be 3/3/1/1... though as I said a current bug makes it actually act like 18th level, so it should be 3/3/3/1. For me, this is working. I guess try messing around with that .2da table before installing, and see how it reacts?

6 hours ago, Dan_P said:

As I posted above, my current solution for a kit was to add an optional component in my mod to change the spell modifier to a +1 bonus

Ah - you are making a wizard kit? I didn't understand that. Probably because I've never actually seen a wizard kit in the wild.

In that case the answer is simple: just give your kit op206 protection against d5z0slt.spl, timing mode 9. It will have no effect on its own, but if 5E casting is installed later, then your kit will be excepted from the -1 specialist penalty.

Edited by subtledoctor
Link to comment

Hi @subtledoctor, I'd asked a while ago about running this excellent mod with the default game memorization slot values as the casting slot values and no extra casts.  About to start a BG2 run (after almost 20 years!) and I'd love the flexibility of 5E casting without additional casts.  Took a look at the files in data/5E_casting as you suggested months ago.  I can replace them with their MXSPL*.2DA variants from the base game - no problems there.  Some questions about additional stuff I've seen while looking at your mod:

  1. What are the un files used for?  d5cstwiz_un.2da, un_mxsplsrc.2da & un_mxsplwiz.2da?  The values are clear, but I'm wondering if they're actually used and how I could disable those larger cast values if so.
  2. Is it ok to run the 1.11 version you have up on github even though you haven't created an official 1.11 release yet?   The changes in the 1.10 and 1.11 commits seem like necessary bugfixes.
  3. The data/5E_casting/bonus_{cha,int,wis}.2da tables seem to be related to Tome & Blood + Scales of Balance spell slot bonuses.  I've been looking at your semi_spontaneous.tpa code and I see 2 variables mentioned there: 5e_int_bonus_memorization and 5e_wis_bonus_memorization. It seems like these are 0 by default.  Is that correct?
  4. There doesn't seem to be a way to disable the cha equivalent.  Is there?  These last 2 questions are related to these functions in lib/semi_spontaneous.tpa
- semi_int_slots - line 5354
    adds bonus casting slots for high INT scores
    bonuses are according to Tome & Blood (levels 1-7) - NB, this is not flexible
    5e_int_bonus_memorization variable can turn bonuses on or off for memorization slots
        (^^ when used with Scales of Balance spell slot bonuses)

- semi_cha_slots - line 5584
    adds bonus casting slots for high CHA scores
    bonuses are according to Tome & Blood (levels 1-5) - NB, this is not flexible

- semi_wis_slots - line 5836
    adds bonus casting slots for high WIS scores
    bonuses are according to Tome & Blood (spell levels 1-7) - NB, this is not flexible
    5e_wis_bonus_memorization variable can turn bonuses on or off for memorization slots
        (^^ when used with Scales of Balance spell slot bonuses)

Basically, I'd love to run this mod but want to use "casting slots = vanilla memorization slots" as the function that determines casting slots.  I actually agree with your premise last time I asked that the reason people go for sorcerers - an otherwise uninteresting class - is because of the number of slots available.  But I still want to do this first run in forever somewhat close to the vanilla experience.

Happy to copy files over from the base game and make any changes needed myself if you think this is achievable.  If it's a big pain, don't bother - I'll come back to this excellent mod in a later run.

Thanks!

Link to comment
35 minutes ago, v1ld said:

Took a look at the files in data/5E_casting as you suggested months ago.  I can replace them with their MXSPL*.2DA variants from the base game - no problems there

I don't remember  everything from the last conversation but yes, to quote a fellow, this is the way.

35 minutes ago, v1ld said:

What are the un files used for?  d5cstwiz_un.2da, un_mxsplsrc.2da & un_mxsplwiz.2da?  The values are clear, but I'm wondering if they're actually used

Honestly don't remember? Is that weird? I would have to look at the code for context to remind myself. But I'm going to say that these are for compatibility with the various optional spell tables that are in Tweaks Anthology. If you don't plan to use those high-power spell tables, then you don't need to worry about these files.

35 minutes ago, v1ld said:

Is it ok to run the 1.11 version you have up on github even though you haven't created an official 1.11 release yet?   The changes in the 1.10 and 1.11 commits seem like necessary bugfixes.

I wanna say yes? I am currently, right this very minute, installing v1.11 onto my iPad in what will hopefully be a great install that will work well aand won't be replaced for many months. But I have not yet started playing it.

35 minutes ago, v1ld said:

The data/5E_casting/bonus_{cha,int,wis}.2da tables seem to be related to Tome & Blood + Scales of Balance spell slot bonuses.

Gosh, I don't even know what those are for. I think I was going to offer ability score bonus slots in this mod - there is a commented-out stub for another component in the .tp2 - but then I stopped and moved it to Scales of Balance for install order reasons. I can't find any reference to those tables in any of (this mod's) mod files so I think they have no purpose.

35 minutes ago, v1ld said:
  • The data/5E_casting/bonus_{cha,int,wis}.2da tables seem to be related to Tome & Blood + Scales of Balance spell slot bonuses.  I've been looking at your semi_spontaneous.tpa code and I see 2 variables mentioned there: 5e_int_bonus_memorization and 5e_wis_bonus_memorization. It seems like these are 0 by default.  Is that correct?
  • There doesn't seem to be a way to disable the cha equivalent.  Is there?  These last 2 questions are related to these functions in lib/semi_spontaneous.tpa

Those functions are there so Scales of Balance can use them to enable ability score-based bonus slots, and can tune them to give bonuses to memorization slots, casting slots, or both or neither. These functions are not called by 5E casting. They are only used by Scales of Balance and the way to 'disable' them there is to simply not install that component. (NB: the way this works in SoB is, it asks you whether you want to apply bonus slots, which is designed for the normal game, so in this context that boosts memorization slots. That is the default, but it is of course optional. Then a separate component allows you to apply that bonus to casting slots in addition to memorization slots, or apply it to casting slots and remove it from memorization slots. If your preference is 'not at all' then simply don't install any of those components.

35 minutes ago, v1ld said:

Basically, I'd love to run this mod but want to use "casting slots = vanilla memorization slots" as the function that determines casting slots.  I actually agree with your premise last time I asked that the reason people go for sorcerers - an otherwise uninteresting class - is because of the number of slots available.  But I still want to do this first run in forever somewhat close to the vanilla experience.

Then, tl;dr: just overwrite the casting tables with the vanilla MXSPL___ tables, and don't worry about the other stuff.

The only thing you'll have to worry about is what you didn't ask about: bonus-slot items like the Rings of Wizardry. These increase your memorization slots by default (but for sorcerers, both, because sorcerer casting slots are hard-coded). You can use the component in this mod to change that to increase your casting slots only (mimic sorcerer behavior) or both memorization and casting slots. There are good arguments either way; I think leaving the vanilla behavior (more casting for sorcerers, more flexible memorization for mages) is nice because it further differentiates mages' strengths from sorcerers'.

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

Then, tl;dr: just overwrite the casting tables with the vanilla MXSPL___ tables, and don't worry about the other stuff.

Perfect, thanks!  I suspected I may be overthinking it 😅 

1 hour ago, subtledoctor said:

There are good arguments either way; I think leaving the vanilla behavior (more casting for sorcerers, more flexible memorization for mages) is nice because it further differentiates mages' strengths from sorcerers'.

I think I'll go with this too - saw the optional component in a test install.  I'll just say N to it to get vanilla behavior.  Thanks for adding this option - read through the thread and saw where you added it.

Question:  Do the SCS IWD spells need to be installed before this mod and the rest of SCS after?  Seems like that from what the README for this mod says about spell packs but just wanted to confirm.

Link to comment
6 minutes ago, v1ld said:

Do the SCS IWD spells need to be installed before this mod and the rest of SCS after?

Yes, precisely that. All new spells should be added before this.

FWIW these days I am getting my IWD spells from IWDification, it uses  the same underlying code that is shared with SCS, but it has been updated more recently.

Link to comment
3 minutes ago, subtledoctor said:

FWIW these days I am getting my IWD spells from IWDification, it uses  the same underlying code that is shared with SCS, but it has been updated more recently.

Will look into using that, thanks! 

I saw these fixes for some of the SCS IWD spells and hadn't seen fixes in v34.  Maybe they're already fixed in IWDificiation: Tresset's fixes for issues for IWD spells in SCS v33. — Beamdog Forums.

Link to comment

@subtledoctor Just wanted to say thank you for your mod and your consistent helpfulness!   I've got it all set up with the tables I'd like to use.

Jaheira confused me because she had 3 memorized slots at level 1, but 1 cast. I forgot she gets 2 extra slots from having a WIS of 14.  It's interesting the mod interprets those extra slots as pure memorization slots, probably because I didn't install the component that makes items give both memorization slots and casts.

Doesn't matter for my purposes.

Cheers.

Link to comment
6 hours ago, v1ld said:

Jaheira confused me because she had 3 memorized slots at level 1, but 1 cast. I forgot she gets 2 extra slots from having a WIS of 14.  It's interesting the mod interprets those extra slots as pure memorization slots, probably because I didn't install the component that makes items give both memorization slots and casts.

Yeah, the vanilla behavior translates into extra memorization slots for WIS if you don’t change it. If you install the SoB component that gives bonus slots for casting slots only then it will actually suppress the WIS memorization bonus. 

If you want to suppress that yourself, and give no one bonus memorization slots for any stat, it’s quite simple, just edit MXSPLWIS.2da. 

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...