Jump to content

How does SCS handle the avenger kit versions of wizard spells?


Recommended Posts

Please pardon my ignorance if this is obvious or has nothing to do with SCS but with DS in general instead, but I would like to know how SCS handles the avenger versions of wizard spells, since they're not listed in SPELL.IDS.

This is further complicated by mods that changer/add spells for the avenger kit. For example, Spell Revisions has this block of code for avenger spells:

/* ----Avenger Abilities---- */

COPY ~spell_rev\shared\spdr101.spl~     ~override~ // Chromatic Orb
  SAY NAME1 @433    SAY UNIDENTIFIED_DESC @434
COPY ~spell_rev\shared\spdr201.spl~     ~override~ // Web
  SAY NAME1 @477    SAY UNIDENTIFIED_DESC @478
COPY ~spell_rev\shared\spdr301.spl~     ~override~ // Lightning Bolt
  SAY NAME1 @515    SAY UNIDENTIFIED_DESC @516
COPY ~spell_rev\shared\spdr401.spl~     ~override~ // Improved Invisibility
  SAY NAME1 @569    SAY UNIDENTIFIED_DESC @570
COPY ~spell_rev\shared\spdr501.spl~     ~override~ // Cone of Cold (replaces Chaos)
  SAY NAME1 @615    SAY UNIDENTIFIED_DESC @616
COPY ~spell_rev\shared\spdr601.spl~     ~override~ // Chain Lightning
  SAY NAME1 @687    SAY UNIDENTIFIED_DESC @688

And in there the original avenger 5th level spell Chaos was replaced by Cone of Cold. So now for example, when an avenger casts SPDR501, does the (SCS)AI know Cone of Cold was cast, or the AI thinks Chaos was cast, or the AI does not know what was just cast at all?

Link to comment

The AI rarely needs to know what spell has just been cast by an opponent, so the issue doesn't really arise. It's responsive to the effects of spells, but those are tracked by things like STATE_CONFUSED, not by the spell name.

That said, swapping Chaos for Cone of Cold will confuse SCS in a different way: when enemy Avengers learn spells. They probably will be confused and will try to cast Cone of Cold in situations where Chaos would be appropriate. There's only so much I can do about that without looking into the guts of every kit mod: I normally assume that mods won't replace a spell with a completely different one and leave the resref unchanged, but unfortunately SR chose to do so. (The compatibility-friendly thing would be to introduce a spell with a new resref and then swap GA_SPDR501 for GA_[new_resref] in the Avenger CLAB file.)

Link to comment

That’s an odd replacement by SR, I never noticed it. Really odd, considering Demi always advocated leaving kit-specific stuff to the putative “Kit Revisions” mod. (E.g. SR’s changes to Dispel Magic do not extend to the Inquisitor’s special ability.) Usually when SR makes substitutions the replacement has similar targeting criteria and tactical application - e.g. replacing Deafness with Sound Burst, or replacing Death Spell with Banishment. I get the idea of changing Avenger spells - elemental attacks make a lot more sense for that kit - but it’s an odd place for SR to dabble in. I might go advocate to have it removed. 

OTOH Demi always wanted SR to be compatible with SCS, and my immediate supposition is that there are (or were, when that code was written) no Avenger enemies in the game, so this is (or was) harmless. If SCS has since started to change some Trueclass druids into Avengers (which would make thematic sense in the Druid Grove map) then it warrants a reevaluation of how the two mods interact. 

There aren’t many party-friendly AoE spells to give the kit in place of Cone of Cold... only ones that jump out at me are Hold Monster and Waves of Fatigue. A new SR release is semi-imminent anyway, so it’s worth a discussion on the SR boards whether to change this to accommodate SCS. But, again, only if it actually matters, i.e. if there are actually enemies with the Avenger kit. 

Link to comment

Just as a point of historical interest, I don't think that supposition is correct. SCS had at least one Avenger in it since v5 (March 2008) when Improved Faldorn was introduced; I'm not 100% sure when I started giving the Avenger kit to druids more widely (I foolishly haven't kept copies of the earliest versions) but it's probably v10 (August 2009) when I started auto-writing spellbooks, and certainly by v16 (February 2011) when spell lists were externalized. Meanwhile SR wasn't released until later in 2008, and of course Demi was actively engaged in it until around 2016.

From a compatibility point of view SCS's update cycle (right now) is probably faster than SR's, so I could handle it on my side (it wouldn't be a problem for Avengers to have/cast Cone of Cold, I just need to know that's what it's doing). That said, as far as I can see this is completely undocumented in SR (either in the in-game kit description or in the mod documentation) so I am inclined just to silently revert it in SCS (and I suggest to whoever's maintaining SR that they document it or take it out - undocumented kit modifications aren't a good idea).

Link to comment

Ah, must have been an oversight then. :undecided:

We have an new version of SR coming together right now, thanks to bug-fixing by Bartimaeus and grodrigues. It’s gotta be released fairly soon because it fxes a pretty major issue related to the EE 2.6 update. So while the update cycle is slow, the timing of this in particular is serendipitous. 

As far as documentation... the problem is that Demi prepared SRv4 as a beta, but then left before finalizing it. So while the mod functions very well, there is not even so much as a rough draft of a Readme. And while care enough to help spruce up the functionality of abandoned mods that I like, writing documentation is just not something I can sign up for. (Especially since, like you, I was not even aware of changes like this.)

Link to comment

SR also makes changes to warrior HLAs, which looks to be added by Kreso when he took charge in Demi’s absence. IMHO, I think while it’s the correct call for SR to modify arcane and divine HLA spells, it’s probably “out of place” for SR to modify warrior HLA abilities. So if we’re going to revert the Avenger spell change, maybe we should also disable the warrior HLA component?

Link to comment

Working well with SCS scripts is an explicit and important goal of SR; if Avengers’ Cone of Cold contravenes that, then there is an argument to revert that one spell. 

The HLA changes are another thing entirely. Feel free to make an argument about it - the more detailed, the better. But best to do it in the SR forum. 

Edited by subtledoctor
Link to comment
18 hours ago, DavidW said:

...The compatibility-friendly thing would be to introduce a spell with a new resref and then swap GA_SPDR501 for GA_[new_resref] in the Avenger CLAB file...

Let's say we have now made Cone of Cold SPDR502.SPL, and have also replaced GA_SPDR501 with GA_SPDR502 in CLABDR04.2DA. To enable SCS Avengers to properly learn Cone of Cold and later to *know* he's indeed casting Cone of Cold, are the previous actions all that's needed, or should I additionally append the new spell as for example 45XX AVENGER_CONE_OF_COLD into SPELL.IDS? In case it's the latter, should I use AddSpell for the task? Can AddSpell specify spell type rather than 1 (Cleric) or 2 (Wizard)? If AddSpell can only add it as a Cleric spell (SPPRXXX), is there an opcode that can tailor the spell to be available only to specific kits?

I guess it's easy to tell that (A) I'm still learning to mod and (B) I don't have a clear clue of how SCS casters "learn" their spells. So once again, apologies for these semi-unrelated questions, and feel free to split and move them into another place.

Edited by guyudennis
Link to comment
On 9/30/2021 at 9:25 AM, DavidW said:

The AI rarely needs to know what spell has just been cast by an opponent, so the issue doesn't really arise. It's responsive to the effects of spells, but those are tracked by things like STATE_CONFUSED, not by the spell name.

That said, swapping Chaos for Cone of Cold will confuse SCS in a different way: when enemy Avengers learn spells. They probably will be confused and will try to cast Cone of Cold in situations where Chaos would be appropriate. There's only so much I can do about that without looking into the guts of every kit mod: I normally assume that mods won't replace a spell with a completely different one and leave the resref unchanged, but unfortunately SR chose to do so. (The compatibility-friendly thing would be to introduce a spell with a new resref and then swap GA_SPDR501 for GA_[new_resref] in the Avenger CLAB file.)

Spell Revisions does this because Chaos gets removed from the game entirely...though I've been thinking on and off over the years of restoring it over what replaces it in SRR, which is probably my most disliked spell, Waves of Fatigue. Maybe this is as good a reason as any to do so...

Link to comment
44 minutes ago, DavidW said:

Ah, that’s what’s going on.

From SCS’s POV, swapping it for Confusion (or a 5th level version) would be simplest. But I can perfectly well deal with CoC now I know.

(And I draw the line at supporting SR and SRR separately here!)

Yeah, that's fine, I've always taken a "I should make sure everything works with SCS and will always revert anything I do that makes that not the case, not the other way around" mindset.

Link to comment
On 10/1/2021 at 11:23 AM, subtledoctor said:

Working well with SCS scripts is an explicit and important goal of SR; if Avengers’ Cone of Cold contravenes that, then there is an argument to revert that one spell. 

The HLA changes are another thing entirely. Feel free to make an argument about it - the more detailed, the better. But best to do it in the SR forum. 

Upon closer inspection of relevant code (kreso_hla.tph), Kreso modified WWA&G.WWA's duration from 6 to 12; he also reduced hardiness' resistance from 40 to 20 while expending the resistance to be more than physical. For the former (WWA&G.WWA), I checked relevant discussions in the KR thread, and the longer duration for both is in line with what Demi was suggesting for KR. For the latter, the resistance expansion is once again in line with Demi, and I seem to remember the reduction of the amount actually has to do with SCS' enemy targeting prioritization, for which resistance over certain percentage (30%?) might cause enemies to completely "ignore" the PC, so this reduction is actually needed for better integration with SCS. With all this, I now believe they can indeed remain with SR (already a separate component that the user can decide for himself to install or not).

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