Jump to content

Scriptable Spells v3


Recommended Posts

Keep in mind, duplicate IDS entries for the same value won't hurt anything--having both will allow folks to use whichever they prefer without loss of functionality.

 

Of course, decomp sucks with multiple entries. WeiDU goes bottom-up, NI, top-down. If you use WeiDU, put the one you like last, else first.

 

Nevemind. devSin voiced the same objection that I had in mind.

 

Thanks,

Link to comment

I've been communicating with Xyx in the IEModders forums about this. He has a few more requests, but I "think" they can be done without any new STAT slots taken up.

 

Should we perhaps leave 2 or 3 empty, in case somebody comes up w/ a brilliant idea in the future? We could add 4 new slots on Spell Immunity (I vote for SPELL_IMMUNITY_INVOCATION, etc--not numbered), and still have 2 or 3 left over.

 

Invocation

Divination

Abjuration

Necromancy

 

Are probably the more used/useful of these--anyone disagree?

 

@ Cirerrek--I have no problem with hyphens in between the words--but less typing per CheckStat is a must!

P.S: It's "Khelben", though Khelban 'sounds' nicer IMO. :down:

Link to comment
Guest Nythrun
Invocation

Divination

Abjuration

Necromancy

 

Are probably the more used/useful of these--anyone disagree?

 

Never actually used Immunity: Invocation (can't even remember if it's Invocation or Evocation in second ed AD&D, heh) but have used Conjuration for Maze, Powerwords, and Druid Bugs from time to time, and wouldn't mind being able to script NPCs to notice it. Feel free to regard said usage as an outlier :down: .

Link to comment
Never actually used Immunity: Invocation (can't even remember if it's Invocation or Evocation in second ed AD&D, heh) but have used Conjuration for Maze, Powerwords, and Druid Bugs from time to time, and wouldn't mind being able to script NPCs to notice it.  Feel free to regard said usage as an outlier :devil: .

 

I considered this one as well as Alteration; I'll fit them if I can. :)

 

 

 

Communications with Xyx have revealed another needed stat:

 

PROTECTION_SPELLS

 

His original purpose was to cover the Potion of Magic Blocking, but I intend to use it for other things. The eSeries will "most definitely" benefit from this. I had emulated this with a Global in my (corrupted and lost, during compiling! :down: ) BPMulti.baf.

 

You give each spell/item a value from 1 to 9, for the highest spell it protects against. RAKRING.itm is an 8, LICH.itm is a 5, MAGEAMUL is a 3; Minor Globe 3, regular Globe of Invulernerability is a 4. (See where this would come in really really handy, Cirerrek? :down: )

Link to comment
Never actually used Immunity: Invocation (can't even remember if it's Invocation or Evocation in second ed AD&D, heh) but have used Conjuration for Maze, Powerwords, and Druid Bugs from time to time, and wouldn't mind being able to script NPCs to notice it.  Feel free to regard said usage as an outlier :devil: .

 

I considered this one as well as Alteration; I'll fit them if I can. ;)

 

 

 

Communications with Xyx have revealed another needed stat:

 

PROTECTION_SPELLS

 

His original purpose was to cover the Potion of Magic Blocking, but I intend to use it for other things. The eSeries will "most definitely" benefit from this. I had emulated this with a Global in my (corrupted and lost, during compiling! :D ) BPMulti.baf.

 

You give each spell/item a value from 1 to 9, for the highest spell it protects against. RAKRING.itm is an 8, LICH.itm is a 5, MAGEAMUL is a 3; Minor Globe 3, regular Globe of Invulernerability is a 4. (See where this would come in really really handy, Cirerrek? :down: )

 

If I'm reading you correctly, what you've stated means that I'll only need one line of code to account for spell immunity items/effects instead of (in some cases) 3.

 

Decreasing the number of lines of code :down: es muy bueno :)

 

Thanks,

Link to comment
If I'm reading you correctly, what you've stated means that I'll only need one line of code to account for spell immunity items/effects instead of (in some cases) 3. 

 

Decreasing the number of lines of code :down:  es muy bueno :devil:

 

Thanks,

Precisely. :down:

NTM, as Xyx stated--there was no other way to account for the effects of Potion of Magic Blocking (very powerful indeed!)

 

I updated the STAT list above (page 2); please peruse for comments.

 

@ Cirerrek: I just noticed your SCRIPTINGSTATE notes. I'm going to say no, simply because I built these around spells that were known to register values on these SCRIPTINGSTATE's. Moving them somewhere else would make things even more difficult on the replacements.

Link to comment
Precisely. :down:

NTM, as Xyx stated--there was no other way to account for the effects of Potion of Magic Blocking (very powerful indeed!)

 

I updated the STAT list above (page 2); please peruse for comments.

 

@ Cirerrek: I just noticed your SCRIPTINGSTATE notes. I'm going to say no, simply because I built these around spells that were known to register values on these SCRIPTINGSTATE's. Moving them somewhere else would make things even more difficult on the replacements.

 

Looks good to me, Horred.

 

SCRIPTINGSTATES, leaving them alone is is fine by me. Just thought I'd add it to the topics of things to be discussed. We discussed it. The End. Although, if we don't rename them (aka COMBAT_ENCHANCERS or whatever), might I suggest using the SCRIPTING_STATE_X nomenclature so we can actually read the things at a glance?

 

Thanks,

Link to comment
What is the difference between

 

134 LEVEL_DRAIN

 

and the

 

200 LEVELDRAIN

 

that is already in the stat.ids (as of ToB)?

 

Thanks,

Cirerrek

 

 

The one that came in ToB did not work (too high of a scripting state # (200-156 = ScriptingState44; SS31 = Max, or 182). KD renamed it to LEVELDRAIN_WRONG. :D

 

The one in this package works, after a fashion. It sets a value according to how many levels you lost in the last hit, but it's not cumulative. Thus, use CheckStatGT(xxxx,0,LEVEL_DRAIN).

 

A restoration spell sets the value to zero. It also runs out after 3 days, regardless. (If a script didn't cure it in 3 days, it wasn't going to anyways ;)).

 

I wish BW had set theirs up, and cumulative, so you could track the amount of loss taken. And so it worked static, like their other stats.

 

Unfortunately, this was the best cure I could come up with at the time. If you have a better idea how to set it up, now would be a good time. I may actually start throwing this together in the next few days (once I know BP-weidu is stable for more than my testing crew).

 

I'm currently redoing BPMulti, with backup saves this time. No more 25-hour losses while compiling will be allowed. ;)

Link to comment

When I've been going through BPMulti, researching the spells, I discovered that I would like to make a case for PROTECTION_FROM_ELEMENTS. In fact, I would like to expand upon it further! I have seen something that RESISTFIRE, RESISTELECTRICITY, etc cannot do.

 

It seems that all of these types of spells, from resist cold/fire on up to protection from energy, are subject to Dispel Magic.

 

Maybe I'll write down a list of my complete findings on this, in another thread (when I'm done researching).

 

Or.....instead of elemental resistance to this/that--we make a DISPELLABLE stat?

Put every (relevant) spell that is dispellable on the stat. With a binary switch so multiple, unrelated entries don't cancel each other out. Or, better yet: 0-1-2. 1 would be adverse effects, 2 would be beneficial effects. That way we can determine for either common usage.

 

This could save a LOT of script lines; every (even-semi) thorough list I've seen is engine sludge at best. You'd only have to do one line check per victim/benefactor (2 perhaps, for curing your own group).

 

 

EDIT: I made it through the priest spells. There are ~ 50 beneficial and 25 adverse. Many of the adverse could be covered by state checks, and some of the good. I also propose making custom STATE_DISPEL_GOOD and STATE_DISPEL_BAD, to cover these. Then again, I stoll have the mage spells to tackle...

 

The need for something like this is becoming clearer as I go--I'm doing the documentation on the spells as I go, so I have a referrence for the PATCH.TBL (the 2DA-ish file KD made, that makes this all happen in weidu). This one will take a lot of work, but reap a lot of benefits as well. The really good things usually do... ;)

 

YET ANOTHER EDIT: (Yawn...) Okay, I did the deed. Here are the states that I came up with:

 

0x6fe08010 STATE_DISPEL_GOOD

 

Invisible, haste, non-detection, improved invis, bless, chant, draw upon holy might, luck, aid, blur, and mirror image

 

0x9015300d STATE_DISPEL_BAD

 

poison, charm, sleep, blind, panic, silence, stun, slow, confusion, feeblemind, chantbad

 

 

These will help a lot, and save many dozen spells of editting. All in all, there are roughly 180 in-game relevant spells that can be dispelled. I even found a couple that could be, that should not. SPWI604 (flesh to stone), and spwi813 (maze). I never tried to dispel either, so I don't know if it really matters or not. Also, spwi250 from bg1npc (imoen lockpick boost).

Link to comment
When I've been going through BPMulti, researching the spells, I discovered that I would like to make a case for PROTECTION_FROM_ELEMENTS. In fact, I would like to expand upon it further! I have seen something that RESISTFIRE, RESISTELECTRICITY, etc cannot do.

 

It seems that all of these types of spells, from resist cold/fire on up to protection from energy, are subject to Dispel Magic.

 

Maybe I'll write down a list of my complete findings on this, in another thread (when I'm done researching).

 

Or.....instead of elemental resistance to this/that--we make a DISPELLABLE stat?

Put every (relevant) spell that is dispellable on the stat. With a binary switch so multiple, unrelated entries don't cancel each other out. Or, better yet: 0-1-2. 1 would be adverse effects, 2 would be beneficial effects. That way we can determine for either common usage.

 

This could save a LOT of script lines; every (even-semi) thorough list I've seen is engine sludge at best. You'd only have to do one line check per victim/benefactor (2 perhaps, for curing your own group).

 

 

EDIT: I made it through the priest spells. There are ~ 50 beneficial and 25 adverse. Many of the adverse could be covered by state checks, and some of the good. I also propose making custom STATE_DISPEL_GOOD and STATE_DISPEL_BAD, to cover these. Then again, I stoll have the mage spells to tackle...

 

The need for something like this is becoming clearer as I go--I'm doing the documentation on the spells as I go, so I have a referrence for the PATCH.TBL (the 2DA-ish file KD made, that makes this all happen in weidu). This one will take a lot of work, but reap a lot of benefits as well. The really good things usually do... ;)

 

YET ANOTHER EDIT: (Yawn...) Okay, I did the deed. Here are the states that I came up with:

 

0x6fe08010 STATE_DISPEL_GOOD

 

Invisible, haste, non-detection, improved invis, bless, chant, draw upon holy might, luck, aid, blur, and mirror image

 

0x9015300d STATE_DISPEL_BAD

 

poison, charm, sleep, blind, panic, silence, stun, slow, confusion, feeblemind, chantbad

 

 

These will help a lot, and save many dozen spells of editting. All in all, there are roughly 180 in-game relevant spells that can be dispelled. I even found a couple that could be, that should not. SPWI604 (flesh to stone), and spwi813 (maze). I never tried to dispel either, so I don't know if it really matters or not. Also, spwi250 from bg1npc (imoen lockpick boost).

 

Ah, I see where you are going with this.

 

I was under the impression that chantbad was broken. disease isn't in your list, but from what I recall, STATE_DISEASED was also broken. (is a disease even dispellable?)

Link to comment
Ah, I see where you are going with this. 

 

I was under the impression that chantbad was broken.  disease isn't in your list, but from what I recall, STATE_DISEASED was also broken. (is a disease even dispellable?)

 

 

Check the part of this post with the "new diagram". I've come to a couple new conclusions since I posted this bit, including: splitting up the stat into DISPEL_GOOD and DISPEL_BAD, and not even using the states (lumping everything into the two stats).

 

In the meantime: I wasn't aware CHANTBAD was broken, I can remove it (it's one of the least important on the list IMO). The new value would be: 0x8015300d.

 

The only example I've had to go on for diseased is TDD's cause disease spell. We obviously cannot trust the mod for "the law" on this. So, I checked OTYUGH.itm. It is listed as 2: Not Dispel/Not Bypass Resistance. So, I guess we'll take that as a no.

Link to comment

Ah, I see where you are going with this. 

 

I was under the impression that chantbad was broken.  disease isn't in your list, but from what I recall, STATE_DISEASED was also broken. (is a disease even dispellable?)

 

 

Check the part of this post with the "new diagram". I've come to a couple new conclusions since I posted this bit, including: splitting up the stat into DISPEL_GOOD and DISPEL_BAD, and not even using the states (lumping everything into the two stats).

 

In the meantime: I wasn't aware CHANTBAD was broken, I can remove it (it's one of the least important on the list IMO). The new value would be: 0x8015300d.

 

The only example I've had to go on for diseased is TDD's cause disease spell. We obviously cannot trust the mod for "the law" on this. So, I checked OTYUGH.itm. It is listed as 2: Not Dispel/Not Bypass Resistance. So, I guess we'll take that as a no.

 

http://forums.gibberlings3.net/index.php?s...c=1802&hl=chant

 

Meh, I guess chantbad does work. Not sure that it is every used in-game, but what the hey. Might as well include it in case some modder decides to use it.

 

Thanks,

Cirerrek

Link to comment

Okay, I'll add CHANTBAD back. But when this package is done, the state will most likely be redundant.

 

I've come up with an idea for the last slot, since nobody else has. We now have DISPEL_GOOD and DISPEL_BAD; why not NEEDS_BREACH?

 

We all are likely familiar with the old Specifics system on this. Those of us that tried this found out it could lead to other problems. Some creatures actually depend on their specifics values. BP includes some of these, as well. BP can tell a Suldanessallar elf, from a "non-city" elf, from a drow elf--for example. Twisting these up could lead to anything from the humorous to disastrous!

 

But I always found this handy code. In fact, several of the existing stats were set up specifically with Breach in mind. I should have just condensed it all in the first place, and voided this discussion on it. ;)

 

I compared this to its twin, HAS_SHIELDS--and I found the Breach selection was far more numerous, and had many that could not be done without even more stats (e.g.--remember the discussion about elemental resistances?--breach gets even more specific than I had.)

 

So, I guess that does it. With any luck--I'll get BPv176 wrapped up this weekend, and get started on all of this. I'd like to have it both ready, and incorporated, into BPv177.

 

Cheers!

Link to comment
Okay, I'll add CHANTBAD back. But when this package is done, the state will most likely be redundant.

 

I've come up with an idea for the last slot, since nobody else has. We now have DISPEL_GOOD and DISPEL_BAD; why not NEEDS_BREACH?

 

We all are likely familiar with the old Specifics system on this. Those of us that tried this found out it could lead to other problems. Some creatures actually depend on their specifics values. BP includes some of these, as well. BP can tell a Suldanessallar elf, from a "non-city" elf, from a drow elf--for example. Twisting these up could lead to anything from the humorous to disastrous!

 

But I always found this handy code. In fact, several of the existing stats were set up specifically with Breach in mind. I should have just condensed it all in the first place, and voided this discussion on it. ;)

 

I compared this to its twin, HAS_SHIELDS--and I found the Breach selection was far more numerous, and had many that could not be done without even more stats (e.g.--remember the discussion about elemental resistances?--breach gets even more specific than I had.)

 

So, I guess that does it. With any luck--I'll get BPv176 wrapped up this weekend, and get started on all of this. I'd like to have it both ready, and incorporated, into BPv177.

 

Cheers!

 

I'm going to gripe about the complete truncating of the names. Somehow BLOCK_WHATEVER doesn't do it for me. But I won't gripe too much since you are doing most of the heavy lifting ;)

 

Hey, here is a thought. Could you add a stat to weapons to tell you what enchantment that they are? Obviously it might be tricky for multiple enchantment level items, e.g., +2/+3 vs. undead.

 

Anything else where that type of thing might be applicable?

 

Thanks,

Cirerrek

Link to comment

Archived

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

×
×
  • Create New...