Skip to content

Spell Revisions beta15

13

Comments

  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited June 2019
    Another idea that I'm sure will work is to filter the opcode 12 effect through the 326 (i.e. replacing the 12effect in the spl). So, if we are using 2e pnp wis based saves for dex, there would be a 326 effect vs targets with dex of less than 15, applying no save bonus. Targets with dex 15, the same but with a +1 to save, etc
  • [Deleted User][Deleted User] Posts: 0
    edited June 2019
    The user and all related content has been deleted.
    Grammarsalad
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited June 2019
    Another idea that I'm sure will work is to filter the opcode 12 effect through the 326 (i.e. replacing the 12effect in the spl). So, if we are using 2e pnp wis based saves for dex, there would be a 326 effect vs targets with dex of less than 15, applying no save bonus. Targets with dex 15, the same but with a +1 to save, etc

    Not to toot my own horn, but I think this is the best solution. It's guaranteed to work and it ties the save bonus to the specific effect (so the char doesn't get saves vs other unrelated effects)

    It might need to be modified (the entire spell might need to be cast via multiple 326effects to account for secondary effects of those spells)
    Aasim
  • AasimAasim Member Posts: 591
    :(

    146 apperantly has a mini-delay built in it. And even with that delay, it's still faster than 326. No go.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    I have a solution. Let me test it and get back to you
  • AasimAasim Member Posts: 591
    Ummm..some progress,

    7uz4s2gvc4u4.png

    (326 applies a 100 fire resistance bonus to humans).

    Thing is, it doesn't always work. Sometimes damage goes through before 326 is applied. And the 146 usage is visible on casting animation, so it looks kinda "delayed".
  • AasimAasim Member Posts: 591
    Sorry, I missed last 4 posts
    :)
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited June 2019
    No worries!

    Okay, so automating this is going to take some time (mostly because I have to relearn stuff like inner_action). But just as a proof of concept replace the 12 effects with 326 effects that apply those effects based on target dex. Boom
  • AasimAasim Member Posts: 591
    I've tried doing the same with Charm person; to see if the problem is in opcode 12. Turns out, it's not - using the same projectile, same timing - 326 travels few miliseconds after the Charm payload.
    No worries!

    Okay, so automating this is going to take some time (mostly because I have to relearn stuff like inner_action). But just as a proof of concept replace the 12 effects with 326 effects that apply those effects based on target dex. Boom

    So I should pretty much rewrite cca 40% of Spell Revisions?
  • [Deleted User][Deleted User] Posts: 0
    edited June 2019
    The user and all related content has been deleted.
    Grammarsalad
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited June 2019
    ...

    But don't you want the save bonus or penalty to apply to everything, not just the damage?

    Yeah...Gonna have to do this the hard way...
    Expand your idea to cover all the effects, and (if I understood it correctly) you get what I wrote above: replace the whole spell with a series of 326 effects, and cast individualized subspells on each target.

    85% of the code is already written, in the AoE Deflection component.

    That's really helpful. Thanks.
    Of course subspell naming and the 8-charactser limit is going to be an issue, just as it is with the Defleciton component. I suggest abandoning the attempt to match it to the original spell, and just use a 4-letter identifier plus a series of increasing integers, or something. Can keep a .2da table somewhere linking each back to the original spell, if you need it.

    Of course, making something like this work with the Deflection component would be tricky. But my philosophy is, first, make things work, and second, make things work together.

    I have the 8-character covered...I think.



    Aasim wrote: »
    I've tried doing the same with Charm person; to see if the problem is in opcode 12. Turns out, it's not - using the same projectile, same timing - 326 travels few miliseconds after the Charm payload.
    No worries!

    Okay, so automating this is going to take some time (mostly because I have to relearn stuff like inner_action). But just as a proof of concept replace the 12 effects with 326 effects that apply those effects based on target dex. Boom

    So I should pretty much rewrite cca 40% of Spell Revisions?

    Lol, nope! I'm going to rewrite it for you!

    Lol, jk. This can be automated, and can be a component independent of the main component in SR (if you choose to add it). It's just a matter of the technical details. So far, this is what I have (note that this is a work in progress and I'm a terrible coder, so):
    COPY_EXISTING_REGEXP GLOB ~.[^abcde]*\.SPL~ ~override~
    	 PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
    	  READ_BYTE 0x001C type //Spell type
    	   PATCH_IF type = 1 BEGIN   //wiz spells
                 READ_LONG  0x0034 level //spell level
     	     READ_LONG 0x0008 name //spell name
    	     READ_LONG 0x0050 desc //description
    	     READ_SHORT 0x007E target //Target-check
    	     READ_SHORT 0x0080 range //range-check
                 READ_LONG  0x64 abil_off ELSE 0
                 READ_SHORT 0x68 abil_num ELSE 0
             INNER_PATCH_SAVE cus0 ~%SOURCE_RES%~ BEGIN
             END
             INNER_PATCH_SAVE cus1 ~%cus0%~ BEGIN
              REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~SPWI~ ~B_SC~
             END
             INNER_PATCH_SAVE cus2 ~%cus1%~ BEGIN
              REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~SPWM~ ~B_SC~
             END
               INNER_ACTION BEGIN
                COPY ~%mod_folder%/data/b_ts101.spl~ ~override/%cus2%A.SPL~   //Level 1 universal as generic.  Modify all others after
                 WRITE_LONG 0x0008 ~%name%~
                 WRITE_LONG 0x000c ~%name%~
                 WRITE_LONG 0x0054 ~%desc%~
                 WRITE_SHORT 0x007E target //Target-check
                 WRITE_SHORT 0x0080 range //range-check
    //             WRITE_LONG 0x0034 (level * 50)
                 LPF ALTER_EFFECT
                   INT_VAR match_opcode = 12  savebonus = 0          //
                 END      //
               END
            END
          END
        BUT_ONLY
    

    Some of this stuff is not needed (it's from something else I'm doing--basically, I'm creating scrolls for all priest spells, so a lot of this needs to be altered accordingly).

    What this does right now is it reads attributes from the base spell and copies those into a dummy spell which is then named "B_SC###A". These "A" versions are for save = 0 applications of 326. Others need to be created. Also, this does nothing to the original spell, which needs to have most effects deleted and replaced by 326 effects (after those effects are copied into the sec spells).
    Post edited by Grammarsalad on
  • kjeronkjeron Member Posts: 2,367
    Aasim wrote: »
    :(
    146 apperantly has a mini-delay built in it. And even with that delay, it's still faster than 326. No go.
    It's not really a delay, provided you use an instant projectile (1), the effects of the subspells will use the same MR, Saves, and Probability as the base spell. The effects of subspells are just added to the bottom of the effect stack. The behavior is specific to subspells (op146/148/252/258/260/311/326/333), op177 and other EFF-applying opcodes do not share it, unless they are used to cast subspells themselves.
    BaseSPL
    Eff1: op326, SubSPL1
    Eff2: op146, SubSPL2
    Eff3: opX

    SubSPL1
    Eff1: opA
    Eff2: opB
    Eff3: opC

    SubSPL2
    Eff1: opD
    Eff2: opE
    Eff3: opF

    Target:
    Eff1: opX
    Eff2: opA
    Eff3: opB
    Eff4: opC
    Eff5: opD
    Eff6: opE
    Eff7: opF

    I take advantage of this for toggle abilities, by putting the removal subspell first, and it's detected trigger afterwards, so the removal only applies if the ability was already in use.
    Grammarsalad
  • GrammarsaladGrammarsalad Member Posts: 2,582
    kjeron wrote: »
    Aasim wrote: »
    :(
    146 apperantly has a mini-delay built in it. And even with that delay, it's still faster than 326. No go.
    It's not really a delay, provided you use an instant projectile (1), the effects of the subspells will use the same MR, Saves, and Probability as the base spell. The effects of subspells are just added to the bottom of the effect stack. The behavior is specific to subspells (op146/148/252/258/260/311/326/333), op177 and other EFF-applying opcodes do not share it, unless they are used to cast subspells themselves.
    BaseSPL
    Eff1: op326, SubSPL1
    Eff2: op146, SubSPL2
    Eff3: opX

    SubSPL1
    Eff1: opA
    Eff2: opB
    Eff3: opC

    SubSPL2
    Eff1: opD
    Eff2: opE
    Eff3: opF

    Target:
    Eff1: opX
    Eff2: opA
    Eff3: opB
    Eff4: opC
    Eff5: opD
    Eff6: opE
    Eff7: opF

    I take advantage of this for toggle abilities, by putting the removal subspell first, and it's detected trigger afterwards, so the removal only applies if the ability was already in use.

    @kjeron
    So, are you saying what I'm proposing won't work (that this, replace all effects with saves with 326 effects that applies effects by attribute with save bonuses based on the value of the attribute).

    E.g. a fireball casts spella vs targets with dex <15 with no save bonus, casts spellb vs targets with dex=15 with +1 save, etc?
  • kjeronkjeron Member Posts: 2,367
    @kjeron
    So, are you saying what I'm proposing won't work (that this, replace all effects with saves with 326 effects that applies effects by attribute with save bonuses based on the value of the attribute).
    No, what your proposing will work, so long as all effects are moved to each subspell.
    Some of the recent posts were not visible when I opened this topic.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    kjeron wrote: »
    @kjeron
    So, are you saying what I'm proposing won't work (that this, replace all effects with saves with 326 effects that applies effects by attribute with save bonuses based on the value of the attribute).
    No, what your proposing will work, so long as all effects are moved to each subspell.
    Some of the recent posts were not visible when I opened this topic.

    I see. Yeah, that's been happening. Off I go into this new hellscape...
  • AasimAasim Member Posts: 591
    kjeron wrote: »
    The effects of subspells are just added to the bottom of the effect stack. The behavior is specific to subspells (op146/148/252/258/260/311/326/333), op177 and other EFF-applying opcodes do not share it, unless they are used to cast subspells themselves.

    SO there's no way to make this simple by adding 326 in front of other effects; but has to be done by externalizing everything to 326 opcode?
  • GrammarsaladGrammarsalad Member Posts: 2,582
    I'm well on my way to doing this.

    @Aasim

    Before I can continue, I need to know exactly what I'm checking for.

    So, I see there is a bonus for dex saves vs. (e.g.) fireball. Should I give dex based saves vs. evocation spells that do direct damage (i.e. that allow saves)?

    Should non-evocation spells be included? I need details
  • AasimAasim Member Posts: 591
    I'm well on my way to doing this.

    @Aasim

    Before I can continue, I need to know exactly what I'm checking for.

    So, I see there is a bonus for dex saves vs. (e.g.) fireball. Should I give dex based saves vs. evocation spells that do direct damage (i.e. that allow saves)?

    Should non-evocation spells be included? I need details


    You're gonna code all this? Man...
    :)

    I haven't worked out specifics - but
    - I'd rather keep this to evocation spells only (i.e. Fireball, Chain Lighting, Lighting Bolt - only those that allow a save) and not include things like Web, Grease and the like. I already have something made for them, will post on it later. At least the 328 opcode is working as I want it to.
    - WIS save should go on Charm, Domination, Chaos and similar
    - CON save on death effects (Finger of Death, Wail of Banshee)

    Note, you don't need to do *everything*. U can use the table here.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Aasim wrote: »
    I'm well on my way to doing this.

    @Aasim

    Before I can continue, I need to know exactly what I'm checking for.

    So, I see there is a bonus for dex saves vs. (e.g.) fireball. Should I give dex based saves vs. evocation spells that do direct damage (i.e. that allow saves)?

    Should non-evocation spells be included? I need details


    You're gonna code all this? Man...
    :)

    I haven't worked out specifics - but
    - I'd rather keep this to evocation spells only (i.e. Fireball, Chain Lighting, Lighting Bolt - only those that allow a save) and not include things like Web, Grease and the like. I already have something made for them, will post on it later. At least the 328 opcode is working as I want it to.
    - WIS save should go on Charm, Domination, Chaos and similar
    - CON save on death effects (Finger of Death, Wail of Banshee)

    Note, you don't need to do *everything*. U can use the table here.



    well, I've been working on something similar so it was just matter of adjusting the code.

    hat table works. It turns out this won't be that difficult. I've already got the code working only for spells that require saves (i.e. add described in the description, believe it or not). Limiting it to evocation spells makes it that much easier (though, I'll have to finishwhen I get home later tonight).

    It'll just require a few tweaks to do wisdom for enchantment and (say) constitution for death like spells. Also, it'll be completely automated so it should account for any mod added spells, etc
    Aasim
  • kjeronkjeron Member Posts: 2,367
    edited June 2019
    Aasim wrote: »
    SO there's no way to make this simple by adding 326 in front of other effects; but has to be done by externalizing everything to 326 opcode?
    Not with op326. It could probably be done with op318/177/206 groups however.

    op318: (DEX NOT X), Immune SUBEFFY
    op177: SUBEFFY: Save vs. Spell?, +Y, Instantaneous(3), Parent: SUBEFFY, parentType:Spell(1)
    op206: SUBEFFY (to prevent stacking when multiple spells strike simultaneously)
    (all timing/duration 0)
    Repeating for each tier of "X".
    Aasim
  • AasimAasim Member Posts: 591
    Exellent. No rush - I'm in the process of tweaking and reworking some other SR stuff.
    Most notably:
    - Haste reworked, yet again (done)
    - True seeing bit more effective vs illusions (done)
    - Obscuring mist innefective vs creatures who don't rely on sight. Also Beastmasters and Barbarians. (done)
    - Spike Growth and Entangle innefective vs incorporal, Druids and Rangers (done)
    - Writhing Fog no longer slows, but is stackable (done)
    - Dispel Screen no longer plays an animation under your feet and it's casting animation is changed (done)
    - several fixes to ee code (contagion was being blocked by Chaotic commands, Hold person removing Know oponnent effects etc.)


    From last year:
    insects (all 3 spells ) make target berserk instead of panicked (1 round, save vs death to avoid) (done)

    - Ice Storm (both mage and druid versions) now slow movement by 20%, not 50. Spell was OP before. (done)

    - Blade Barrier and Globe of Blades now can work together (done)

    - Globe of Blades does 2d8 slashing damage per round, no save (done)

    - Haste now only gives +4 to movement speed (was +6 before) Scrapped.

    - Haste fatigue had a spell power of 3, which would make people under Globes/Deflection etc.immune to it. Now it's set to 0. (scraped)

    - Protection from Missiles is now caster-only. (done)

    - Waves of Fatigue debuff duration shortened to 3 rounds Total rework. Otherwise I'd need to play around with fatigue.2da and balancing this is hell.

    - Flesh to Stone will kill the target after 5 rounds have passed if not cured (done)

    - Imp.Haste is now +4 to movement speed
    Scraped.

    - Prismatic Sphere is nerfed, it can no longer autokill people with poison damage, nor it does any damage at all. It inflicts various debuffs instead. (Maze, confusion, blindness, I'll probably add a few more like stupor, stun etc.) All debuffs will last for 1 round. Spell power of all effects is set to 0, to avoid depleting deflection charges. It's now a sort of debuff fireshield. (need further work)

    - Mind Blank now covers all Stun sources, no longer stops Hold stuff nor does it prevent divinations from working. It still keeps it's PW immunity. (need checking, but I think it's good to go)

    - Spell Trap lasts for 5 turns (done)
    - Cloud-like spells and those that persist on the ground are no longer blocked by Deflection
    - added HLAs Whirlwind, Greater Whirlwind and Hardiness from KR (optional component for those who add physical resistance to armor)

    +
    - various 328 effects added, ADHW will no longer affect undead etc. (I think I'm on spwi40x.spl now, just a hundred more to go)

    yada yada yada. Also, most of the changes are now EE-only. It will still be compatible with old BG.

    Grammarsalad
  • [Deleted User][Deleted User] Posts: 0
    edited June 2019
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
    Ardul
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Aasim wrote: »
    Exellent. No rush - I'm in the process of tweaking and reworking some other SR stuff.
    Most notably:
    - Haste reworked, yet again (done)
    - True seeing bit more effective vs illusions (done)
    - Obscuring mist innefective vs creatures who don't rely on sight. Also Beastmasters and Barbarians. (done)
    - Spike Growth and Entangle innefective vs incorporal, Druids and Rangers (done)
    - Writhing Fog no longer slows, but is stackable (done)
    - Dispel Screen no longer plays an animation under your feet and it's casting animation is changed (done)
    - several fixes to ee code (contagion was being blocked by Chaotic commands, Hold person removing Know oponnent effects etc.)


    From last year:
    insects (all 3 spells ) make target berserk instead of panicked (1 round, save vs death to avoid) (done)

    - Ice Storm (both mage and druid versions) now slow movement by 20%, not 50. Spell was OP before. (done)

    - Blade Barrier and Globe of Blades now can work together (done)

    - Globe of Blades does 2d8 slashing damage per round, no save (done)

    - Haste now only gives +4 to movement speed (was +6 before) Scrapped.

    - Haste fatigue had a spell power of 3, which would make people under Globes/Deflection etc.immune to it. Now it's set to 0. (scraped)

    - Protection from Missiles is now caster-only. (done)

    - Waves of Fatigue debuff duration shortened to 3 rounds Total rework. Otherwise I'd need to play around with fatigue.2da and balancing this is hell.

    - Flesh to Stone will kill the target after 5 rounds have passed if not cured (done)

    - Imp.Haste is now +4 to movement speed
    Scraped.

    - Prismatic Sphere is nerfed, it can no longer autokill people with poison damage, nor it does any damage at all. It inflicts various debuffs instead. (Maze, confusion, blindness, I'll probably add a few more like stupor, stun etc.) All debuffs will last for 1 round. Spell power of all effects is set to 0, to avoid depleting deflection charges. It's now a sort of debuff fireshield. (need further work)

    - Mind Blank now covers all Stun sources, no longer stops Hold stuff nor does it prevent divinations from working. It still keeps it's PW immunity. (need checking, but I think it's good to go)

    - Spell Trap lasts for 5 turns (done)
    - Cloud-like spells and those that persist on the ground are no longer blocked by Deflection
    - added HLAs Whirlwind, Greater Whirlwind and Hardiness from KR (optional component for those who add physical resistance to armor)

    +
    - various 328 effects added, ADHW will no longer affect undead etc. (I think I'm on spwi40x.spl now, just a hundred more to go)

    yada yada yada. Also, most of the changes are now EE-only. It will still be compatible with old BG.
    Great to see you back at it!
    Please tell me the saving throw stuff is going to be an optional component...

    Personally, I'm operating on that assumption. The code is completely automated. It would just affect (e.g.) every evoc spell that allows a save for the dex bonus. It should be independent of the main component (though, there would be complications if the main component was installed after)...

    I'll be doing a more toned down version of this at some point (with numbers similar to 2e pnp wis save bonuses)

  • The user and all related content has been deleted.
  • AasimAasim Member Posts: 591
    Great to see you back at it!

    Ditto!

    A couple quick questions while you're here:

    - What did you do with True Seeing vs. illusions?

    - Is the Haste speed bonus not 4? If so what is it? I'm trying to make my mods' Haste effects match SR spells and IR Boots of Speed.

    Demi had this idea about True Seeing having the property of weakening illusions. So that's what happens (in the current version, only "color glow" opcode is there). 2 days ago I've added 50% HP removal and a slowing effect, and yesterday evening I've scrapped it again. :) If you guys got ideas about how to make an illusion weaker, that'd be grand.
    Set apr to 0? Disable spellcasting? Both? Or make the caster "immune" (using pro creature effect) to the illusion alltogether so he's undetectable by them since he can see through it?

    As per Haste - I've browsed a lot of creatures in this game and the effects they have on. While this may be a really daring idea, I think it's probably the best solution (and the most fair towards player, since enemies with this effect don't use +movement/+apr opcodes; what now SR uses).
    Haste is back to what it was in the original game; with 2 changes

    1) fatigue opcode is gone completely (just forces resting, making the spell useless)
    2) it's duration is shortened to 1 turn

    Big Brother Imp.Haste - for 5 rounds, attack rate doubled. I'm still kind of split on duration (3,4 or 5 rounds)

    Boots of Speed/Grandmaster armor - they now apply haste effect to user. This is what was used in the original BG1 game.
    Advantages - nothing stacks anymore. (IR Oil of Spees would be tweaked in the same manner, i.e. single-target haste effect). No warp speed for player anymore (I'm intolerant to 4x movement speed being available).
    While having permanent haste may seem OP- you don't get Boots of Speed that quickly, there isn't an unlimited number of them, and when you can get more than 2 (ToB) this is hardly an issue anymore.
    In BG1 you get 2 pairs - Cloakwood mine and (if you kill him) the thief with Marek
    BG2 - Slot machine in Spellhold, Planar Prison, Renal Bloodscalp (if you kill him) - but I think you can only do this in CH.6

    ToB - Illasera, Saradush store, Amkethran store

    Using Haste opcode may make some spells more effetive (Blade Barrier and the like) but I can live with that, these spells aren't that powerful with SR.
    Slow effect will "supress" the Haste from boots, even with permanent/while equipped timing.
    This is the best solution I can think of. I'm not sure how Demi would feel about this, but I'm really worn out trying to balance Oils, spells and boots. Currenty the player under Haste is at a big disadvantage vs enemies with permanent haste effect (gains +4 MS, while enemy speed is doubled so has cca +9). Now, if you use both Oil and spell this is kinda even. If you add boots, you're faster. If you add Whirlwind, you're even quicker. :(
    It's just - complicated to balance out.
    This solution fixes *every little issue*. And makes it fair.

  • XlatocXlatoc Member Posts: 59
    Where can you find the latest Spell Revision for EE ?
    On Gibberling, the only one I found is a BG2.
    I found somewhere a mod called SR_Revised....would it be that one ?

    Thanks....sorry for the inconvenience.
  • AasimAasim Member Posts: 591
    Xlatoc wrote: »
    Where can you find the latest Spell Revision for EE ?
    On Gibberling, the only one I found is a BG2.
    I found somewhere a mod called SR_Revised....would it be that one ?

    Thanks....sorry for the inconvenience.

    You can find it on my desktop. :)
    It's generally the best idea to get it from Github. Link.

    Xlatoc
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited June 2019
    I'm using protection from illusory creatures for my pnp intelligence illusion immunity mod (and for Phantasmal force line of spells). It works well. Personally, I would think that true sight would just outright destroy illusory creatures
  • [Deleted User][Deleted User] Posts: 0
    edited June 2019
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • AasimAasim Member Posts: 591
    Destroying illusions suffers from the same problem as vanilla TS/Detect Invis.: why does the rest of the party get the same benefit?

    I guess most solutions would as well. At the moment, TnB gives illusionary creatures a -5 Luck penalty and deafness... maybe full creature immunity for the caster, too (I forget whether I implemented that... I think so)

    I don't know if it's possible but I could grant the caster AC/saves vs Illusionary.
Sign In or Register to comment.