Jump to content

RFC: Haste


Recommended Posts

As described here, the current implementation of Haste is problematic, maybe more problematic than Demi realized, for not setting the STATE_HASTED state. This can lead to, as an example and among other things, SCS enemies repeatedly using Oils of Speed when they are already hasted. I will lay out the issues below. 

When the Haste opcode is applied, the subject gets +1 APR, as well as doubled movement rate which is effected by doubling the character’s frame rate - meaning applied effects operate faster, notably poison damage and regeneration rate. 

Demi thought, reasonably, that 1) this is OP for a party-wide spell of only 3rd level; and 2) the frame rate increase was an unintended and undesirable knock-on effect. So Haste in SR tones down the APR increase to +1/2, and applies both it and the movement rate doubling manually, without using the Haste opcode. This tones down the power level of the spell and removes unwanted frame-doubling for poison/regeneration/etc., and allows for normalization of the movement speed bonus. (This is useful - for example, I believe SR and IR both use a static +6 bonus for Haste and Boots of Speed, and in turn I match that bonus for the movement increases in my mods, so a player can more easily give movement bonuses to an entire party without worrying about them separating as they move across the map.)

For reasons linked above, however, this implementation may not be ideal. So are there ideas for achieving Demi’s goals by a different way?

One thing that was tried for a while was to keep Haste strong, but make it a single-target spell instead of party-wide. I’m not sure if SCS would like this - would it know to caste Haste on the best melee ally, versus just anyone on in the front row?

I’ve noticed that there is a “weak haste” version of opcode 16, which (sort of) decouples APR from the other Haste effects. This causes the spell to still have a +1/2 APR bonus instead of a full +1 bonus - maybe. But, using this would still cause framerate issues with poison/regen. 

The spell could use the original Haste effect, but add thac0/AC/DEX penalties to tone it down… (Rationale being, it makes you super fast but doesn’t improve your cognition to skillfully handle that super speed - witness, after all, that it does not improve spellcasting speeds.)

Also this affects IR as well, so it is probably worth throwing out ideas for if/how any changes to the current implementation would affect Oils of Speed and Boots of Speed. 

Edited by subtledoctor
Link to comment

Just narrowly on the AI issues:

37 minutes ago, subtledoctor said:

This can lead to, as an example and among other things, SCS enemies repeatedly using Oils of Speed when they ate already hasted.

FWIW I'm not convinced that specific example is SCS: The main bit of code that takes haste potions is gated with a global anyway (to stop creatures spending too much time drinking potions). But if anything that strengthens the point, STATE_HASTED checks are all over the place and not setting it has widespread possibilities to mess up scripting.

39 minutes ago, subtledoctor said:

One thing that was tried for a while was to keep Haste strong, but make it a single-target spell instead of party-wide. I’m not sure if SCS would like this - would it know to caste Haste on the best melee ally, versus just anyone on in the front row?

This is unlikely to be a problem. Right now I only give Haste to fighter/mages, and they only cast it on themselves. Even if I broaden it out, it's likely to be something simple. That said, if SR makes it single-target, I'll probably just restrict that broadening to non-SR installs - I don't see a simple way to guard against casting Haste on some weak creature, and that's immersion-breakingly stupid.

Link to comment
50 minutes ago, DavidW said:

FWIW I'm not convinced that specific example is SCS

Yeah, sorry, I didn’t mean to suggest it was specific to SCS. It is a problem with AI scripts in general (Polytope quoted a vanilla game script in the link); and to the extent SR cares about AI scripts, it cares the most about SCS AI scripts. So I used an example that I had seen recently from an SR/SCS install. 

Link to comment
16 hours ago, DavidW said:

I don't see a simple way to guard against casting Haste on some weak creature, and that's immersion-breakingly stupid.

Hmm, how about a trigger like:

CheckStatGT(ThirdNearest([EVILCUTOFF]),649,XPVALUE)

So Haste won't be cast on anything weaker than a ghast.

Or if that's too weak set a threshold of 1999 or whatever else you think worthwhile for an enemy mage to buff.

Link to comment
16 hours ago, DavidW said:

That said, if SR makes it single-target, I'll probably just restrict that broadening to non-SR installs - I don't see a simple way to guard against casting Haste on some weak creature, and that's immersion-breakingly stupid.

Oh, that's nothing on vanilla stupidity. Consider this githyanki script excerpt (GITH04):

IF
	Global("prepspells","LOCALS",0)
	See(NearestMyGroupOfType)
	!StateCheck(LastSeenBy(Myself),STATE_HASTED)
	See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_HASTE)  // SPWI305.SPL (Haste)
		SetGlobal("prepspells","LOCALS",1)
END

See an ally and an enemy? Cast Haste on the enemy.

Link to comment
2 hours ago, polytope said:

Hmm, how about a trigger like:

CheckStatGT(ThirdNearest([EVILCUTOFF]),649,XPVALUE)

So Haste won't be cast on anything weaker than a ghast.

Or if that's too weak set a threshold of 1999 or whatever else you think worthwhile for an enemy mage to buff.

You can do that (or base it on level, which is easier to read and doesn’t get confused by summons).

The problem is that a sensible threshold depends on the level of the caster. You can handle that I do it for healing spells - but it’s quite cumbersome.

Link to comment
1 hour ago, DavidW said:

You can do that (or base it on level, which is easier to read and doesn’t get confused by summons).

The problem is that a sensible threshold depends on the level of the caster. You can handle that I do it for healing spells - but it’s quite cumbersome.

I suggested xp value rather than level because there are some creatures with disproportionately dangerous physical attacks relative to their HD (like mindflayers - although SCS does raise their level - and the aforementioned ghasts). Of course there are other monsters whose threat level is hardly increased by haste and would need to be filtered by class/race (like beholders, ofc the Twisted Rune encounter is about the only case where a mage might cast haste on a beholder).

I can understand that clerics need to make complex choices about who to deliver a Heal spell to, because they've potentially got it memorized by level 11, but on the other hand it's the 2nd highest spell tier for clerics, and near the top priority even for 25th level clerics. A mage however would be casting Haste when their script has reached a point indicating a 3rd level spell is the most appropriate to use (besides Remove Magic which would typically be used earlier), either because they've used their higher level spells, can't see a suitable/vulnerable target for high level magic or are under Improved Alacrity. This would be equally true of 8th level mages, 12th level mages and 20th level mages.

Edited by polytope
Link to comment
2 hours ago, polytope said:

suggested xp value rather than level because there are some creatures with disproportionately dangerous physical attacks relative to their HD (like mindflayers - although SCS does raise their level - and the aforementioned ghasts)

Fair, but the real problem (as you recognize) is that neither XP nor level is a reliable guide to whether a Haste spell is a good choice (and class checks are imperfect too, since monsters often don't have them, though they're not useless). Bear in mind that I would much rather not cast Haste when it would be useful, than cast it when it would be useless. The former is invisible, the latter breaks immersion (which is actually a higher priority than tactical challence in SCS).

2 hours ago, polytope said:

A mage however would be casting Haste when their script has reached a point indicating a 3rd level spell is the most appropriate to use

Just as character level is an imperfect metric of character power, spell level is an imperfect metric of spell power. Haste is a very powerful spell in the right circumstances, often a sensible early choice for a player mage if they use a melee-oriented party even in quite high-level play. It's also a spell that has the same benefit every round that it's active (unlike, say, Fireball) so that you want to get its effects earlier rather than later. SCS, when it uses it at all, uses it very early in the casting order for attack spells, after only HLAs, a possible initial Remove Magic, and the more powerful 8th and 9th level area-effect and summoning spells. (But it quite rarely uses it at all - which brings us back to the issues we're discussing here.)

Link to comment

If the spell needs nerfing (I take as almost axiomatic for this discussion that “SR thinks Haste needs nerfing”) maybe simply reducing the duration would do it? Keep the vanilla Haste effect, keep the AoE, but reduce the duration to a flat 5 rounds. I don’t think that would necessarily change AI considerations at all. (Apart from dumb scripts like Melissan’s who can spam it endlessly… but even there, if an enemy is going to cheese it endlessly, making them repeat it every 30 rounds doesn’t offend me. If that would be disruptive, the mod can just selectively apply permanent Haste to her, like Karhk.)

This would also minimize the extent to which doubled poison/disease/regeneration effects are problematic. And it would distinguish Improved Haste even more. 

The “fatigue” state afterward would be a bit of a tactical issue, but if the spell is less powerful then the fatigue effect could be less powerful as well, since it exists as a balancing mechanism. Set it to a -1 Luck penalty for 3 rounds, or something. 

EDIT - this may have been considered and explicitly rejected by Demi. Have to comb through old threads to see what the thought process was a decade ago. 

Edited by subtledoctor
Link to comment

Okay just for informational purposes: 

The last thread I see about Haste was in ~2015, where Demi & kreso discussed removing the Haste opcode and maki g other changes. kreso seems to have supported, as I mentioned above, just giving Melissan perma-Haste to satisfy her script. He acknowledges but doesn’t specifically address other issues in detecting STATE_HASTE. The thread ended with uploading a build with Haste as long duration/single-target and Improved Haste changed to Mass Haste. 

Then in 2018, the SR repo got a commit where Haste was changed back to AoE, I think with the APR bonus reduced to 1/2, and Improved Haste was restored. By “Madmatoster” - was that kreso? I do recall kreso experimenting with Haste a fair amount in those years - last I heard from him he had the rather insane idea (IMHO!) of giving Boots of Speed a full-on perma-Haste effect, APR and all, in IR. But that never ended up happening. 

So I don’t know. Demi like SR to be rooted in PnP, but he was also was willing to tolerate a single-target version because there was a single-target version of the spell in some version of D&D. (5E!)

My take: the PnP spell has a crazy balancing mechanism (aging you a year); any BG version lacks than feature so we are necessarily dealing with a regional variant of the PnP spell. So I can justify deviating from PnP here. 

Link to comment

I personally hate the double speed stuff, but if it's breaking a bunch of stuff, it's breaking a bunch of stuff and has got to go. And wasn't single-target Haste reverted because it was found to be breaking the AI? Something to keep in mind is that even if DavidW modifies SCS to get it working with SR changes, it's not necessarily the best idea to go around breaking vanilla behavior either, though that's dependent on that actually being the case. I'd be fine with a hard limit of a 5 round AoE as suggested by subtledoctor, particularly given the multi-round fatigue* afterwards, and I think Improved Haste could stay as-is: 1 turn, AoE, no fatigue afterwards, fully protects against slow.

*It's currently -2 THAC0, damage, and AC for 3 rounds, the parameters of which could also potentially be modified, as it's not true fatigue, but rather just an imitative debuff.

Link to comment
18 hours ago, subtledoctor said:

I do recall kreso experimenting with Haste a fair amount in those years - last I heard from him he had the rather insane idea (IMHO!) of giving Boots of Speed a full-on perma-Haste effect, APR and all, in IR. But that never ended up happening.

This is how it was (although with type 2 haste) in original BG prior fixpack, it's also how Improved Anvil handles it; although the boots are far harder to acquire - or produce rather - than in vanilla or even SCS.

In my view it's in fact more balanced than a movement rate bonus that stacks with Haste, the boots explicitly don't stack with haste in PnP. An item with perma-Haste (type 0 haste anyway, APR incremented by 1 and capped at 6) is powerful, shall we say, on par with the Girdle of Hill Giant Strength. Quadrupled movement rate on the other hand makes a character practically unkillable by enemies reliant on melee attacks. Of course, it's not a solution as far as scripting goes, because a character with the boots and nothing else would be STATE_HASTED for the purpose of AI dispel checks.

On the other hand, the boots might legitimately be a good candidate to attach the current SR pseudo-haste onto, in addition to preventing the Haste spell and opcode while worn, and either removing the effects (on the EE engine) or preventing the equipage of boots of speed if currently hasted (on classic). This circumvents all the above nonsense entirely.

18 hours ago, subtledoctor said:

My take: the PnP spell has a crazy balancing mechanism (aging you a year); any BG version lacks than feature so we are necessarily dealing with a regional variant of the PnP spell. So I can justify deviating from PnP here. 

However the PnP version in 1st and 2nd edition actually doubled APR, equivalent to mass Improved Haste, although even a year of aging isn't as big a deal if a gray elf PC for example (although it's still hardly a spell to be used regularly). I think it's never been properly balanced, the balancing act is that if the party has Haste, enemies (of appropriate level) should too.

Edited by polytope
Link to comment

Haste is a great early game force multiplier.  Yes, you may be able to win a fight with a single fireball or skull trap using that same level 3 slot, but haste as it is has the benefit of being useful outside of combat for running more quickly across maps.  (Haste spam was how I got through much of point-to-point exploration, like in towns.)  Haste is a spell that can make the entire party feel important, and it's something that's just assumed to be always on at a certain point.

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