Jump to content

SR Revised V1.3.900 (2022 August 8th)


Recommended Posts

3 hours ago, Chitown Willie said:

Yeah - I think you're onto something.

Only 2 bats averaging +4 to-hit:

And then there's the generic freak bat doing +127?

Hm, this is an ability I've never modified from the base SR package, so theoretically, it isn't my fault. I'll have to muck about and do some testing and find out for sure, though - thank you!

@morpheus562 I have a general policy of defaulting optional tweaks to off so that people don't accidentally get weird stuff enabled they're not expecting coming from having played non-Revised previously. I will implement it sometime within the next week or two, though - it shouldn't be that particularly difficult to implement, but I am a bit busy right now.

In regards to the spell state stuff... It should be noted that I do not play the EEs - as such, spell states as set by opcode 328 do not even exist in my games (instead, stuff like SCS makes use of some other more hacky stuff to more or less the same effect), so I only have a little working knowledge of them. I've added spell states to some miscellaneous things in the past at the behest of a couple of other knowledgeable EE players, but only ones that already existed in the .ids. So I don't know the details of adding an entirely new one, and I don't currently have the time to research and mess around with it. If you want to link me to something that explains or gives an example on how to do it, though, I can look at in the somewhat near-future.

Link to comment
4 hours ago, morpheus562 said:

There would be many issues when trying to get complete compatability with SCS. For starters, many of the new spells (i.e. Dispelling Screen, Mage Armor, etc.) do not update any spell states, so it's impossible to detect if an enemy or player has the spell active. I think this would be a great first step for laying the groundwork for complete SCS compatability. 

Mage Armor has a sectype, which SCS knows how to handle. As a combat protection, it can be breached or dispelled. SCS is quite adept at doing such thing, in my experience.

4 hours ago, morpheus562 said:

Let's look closer at Dispelling Screen and why appropriate spell tracking is necessary. SCS currently checks if the SPELL_IMMUNITY spell state is set at 1 to see if SI: Abjuration is active to appropriately determine what spells to cast at the player. Dispelling Screen updates NOTHING! So SCS will cast spells assuming the player is not protected when in fact the player is. Additionally, there is no way to write player scripts to cast Dispelling Screen because the player will keep casting the spell until every instance of it in their spellbook is used up because there is no way for the script to detect if it's active. Simple solution would have Dispelling Screen update SPELL_IMMUNITY to 1 to mimic SI: Abjuration. This is just one example of many on why tracking spell states matters.

Dispelling Screen has a custom sectype, which I think SCS knows about... but even if not, it doesn't really matter. Dispelling Screen blocks one instance of Breach or Dispel Magic; to remove that protection you must cast... Breach or Dispel Magic. Thing thing it protects from is the thing that dispels it; so even if the AI is dumb as a rock and casts Dispel Magic at your Dispelling Screen, it is actually doing precisely what a smart AI would do in the same circumstance.

 

Link to comment
13 minutes ago, subtledoctor said:

Mage Armor has a sectype, which SCS knows how to handle. As a combat protection, it can be breached or dispelled. SCS is quite adept at doing such thing, in my experience.

Dispelling Screen has a custom sectype, which I think SCS knows about... but even if not, it doesn't really matter. Dispelling Screen blocks one instance of Breach or Dispel Magic; to remove that protection you must cast... Breach or Dispel Magic. Thing thing it protects from is the thing that dispels it; so even if the AI is dumb as a rock and casts Dispel Magic at your Dispelling Screen, it is actually doing precisely what a smart AI would do in the same circumstance.

 

But from a player ai scripts perspective, there is no way to track either Mage Armor or Dispelling Screen. Both will continue to be cast by any scripts until all instances in the players spell books are used up. SCS gets around this on buffing the enemies through contingencies, and as you state, it doesn't matter as far as casting on enemies. The difficulty with targeting comes from non-detection and improved invisibility. The changes Bart mentioned should improve targeting in theory.

Link to comment

Ah, well if you're just talking about player scripts then I confess I don't use those so I don't really pay attention. I've never found them good enough to make me want to cede control to a script (especially for mages - for fighters or thieves or even clerics, it's not as big a deal). But, for the sake of argument:

There are only so many spellstates you can add to the game; talking about applying one for each spell like Mage Armor is a start down a path toward infeasibility. Maybe something like a broad "AC buff" category, which could include Armor, Shield, Blur, Ghost Armor, Spirit Armor, etc. If the script finds that you are without any buffs, then it can check what you have memorized and apply something. Some important defensive spells, like Stoneskin, do already apply a detectable state. PfMW might or might not, I forget. As to Mage Armor in particular, I'll not that it has a long casting time and an all-day duration, and is thus clearly meant to be applied before combat starts. If my mage loses his buffs to a Breach and the script starts casting Mage Armor, I would be pretty annoyed at that script. That's not a spell I ever want to cast mid-combat.

I still don't really understand what the issue is with Nondetection or Improved Invisibility. What is the behavior you are seeing that you find objectionable? SR's See Invisible and True Seeing apply opcode 193 "invisibility detection by script," which makes anyone - anyone - a valid target for spells or attacks, regardless of invisibility or non-detectibility. If you cast True Seeing and your mage script isn't targeting an invisible enemy, then my guess would be that the problem is in the player script. Player scripts don't account for the player having opcode 193 - it's generally reserved for a select few enemies and scripted cut-scenes. So the player scripts might have conditional stuff like, "if target is not invisible, then cast spell A." With SR installed, that won't work well. The answer is to remove such targeting conditions from the scripts. (Letting spells target improved invisible enemies is not a good solution, because then they could be targeted even if you don't cast True Seeing, and then really what is the point of True Seeing?)

Link to comment

I should mention, if there is "going on at the opcode level preventing scripts from appropriately targeting enemies" with ND and II, then it is hardly an issue with SR. If that's really the case, then I would guess it is something hard-coded about Nondetection. The way the game treats invisibility and nondetection has always been screwy. If that's the case, then you might want to look at what I've done with Tome & Blood. It changes Nondetection into "Protection from Divinations" - closer to a true replacement for SI:Div. It does this by adding an opcode 205 effect, blocking spells with the DIVINATIONATTACK sectype. (It also adopts SR's use of opcode 193 for See Invisible and True Seeing, so a caster with True Seeing cannot remove the protected person's invisibility (or  Mirror Image etc.), but can still see and target that person.

With opcode 205 in place, I suppose there is no need for the vanilla "nondetection" opcode 69. So the lastest master of TnB, just uploaded now but not yet set as a "release," eliminates the opcode 69 effect.  If opcode 69 was indeed interfering with player scripts, then maybe they will work better with the TnB tweaks.

Link to comment

The 69 opcode just makes it so...spells like True Seeing can't dispel the stealth status, right? So yeah, that would already be covered by protecting wholesale against invisibility-detection spells, so it's a bit superfluous. Would be indeed good to know if that particular opcode causes scripting problems.

Link to comment

Generic AC buff is how Mage Armor has to be checked, but it's a bad way to check since the ac adjustment changes based on mage level. Scripts can easily be written to cast Mage Armor out of combat, but the issue is there is no way yet to check if the player has it active. Same goes with Dispelling Screen. 

I've done hours of testing SRR non-detection and improved invisibility, and it doesn't matter what conditions I have set within the scripts, enemies with those spells up will not be targeted by the scripts even if spells can be cast manually. Zero issues with targeting using vanilla spells. SRR, non-detection, and improved invisibility are the only outliers.

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

Zero issues with targeting using vanilla spells. SRR, non-detection, and improved invisibility are the only outliers.

With vanilla spells, you simply cannot target an enemy who has II + ND. (Heck, you can;t target an enemy who only has II - ND doesn't even factor into it.) So I'm not clear on what you are comparing here.

I have definitely had occasions when I turned on player AI by mistake, and one of my characters started attacking an invisible enemy. So invisible enemies can definitely be targeted with SR installed. (In fact that is partly what caused me to go out and make my own invisibility tweak mod.)  I don't know whether that enemy had Nondetection cast... probably not. So maybe adding Nondetection into the mix can screw with player scripts? But if so, it sounds like it is something, as you say, "at the opcode level." I can't see how SR could be causing it; SR doesn't really change Nondetection. The only thing SR does to Nondetection is add an opcode 282 effect, setting the value to 3. I have no idea what that is for - I assume it is something to do with Detectable Spells?

Link to comment
18 minutes ago, subtledoctor said:

With vanilla spells, you simply cannot target an enemy who has II + ND. (Heck, you can;t target an enemy who only has II - ND doesn't even factor into it.) So I'm not clear on what you are comparing here.

I have definitely had occasions when I turned on player AI by mistake, and one of my characters started attacking an invisible enemy. So invisible enemies can definitely be targeted with SR installed. (In fact that is partly what caused me to go out and make my own invisibility tweak mod.)  I don't know whether that enemy had Nondetection cast... probably not. So maybe adding Nondetection into the mix can screw with player scripts? But if so, it sounds like it is something, as you say, "at the opcode level." I can't see how SR could be causing it; SR doesn't really change Nondetection. The only thing SR does to Nondetection is add an opcode 282 effect, setting the value to 3. I have no idea what that is for - I assume it is something to do with Detectable Spells?

Let me clarify, in vanilla my scripts will identify a character has non-detection and improved invisibility up and immediately take it down using True Sight. From there, the characters will get to work stripping spell protections to take down pfmw if it's up. Otherwise, they will autoattack. 100% success rate, no fuss, spells are appropriately identified by the scripts and dealt with.

With SRR, it gets wonky. Even with a character who cast true sight, something at the opcode level is preventing the scripts from targeting the enemy and taking down the appropriate spell protections even though the spells can be cast manually. The enemy is still not targetable by spells, from the scripts point if view, even though spells can be manually cast. Autoattack still works, but you can still attack an enemy with improved invisibility up so long as they revealed themselves. I want to be clear, there are no checks preventing spells being cast, they should 100% work; however, some other check in one of the opcodes is preventing it.

Edited by morpheus562
Link to comment

And they are targetable with II but no ND?

My gut says it's something to do with opcode 69, if that's the case. (Though I've been wrong before. This game engine is wacky.) Which would mean this problem is already solved by my mod. :p (Though, it could create other issues, like Nondetection becoming too strong... at least against priests. Their only counter would seem to be Faerie Fire. )

What happens in SRR with someone has Nondetection and you cast Invisibility Purge?

EDIT - it might also be something wacky about the "invisibility detection by script" effect. IIRC this is generally applied in-game to enemies, and those enemies will generally make physical attacks. Maybe this only supports scripted targeting for physical attacks? Anyone recall whether there are enemies with scripted invisibility detection who cast spells? Maybe some fiends? Will they successfully target a player with II + ND?

Edited by subtledoctor
Link to comment
2 minutes ago, subtledoctor said:

And they are targetable with II but no ND?

My gut says it's something to do with opcode 69, if that's the case. (Though I've been wrong before. This game engine is wacky.) Which would mean this problem is already solved by my mod. :p (Though, it could create other issues, like Nondetection becoming too strong... at least against priests. Their only counter would seem to be Faerie Fire. )

What happens in SRR with someone has Nondetection and you cast Invisibility Purge?

You're making me think back to my testing last summer 😂. SCS always has II go up with ND with SRR installed, so technically wasn't able to compare. My scripts never cast Invisibility Purge or Detect Invisibility with ND up because even vanilla blocks that. If ND is not up, I would cast either of those to take down II, and I have 100% success rate in vanilla with that. 

Link to comment
2 minutes ago, subtledoctor said:

You could just remove all of the effects from ND, then load up a save and see what happens... that might suss out the issue.

I would do that if I still had SRR installed. I ended up just getting frustrated and rewrote everything for SCS and vanilla spells, but would love the opportunity to write updated ones for SRR if some of the items I mentioned are addressed. Spell states should be relatively easy to create/update. The non-detection and improved invisibility is going to take much more time and testing to really see what is going on and ascertaining the true culprit.

Link to comment
On 3/2/2021 at 9:46 AM, subtledoctor said:

Down to brass tacks, if you want to convert your changes into an installable thing, here is what I suggests

  • upload your .BAM/.VVC. files
  • roughly list which file goes with which spells/effects
  • if you have it handy, list which vanilla animations need to be suppressed
  • I'll put it all together with a Weidu installer.

Ok @subtledoctor, here are the files and a Read Me that explains what goes where.

I give everyone permission to use these files as desired. If you publish a mod which incorporates them, please give me a credit for posterity's sake.

When working with the files, refer back to my previous posts for images of the various spell animations in action.

https://www.dropbox.com/s/teo2grmy373liuq/DavidNYC's Better Spell Protection Feedback v1.zip?dl=0

Edited by DavidNYC
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...