Page 1 of 1

Relogging reacts oddly to multi-round spells (Split related)

Posted: Mon Jul 26, 2021 1:44 am
by Kitunenotsume
Hey there Devs et.al.,

I was testing out Scrying recently, as one might notice from my recent posts.
Poking at what it could do and not do, I tried to activate a disguise to see if I could rename it - worked on me/not the summon, nothing wrong there but relevant for context later.
While I had a sensor out and poking around, my game crashed (I tried to go through a transition to Northern Farmlands and got bounced back to Eastern).
So I booted it back up, and logged in.

First thing that occurred was I started chain-casting my Scrying spell, because it has a 1-minute cast time. I also noted that I did not have my summon (as to be expected).
Halfway through this process, as I did not fully parse what was going on, I removed the disguise toggle that had applied to my character - doing so stopping the cast at 50%.

I then relogged, to ensure the name adjustment was fixed, and saw the *very* first thing in my combat log was "60%".

On a whim, I relogged 4 more times. Each time increased the percentage, until I had completed the 10 casts and re-summoned my scrying sensor.

I sat about a bit longer, until the sensor had despawned, and then relogged.
On login, I again begin automatically casting Scrying for all 10 queued casts. This also appeared to interrupt the equipment re-equip-check, and I ended up with only my chest armor and one ring equipped.


My analysis of this is that the server state had recorded that I had Scrying as an active buff in it's database. On login, the current spell system causes a character to cast all buffs affecting them, on themselves. However, multi-round spells queue many more actions once the spell is cast the first time. Every subsequent login applied the Scrying cast to the queue, but since the server already had a 'counter' for casts, it just assumed it was the next in line and dutifully added 10% to the progression each login. It is also possible that completion of the spell chain refreshes the duration of the buff, as the spell 'completes' only once it reaches 100% and thereby potentially overwriting the instantiation time of the spell in the database.

Scrying is clearly an easy test here, but given that I have seen Hunter-Traps auto-cast on server-transition/load, I am concerned that other multi-round spells like Raise Dead and Sending might also see similar quirks, and it is worth bringing to the attention of the Dev team.

Chers,
Kit

Re: Relogging reacts oddly to multi-round spells (Split related)

Posted: Mon Jul 26, 2021 4:12 am
by Rhifox
As far as I can tell, this is due to the fact that these spells are recast when you transfer servers (which relogging counts as) due to the buff transfer script. If you have an active multi-round spell effect, this effect gets saved when you log out/transfer servers. When you log back in, the game tries to recast that spell. For most spells, this is an instantaneous process. But for multi-round ones, it has to go through the entire multi-round process.

Once you no longer have that spell effect (by the duration wearing off, or resting, and so on), you should no longer have issues.

Re: Relogging reacts oddly to multi-round spells (Split related)

Posted: Mon Jul 26, 2021 4:27 am
by DaloLorn
I wonder, though... the game instantly casts all the other spells when transferring servers, and quickening a multi-round spell turns it into a half-round spell. Could it not be possible to detect that it's a recast and accelerate it accordingly?

Re: Relogging reacts oddly to multi-round spells (Split related)

Posted: Mon Jul 26, 2021 4:44 am
by Rhifox
DaloLorn wrote: Mon Jul 26, 2021 4:27 am I wonder, though... the game instantly casts all the other spells when transferring servers, and quickening a multi-round spell turns it into a half-round spell. Could it not be possible to detect that it's a recast and accelerate it accordingly?
Frankly, Quicken Spell needs to be fixed so it *doesn't* turn multi-round spells into just one half-round. And wands and scrolls shouldn't remove the multi-round requirement, either.

As for whether it's possible to due that during login/server switch, that'd be something to ask Valefort.

Re: Relogging reacts oddly to multi-round spells (Split related)

Posted: Mon Jul 26, 2021 5:20 am
by Kitunenotsume
Rhifox wrote: Mon Jul 26, 2021 4:44 am Frankly, Quicken Spell needs to be fixed so it *doesn't* turn multi-round spells into just one half-round.
This should be possible for most cases by correcting any multi-round spells in the spells.2da so that their metamagic bitwise-flag is false for 0x08 (Quicken). It might not affect Auto-Quicken epic metamagic, but should work for most other cases.
Sending, for example, is currently [0x38], which permits Silent Spell (0x10), Still Spell (0x20) and Quicken Spell (0x08). Changing it to [0x30] should prevent Sending from being Quickened, as intended.
Scrying is set to [0x3A] which is the same but includes Extend Spell (0x02). It would need to be adjusted to [0x32] to remove Quicken.
(Teleportation Circle is apparently [0x18], which seems a bit absurd, given it's P&P 10-minute cast time).

It would also be a possibility to set the ConjTime of a spell to 60000 and check how that serves, but it might lack round triggers.