Member
Join Date: Jul 2015
Location: Ottawa
Posts: 58
|
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 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. |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,144
|
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.
|
#2 |
Member
Join Date: Jul 2015
Location: Ottawa
Posts: 58
|
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... 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. RichMod 2017-05-29.user Thank-you Sendric. |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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:
debug "Running" ~ -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 debug "Hit Dice Count: " & hero.tagcount[Hero.HitDice] if (hero.tagcount[Hero.HitDice] >= 6) then debug "In IF" hero.child[cHelpWiz].field[cSplSaveDC].value -= 1 debug "Wiz Save DC:" & hero.child[cHelpWiz].field[cSplSaveDC].value endif Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#4 |
Member
Join Date: Jul 2015
Location: Ottawa
Posts: 58
|
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? |
#5 |
Member
Join Date: Jul 2015
Location: Ottawa
Posts: 58
|
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? |
#6 |
Senior Member
Join Date: Jul 2010
Posts: 3,144
|
Quote:
Code:
doneif (field[gIsEquip].value = 0) |
|
#7 |
Member
Join Date: Jul 2015
Location: Ottawa
Posts: 58
|
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!! |
#8 |
Senior Member
Join Date: Jul 2010
Posts: 3,144
|
Quote:
Quote:
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" |
||
#9 |
Member
Join Date: Jul 2015
Location: Ottawa
Posts: 58
|
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/showthrea...emental+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? |
#10 |
Thread Tools | |
Display Modes | |
|
|