Jump to content

Scriptable Spells v3


Recommended Posts

If we had an open slot, we could add a stat to weapons in the equipping effects. ;)

 

Probably in a nice neat automated REGEXP sort of way, too. I know where you're going with this... :D

 

Let's see if anything else can be yanked.

 

Too short of names for you? At least they are neater than Bioware's ;)

 

EDIT: If I were to choose one to yank, it would be either the RESIST_PHYSICAL_DAMAGE, or one of the IMMUNITY types. A lesser-used one, like Alteration. If I had to choose between these two, I'd say cut Alteration. An enhancement detector could be quite handy, you are correct.

 

Would PROTECT feel better than BLOCK? Only 2 more letters to type. Not 5 (doubled) like PROTECTION :D

Link to comment

I would like to have a say on this (albeit a little late):

 

120 BLOCK_SPELLS

What would this exactly do?

 

123 IMMUNITY_ABJURATION

I think Spell Immunity effects should be clustered into a single stat, and not allow the player to have multiple spell immunities on top of him/her (you could use this exploit to protect yourself from practically every single spell in the game). It should be renamed to IMMUNITY_MAGICSCHOOL. This would free up a slew of slots.

 

 
126 IMMUNITY_ALTERATION

This should be replaced with IMMUNITY_SPELL_LEVELS (IMMUNITY_ALTERATION is included in the IMMUNITY_MAGICSCHOOL). Minor globe would use the value of 3, and Globe would use a value of 4. The MINORGLOBE state should be replaced with something else, and the animation should be replaced with a blank one. This would free up yet another slot. The spells themselves (Globe and Minor Globe) would use a seperate, custom animation.

 

The reason I support this stat over the existing stats, is that you could seperately detect for the 2 spells rather than simply looking for the globe overlay that doesn't allow the creature to know whether or not it is safe to cast a 4th level spell.

 

127 IMMUNITY_CONJURATION  

Since IMMUNITY_MAGICSCHOOL takes care of this, this slot is open.

 

128 BLOCK_MAGIC_WEAPONS

 

I would rename this to BLOCK_WEAPONTYPE, where you could have values set for several weapontypes (normal, normal missiles, magical, magical missiles, all, or maybe even currently unused types such as silver, cold steel, etc.). Is more compact than having multiple stats set. You could use extra values for immunity to +x weapons.

 

We could free up the SHIELDGLOBE slot by using the method I described for MINORGLOBE.

 

    
130 IMMUNITY_DIVINATION

Since IMMUNITY_MAGICSCHOOL takes care of this, this slot is open.

 

  
133 IMMUNITY_GENERAL [ILLUSION and ENCHANTMENT: 0-1-2]

Again, since IMMUNITY_MAGICSCHOOL takes care of this, this slot is open.

 

  
158 BLOCK_NEGATIVE      

 

I somehow don't like placing miscellaneous states into a single one.

 

 
159 COMBAT_BUFF    

 

THAC0_BONUS sounds better to me. We might need a SAVING_THROW_BONUS somewhere.

 

 
160 MAGIC_ARMOR    

 

This one isn't needed. The CheckStatLT(Myself,x,AC) takes care of this. The only problem is that you might need to have many script lines that check for dexterity and adjusts the value of x accordingly. I have fully tested this, and it works exactly the way I described it.

 

 
161 STRENGTH_BUFF    

The name, STRENGTH_BONUS sounds more appropriate to me. STRENGTH_SET could be checked by a simple CheckStat(Myself,x,STR)

 

  
162 IMMUNITY_INVOCATION  

Again, since IMMUNITY_MAGICSCHOOL takes care of this, this slot is open.

 

163 NEEDS_BREACH [everything that Breach can dispel]          

 

I somehow don't like placing miscellaneous states into a single one.

 

         
165 IMMUNITY_NECROMANCY

Again, since IMMUNITY_MAGICSCHOOL takes care of this, this slot is open.

 

177 SPELL_SHIELD

This one I find unnecessary, since no one in the game really uses Spell Shield/reacts to Spell Shield.

 

178 RESIST_FEAR

 

Isn't there already a stat like this?

 

181 BLOCK_NORMAL_WEAPONS

 

Since IMMUNITY_WEAPONTYPE takes care of this, this slot is left open.

 

180 INSIDE_CLOUD [and take 10 off of each current value]

Could be used much more efficiently if an invisible .cre would be summoned and a Detect() trigger would be used. Using a stat to detect stationary spells is a total waste. Could be freed up for another stat.

 

179 DISPEL_BAD [Many Spells]
182 DISPEL_GOOD [Many Spells]

See my opinions for the NEEDS_BREACH and BLOCK_NEGATIVE stats.

 

-Galactygon

Link to comment
I would like to have a say on this (albeit a little late):

 

120 BLOCK_SPELLS

What would this exactly do?

 

It does precisely what you proposed yanking IMMUNITY_ALTERATION out, to do. ;) Levels 1 to 9. RAKRING.itm = 8, LICH.itm = 5, etc....yes, globes as well.

 

123 IMMUNITY_ABJURATION

I think Spell Immunity effects should be clustered into a single stat, and not allow the player to have multiple spell immunities on top of him/her (you could use this exploit to protect yourself from practically every single spell in the game). It should be renamed to IMMUNITY_MAGICSCHOOL. This would free up a slew of slots.

 

Several other community members thought "not", so we did this. Not only are you late, you are outvoted.

 

 
126 IMMUNITY_ALTERATION

 

See above...

 

128 BLOCK_MAGIC_WEAPONS

 

This was formerly PROTECTION_FROM_MAGIC_WEAPONS, for Mantle and the like. Used often, very handy, not negotiable.

 

We could free up the SHIELDGLOBE slot by using the method I described for MINORGLOBE.

 

Besides, STAT values don't stack, or increment--they overwrite. Two effects Prot/Missiles, and Prot/Magic Weapons both cast would wreak havoc on your theory.

 

  
158 BLOCK_NEGATIVE      

 

I somehow don't like placing miscellaneous states into a single one.

 

Not a clue what you mean here. This is a mere renaming of the existing in-game SCRIPTINGSTATE3, which was set up by BW to detect Negative Plane Protection

 

 
159 COMBAT_BUFF    

 

THAC0_BONUS sounds better to me. We might need a SAVING_THROW_BONUS somewhere.

 

See above (= scriptingstate4). Besides...

72 MISSILETHAC0BONUS        
84 THAC0BONUSRIGHT          
85 THAC0BONUSLEFT

:D

 

 
160 MAGIC_ARMOR    

This one isn't needed. The CheckStatLT(Myself,x,AC) takes care of this. The only problem is that you might need to have many script lines that check for dexterity and adjusts the value of x accordingly. I have fully tested this, and it works exactly the way I described it.

 

Again, a BW original...This is for Barkskin, Armor, Ghost Armor, Spirit Armor--nothing to do with that metal gear minsc puts on after feeding the hampster...

 

 
161 STRENGTH_BUFF    

The name, STRENGTH_BONUS sounds more appropriate to me. STRENGTH_SET could be checked by a simple CheckStat(Myself,x,STR)

 

Somebody send this guy a manual!!!!! This is every strength enhancing spell in game, basically. Draw upon holy might, champion's strength, divine power, etc, etc

 

163 NEEDS_BREACH [everything that Breach can dispel]          

I somehow don't like placing miscellaneous states into a single one.

 

I somehow don't like using 12 lines of code to do less than 1 can do. :D

 

177 SPELL_SHIELD

This one I find unnecessary, since no one in the game really uses Spell Shield/reacts to Spell Shield.

 

They do in my game, both enemy and party AI.

 

178 RESIST_FEAR

Isn't there already a stat like this?

Why, yes there is....

14 RESISTFIRE

;)

 

180 INSIDE_CLOUD [and take 10 off of each current value]

Could be used much more efficiently if an invisible .cre would be summoned and a Detect() trigger would be used. Using a stat to detect stationary spells is a total waste. Could be freed up for another stat.

 

I can already see all of the extra script blocks something like this would take. NTM the chaos having two of these spells in sight range, could do.

 

179 DISPEL_BAD [Many Spells]
182 DISPEL_GOOD [Many Spells]

See my opinions for the NEEDS_BREACH and BLOCK_NEGATIVE stats.

 

And see mine...

Link to comment
120 INSECT_PLAGUE: SPELLFAILURE [PRIEST/MAGE] works fine. No spells to directly counter it, so pitch it.

 

I disagree on this one, simply because there are other things that can cause spell failure that do not last nearly as long as INSECT_PLAGUE. I've got a block in some caster scripts that have the caster stop using spells if affected by INSECT_PLAGUE. Keep this one.

Link to comment

First, I want to say I'm thrilled that everyone's participating and working on a consensus. ;) This bodes well for finally unifying the various Detectable Stuffs running around in the wild. From a practical PoV, I'd like to make two requests.

 

The first is that I'd like to see an effort made to reach out to modders who are adding items/spells which are going to do things we wish to detect. I understand the first phase must be the revamping of the actual stats, but we should always keep in mind that we also need to also get modders to buy into the idea--especially since we want to embed this into the Fixpack (which is targeted to go in the old Baldurdash order of prior to other mods) we'll need to get buy-in. In most cases awareness of a new DS is not enough. For example, as someone who has never scripted with DS I'll need help deciding which states we need to attach to the various Divine Remix spells.

 

The second is that I have not seen an ancillary discussion of states. For the Fixpack, we currently add one state (0x00000FC0 STATE_REALLY_DEAD) to fix non-DV Dead() triggers. Helping cirerrek with the last eSeries and gMinion, it became apparent that an expanded state list is also a critical component--are there any changes needed there as well? Are there any stats that could be offloaded into state checks?

Link to comment
It does precisely what you proposed yanking IMMUNITY_ALTERATION out, to do. ;) Levels 1 to 9. RAKRING.itm = 8, LICH.itm = 5, etc....yes, globes as well.

I misunderstood as something else. The naming isn't clear enough; BLOCK_SPELL_LEVELS is more appropriate.

 

Several other community members thought "not", so we did this. Not only are you late, you are outvoted.

Why, might I ask?

 

Besides, STAT values don't stack, or increment--they overwrite.

I am fully aware of that.

 

Two effects Prot/Missiles, and Prot/Magic Weapons both cast would wreak havoc on your theory.

I know of an easy and effective way around that, and have already done similar implementations.

 

Not a clue what you mean here. This is a mere renaming of the existing in-game SCRIPTINGSTATE3, which was set up by BW to detect Negative Plane Protection 

Again, the naming isn't clear enough. It should be renamed to BLOCK_LEVELDRAIN or something similar. I thought it was a mix of protection spells.

 

See above (= scriptingstate4). Besides...

72 MISSILETHAC0BONUS        
84 THAC0BONUSRIGHT          
85 THAC0BONUSLEFT

  :D

Nevermind that; I completely forgot about those 3 stats.

 

Again, a BW original...This is for Barkskin, Armor, Ghost Armor, Spirit Armor--nothing to do with that metal gear minsc puts on after feeding the hampster...                 

You could use the AC stats combined with some other stat that sets the saving throw bonus.

 

Somebody send this guy a manual!!!!! This is every strength enhancing spell in game, basically. Draw upon holy might, champion's strength, divine power, etc, etc

So if someone casts Righteous Magic on him/herself, the character will not cast Draw Upon Holy Might to further enhance his/her strength? I don't understand the reasoning used here.

 

They do in my game, both enemy and party AI.

That's the exception here.

 

Why, yes there is....
14 RESISTFIRE

;)

I have checked... have you tried MORALEBREAK and MORALERECOVERYTIME, by any chance?

 

See my opinions for the NEEDS_BREACH and BLOCK_NEGATIVE stats.

 

And see mine...

 

It seems we never agreed on anything so far.

 

-Galactygon

Link to comment
120 INSECT_PLAGUE: SPELLFAILURE [PRIEST/MAGE] works fine. No spells to directly counter it, so pitch it.

 

I disagree on this one, simply because there are other things that can cause spell failure that do not last nearly as long as INSECT_PLAGUE. I've got a block in some caster scripts that have the caster stop using spells if affected by INSECT_PLAGUE. Keep this one.

 

Well, a script parses every second, and a spellcaster shouldn't try casting with 100% failure...no matter what causes it, or how long it lasts. About the best thing you can do for insect plague is have an unaffected friend dispel it (this will be covered under DISPEL_BAD stat), or keep chugging healing potions.

 

This is a little system I set up in BPMulti, to reduce the amount of lines of code per block to accomplish this check:

IF
 Global("BPCLFAIL","LOCALS",0)
 OR(3)
   CheckStatGT(Myself,50,SPELLFAILUREPRIEST)
   StateCheck(Myself,STATE_SILENCED)
   CheckStatGT(Myself,0,SCRIPTINGSTATE4)
 OR(4)
   Class(Myself,CLERIC_ALL)
   Class(Myself,DRUID_ALL)
   Class(Myself,RANGER_ALL)
   Class(Myself,PALADIN_ALL)
THEN
 RESPONSE #100
   SetGlobal("BPCLFAIL","LOCALS",1)    // Anything that gives a reasonable to certain chance of failure
   SmallWait(1)
   Continue()
END

IF
 Global("BPMGFAIL","LOCALS",0)
 OR(3)
   CheckStatGT(Myself,50,SPELLFAILUREMAGE)
   StateCheck(Myself,STATE_SILENCED)
   CheckStatGT(Myself,0,SCRIPTINGSTATE4)
 OR(3)
   Class(Myself,LONG_BOW)
   Class(Myself,SORCERER)
   Class(Myself,BARD_ALL)
THEN
 RESPONSE #100
   SetGlobal("BPMGFAIL","LOCALS",1)    // Anything that gives a reasonable to certain chance of failure
   SmallWait(1)
   Continue()
END

 

And in each mage/cleric spell block, all you have to check for is BPMG(CL)FAIL LOCALS at value zero:

  Global("BPCLFAIL","LOCALS",0)                                 
// and we haven't been hit with a spellfailure effect (such as antimagic_ray, insect_swarm etc)

 

You can adjust the failure %'s to meet your personal needs, of course.

 

The first is that I'd like to see an effort made to reach out to modders who are adding items/spells which are going to do things we wish to detect. I understand the first phase must be the revamping of the actual stats, but we should always keep in mind that we also need to also get modders to buy into the idea--especially since we want to embed this into the Fixpack (which is targeted to go in the old Baldurdash order of prior to other mods) we'll need to get buy-in. In most cases awareness of a new DS is not enough. For example, as someone who has never scripted with DS I'll need help deciding which states we need to attach to the various Divine Remix spells.

 

You are welcome to use BP scripts for a referrence guide, they will probably be the first set truly integrated. ;)

 

The second is that I have not seen an ancillary discussion of states. For the Fixpack, we currently add one state (0x00000FC0 STATE_REALLY_DEAD) to fix non-DV Dead() triggers. Helping cirerrek with the last eSeries and gMinion, it became apparent that an expanded state list is also a critical component--are there any changes needed there as well? Are there any stats that could be offloaded into state checks?

 

I have temporarily set up one for benefical and adverse effects that can be dispelled...but that will be superceded by the corresponding STAT's. I suppose more could be done, with some imagination...but the best ones have already been done. The set that IEDSP offers is quite handy, for example.

Link to comment
I misunderstood as something else. The naming isn't clear enough; BLOCK_SPELL_LEVELS is more appropriate.

 

Naming conventions can be worked out. The emphasis is on "not too much extra typing per stat". ;)

 

Several other community members thought "not", so we did this. Not only are you late, you are outvoted.

Why, might I ask?

 

Read Xyx' reply to IEDSP, reproduced on page 1 of this thread. Others have expressed this desire as well (read the thread).

 

Two effects Prot/Missiles, and Prot/Magic Weapons both cast would wreak havoc on your theory.

I know of an easy and effective way around that, and have already done similar implementations.

Easy and effective is nice, but is it short as well? Reducing lines of code and thus resultant lag is paramount here.

 

 

Again, a BW original...This is for Barkskin, Armor, Ghost Armor, Spirit Armor--nothing to do with that metal gear minsc puts on after feeding the hampster...                 

You could use the AC stats combined with some other stat that sets the saving throw bonus.

You might be right here, because most uses I've seen include AC checks as well as this check. But this is ScriptingState5, and I don't believe I'm the one who set it up. We'd have to likely change more in-game files to do this (hopefully not the bgmain).

 

Somebody send this guy a manual!!!!! This is every strength enhancing spell in game, basically. Draw upon holy might, champion's strength, divine power, etc, etc

So if someone casts Righteous Magic on him/herself, the character will not cast Draw Upon Holy Might to further enhance his/her strength? I don't understand the reasoning used here.

 

This is from the BPDetectStats readme:

161)  SCRIPTINGSTATE6 (#5)  AKA: Strength Buffing

          1= Divine Power                          (sppr422)

          2= Strength of One, Wizard Strength      (sppr312, spwi214)

          3= Holy Power, Champion's Strength        (sppr412, sppr507)

          4= Draw Upon Holy Might                  (sppr214, spin103, bhaal2a)

          5= Call Upon Faith      (sppr217, sppr524, prfaith)

          6= Righteous Magic                        (sppr513, dgright)

          7= Diety Bind                            (sppr745)

 

Notice how the more powerful spells are higher values. Spells that disable spellcasting also cast the value of SCRIPTINGSTATE4, 1. (I didn't set up SS4, bioware did--or started it at least).

 

So, if I do a LT check, I can keep from casting weaker spells on top of powerful ones. (e.g) You wouldn't cast wizard strength on top of draw upon holy might, but you might find the opposite useful. :D

 

They do in my game, both enemy and party AI.

That's the exception here.

But it is useful, and others might like it once they try it.

 

... have you tried MORALEBREAK and MORALERECOVERYTIME, by any chance?

No, I have not. Expound on your theory, please.

 

It seems we never agreed on anything so far.

At least some things haven't changed... ;)

Link to comment
Read Xyx' reply to IEDSP, reproduced on page 1 of this thread. Others have expressed this desire as well (read the thread).

 

Since various Spell Immunities are not meant to be cumulative (as I have already explained), I see little point in seperating them into several different stats. If you disagree with noncumulative Spell Immunities, then the more power to you.

 

Easy and effective is nice, but is it short as well?

 

Yes. In fact, it doesn't add a single line to the .bcs code. I have found a compact solution. You might wish to PM me for the explanation/examples.

 

Reducing lines of code and thus resultant lag is paramount here.

That is one of my main goals, too.

 

So, if I do a LT check, I can keep from casting weaker spells on top of powerful ones. (e.g) You wouldn't cast wizard strength on top of draw upon holy might, but you might find the opposite useful. ;)

 

Makes sense now. Thanks for the clarification. ;)

 

No, I have not. Expound on your theory, please.

 

Since Resist Fear spells disable morale failure, it doesn't matter what value MORALEBREAK is set to. You could use Opcode #106 to set the value of MORALEBREAK to some value, and look for the MORALEBREAK stat in the .bcs file. I haven't tested this, but it should theoretically work.

 

-Galactygon

Link to comment
Since various Spell Immunities are not meant to be cumulative (as I have already explained), I see little point in seperating them into several different stats. If you disagree with noncumulative Spell Immunities, then the more power to you.

You point the finger at me, when I have made it clear that this was voted on by other community members. I am merely accomodating their requests. There is nothing in this spell to prevent multiple castings, BTW. Nor in the PNP description.

 

Since Resist Fear spells disable morale failure, it doesn't matter what value MORALEBREAK is set to. You could use Opcode #106 to set the value of MORALEBREAK to some value, and look for the MORALEBREAK stat in the .bcs file. I haven't tested this, but it should theoretically work.

 

If I find time, I'll look into this. Pretty busy ATM, with the next version of BP-weidu. Critical installer issues to address. Also ~12000 more lines of a script, to proofread & edit, for this release.

Link to comment

I really think things like STRENGTH_BUFF should be at the very bottom of the pile when it comes to stat allocations. CheckStat does fine for yourself and allies, and enemies should really have better things to do than dispel Strength Of One.

 

I can already see all of the extra script blocks something like this would take.

The answer is very likely "not very much". Where you do a CheckStat, the alternative is a Detect/Range check. It's still just as easy to identify when a cloud is there, just as easy to distinguish between cloud types, and you get the added bonus of something to RunAwayFrom. Yes, that falls down when there are two onscreen or when you get stuck on walls or something, but it's an added option over just RandomWalking. I like your solution because it's more elegant than just splattering invisible CREs across the screen, but if push comes to shove I think it's something we can sacrifice in favour of, say, identifying weapon enchantment.

(Incidentally, did anyone remember to modify Zone Of Sweet Air to destroy the cloud CREs?)

Link to comment
if push comes to shove I think it's something we can sacrifice in favour of, say, identifying weapon enchantment.

(Incidentally, did anyone remember to modify Zone Of Sweet Air to destroy the cloud CREs?)

 

There are other things I'd be willing to sacrifice first, this is proving some handy scripting. Good for casting summons spells as well as getting your butt out of a cloud. And, of course--zone of sweet air.

 

I can also tell if "somebody else" is currently in a cloud (under its effects or not). Range checks cannot do that, vs an invso CRE's position.

 

If anything, I'd say using both methods would be the most effective. I'm sure the STAT scripting would help out your invisible CRE's script system. I know the epicenter location would help out mine (though I've worked around it effectively enough--the people get out, at least ;)).

 

I vote for RESIST_PHYSICAL_DAMAGE to be yanked, personally. Armor of Faith, and maybe a couple others, tops--use this. And each type of damage resistance can be detected individually.

 

Ooo, I just saw a couple more spells to add to this cloud stat--sphere of chaos and teleport field (they don't have to be centered on the caster, though most choose to). Thought I had them there, guess I overlooked; I think each of these deserves a seperate value.

 

These two spells also make a case for IMMUNITY_ALTERATION (a stat I had thought about cutting back on seperately). Hmm, many other spells as well. Wouldn't want to cast Time Stop if somebody was immune to alteration, for example. Nor disintegrate nor flesh to stone. Even haste and slow! A lot more than just polymorphing, I see.

Link to comment
I vote for RESIST_PHYSICAL_DAMAGE to be yanked, personally. Armor of Faith, and maybe a couple others, tops--use this. And each type of damage resistance  can be detected individually.

 

 

Will the CURSED spells be covered under DISPEL_BAD? If so, then that is the one that I would drop first.

Link to comment

I just did a little peeking around in NI. SCRIPTINGSTATE1 is only used by one spell, very obscure. SPIN854 {MAGNET}. A "pull you in" wing buffet. I think we can take over that slot safely. Does anyone disagree, or have a need for GRAVITY stat?

 

Only 4 in-game items use scripting states; they are SS3, value 1 (neg plane protection)

Also, i noticed that Melissan's Blade Barrier MELIS02.spl is attached to SCRIPTINGSTATE10. So, I vote we move the handmade one to this slot (formerly occupied by improved_alacrity)

 

I was wrong on SCRIPTINGSTATE5, nothing obvious in game; and I agree that armor-type spells can be detected with ARMORCLASS stat. So, scriptingstate5 can be our enchantment stat.

 

That leaves SCRIPTINGSTATE1 and the BLOCK_PHYSICAL slots open. Speak up, and take the vacancy. First come, first served. That includes me, and I'm scripting a lot lately; so you'd better get your wishes on the list promptly. ;)

Link to comment

Archived

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

×
×
  • Create New...