• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Help applying -1 to Spell Save DC

draco963

Well-known member
Good morning good folks,

I've been hammering my head on this brick wall for two days. Help me please?

I'm trying to create a custom weapon of legacy. I've got bits and pieces working, but I can't get the Spell Save DC reduction functional.

So, here's one of the Eval Script entries
Code:
~ -1 Skill Check Penalty at 10th level
  if (hero.tagcount[Hero.HitDice] >= 10) then
   foreach pick in hero from BaseSkill
    eachpick.field[Penalty].value -= 1
   nexteach
  endif

~ -1 Spell save DC at 6th level
~  if (hero.tagcount[Hero.HitDice] >= 6) then
~   foreach pick in hero from Spellcast
~    eachpick.field[cSplSaveDC].value -= 1
~   nexteach
~  endif

~ -1 Spell save DC at 6th level
  if (hero.tagcount[Hero.HitDice] >= 6) then
    hero.child[cHelpWiz].field[cSplSaveDC].value -= 1
  endif

Now, the Skill Check penalty is working. But the penalty to the Spell Save DC is not. You can see the two different approaches I've tried in the code block. If put this in Pre-Attributes, Post-Attributes, and Pre-Levels (always at 10000), and every way I try, the Skill Check penalty works, but the Spell Save DC doesn't.

Does anyone know what I'm doing wrong? I've been up and down the forums trying to find some ideas for this (that's how I found cSplSaveDC and the two different approaches to this) but I'm out of ideas...

Thanks in advance.
 
Does anyone know what I'm doing wrong? I've been up and down the forums trying to find some ideas for this (that's how I found cSplSaveDC and the two different approaches to this) but I'm out of ideas...

Thanks in advance.

You aren't doing anything wrong. I tried this script out on a feat, and it works just fine. I tested it at Post-Attributes/10000. If it still isn't work, please post the user file and I'll take a look.
 
I feel like an idiot....

It's still not working. Maybe it's because I have the script on a weapon, not in a feat? Should I be making a feat and bootstrapping on the feat to the weapon? Can I do that in an IF statement so that it only occurs at a certain level?

Yeesh...

attachment.php


So, you can see that the Level 1 spells are being reduced as they should be. But that Spell Save DC stubbornly stays at 14...

Here's my .user file. There's only one weapon in it.
View attachment RichMod 2017-05-29.user
Thank-you Sendric.
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    248.5 KB · Views: 34
Your script is running at 'User Post Attributes'. Don't use any of the "user" timing phases. Change to "Post Attributes". "User" timing phases are going to be deprecated in a future release...

Next step to help yourself use "debug" statements to see what the script is doing.

Code:
[B]debug "Running"[/B]
~ -1 Skill Check Penalty at 10th level
  if (hero.tagcount[Hero.HitDice] >= 10) then
   foreach pick in hero from BaseSkill
    eachpick.field[Penalty].value -= 1
   nexteach
  endif

~ -1 Spell save DC at 6th level
[B]debug "Hit Dice Count: " & hero.tagcount[Hero.HitDice][/B]
  if (hero.tagcount[Hero.HitDice] >= 6) then
[B]debug "In IF"[/B]
    hero.child[cHelpWiz].field[cSplSaveDC].value -= 1
[B]debug "Wiz Save DC:" & hero.child[cHelpWiz].field[cSplSaveDC].value[/B]
  endif

Then go to "Develop->Floating Info Windows->Show Debug Output". Then you can see the output of the "debug" info in the window. That should provide you with good info to see "what" is going on. :)
 
OK, thank-you for those debug statements ShadowChemosh. Brilliant, those.

So, you're right, the script is running. It's even applying the -1. But, my character's Spell Save DC isn't being reduced. Maybe cSplSaveDC is the wrong thing?
 
Nope, I'm just unbelievably stupid. The script is running immediately, without being tied to the Legacy rituals. No wonder I never saw a difference between having the Rituals turned on or off, the script is running instantaneously, and effecting my player as soon as the weapon is in inventory, regardless of whether the Rituals are turned on or not.

Yeesh...

So sorry to have wasted your time, guys. Thank-you both for your help. Again, those debug statements will be priceless.

May I divert the thread to ask how to get theses scripts (and several other effects) to apply only if the weapon is actually equipped, as opposed to only in inventory?
 
May I divert the thread to ask how to get theses scripts (and several other effects) to apply only if the weapon is actually equipped, as opposed to only in inventory?

Certainly. You can use a simple doneif statement at the top of your script, like this:

Code:
doneif (field[gIsEquip].value = 0)

This statement will prevent everything below it from executing if TRUE.
 
Thank-you Sendric! That's perfect!

So, yet another digression, if I may...

Moving on through this WoL, I need to add an elemental damage type to the weapon at level 14. I've tried bootstrapping on "iFrost" with the appropriate conditional for it to only kick in at the correct level and ritual, but, when I tested it, HL threw me this error:
"Condition phase/priority (First/10000) for bootstrap thing 'iFrost' occurs after earliest rule/script (First/5000)"

The error goes away if I set the conditional on the bootstrap to run at First/4999, but that's the dumb solution; I should understand why it was necessary...

Also, bootstrapping on iFrost didn't have the desired effect anyhow. In fact, I'm not sure the desired effect is even possible... What I'd like is for the damage listing of the weapon on the printed character sheet to say "1d6+1, +1d6 frost". So far, the closest I've seen in mucking about with the custom weapons in HL proper (as opposed to the Editor), is that a weapon with the Frost or Fire (or any other elemental) effect will simply say "+1 Longsword, Frost" in its title, but not list the on-hit damage added by the elemental effect in the body of info listing the damage the weapon can do...

So, do (either of) you know if it's possible to get the elemental damage listed as a dice amount in the body of text describing the weapon's damage (eg, "1d6+1, +1d6 Frost"), or is the best I can hope for "Frostbourn's Wrath, Frost"?

Thanks!!
 
...but, when I tested it, HL threw me this error:
"Condition phase/priority (First/10000) for bootstrap thing 'iFrost' occurs after earliest rule/script (First/5000)"

The error goes away if I set the conditional on the bootstrap to run at First/4999, but that's the dumb solution; I should understand why it was necessary...

Some script behind the scenes is running at First/5000 when the Frost Item Power is added to a weapon. Unfortunately, I have no insight into what that script is. Regardless, your solution isn't dumb..it's correct. If your conditional takes place after the item your bootstrapping is already supposed to have done something, HL won't let you do it. I run into this all the time.

Also, bootstrapping on iFrost didn't have the desired effect anyhow. In fact, I'm not sure the desired effect is even possible... What I'd like is for the damage listing of the weapon on the printed character sheet to say "1d6+1, +1d6 frost". So far, the closest I've seen in mucking about with the custom weapons in HL proper (as opposed to the Editor), is that a weapon with the Frost or Fire (or any other elemental) effect will simply say "+1 Longsword, Frost" in its title, but not list the on-hit damage added by the elemental effect in the body of info listing the damage the weapon can do...

So, do (either of) you know if it's possible to get the elemental damage listed as a dice amount in the body of text describing the weapon's damage (eg, "1d6+1, +1d6 Frost"), or is the best I can hope for "Frostbourn's Wrath, Frost"?

Thanks!!

Currently, the d20 system doesn't have the functionality you are looking for. There is a way to put +1d6 Frost in the weapon's damage, but it is limited. You can use the field wFixDamage, which is a text field so you can enter whatever you want.

However, I only recommend using this technique if the damage dice is never going to change. For example, if you set this field to "1d6+1, +1d6 Frost" and your character becomes the recipient of a "Bull's Strength" or "Enlarge Person" spell, the damage will still read "1d6+1, +1d6 Frost". I have not figured out how to pull the weapon damage and put it into wFixDamage to make this method more versatile.

Have hope, though. I'm certain this is something that Shadow intends to implement in the future.

For the record, you can modify this field thusly:

Code:
field[wFixDamage].text = "1d6+1, +1d6 Frost"
 
Thank-you Sendric!!

I should have said "ignorant," instead of "dumb." I'm not implying that the obvious solution (First/4999) is stupid, just that it would be better for me to understand why it is the solution. But, since it seems that that information is not available... <shrug>

Thank-you for the [wFixDamage] idea. In my searching, I came across this post.
http://forums.wolflair.com/showthread.php?t=55426&highlight=elemental+damage
I think they might be aiming at the same idea and I could maybe combine them? Like, could there be a way to ask HL for the BAB of the PC holding the weapon, and insert that into the text string?
 
Thank-you for the [wFixDamage] idea. In my searching, I came across this post.
http://forums.wolflair.com/showthread.php?t=55426&highlight=elemental+damage
I think they might be aiming at the same idea and I could maybe combine them? Like, could there be a way to ask HL for the BAB of the PC holding the weapon, and insert that into the text string?

That thread is talking about adding a specific amount of damage to an item, which is what the wFixDamage field is for. In this case, you want that damage to be more versatile. In theory, it is possible, but weapon damage is handled through tags, so you would need to create a long script that cycled through the weapons tags and adjusted accordingly. Historically, what I've done is put the additional damage in the weapon name. It's far easier, and perfectly functional until the d20 system gets upgraded.

For the record, you would need to search for the wMain.? tag to determine the weapon's base damage. Then you would want to search for things like Helper.DamageUp/DamageDown, whether it's being held in main, off, or both, and probably some other tags that I'm not thinking of. As you go through, you would need to set a variable, and then at the end use that variable to set wFixDamage.

At least, that's the only way I know to do it. Perhaps someone smarter has a better idea.
 
Ouch. :eek:

um... Ya, that's waaay too complicated for the scope of what I want to achieve. And, it still wouldn't provide the right result... :( Part of the problem is that the additional damage is tied to both the level of the PC and whether or not the ritual for the weapon has been achieved.

I'll list the level-dependant elemental damage as a weapon special, that way it'll at least show up on the character sheet.

Hopefully the d20 system gets that upgrade soon(ish). I guess I'll have to start paying attention to the changelogs! :D

Thank-you for all your help, Sendric!
 
Back
Top