Blazing Inferno
Aasim
Member Posts: 591
Cool spell, isn't it?
Anyhow, back on my first playthrough of SoD I've noticed that this spell doesn't affect creatures immune to fire.
No damage animation or (even worse) spell failure due to it, nothing; as if the spell didn't work at all. Now, in that run I was playing a Cavalier, he had 100% Fire res from his armor and a potion.
I also had Spell Revisions installed. SR makes some spells work similar to what happens with Inferno, but that only works for spells like Pro Fire; which make you immune to fire based spells.
But my Cavalier had no Pro Fire on himself, and SR couldn't take into account Blazing Inferno.
Hence I was curious; how does this spell work? In vanilla game, short of a baldur.bcs hack, I can't think of a way. So I found out it's a new opcode being used. A lot of SoD spells (like Shaman's Writhing Fog) work this way. If you're Cold immune (from any source), Writhing Fog is completely useless.
I tought, why not make all spells work this way?
So, I took my time, made a small mod that patches the new effect on all spells (well, not all - I didn't take all mod-added spells into account when making this - it's made on an EET spells list as a base). In effect, what this does is as shown below.
W/o this mod:
Poor Dragon Disciple, despite having 100% immunity to fire, still rolls a save and is suffering from damage animation. Why oh why? Even old ToBex had an option to make all casting succesfull on zero-damage instances. Unfortunately, this isn't possible in EE.
Hence, my mod does this:
Provided you're fire-immune, no damage animation, no spell failure, nada.
I took a Fireball as an example here, but it works for most of the in game spells - from Grease to Cone of Cold, from Confusion to Dragon's Breath.
There are some instances which aren't black or white (should Death Ward give immunity to Finger of Death's damage effect as well as instakill?) but I think I've got the most ground covered.
I've made this so it will work for both vanilla and Spell Revisions installs.
I'm willing to go an "extra mile" for SR concerning this opcode; but more on that later...I should have the mod ready to download tomorrow.
Anyhow, back on my first playthrough of SoD I've noticed that this spell doesn't affect creatures immune to fire.
No damage animation or (even worse) spell failure due to it, nothing; as if the spell didn't work at all. Now, in that run I was playing a Cavalier, he had 100% Fire res from his armor and a potion.
I also had Spell Revisions installed. SR makes some spells work similar to what happens with Inferno, but that only works for spells like Pro Fire; which make you immune to fire based spells.
But my Cavalier had no Pro Fire on himself, and SR couldn't take into account Blazing Inferno.
Hence I was curious; how does this spell work? In vanilla game, short of a baldur.bcs hack, I can't think of a way. So I found out it's a new opcode being used. A lot of SoD spells (like Shaman's Writhing Fog) work this way. If you're Cold immune (from any source), Writhing Fog is completely useless.
I tought, why not make all spells work this way?
So, I took my time, made a small mod that patches the new effect on all spells (well, not all - I didn't take all mod-added spells into account when making this - it's made on an EET spells list as a base). In effect, what this does is as shown below.
W/o this mod:
Poor Dragon Disciple, despite having 100% immunity to fire, still rolls a save and is suffering from damage animation. Why oh why? Even old ToBex had an option to make all casting succesfull on zero-damage instances. Unfortunately, this isn't possible in EE.
Hence, my mod does this:
Provided you're fire-immune, no damage animation, no spell failure, nada.
I took a Fireball as an example here, but it works for most of the in game spells - from Grease to Cone of Cold, from Confusion to Dragon's Breath.
There are some instances which aren't black or white (should Death Ward give immunity to Finger of Death's damage effect as well as instakill?) but I think I've got the most ground covered.
I've made this so it will work for both vanilla and Spell Revisions installs.
I'm willing to go an "extra mile" for SR concerning this opcode; but more on that later...I should have the mod ready to download tomorrow.
4
Comments
Kind of.
It's not complicated, it's just (it WAS ) a very time-consuming task.
Look at the code example (I think this is Burning Hands vs fire-immunity):
ACTION_IF FILE_EXISTS_IN_GAME ~spwi103.spl~ THEN BEGIN // fire immune
COPY_EXISTING ~spwi103.spl~ ~override~
LPF ADD_SPELL_EFFECT
INT_VAR
opcode = 324
target = 2
power = 0
savingthrow = 0
parameter1 = 0
parameter2 = 3
duration = 1
timing = 0
insert_point = 0
STR_VAR
resource = spwi103
END
END
Now, I had to manually go through cca 2500 spells. Then it's just copy-paste the code, alter spell name at all three instances; but it's (WAS!) a huge ammount of work just going through spells.
One can patch either 318 or 324 onto them, both work. I think the important part is that power of the effect is 0 (to bypass spell level immunity/protections).
On a (bad) sidenote - even most of SoD spells don't work like this.
Example; Dragon Fear. If you're fear immune, you shouldn't suffer from this spell's effects imo. Yet you do. You get a THAC0 penalty and whatever else is there even if you won't start panicking - I assume THAC0 penalty is there since you're *afraid*.
Seeing this brings back not so fond memories of old Solaufein mod from Weimer - his Vampire Fear aura would indefinitely stack THAC0 penalty, even on fear-immune critters...
Bleh - I'll include SoD spells as well then.
As per Cat's Grace, no, I've just noticed Evasion opcode while browsing; so I was curious f this would work in BG. I can't get it to work as it should; but it's not important, I've got some rather bold ideas about making Evasion a bit more interesting and I don't even need the opcode to work at all for this crazy idea I have - I'll see if I can mingle something out in the next few days.
The problem is that negative resistance occupies values 128-255. So you have also made anything weak towards fire immune to the spell.
You need 3 SPLPROT entries:
"rowA# 14 100 2" // Fire Resistance < 100
"rowB# 14 128 4" // Fire Resistance >=128
"rowC# 0x104 rowa# rowb#" // NOT (less than 100 or greater than 127).
rowc is what you would use in opcode 324.
Tnx, I'll see what I can do about that - I haven't really looked at splprot.2da.
This will add the entries to SPLPROT and assign the necessary row# to a variable for each damage type:
Incredible. I'll need to redo all my work from scratch (well, bar the NI browsing for spells), but this is outstanding.
I cannot thank you enough - I've just flash-tested this in practice and works like a Swiss clock.
There may not be many negative resistances used in this game, but seeing a Fireball failing to affect Mummies was very dissapointing for me. I'll make good use of it.
Nature's Beauty: Yes, True Seeing or Blindness should protect against Nature's Beauty.
I'd also allow True Seeing to protect against Spook (but not Blindness, Spook could manifest as an auditory illusion as well and affect a blind opponent).
SR version will take a bit more time (I hope to finish the core conversion tomorrow, then move to more advanced stuff) - while it's 80% copy-paste; there are some spells which must be handled with care since SR changes the core mechanics of some spells like Flame Arrow, Chain Lighting etc.
SR version will have a few (optional) extras; such as True Seeing working much more efficiently vs illusions and similar (it should be renamed into SI:Illusion anyway); more on that when I get to work on it. For now, let's just say that my plan is to include some rather daring changes in the way saving throw system is handled in this game (if you're *held* and cannot move (or dodge an attack), how can you *dodge* a Fireball? ) - if you're unable to move all evocations (and some other spells like Disintegrate) that allow a save will not allow it anymore.
Likewise, creature stats will have a bigger effect on chances of a succesfull save, even on outright avoiding the spell and all it's effects.
Coding this should be relatively easy, but I need to decide on the numbers.
The best part is - it won't touch any of the creatures in the game, but it will affect all of them; and automatically take into account the stats they have at the moment spell hits them.
This means that if you lower someone's DEX, he'll automatically be more vulnerable to evocations. Take away someone's WIS, he'll be confused more easilly.
With 318/324 I can fine-tune this for each spell individually (it will be a %-based chance); a snail-pace moving Vitriolic Sphere will be a bit easier to dodge; a chain lighting that travels quickly won't. This won't affect all spells, I cannot tie all spells with base stats (i.e. Slow; Wail of the Banshee and similar; some imo shouldn't be avoidable at all)
It will be a lot of work, in any case, so I don't expect this to be done for a week-two or so. And I'll definitely need to test this in practice.
One thing I still need to do, concerning items/spells in the game. I'll patch STAT effect where applicable. e.g. Cavalier with his natural Fear immunity will have outright immunity to all Fear spells and their side-effects, not just the "fear" and "panick" effect.
He won't suffer from negative THAC0 or anything else that comes with spells that cause Fear. Likewise, if you're holding Dragonslayer, or are under Pro Fear spell from your cleric, one will have the same benefits, so forget about that nonsensical "drop
itemsarmor in panick" stuff. This is doable in few code lines for each effect, so V1 should be out later today/tomorrow.- in SR, Chromatic orb universally does magic damage; and has some side-effects. Should magic damage immunity fully stop it?
- Spike Growth spell is added by SR to druids (kind of entangling, damaging vines). Should Free action block it fully or only the entangling effect? I'd vote for full stop...
When I run the regexp patch code to set SPLSTATE on fear & poison immunity for spl and itm files, game won't run anymore. I cannot start or load a game. Any ideas what is worng with it? I've checked the files with NI, all is fine, yet game crashes when I click on "new game". Unistalling the mod fixes everything back.
Code example
COPY_EXISTING_REGEXP GLOB ~.*\.itm~ ~override~
PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
LPF CLONE_EFFECT
INT_VAR
match_opcode = 101
match_parameter2 = 24
opcode = 357
parameter2 = 106
silent = 1
END END
BUT_ONLY_IF_IT_CHANGES
Link to download.
P.S.
If I edit out the *.itm regexp part of code, it works fine for .spl regexp....
Opcode 328 is Set SpellState (from SPLSTATE.IDS) - usable in any current EE. This is what you want.
Barbarian rage will protect vs Symbol:Fear provided that it has immunity to panick opcode, ditto Blackrazor.
If they're modded not to give this immunity, they won't protect vs this spell.
This part will be unrelated to mods installed beforehand, given it's regexp patching nature.
I've also noticed I missed a few effects with 324 opcode, so I'll need to add this to the code...while it would be far easier to regexp all "panic" instances in the game, this would lead to many issues since some spells panick you and have additional effects that shouldn't be stopped by fear immunity. Ditto posion etc.
Will re-upload later tonight or tomorrow, depending on time available. Also, this mod will standardize poison immunity - being poison-immune will outright prevent any posion-type damage. (Periapt of pro poison in this example)
I've done that for IR's Greenstone amulet and believe me, it's no fun at all. And, it doesn't cover mod-added stuff. Even more so - it adds more confusion to the mix. When you get to the point where you have to decide if Rage should protect vs Charm, Dire Charm, Domination, Sirene charm, Succubus charm, Demogorgon charm, eyrines charm, Vampire charm, Beholder charm, Mental domination from clerics, SR's Druid charm animal or human etc you'll see the problem. Count in charms cast from items as well. When you're done with that add mod-added charms.
Hell, should Rage make you immune to Hallucinatory spores from Myconids? Hardly so, yet it does.
Let alone writing a decent description for such an ability. And no, reading a spell level via code and saying "rage protects vs charms of level 4 and lower" won't help either since these innates are a total mess - ranging from wrongly assigned sectypes/schools to what seem to be provisionary power levels.
Just try to remove Succubi charm via SR's Break Enchantment and you'll see what I mean.
I've fixed this in a SR fixpack, I'll include it in main SR code when I get the time.
In addition, SCS and aTweaks consider Rage to be a no-go for charm effects, so it doesn't matter if Rage doesn't give charm immunity- you won't be targeted anyway.
If you exclude Rage from giving Fear immunity Symbol fear would still affect the character after this is installed, it clones immunity to panick effect. I see potential problems with damage spells that other mods add - but this can't be fixed easilly. I've had much problems accounting for SR's "AoE Deflection" tweak, which suffers from the same fate - spells must be added manually to the code.
There are tons of spells (even in a completely unmodded game) that I still don't know if I should include or not. Not every spell is "black and white" like a Charm person- Demogorgon's Insanity gaze not only confuses you, but gives saves penalty etc. Should Chaotic Commands keep you completey safe from it or just the confusion/feeblemind effects tied to the spell?
That's one of the reasons I can't do this via a simple regexp that would be kinda bullet-proof, but rather going through spells with NI and deciding on a spell-by-spell basis.
I've made this regexp mistake with SR's Haste/Slow - regexp patched Holy word with "slow" sectype since it found slow opcode - you could counter all of the Holy words effects (deafness, stun etc.) via Haste.
My plan was to do a megamod install, go through all spells, add them to the code where applicable and have this installed last.
Unfortunately, I've lost virtually all interest in doing so after the unfortunate incident with Energy-draining Talos knights. It's just not worth the effort imo.
Overall, don't worry. If I'm in doubt, I don't change anything. And I haven't touched rages none, or used rage state as a no-go for any spell in the game.
In several BG1/SoD runs I've ran with the code I use all seemed to work fine; bar one thing - on few Duralg tower traps, message displayed would be "Unaffected by effects from"; probably since the spell cast from trap doesn't have a name.
Benefits one will get from installing this (undead completely unaffected by ice even w/o eff targeting , SR's Deflections preforming better in every-single-way-imaginable in pre-EE era, no zero damage spell disruption from spells etc. - and I haven't included half the stuff I'm planning to do here) imo far outweight the few "grey" instances where I followed my gut reason, which probably not everyone would agree with.
If you're not using some mod like aTweaks/SR this will also make sure that your summons don't turn on you if you hit them with a spell they're 100% resistant to (ie Fire Elemenatals can stay in the mid of a Firestorm and Inc.cloud. This is already included in SR to an extent, but it only works with limitations - Pro Fire spell(s) give(s) spell immunity to fire spells; with a bad side-effect that even if your Fire res get lowered you're still immune to fire-based spells. With this, SR's tweaks are redundant. On a "fix-cheese" side, this means that you can no longer heal yourself with resistances above 100%. Not all spells can be added. If a spell has 7 letters, using it in the code will result in spell re-casting itself until the game crashes.
The code is in spell_rev/components/nwn_deflection, if you can improve it, that'd be great - frankly, while I can understand what @Ardanis code does, I'd rather not mess with it more than I already have. Likewise, if you want to use this in your mod (given it goes after SR) I doubt he would have any objections.
Do not use this with new Spell Revisions beta, a revised version is already used there. As per order of install, before SCS, after item mods.
Let me know if I messed up something. And don't use unless you're playing EE games. I don't play IWD so the spells there aren't accounted for, if I ever get to play it (hardly) I might do something about it.
Thanx to kjeron for code to avoid neg.resistance issues and debugging; tnx to subtledoctor & AstroBryGuy for tips and suggestions. Have fun!
Download.