Jump to content

Scriptable Spells v3


Recommended Posts

I've never checked to see how (or if) any of the big scripters get around this (beyond using the broken detectable effects system).

 

I've not seen a whole lot beside the broken system ;)

 

I suppose my biggest question is what you actually need to script differently - other than working a "spellstrike me please" sign into these spell effects, nothing else really changes as far as a.i. goes.

Link to comment

I think it would be an issue to decide when you should cast the deflection spells? You can't really use a timer accurately for the same reason they hardcoded the animations.

 

The limitations really crop up when trying to adapt existing scripts without wanting to make too many obtrusive changes -- I don't want fat "MY AI IS BETTR THEN YORZ" scripts; I just want shit to work like it was supposed to, and it sucks when the engine can't handle it. :(

Link to comment
The stats added by the last BP version:
IMMUNITY_ENCHANTMENT
 WEAPON_ENCHANTMENT
 SPELL_DEFLECTION
 PROTECTION_ALIGNMENT
 TRUE_SIGHT
 MIND_SHIELD
 PROTECTION_SPELL_LEVEL
 IMMUNITY_NECROMANCY
 PHYSICAL_MIRROR
 IMMUNITY_ABJURATION
 REGENERATION
 FIRE_SHIELD
 IMMUNITY_ALTERATION
 IMMUNITY_CONJURATION
 PROTECTION_MAGIC_WEAPONS
 SPELL_TURNING
 IMMUNITY_DIVINATION
 FREE_ACTION
 KHELBENS_WARDING_WHIP
 IMMUNITY_ILLUSION
 LEVEL_DRAINED
 COMBAT_BUFF
 ARMOR_SPELL
 STRENGTH_BUFF
 IMMUNITY_INVOCATION
 NEEDS_BREACH
 SPELL_TRAP
 GAZE_REFLECTION
 SPELL_SHIELD
 RESIST_FEAR
 DISPEL_BAD
 INSIDE_OF_CLOUD
 PROTECTION_NORMAL_WEAPONS
 DISPEL_GOOD

 

Stuff I change:

 

Things I've removed entirely:

 

RESIST_FEAR: As of Fixpack beta3, fear immunity effects include a batch that modifies the morale break stat - this is no longer needed.

 

PROTECTION_NORMAL_WEAPONS/PROTECTION_MAGIC_WEAPONS: No need for two stats, use value of 1 = normal weapons, 2 = +1 weapons, 3 = +2 weapons, 256 = protection magical weapons. Having one of these stats would be hugely useful and really needs retaining ;)

 

ARMOR_SPELL: This is not actually used by any in game resources; Horred noted this and then left the stat in anyway. Other creatures don't need to know which spells in which order you've cast to get an armor class, and you need to track the spells with variables anyway.

 

SPELL_TRAP, SPELL_TURNING, SPELL_DEFLECTION: After a minor spell turning is overloaded with a fifth level spell, the stat would remain in place because it's not possible to directly bind new effects into opcodes. Only spell reflection would change strategies in any case. They'd be nice, but they'll never work correctly.

 

COMBAT_BUFF: Again, Tenser's Transformation and its ilk do not actually set this stat - what is really meant to do? There are spell failure stats aplenty.

 

LEVEL_DRAINED: Redundant

 

PROTECTION_NORMAL_WEAPONS/PROTECTION_MAGIC_WEAPONS - doesn't do diddly if you don't have some means of detecting WEAPON_ENCHANTMENT

 

ARMOR_SPELL - I don't recall ever using this one

 

SPELL_TRAP, SPELL_TURNING, SPELL_DEFLECTION - ;)

 

But HasBounceEffects() is workable if not perfectly ideal

 

COMBAT_BUFF - I think Tenser's got lumped in there because it had something to do with removing the ability to cast spells. Most of the COMBAT_BUFF stuff would probably also fall under the category of DISPEL_GOOD

 

LEVEL_DRAINED: My understanding was that 200 LEVEL_DRAIN was broken, so KD decided to add his own check. Horred then used it with some insanely long timer to decide if a person was a candidate for a Restoration Spell.

 

Things I've considered removing:

 

WEAPON_ENCHANTMENT: can be done with a while-equipped LOCALS, would only be useful if other creatures need to check your weapon enchantment level readily. Still on the fence about this one.

 

I'm okay with a while-equipped LOCALS. I was actually envisioning it to work that way.

 

DAMGE_TYPE could also be useful (Slashing, Piercing, etc.,.)

 

Of course this is all sort crapped out by the fact that FillSlot() sucks!

 

Things I've added:

 

NORMALMISSILEIMMUNITY: It's too important at lower levels

 

I never really noticed a need, but I suppose it could me more important say for BG1 level characters to not have their arrows bounce off of critters/people.

 

Doesn't SHIELDGLOBE or one of those other stats already handle this or is it too loose of a definition?

 

Things that I'd like to expand:

 

MIND_SHIELD: It's just Chaotic Commands, would be handy to check for fear/charm immunities seperately

 

FREE_ACTION: Free action itself is an instant effect, really this is a bundle of spell immunities

 

Okay.

 

It's also worth noting that spells can be updated to set local variables that match their duration, type, and dispellabillity, if this is something that people find useful (uh huh uh huh!) This can't be done by script.

 

Don't really care how, we're all just looking for a cohesive functional package that gives us a means of detecting most any effect to avoid targeting something that is immune or already has been hit with that effect (avoiding re-casts).

 

Oh yeah, and de-protecting with the appropriate spell to get rid of pesky things that preventing opposing critters/people from killing each other (e.g. combat and spell proctections).

 

Or as a bit of refinements also de-buffing things that make critters/people harder to kill or better at killing.

Link to comment
PROTECTION_NORMAL_WEAPONS/PROTECTION_MAGIC_WEAPONS - doesn't do diddly if you don't have some means of detecting WEAPON_ENCHANTMENT
Very little is accomplished by either in isolation ;)

 

ARMOR_SPELL - I don't recall ever using this one
I couldn't see how this was going to be useful as a stat when there's both set and increment AC modifiers. Presumably this was meant to work with set only?

 

SPELL_TRAP, SPELL_TURNING, SPELL_DEFLECTION - :D
A stat of some kind would still be an improvement, don't get me wrong. Timers aren't ideal, as devSin noted, because either a Magic Attack spell or just overloading the protection will remove the spell effect but leave the timer in place. With stats, at least Secret Word can knock off the stat as well (overloading the protection - I've no idea how one could work around this :( )

 

COMBAT_BUFF - I think Tenser's got lumped in there because it had something to do with removing the ability to cast spells. Most of the COMBAT_BUFF stuff would probably also fall under the category of DISPEL_GOOD
I've looked at the last BP version, and I'm still not sure what Horred wanted to do here. I'd rather add 100% spellfailure to Tenser's to accompany the disable spellcasting and not use a stat, myself. As far as the other spells that were being included - a kensai ought to set off threat detection klaxons whether they have Kai going or not :)

 

 

LEVEL_DRAINED: My understanding was that 200 LEVEL_DRAIN was broken, so KD decided to add his own check. Horred then used it with some insanely long timer to decide if a person was a candidate for a Restoration Spell.
It's just needed a gentle nudge to start working in my game and it apparently works in the Mac port already - could stand for some testing in other installs too :)

 

DAMGE_TYPE could also be useful (Slashing, Piercing, etc.,.)
Ooh, that's a good idea. Would only require one stat too.

 

Of course this is all sort crapped out by the fact that FillSlot() sucks!

 

If it's not in the quickweapon slot, I don't script it :) /lazy

 

Doesn't SHIELDGLOBE or one of those other stats already handle this or is it too loose of a definition?
I'm not sure. 65 picks up the lavender cylinder overlay nicely, but I'd thought it detected others as well - hopefully that's wrong ;)

 

I'd also (earlier) mentioned yanking GAZE_REFLECTION, but since Horred apparently intended for that to really mean protection from petrification, it can stay.

Link to comment

ARMOR_SPELL - I don't recall ever using this one

I couldn't see how this was going to be useful as a stat when there's both set and increment AC modifiers. Presumably this was meant to work with set only?

 

And there is also a way to detect AC, so yeah, who knows?

 

SPELL_TRAP, SPELL_TURNING, SPELL_DEFLECTION - :)

A stat of some kind would still be an improvement, don't get me wrong. Timers aren't ideal, as devSin noted, because either a Magic Attack spell or just overloading the protection will remove the spell effect but leave the timer in place. With stats, at least Secret Word can knock off the stat as well (overloading the protection - I've no idea how one could work around this :( )

 

I think I understand the problem now. Timers and Stats gets set on the creature, but when the spell gets overloaded the removal spell gets blocked, so it couldn't 0 the timer or reset the stat?

 

COMBAT_BUFF - I think Tenser's got lumped in there because it had something to do with removing the ability to cast spells. Most of the COMBAT_BUFF stuff would probably also fall under the category of DISPEL_GOOD

I've looked at the last BP version, and I'm still not sure what Horred wanted to do here. I'd rather add 100% spellfailure to Tenser's to accompany the disable spellcasting and not use a stat, myself. As far as the other spells that were being included - a kensai ought to set off threat detection klaxons whether they have Kai going or not ;)

 

I suppose it is a question of threat assesment refinement (not that anyone's threat assessment code is this advanced), but what is more dangerous a Kensai or a Kensai with Kai going?

 

Answer, if you have Stoneskin and Immunity to +X weapons, not so scary. But if not, then "Run Forest! Run!" Or if you have a spellcaster, then "Paralyze, Stun, Sleep, Charm, Finger of Death, etc., that one!".

 

Buff dectection is nice in lieu of script timers and occasionally one is worth a dispel.

 

Doesn't Tenser's grey out spellcasting icons? I think at one time Tenser was its own stat. I think the original idea was to 1) Have some way of knowing that you can't cast spells 2) Knowing if it is worth dispelling

 

LEVEL_DRAINED: My understanding was that 200 LEVEL_DRAIN was broken, so KD decided to add his own check. Horred then used it with some insanely long timer to decide if a person was a candidate for a Restoration Spell.

It's just needed a gentle nudge to start working in my game and it apparently works in the Mac port already - could stand for some testing in other installs too ;)

 

Hmm, what kind of help does it need?

 

DAMGE_TYPE could also be useful (Slashing, Piercing, etc.,.)

Ooh, that's a good idea. Would only require one stat too.

 

Would it be worth having Fire, Electrcity, etc,.. as a separate stat?

 

Of course this is all sort crapped out by the fact that FillSlot() sucks!

 

If it's not in the quickweapon slot, I don't script it :) /lazy

 

Not lazy. Practical :)

 

But think of all those poor Fighter/Mages with only two quickweapon slots!

 

Doesn't SHIELDGLOBE or one of those other stats already handle this or is it too loose of a definition?

I'm not sure. 65 picks up the lavender cylinder overlay nicely, but I'd thought it detected others as well - hopefully that's wrong :D

 

Yeah, I thinking it might get the Globes Invulnerability and perhaps the one that reflects arrows.

 

Xyx had a list. Looks like it still available (very nice reference)

 

http://members.chello.nl/~j.vanthull/BG2SR/Main.htm

 

I'd also (earlier) mentioned yanking GAZE_REFLECTION, but since Horred apparently intended for that to really mean protection from petrification, it can stay.

 

Gaze reflection and its brothers and sisters is a nice one to have available from time to time.

Link to comment

SHIELDGLOBE, appropriately, returns 1 only if the shield globe overlay effect is active ("Protection from normal missiles overlay" in NI). It doesn't matter what spells or other effects are on in addition to the overlay.

 

MINORGLOBE detects only the minor globe overlay (listed as such in NI).

Link to comment

No worries about false positives with stat 65/SHIELDGLOBE then, it's already good to go. Bioware does take care of us from time to time ;)

 

I'm thinking Tenser's would just be handled by checking for spellfailure and !dispelbad. If COMBAT_BUFF deserves reworking into a "has some narsty melee ability active" stat, it's feasible.

 

LEVELDRAIN doesn't work by itself in my version of ToB, no. But setting stat 200 to any value for any duration as the level drain is applied makes it detect correctly - there's no need for three-day long effects. I do not understand this at all nor why it works, mind, but I'll take it as long as it incurs no problems - and zero duration stat effects seem pretty safe ;)

 

Fire/cold/electricity as a seperate stat: think of the Flail of Ages - you'd need to either have multiple stats or a lookup table for each permutation and combination of damage types. "Don't use sword of +1 fire damage on that there Fire Elemental" is pretty daunting.

 

Is there anything that version of GAZE_REFLECTION would do that HasItemEquiped("ShieldOfCheese") wouldn't do?

 

I hate that I can't find 193 - it's the last true unknown :D

Link to comment

The only thing that was getting this stat in the BP version was spwi108, which reflects nothing - the stat name is rather misleading, unless someone was planning on reworking the BG2 version of the spell to actually bounce some effects. It's not been on my list of things to do ;)

Link to comment

Whatever 176-182 may have been meant to do, it doesn't appear to involve any opcode - there's a few more I have to check, so I'm not saying it's definative just yet ;) 188 is properly broken as far as I can tell, and 193 isn't returning true under the influences of any opcode that doesn't crash (including hard-coded stuff like tracking). Considering that we'd have a terrible time figuring out what busted stuff like identify mode was supposed to do without a pre-existing ids, this is not going to be easy to find.

 

Hardly anyone has wiki access, I'm afraid. A lexicon for stats ids would be awfully nice (i.e. documenting which luck is which, which berserk/puppetmaster stats don't work, etc etc)

Link to comment
Hardly anyone has wiki access, I'm afraid. A lexicon for stats ids would be awfully nice (i.e. documenting which luck is which, which berserk/puppetmaster stats don't work, etc etc)

 

Don't know if this helps, but here is what my testing of the puppemaster stats showed, along with some more in-depth explanations of How Stuff Werks by Avenger.

 

http://forums.gibberlings3.net/index.php?s...l=puppet+master

Link to comment

Sorry to keep on about this, but I'm no less confused by the whole Detectable Spells issue than I was months ago.

 

The 'Tutu Mod Compatibility and Order of Install' thread says for eSeries "v1.8 includes BP Detectable Stats/Detectable Spells content, so needs no DS" but the readme for v1.8 says "eSeries requires the installation of Detectable Spells".

 

Nythrun mentions in another thread - http://forums.gibberlings3.net/index.php?s...ost&p=69575 - that in order to install BP Detectable Stats you have to alter the .tp2 yourself, which leads us to another thread - http://forums.spellholdstudios.net/index.php?showtopic=21704. I've read that thread but am none the wiser on what I'm supposed to do.

 

At this point I'm thinking that it'd be best to simply not install any mods that require Detectable Stats (like eSeries. Maybe. I still don't know if it needs Detectable Stats or not). But what about mods that install an older version of Detectable Stats, like Ascension? Will I then have problems when installing a mod that uses a new version of Detectable Stats, like Sim's Quest Pack?

 

This post - http://forums.gibberlings3.net/index.php?s...ost&p=70975 - gave me some hope for a resolution, but what should those of us who'd like to play now do?

 

If anyone has some newbie-friendly advice on how to play a game that includes Ascension, eSeries, Kelsey and Quest Pack, please let me know.

Link to comment

Bursk,

 

It is a mess. One I don't have time to sort out.

 

But honestly, you can probably install all the mods together and you will never really notice a difference.

 

The worst thing that should happen is that a script relying on DS will not cast the most appropriate spell for a particular situation.

 

So you would have to know what the script should cast in a particular situation, check the creature to see if they have it memorized, and note if they don't cast it.

 

Or in other words, to my knowledge, nothing game breaking should occur if you have competing versions of DS installed.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...