Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
draco963
Member
 
Join Date: Jul 2015
Location: Ottawa
Posts: 58

Old May 29th, 2017, 10:46 PM
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.
draco963 is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old May 30th, 2017, 03:48 AM
Quote:
Originally Posted by draco963 View Post
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.
Sendric is offline   #2 Reply With Quote
draco963
Member
 
Join Date: Jul 2015
Location: Ottawa
Posts: 58

Old May 30th, 2017, 01:40 PM
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.
Attached Images
File Type: jpg Untitled-1.jpg (248.5 KB, 34 views)
draco963 is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 30th, 2017, 02:16 PM
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
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.

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.
ShadowChemosh is offline   #4 Reply With Quote
draco963
Member
 
Join Date: Jul 2015
Location: Ottawa
Posts: 58

Old May 31st, 2017, 03:32 AM
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?
draco963 is offline   #5 Reply With Quote
draco963
Member
 
Join Date: Jul 2015
Location: Ottawa
Posts: 58

Old May 31st, 2017, 03:37 AM
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?
draco963 is offline   #6 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old May 31st, 2017, 04:35 AM
Quote:
Originally Posted by draco963 View Post
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.
Sendric is offline   #7 Reply With Quote
draco963
Member
 
Join Date: Jul 2015
Location: Ottawa
Posts: 58

Old May 31st, 2017, 06:52 PM
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!!
draco963 is offline   #8 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old June 1st, 2017, 04:38 AM
Quote:
Originally Posted by draco963 View Post
...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.

Quote:
Originally Posted by draco963 View Post
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"
Sendric is offline   #9 Reply With Quote
draco963
Member
 
Join Date: Jul 2015
Location: Ottawa
Posts: 58

Old June 2nd, 2017, 09:50 AM
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?
draco963 is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:50 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.