Jump to content

SR Revised V1.3.900 (2022 August 8th)


Recommended Posts

That helps. Digging through DavidW's posts, it appears he uses the DEFENSE_MODIFIER stat set to 3 to track SR's WIZARD_ARMOR. I would only need to create a new spellstate for Dispel Screen and then adjust antimagic to be able to target through Improved Invisibility, then I should be good to go.

Link to comment
23 minutes ago, morpheus562 said:

 and then adjust antimagic to be able to target through Improved Invisibility, then I should be good to go.

While I definitely see this as a valid option and some people like it, in the context of SR having True Sight apply 'Invisibility Detection by Script' is a MAJOR design decision, which would be undercut by this change. I really think it's worth figuring out whether the issue you discovered is something about the interaction between opcode 193 and opcode 69, or inherent to opcode 193. If it's not too much trouble to set up a test, install my Revised Invisibility component from Tome & Blood on top of SR. My mod eliminates opcode 69 from the equation but otherwise works the way SR does. Then see if a mage with True Seeing will correctly target invisible enemies with your scripts.

Link to comment

@DavidNYC I glanced at the stuff, this is practically already written! I'm inclined to break  it down so that one component is just animation changes, and exclude the functional tweaks (e.g. whether Dispelling Screen gets removed by MAGICATTACKs, etc.) to a separate component. That way someone can get the benefit of the animations but still choose whether to use your functional rules, or the SR one, or the SRR ones, or the SDRT ones.

As far as SCS stuff... I think if this is installed before SCS, then it should all fall into place. SCS will clone spells that already have these modified animations, and will apply its invisibility function to these new .VVC/.BAMs.   ...Right?

EDIT - here's my rough plan:

Component 1: 'Make Magical Protections More Distinct and Recognizable'

  • PfNW
  • PfMW
  • Prismatic Mantle
  • Moment of Prescience
  • Absolute Immunity
  • ProMissiles
  • NonDetection
  • Deflections/Trap/SotA
  • Dispelling Screen
  • MGOI/GOI
  • Fire Shield/Acid Sheath
  • Spell Shield
  • Storm Shield
  • Mind Blank
  • Disable Ioun Stone animations so as not to conflict with these

Probably set all these animations in a single go. (NB there is a bit of a conflict between SR's "Storm Shield" and SCS/IWD's "Storm Shell." Both can coexist, but it seems like they should be collapsed into one spell. I will probably handle this separately in my own mod, though.)

I know you have this geared toward SR+SCS, but at least some of these could be independent. I'll think about how much effort it's worth to support non-SR games.

Component 2: 'Varying Color Glows & Pulses'

I see what you're doing here, but I'm not sure how extensive this needs to be. I might leave it aside until I have wrapped my head around the extent of it.

Component 3: 'Bubb's Mirror Image Transparancy'

EEex-only, so broken out into its own component so players without EEex don't need to worry about it. In an effort to avoid using READLN, I would probably just offer a couple optional SUBCOMPONENTs, with 51% transparency and 80% transparency, or something like that.

Component 4: 'DavidNYC's Functional Tweaks'

Nondetection:

  • Prevent Nondetection from stacking
  • Nondetection add 206 vs. True Sight, Detect Illusion, and Faerie Fire
  • Set power level of Nondetection so it can be removed by MAGICATTACKs
  • Make Nondetection dispellable
  • Set MSD spellstates for Nondetection

Dispelling Screen

  • Set Dispelling Screen to SPELLPROTECTIONS sectype
  • Set Breach/Dispel Magic to 321 remove Dispelling Screen
  • Fix dispel-on-hit items to work with this version

Fire Shield/Acxid Sheath:

  • Set to SPECIFICPROTECTIONS sectype

Moment of Prescience:

  • rename back to Improved Mantle

 

Edited by subtledoctor
Link to comment

It's coming along. Testing right now that I'm getting the weidu component working right since I'm new to it. So far, beyond the pedantics of weidu, it's coming along well. I've seen, and learned on far more annoying things than weidu.

I'm hoping I can get an install up of EET, SCS, IRR, SRR, and Tome & Blood tonight so I can get cracking at figuring out the invisibility thing. @subtledoctorI may reach out if I have any questions and if I'm able to determine a culprit. I'm really hoping your Revised Invisibility component does the trick.

On another note, if/when I get this up and running, can g3 host my improved ai scripts and components? 

Link to comment
10 minutes ago, morpheus562 said:

@subtledoctorI may reach out if I have any questions and if I'm able to determine a culprit. I'm really hoping your Revised Invisibility component does the trick.

Sure thing. And even if it doesn't work, then we can conclude that it is something inherent to the status of having invisibility detection by script. Which would be bad, but still a very good thing to be aware of!

Link to comment

@subtledoctor

On 3/9/2021 at 11:57 AM, subtledoctor said:

I'm inclined to break  it down so that one component is just animation changes, and exclude the functional tweaks (e.g. whether Dispelling Screen gets removed by MAGICATTACKs, etc.) to a separate component.

Definitely agree.

On 3/9/2021 at 11:57 AM, subtledoctor said:

As far as SCS stuff... I think if this is installed before SCS, then it should all fall into place. SCS will clone spells that already have these modified animations, and will apply its invisibility function to these new .VVC/.BAMs.   ...Right?

No, SCS would have to hardcode these changes into stratagems\spell\stratagems\invisibility_animations.tpa. That'd be between you and DavidW to see if something could be worked out.

The alternative that doesn't touch SCS is what I'm currently doing: install SR + SCS, then add these animations afterwards. This should help.

DK_Invis_Animations code:

Spoiler


/*-------------------------------------------------------------------------------------------------------------------------------------------

DK_Invis_Animations (add animation to spell, update SCS hiding & invisibility detection)

dw#hideA.spl, dw#hideB.spl, dw#HideA.eff, dw#HideB.eff are attached in this post.

If you don't have them, they're just empty templates I use when creating the new spells and effects.

-----------------------------------------------------------------------------------------------------------------------------------------*/

DEFINE_ACTION_FUNCTION DK_Invis_Animations

INT_VAR    
    mTarget=1                 
    mCloneOpcode=0     // choose opcode with matching desired duration, saves, resist_dispel. Only first instance cloned.
    
STR_VAR
    mCode=""    // Max length 3 alphanumeric. Creates dw#w%mCode%a.spl, dw#w%mCode%b.spl
    mFile=""     
    mAnim1=""
    mAnim2="NONE"
  mInsert = "last" // "first" to locate BOF (i.e. spell ends with opcode 206 (no stacking))
 
BEGIN
        

    // 1. Update parent spell to call for the animation         
    COPY_EXISTING_REGEXP GLOB ~%mFile%.spl~ ~override~  
        // protection from spell
        LPF DK_CLONE_EFFECT INT_VAR match_opcode=%mCloneOpcode% multi_match=1 opcode=206 target=%mTarget%
                parameter1=0 parameter2=0
                STR_VAR insert=EVAL "%mInsert%" resource="dw#w%mCode%b" END
        // apply invis condition every second
        LPF DK_CLONE_EFFECT INT_VAR match_opcode=%mCloneOpcode% multi_match=1 opcode=272 target=%mTarget%
                parameter1=1 parameter2=3
                STR_VAR insert=EVAL "%mInsert%" resource="dw#w%mCode%a" END
    BUT_ONLY
            

    ACTION_IF FILE_EXISTS_IN_GAME "dw#w%mCode%a.spl" BEGIN     
        PRINT "" PRINT "%mFile%'s files for %mAnim1% already exist." PRINT ""
    END    
        
    
    ACTION_IF !FILE_EXISTS_IN_GAME "dw#w%mCode%a.spl" BEGIN     
    
            PRINT ""     PRINT "Creating %mAnim1% spells for %mFile%." PRINT ""     
            
            
            // 2. apply 3D Animation
        
            COPY_EXISTING_REGEXP GLOB ~dw#hideA.spl~  ~override/dw#w%mCode%a.spl~  
                 LPF DK_DELETE_EFFECT END // delete all existing effects
                
                 LPF DK_ADD_SPELL_EFFECT INT_VAR opcode=215 target=%mTarget% duration=1500 parameter2=1 STR_VAR resource=~%mAnim1%~    END
                
                 PATCH_IF ("%mAnim2%" STRING_COMPARE_CASE "NONE" != 0) BEGIN
                        LPF DK_ADD_SPELL_EFFECT INT_VAR opcode=215 target=%mTarget% duration=1500 parameter2=1 STR_VAR resource=~%mAnim2%~    END
                 END
                
                 LPF DK_ADD_SPELL_EFFECT INT_VAR opcode=272 target=%mTarget% duration=1500 parameter1=1
                 parameter2=3 STR_VAR resource=~dw#w%mCode%b~    END
    
                 LPF DK_ADD_SPELL_EFFECT INT_VAR opcode=206 target=%mTarget% duration=1500 parameter1="-1"
                 STR_VAR resource=~dw#w%mCode%a~ END             
            BUT_ONLY    
        
            // 2. remove 3D Animation        
            COPY_EXISTING_REGEXP GLOB ~dw#hideB.spl~  ~override/dw#w%mCode%b.spl~
                 LPF DK_DELETE_EFFECT END // delete all existing effects  
                 LPF DK_ADD_SPELL_EFFECT INT_VAR opcode=321 target=%mTarget% STR_VAR resource=~dw#w%mCode%a~    END
            
            
            // 3. update effect files
            COPY_EXISTING_REGEXP GLOB ~dw#HideA.eff~  ~override/dw#w%mCode%a.eff~  
                    WRITE_ASCIIE 0x30 ~dw#w%mCode%a~ #8  
                    WRITE_LONG 0x14 %mTarget%
            COPY_EXISTING_REGEXP GLOB ~dw#HideB.eff~  ~override/dw#w%mCode%b.eff~
                  WRITE_ASCIIE 0x30 ~dw#w%mCode%b~ #8
                    WRITE_LONG 0x14 %mTarget%
            
            //4. update dw#hdani
            COPY_EXISTING_REGEXP GLOB ~dw#hdani.spl~ ~override~  
                LPF DK_ADD_SPELL_EFFECT INT_VAR    opcode=321 target=%mTarget%  STR_VAR resource=~dw#w%mCode%a~ END
                LPF DK_ADD_SPELL_EFFECT INT_VAR    opcode=206 target=%mTarget% timing=1 STR_VAR resource=~dw#w%mCode%a~ END
                    
    END // ACTION_IF !FILE_EXISTS_IN_GAME "dw#w%mCode%a.spl"    
                   
END // DK_Invis_Animations

 

 

/*===============================================

Spells whose animations are already handled by SCS's invisibility_animations.tpa:

Prismatic Mantle
Fire Shield Red
Mestil's Acid Sheath
mGoI
Spell Shield

===============================================*/

 

// pfMissiles
ACTION_FOR_EACH file IN
  spwi311 dwsw311
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=2 mCloneOpcode=83
        STR_VAR mCode=~311~ mFile=EVAL "%file%" mAnim1=~ION1RED~ mAnim2=~ION2RED~ END
END


// Non-Detection    
ACTION_FOR_EACH file IN
         SPWI310 dwsw310
BEGIN    
        LAF DK_Invis_Animations    INT_VAR mTarget=2 mCloneOpcode=69
            STR_VAR mCode="310" mFile=EVAL "%file%" mAnim1="ION1BLCK" mAnim2="ION2BLCK" END
END


/* Minor Spell Deflection (orig whitish-blue)*/        
ACTION_FOR_EACH file IN
     SPWI318 dwsw318
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=201
        STR_VAR mCode="318" mFile=EVAL "%file%"  mAnim1="SWIRLW" END
END


/* Spell Deflection (darker blue) */
ACTION_FOR_EACH file IN
      SPWI522 dwsw522
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=201
            STR_VAR mCode="522" mFile=EVAL "%file%" mAnim1="SWIRLB" END
END


/* Gr Spell Deflection (gold) */
ACTION_FOR_EACH file IN
      SPWI701 dwsw701
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=201
            STR_VAR mCode="701" mFile=EVAL "%file%" mAnim1="SWIRLY" END
END


/* Spell Trap (purple) */
ACTION_FOR_EACH file IN
      SPWI902 dwsw902
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=201
            STR_VAR mCode="902" mFile=EVAL "%file%" mAnim1="SWIRLP" END
END        


// Shield Archons
ACTION_FOR_EACH file IN
 SPPR701 dwsp701
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=201
        STR_VAR mCode="Arc" mFile=EVAL "%file%"  mAnim1="swirlT" END
END        


// Mestil's Acid Sheath (spwi403.spl legacy, ids FIRE_SHIELD_BLUE, still used by enemies)
ACTION_FOR_EACH file IN
  spwi403 dwsw403
BEGIN    
LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=27
    STR_VAR mCode=~403~ mFile=EVAL "%file%" mAnim1=~SPFIRESA~ mAnim2=~SPFIRESB~ END
END


// Dispelling Screen
ACTION_FOR_EACH file IN
 k1#scre
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=2 mCloneOpcode=101
        STR_VAR mCode="510" mFile=EVAL "%file%"  mAnim1="discBlue" END
END


// PfNW
ACTION_FOR_EACH file IN
 SPWI511
 spwi315 // wraithform
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=120
        STR_VAR mCode="511" mFile=EVAL "%file%"  mAnim1="myBulbGr" END
END    

// potion Invulnerability, note "first" due to opcode 206 EOF (no stacking)
ACTION_FOR_EACH file IN
 potn11
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=120
        STR_VAR mCode="P11" mFile=EVAL "%file%"  mAnim1="myBulbGr" mInsert="first" END
END


// pfMW
ACTION_FOR_EACH file IN
 SPWI611 spin158
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=120
        STR_VAR mCode="611" mFile=EVAL "%file%"  mAnim1="SPCOMETT" END
END


// Improved Mantle
ACTION_FOR_EACH file IN
 SPWI808
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=0
        STR_VAR mCode="808" mFile=EVAL "%file%"  mAnim1="myImpMan" END
END

// Abs Immunity
ACTION_FOR_EACH file IN
 SPWI907
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=120
        STR_VAR mCode="907" mFile=EVAL "%file%"  mAnim1="SPABSIMM" END
END


//GoI
ACTION_FOR_EACH file IN
 spwi602 dwsw602
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=102
        STR_VAR mCode="602" mFile=EVAL "%file%"  mAnim1="myGlobeP" END
END


// Mind Blank
ACTION_FOR_EACH file IN
 SPWI802 DWSW802
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=2 mCloneOpcode=101
        STR_VAR mCode="802" mFile=EVAL "%file%"  mAnim1="ion1Gold" mAnim2="ion2Gold" END
END    


// Storm shield (note insert "first")
ACTION_FOR_EACH file IN
 sppr322 spcl721 DWSC721
BEGIN    
    LAF DK_Invis_Animations    INT_VAR mTarget=1 mCloneOpcode=83
        STR_VAR mCode="322" mFile=EVAL "%file%"  mAnim1="myStorms" mInsert="first" END
END

 

 

 

On 3/9/2021 at 11:57 AM, subtledoctor said:

Component 1: 'Make Magical Protections More Distinct and Recognizable'

Sounds good. Yeah, I personally don't like ioun stone helmet animations on my PC's so I've always had them disabled. My general preference is I only want to see animations that convey "combat-relevant" information. But it's still a conflict and I leave it to you.

 

On 3/9/2021 at 11:57 AM, subtledoctor said:

Component 2: 'Varying Color Glows & Pulses'

This was more of an FYI, certainly no need to include it. I actually started by giving those conditions unique animations and just tried the glows as an experiment. Interesting how the game originally decided that 'confusion' was a condition meriting a unique animation but most other conditions do not. I know we have portrait icons, etc, but the conditions affect both PC's and enemies.

 

On 3/9/2021 at 11:57 AM, subtledoctor said:

Component 3: 'Bubb's Mirror Image Transparancy'

Sounds good. BTW, I checked my install and I've been using 65%.

 

On 3/9/2021 at 11:57 AM, subtledoctor said:

Component 4: 'DavidNYC's Functional Tweaks'

Good, and I'd prompt a user message along the lines of "These changes attempt to bring protections in line with their documented behavior on  https://gibberlings3.github.io/SpellRevisions/spells/arcane/." (as opposed to yet another random person doing his own thing). I know the documentation is v18, but I believe these spell issues are unchanged since v16.

 

On 3/9/2021 at 11:57 AM, subtledoctor said:

rename back to Improved Mantle

Heh, no, leave it as Moment of Prescience. No point in confusing people. I just made note of that since you'd see 'Improved Mantle' in my code.

 

Thanks and good luck. There's only one other tricky component I'll have to post later. Dispelling Screen is the only AoE animation and SCS invisibility hiding doesn't work out of the box. This actually comes up a lot since virtually every mage buffs with DS and so their allies get it too. Assassinating Mae'Var, attacking the Shadow Thieves, etc., all have fights where the stupid thieves are chugging their 3 invisibility potions but their position is given away by their DS (pic is original SR + SCS animation).

Anyway I do have a fix for this, I'll post it in the next few days.

Spoiler

hBI5SpK.png

dw#hidea.eff dw#hideb.spl dw#hidea.spl dw#hideb.eff

Edited by DavidNYC
Link to comment

@subtledoctor Ok, I really have to cut this off but I saw this in my code.

21 hours ago, subtledoctor said:

Component 4: 'DavidNYC's Functional Tweaks'

Please add these to the SR spell fixes. This first one is a straight up bug rather than an interpretation AFAIK.

1. pfMW is protecting from normal weapons as well as magic. I remember this was one of my first fixes. I know you guys have been working on SRR and may have caught this long ago.

2. SR allows pfNW and pfMW to stack. The base game disallowed it and even created related strref messages. This allowance may be intentional on SR's part, but it feels more like an oversight. Vanilla also disallowed pfMW to stack with Mantle, Improved Mantle or Abs Immunity while SR allows it. I do allow stacking with these since the SR versions feel designed to each have different effects (Prismatic Mantle is a clever protection that's more fun than 'weapons <= +3'). You guys have heard far more feedback though and I could be convinced otherwise.

Spoiler

// pfMW
COPY_EXISTING ~spwi611.spl~ ~override~
    // bugged: pfMW is also granting immunity to normal weapons    
    LPF DK_DELETE_EFFECT INT_VAR match_opcode=120 END
    LPF ADD_SPELL_EFFECT INT_VAR opcode=120 target=1 timing=0 duration=24 parameter2=1 power=6 resist_dispel=3 END
    // shouldn't be able to stack with pfNW
    LPF ADD_SPELL_EFFECT INT_VAR opcode=206 target=1 duration=24 parameter1=36911 resist_dispel=3 power=6    STR_VAR resource=~spwi511~ END
    
    // base game does not allow stacking with Mantle, ImpMantle, AbsImm. SR does allow it. Probably ok.
BUT_ONLY    

//pfNW
COPY_EXISTING ~spwi511.spl~ ~override~
    // no stacking with pfNW    
    LPF DK_CLONE_EFFECT INT_VAR match_opcode=120 opcode=206 parameter1=36743 parameter2=0 STR_VAR resource=~spwi611~ END
BUT_ONLY   

 

Link to comment
3 hours ago, DavidNYC said:

No, SCS would have to hardcode these changes into stratagems\spell\stratagems\invisibility_animations.tpa. That'd be between you and DavidW to see if something could be worked out.

Huh. I never knew how that worked in SCS, and even now that I know what I'm looking at, I can't really follow DavidW's code. So a subspell is created for each spell with an animation to be suppressed, and the spells with animations to be suppressed is taken from a static list? How then does he handle stuff like the vanilla Spell Shield and Spell Deflection, with hardcoded animations?

Looking at this, man it would be nice if there were an opcode to cancel animations instead of just to protect from them. (Though I guess we said the same thing about canceling spells for 15+ years, and here anyway we can use the workaround of running animations through subspells...)

So I guess if SCS is already installed, then we can simply make our own subspells with animations for each of our changed spells, and simply hook our subspells into DW#bldha and DW#hdani. Should be doable.

3 hours ago, DavidNYC said:

I'd prompt a user message along the lines of "These changes attempt to bring protections in line with their documented behavior on  https://gibberlings3.github.io/SpellRevisions/spells/arcane/." (as opposed to yet another random person doing his own thing)

TBH I'm not sure that's true... or at least I'm not sure the descriptions written up recenly by Mike should be the authority as to the mod's intent, and we should be changing the mod's function to match those descriptions. It's going to take some digging through forums threads to answer these questions definitively, but:

  • I believe the descriptions of Spell Thrust/Secret Word stating that they will remove Dispelling Screen are in error, and that Demi/Kreso intended DS not to be taken down by MAGICATTACK spells
  • I'm pretty sure Demi/Kreso intended for Fire Shield & Acid Sheath to be unbreachable, and in fact not removable by anything except Dispel Magic (I hate this, I think they should be breachable, but that's my recollection of the modder intent)
  • I vaguely recall that allowing PfNW and PfMW to stack was intended, and in fact Demi talked a lot about turning PfMW into a straight "Pro. from All Weapons" spell... though I don't remember how that discussion ended up. Generally the whole "you can wack a PfMW mage with a simple stick" tactic is something only the player can do, and Demi wanted to preclude such imbalances, which argues in favor of PfMW blocking unenchanted attacks

Neither here nor there, but temnix did something quite interesting in teasing apart weapons' "+x" characteristic from their "enchanted" status; this allowed adding +x values to monster claws based on hit dice, per PnP, while bringing PfMW closer to its PnP function by only protecting against magical weapons. Quite clever, and a nice buff to e.g. shapeshifted druids... but unfortunately it means monks and mid-level summons would rip right through all but the highest level SCS mages, making them pushovers. If PfNW were to include animal claws then stacking the two defenses would suddenly become an interesting proposition... but I don't think SCS would stack them in any event so that's out the window.

The whole PfMW quandary is still a thorn in my side, all these years later. I hate that spell so much.

Link to comment
20 minutes ago, subtledoctor said:

I'm pretty sure Demi/Kreso intended for Fire Shield & Acid Sheath to be unbreachable, and in fact not removable by anything except Dispel Magic (I hate this, I think they should be breachable, but that's my recollection of the modder intent)

Seems inconsistent with their design of Prismatic Mantle, which I'm pretty sure *is* breachable. Isn't something like Blade Barrier as well?

Link to comment
1 hour ago, subtledoctor said:

So I guess if SCS is already installed, then we can simply make our own subspells with animations for each of our changed spells, and simply hook our subspells into DW#bldha and DW#hdani. Should be doable.

@subtledoctor Exactly. And just to be sure you saw it, my code to do that is there in the previous post in a Hidden Section (DEFINE_ACTION_FUNCTION DK_Invis_Animations) . If you have SCS installed right now, you should be able to run it almost as-is.

 

1 hour ago, subtledoctor said:

TBH I'm not sure that's true... or at least I'm not sure the descriptions written up recenly by Mike should be the authority as to the mod's intent, and we should be changing the mod's function to match those descriptions. It's going to take some digging through forums threads to answer these questions definitively, but:

Fair enough, and it's all independent to a mod of working animations. I don't know anything about the evolution of SR and didn't even know that documentation wasn't written by the original author.

The very thing I love about SR & IR  is that they're a rebalance I could adopt (almost) wholesale. I was starting to tweak vanilla, but when I found SR & IR it gave me the feeling of "ok, here are a fair set of rules and I'm going to work in them rather than tweaking things with my own biases." In vanilla, my party would run around with that 8 hours of 10' invisibility simply because it was available and therefore I wasn't 'cheating', but it felt cheap. Then SR' says, no, only 60s duration. I liked that decision being taken out of my hands and thinking, "ok, that option is severely curtailed, here's what I have to do differently."

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

IIRC Blade Barrier is not Breachable either. You’re just supposed to tank it or bomb from range. (I hate that too.)

These spells are literally called "Fire Shield" and "Blade Barrier". Their concept and intended effect (although in practice the AI doesn't care - but the player will if the AI casts them) is to protect the caster by making it dangerous to attack them. Makes no sense to me that they would not be considered a combat protection...and while Blade Barrier may not be included, SR's Prismatic Mantle is literally the same function (no direct protection, just a "if you hit me then I hit you" sort of effect) and *is* considered a combat protection. Well, that just makes me want to review exactly what is or isn't considered a combat protection now...

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

No worries! I didn't realize what you were talking about, I didn't think about what the spells were doing with stats. (I think some of the stat stuff doesn't show up on my installs, because I am on the EEs and some of the spells might be using spellstates instead there. Maybe. Anyway, NBD.
If your scripts are targeting the EEs, you can patch the spells with spellstates, instead of messing with the stats that may be used by Detectable Spells. There is an "add spellstate" macro here at line 55:

  Reveal hidden contents

 







DEFINE_ACTION_FUNCTION resolve_spellstate INT_VAR index=0 delete=0 STR_VAR new_state_id = ~blah~ RET new_state_ind BEGIN
 OUTER_SET min_new=118
 COPY_EXISTING ~splstate.ids~ override
  new_state_ind=0
  found=0
  READ_2DA_ENTRIES_NOW stats 2
  FOR (row=0;row<stats;row+=1) BEGIN
    READ_2DA_ENTRY_FORMER stats row 0 ind
    READ_2DA_ENTRY_FORMER stats row 1 str
    SET $stat("%row%") = ind
    PATCH_IF index BEGIN
      PATCH_IF ind=index BEGIN
        REMOVE_2DA_ROW row 2
        found=1
        PATCH_IF delete=0 BEGIN
          INSERT_2DA_ROW row 2 ~%index% %new_state_id%~
        END
        row=stats
      END
    END ELSE BEGIN
      PATCH_IF ~%str%~ STRING_EQUAL_CASE ~%new_state_id%~ BEGIN
        new_state_ind=ind
        found=1
      END
    END
  END
  PATCH_IF found=0 BEGIN
    new_state_ind=min_new
    PHP_EACH stat AS row => ind BEGIN
      PATCH_IF found=0 && (row+1 < stats) BEGIN // not at the end of file
        next_row = row+1
        next_ind = EVAL $stat("%next_row%")
        PATCH_IF index BEGIN
          PATCH_IF index<next_ind && index>ind BEGIN
            INSERT_2DA_ROW next_row 2 ~%index% %new_state_id%~
            found=1
          END
        END ELSE BEGIN
          PATCH_IF new_state_ind<next_ind BEGIN
            PATCH_IF ind<new_state_ind BEGIN
              INSERT_2DA_ROW next_row 2 ~%new_state_ind% %new_state_id%~
              found=1
            END ELSE BEGIN
              new_state_ind+=1
              PATCH_IF new_state_ind<next_ind BEGIN
                INSERT_2DA_ROW next_row 2 ~%new_state_ind% %new_state_id%~
                found=1
              END
            END
          END
        END
      END ELSE BEGIN // at the end of file
        PATCH_IF found=0 BEGIN
          PATCH_IF index BEGIN
            INSERT_2DA_ROW stats 2 ~%index% %new_state_id%~
          END ELSE BEGIN
            PATCH_IF new_state_ind>ind BEGIN
              INSERT_2DA_ROW stats 2 ~%new_state_ind% %new_state_id%~
            END ELSE BEGIN
              new_state_ind+=1
              INSERT_2DA_ROW stats 2 ~%new_state_ind% %new_state_id%~
            END
          END
        END
      END
    END // PHP_EACH
  END
END

 

 

 

 

The macro seems to be broken. It starts at index 118, increments to 119, then appends the new spellstate to 119 replacing DETECT_INVISIBILITY. It should increment to spellstate 184 on my splstate.ids file and append.

UPDATE 1: The issue is my splstate.ids file is not in order and I need a macro to reorganize it. SCS has one, but its causing a hangup...hmm...more work to do.

UPDATE 2: Learning occurred and it is now running as intended. 

Edited by morpheus562
Link to comment
3 hours ago, Bartimaeus said:

These spells are literally called "Fire Shield" and "Blade Barrier". Their concept and intended effect (although in practice the AI doesn't care - but the player will if the AI casts them) is to protect the caster by making it dangerous to attack them. Makes no sense to me that they would not be considered a combat protection...and while Blade Barrier may not be included, SR's Prismatic Mantle is literally the same function (no direct protection, just a "if you hit me then I hit you" sort of effect) and *is* considered a combat protection. Well, that just makes me want to review exactly what is or isn't considered a combat protection now...

It's something that I've thought about for a while. At some point I went through and looked for what is dispellable but not breachable (e.g. Fire Shield, Acid Sheath, Blade Barrier) and what is breachable but not dispellable (e.g. Moment of Prescience). Those may be the only ones; I don't really remember but they are the ones that stick out in my mind.

Fire Shield/Acid Sheath are an interesting case because they have characteristics of both specific protections and combat protections. Further, they plus Prismatic Shield/Blade Barrier are admittedly different from other combat protections in that they are not really "protections." More like passive offenses. But Moment of Prescience IS a traditional combat protection... OTOH I get why it shouldn't be dispellable because it is not a magical effect covering the caster, but simply knowledge in their head.

Fire Shield/Acid Sheath/Blade Barrier all currently have the "OFFENSIVEDAMAGE" sectype... I don't know whether that is needed for some purpose or scripts or something. That would at least explain the weirdness. But IMHO they should all be both dispellable and breachable.

TBH given Moment of Prescience's description as a divination, and given its spell level and short duration, I kind of think it should NOT be either breachable or dispellable. In a real sense there is nothing to be "breached."

EDIT - in any event you can expect to see these changes added to my "SD's Random Tweaks" mod very soon. :;):

EDIT2 - @morpheus562 that may have been a typo from me copying/pasting the macro... it works fine in my mods but of course that's where I put more time into checking the syntax and testing the results... anyway good to see you've got it running.

Edited by subtledoctor
Link to comment

Moment of Prescience functions in-game as a combat protection, but yeah, conceptually makes absolutely no sense as one - I would not want that as one (or for it to dispellable at all). Concept matters to me, which is why are there other special quirks in some spells, like e.g. the recently mentioned Glitterdust or Faerie Fire being usable against creatures with Non-Detection where Detect Invisibility or True Seeing aren't, even though the invisibility-dispelling literally function via the same opcode (...I'm fairly sure, anyways - if it's not, it might as well be for all the difference between the two different invisibility-dispelling opcodes). Concepts are what make spells special rather than just generic upgrades of each other, so for my money, even though Fire Shield et. al. do not really function as a protection (for the player - again, this is not the case for the AI when the player is considering whom or how to attack, because even just a Fire Shield can be pretty tough to attack in some circumstances if you're not prepared for it), their concept seems to make it pretty clear that they are.

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