Jump to content

SubtleMods: 5E Spellcasting Rules Conversion


Recommended Posts

32 minutes ago, morpheus562 said:

I'm not sure if this has been asked, but how do ai mods like SCS handle 5E? Are there any issues with enemy spellcasters?

Enemy spellcasters are entirely untouched by the mod. At root it just mimics what a sorcerer can do and... apparently there are no sorcerer-specific AI scripts, in SCS or anywhere else. (I don't think there are actually any enemy sorcerers in the game.) So enemies have what spells they have, and they cast them according to their script... and as far as the player can see, that behavior is entirely consistent with the way the player casts spells.

Realistically, the major benefit of this mod is that spells prepared once can be cast in multiple different encounters. Enemies only appear in one encounter and then die, so... that part doesn't help them. :laugh:

Link to comment

@subtledoctorI seem to have an issue where memorized spells will not return after resting. I.e. I have 6 castings of Stoneskin, I use it which brings it to 5; however, after resting it remains at 5 instead of going back to 6.

The only mod in my installation is this one and testing was done by creating a character in BG2EE ToB.

 

More testing: pressing the change prepared spells option refreshes existing spells instead of allowing me to update the spellbook. I have to hit this button 2 or 3+ times before I can edit spells. Additionally, it no longer allows me to cast Stoneskin or Mirror Images even when I have them memorized. It just doesn't show in the spell menu.

Edited by morpheus562
Link to comment

A couple of questions regarding the ' set bonus spell slots for items' component:

- Is this the same as the one in tome and blood? Is it better to only install this one or it just doesn't make a difference?

- The +1 bonus to casting slots is installed on top of the vanilla bonus to memorization, or it replaces it?

Link to comment

@morpheus562 That’s really weird. The spell has a number of effects, it does what it does; it cannot change what it does if you cast it 2 or 3 times. And there’s nothing about Stoneskin or Mirror Image that would prevent them working, unless your game lacks or has somehow changed their scrolls. This sounds like something is up with your test environment, though I’ll run some tests myself. 

As far as spells being refreshed, there is a bit of a loophole introduced by the recent change improving compatibility with 7th-member mods: I can no longer change Fatigue, so your spells are refreshed when it detects Fatigue = 0; but if you rest again before Fatigue hits 1, they will not be refreshed. This affects tests since when testing you are likely to cast one spell and immediately rest; but nobody actually plays like that. 

If for whatever reason you need to rest immediately after having rested, before your fatigue can tick from 0 to 1, then you can force spells to be refreshed by using the spell preparation ability. 

15 hours ago, Gwaihir said:

regarding the ' set bonus spell slots for items' component:

- Is this the same as the one in tome and blood? Is it better to only install this one

Exactly the same. Probably best to install it from whichever mod is later, though it may not make a difference. 

15 hours ago, Gwaihir said:

The +1 bonus to casting slots is installed on top of the vanilla bonus to memorization, or it replaces it?

On top. We can’t remove the memorization bonus because you can do a partial 5E install, like only the Arcanist kit. In that case normal casters still need the normal bonus; but there is no easy easy way to exempt 5E casters from that bonus. 

EDIT - actually I suppose if you install the 5E system game-wide, then we could detect that and remove the memorization slot effect. This would stop vanilla sorcerers from getting the bonus; we would have to apply it to them selectively via opcode 177. It would not be completely straightforward but... possible? I'll look into it I guess, since I would actually really like an option to remove the memorization bonus. (Then we could apply memorization bonus from stats via SoB, and casting slot bonuses from items. Which I think would be my preferred way to play.)

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

My test environment is newly created specialist mage in bg2ee tob (new install with no other mods). GoG version of the game.

So, I'll be very clear about how this works and what I did to test this, because I could not replicate your problem.

The mod needs to know when you rest, in order to refresh your spells. It uses to check for Fatigue = 0, and then immediately set Fatigue = 1 so that the check does not repeatedly return true. Unfortunately this could interfere with other mods that also manipulate Fatigue, and other mods that manipulate Fatigue can interfere with this mod.

So now the mod checks for Fatigue = 0 and a spellstate = 0. When it detects that combination, it sets the spellstate to 1. But we can't leave the spellstate at 1, else the rest check would return false tomorrow. So the spellstate is set back to 0 when either 1) Fatigue >=1, or 2) you use the 'Prepare Spells' ability. For purposes of starting things right, the initialization of the spellcasting mechanism at the beginning of the game sets Fatigue to 1 and the spellstate to 0. This way if you rest immediately at the beginning of the game, it will refresh your spells.

In my test, this is all working perfectly:

  • I created a half-elf Conjurer and started in TOB. I had 5 casting slots of 1st-level and 2nd-level spells, among others.
  • I cast Armor and Glitterdust. Now I had 4 casting slots of 1st- and 2nd-level spells.
  • I rested. This was fairly immediate, only about 20-30 seconds into the game; there was no time for my fatigue to advance.
  • Nevertheless because I set the mod for this to work at the game's start, when I woke up I was back to 5 casting slots in 1st- and 2nd-level spells.
  • I cast Armor and Glitterdust again.
  • I rested again. Again this was less than 30 seconds after my last rest, so my Fatigue score could not yet advance beyond 0.
  • As expected, this time when I woke up I still only had 4 casting slots in 1st- and 2nd-level spells. The slots were not refreshed. If I had played the game for a few minutes and my fatigue score was 1 or higher, they would have been.
  • I used the 'Prepare Spells' ability. It disable my 'Cast Spell' button and enabled my memorization slots, allowing me to change prepared spells. But I did not change anything.
  • I rested.
  • This time, even though it was only a few seconds since my last rest and my Fatigue score was still 0, when I woke up my casting slots were refreshed, I had 5 1st- and 2nd-level slots. This is because I used the 'Prepare Spells' ability.

So, everything seems to be working as intended. The only hiccup is when I rested with 0 Fatigue; but that 'hiccup' is a known and expected limitation of the code, and should almost never affect anyone actually playing the game.*

So, your test is showing different results from my test even though the code is the same and presumably the test was equivalent. Which leads me to conclude that the difference must be in the test environment. My questions are:

  1. What other mods do you have installed? Anything that might manipulate the Fatigue stat?
  2. Were you perchance wearing any armor when your rested?
  3. How did you create the character? Load a savegame from an earlier game? Use a pre-generated or imported character created when an older version of the mod is installed?

When you create a character with this mod, it needs to run various operations behind the scenes to initialize the casting system. This happens when you create a character and when an NPC joins the party and when you dual-class. If you imported a character that did not get the benefit of this initialization, things will be wonky. The only way to really test is to create a new character from scratch. (Or recruit someone - SoA starts are good for this because Imoen and Jaheira are right there giving you an arcane and divine caster to test with.)

---------

EDIT - thinking about this more, I can think of two circumstances when a player might rest, cast spells, and then immediately rest: 1) to cast Cure Wounds spells, and 2) to cast Sequencer spells and the free up a spell slot.

To cure party members, an easier way to get this result is to use the "rest until healed" game option. I believe this works with the 5E system because for a second or two after waking up, you actually have Vancian memorized spells. The game can use these to heal you and have you immediately rest again.

For sequencers, there are several answers to this issue:

EDIT 2 - Actually sorry, this is not a problem at all for sequencers, because to set your sequencer and then fill that slot with a different spell, you will need to use the 'Prepare Spells' ability, which will allow your slots to be properly refreshed.

Link to comment

My test environment was a completely new install of the game. I deleted the old version and deleted the game folder completely. I then installed fresh from GoG this morning with the ONLY mod being 5e. I figured there would be an issue with import characters, etc., so I created a net new Conjurer Human Mage (not pre-generated) for the testing. Trying to eliminate as many variables as possible. No armor equipped.

I also noticed I seem to lose some amount of memorized spells when I can get into my spellbook. But after updating memorized spells once, I do not have the option to update after resting. This is with repeated clicks (while waiting in between) of the reset memorized spells.

How long after resting will fatigue move from 0 to 1 (or higher)? I am guessing that is probably where my issues are stemming from.

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

How long after resting will fatigue move from 0 to 1

No idea.

6 minutes ago, morpheus562 said:

I also noticed I seem to lose some amount of memorized spells when I can get into my spellbook. But after updating it once, I do not have the option to update it a second time after repeated clicks (while waiting in between) of the reset memorized spells.

I'm not clear on what you are saying here. The Prepare Spells ability disappears when you use it, you should not be able to do repeated clicks.

EDIT - I see a problem if you Prepare Spells and then rest, repeatedly without waiting in between. Hang on, I'll be back with a fix in a few minutes.

Link to comment

Reviewing the wiki, it would take 1200 seconds (20 minutes) for fatigue to increase by 1. Additionally, it shows that characters with 16 CON receive -1 fatigue (18 CON is at -2 fatigue). Not sure how that plays into your checks, but it could be maybe an hour or more of gameplay for some high CON builds before they can rest and refresh their spells.

Link to comment

Resting seems to be good now in testing, along with memorizing spells; however, I still lose one memorized spell for levels 1, 5, 6, 7, and 8. I am also noticing that I only have 1 memorized spell at level 8 which is assigned to Protection from Elements (I believe this is the one); however, I can actually cast any 8th level spell in my spell book that is NOT memorized.

I am playing with a fresh BG2EE ToB installed with a newly created character since downloading v1.5.3 of your mod.

On another note: do you have a function to where I can input a spell name (i.e. ~WIZARD_MINOR_GLOBE_OF_INVULNERABILITY~) and it will link to your d5zclons.2da and provide the applicable index number? For my Enhanced Powergaming Scripts I create a number of spell states and add them to spells. Since my scripts would be installed after your mod, I will need to identify your spells and add any applicable spell states.

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

however, I still lose one memorized spell for levels 1, 5, 6, 7, and 8

Memorization slots are fairly variable and only really settle down once you have 1) started playing the game, and 2) leveled up to make sure mxsplwiz.2da has updated your character to match the table.

In this case specialists get a -1 penalty to memorization slots, to match unkitted mages, because the mod makes every mage basically like a sorcerer who can change their spells every day. This is balanced by limiting the mage to prepare fewer spells at any given moment than the number in a sorcerer's static list. Mods being mods, this penalty can only take effect after the game starts, which means it cannot match up with the number of spells you memorize during character generation. Welcome to the fun of modding the Infinity Engine!

BUT! Specialists get a major benefit in exchange for that penalty:

55 minutes ago, morpheus562 said:

however, I can actually cast any 8th level spell in my spell book that is NOT memorized

No - to be specific, you can cast any spell in your spellbook in your specialty school. Specialists lose one memorization slot, but they gain implied auto-memorization of every spell in their school. You get superficially less flexibility (can prepare a narrower range of spells) but generally more actual capability, which leans in to your specialty (you can always cast your specialty spells, and if there are two or more specialty spells at a spell level, the overall result is more flexibility). In other words your total number of prepared spells is likely greater,* but your ability to control which ones are prepared is reduced.

* Unless you play an unmodded Enchanter in late BG2, which has no spells of 6th level and above. As mentioned in the readme I highly, highly recommend using some method to rebalance the specialty schools.

55 minutes ago, morpheus562 said:

do you have a function to where I can input a spell name (i.e. ~WIZARD_MINOR_GLOBE_OF_INVULNERABILITY~) and it will link to your d5zclons.2da

I'll tell you... but you don't need it. The d5[ind]i.spl spells only use opcode 146 or 148 to cast the real spells. So you can set your spellstates in the regular spells and it will still take effect with my mod installed. No need for extra work here.

But if you do have a reason to match IDS names to zclons inds, you can do something like:

OUTER_SET spell_number = IDS_OF_SYMBOL (~spell~ ~CLERIC_BLESS~) // change to suit your need
ACTION_IF !(spell_number = (0 - 1)) BEGIN
  LAF RES_NUM_OF_SPELL_NAME STR_VAR spell_name = ~CLERIC_BLESS~ RET spell_res END // change to suit your need
  COPY_EXISTING ~d5zclons.2da~ ~override~
    COUNT_2D_COLS cols
    COUNT_2DA_ROWS cols rows
    FOR (row = 1; row < rows; ++row) BEGIN
      READ_2DA_ENTRY row 0 cols ind_num
      READ_2DA_ENTRY row 1 cols mem_spl
      PATCH_IF (~%mem_spl%~ STRING_EQUAL_CASE ~%spell_res%~) BEGIN
        INNER_ACTION BEGIN
          COPY_EXISTING ~d5%ind_num%i.spl~ ~override~
            [patch]
          BUT_ONLY
        END
      END
    END
  BUT_ONLY
END

 

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