Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
I need this calculation to show up in the Specials tab.
Quote:
I tried to do the Automatic Calculations but that shows a flat value instead of the 1d20+ part that I want. I also can't create a custom tag that says "sp/day." I found one for GP but not for SP and I can't use the "/" in my new tag. Any suggestions? |
|
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Post-Attributes/10000
Code:
~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] <> 1) ~ If we've been Disabled, get out now doneif (tagis[Helper.SpcDisable] <> 0) ~ Calc bonus of level + Intelligence modifier field[trkMax].value += field[xTotalLev].value + #attrmod[aINT] ~ Set live name to be 1d20+Bonus sp/day field[livename].text = field[name].text & " d20" & signed(field[trkMax].value) & " sp/day" 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. |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
That worked much better than I was doing. Thanks.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
So as I said, that worked beautifully. I didn't think about two discoveries that would have an impact on this. Here they are:
================= Noble Metamorphosis: The alchemist has discovered one of the secrets of easier, and more profitable, metamorphosis. When using base metamorphosis, the alchemist creates a volume of material with a value equal to double his class level + his Intelligence modifier in sp each day. An alchemist must be at least 6th level before selecting this discovery. So here's the code I am using: ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] <> 1) ~ If we've been Disabled, get out now doneif (tagis[Helper.SpcDisable] <> 0) ~ Calc bonus of level + Intelligence modifier field[trkMax].value += field[xTotalLev].value *2 + #attrmod[aINT] ~ Set live name to be 1d20+Bonus sp/day field[livename].text = field[name].text & " d20" & signed(field[trkMax].value) & " sp/day" ================= Royal Metamorphosis: The alchemist has discovered all the secrets of easier, and more profitable, metamorphosis. When using base metamorphosis, the alchemist creates a volume of material with a value equal to five times his class level + his Intelligence modifier in sp each day. An alchemist must have noble metamorphosis and be at least 12th level before selecting this discovery. ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] <> 1) ~ If we've been Disabled, get out now doneif (tagis[Helper.SpcDisable] <> 0) ~ Calc bonus of level + Intelligence modifier field[trkMax].value += field[xTotalLev].value *5 + #attrmod[aINT] ~ Set live name to be 1d20+Bonus sp/day field[livename].text = field[name].text & " d20" & signed(field[trkMax].value) & " sp/day" Both are showing up exactly as they should but there is one problem. They should replace the previous ability. I tried to have it Append Reference Information but that doesn't seem to do what I thought it would. I thought it would replace the old ability with the new one. So how do I go about having these replace the lower options? |
#4 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Have each ability assign Helper.SpecUp to the previous version.
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I would recommend studying up on the tutorials. There's a very similar issue that's covered there. In the editor, select the Help menu, then "Help on Using the Editor". Then, follow the "Adding the Alchemist (Tutorial 7)" link, and then "Class Specials, part 4: poisoning and being poisoned". There, it discusses how to build a class ability that changes its name as the character gains levels in that class.
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
Thanks. I will check that out. Coincidentally this has to do with adding abilities to the alchemist.
|
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: May 2010
Location: Mountlake Terrace, Washington
Posts: 407
|
I'm more confused now than before. I'll have to try to look at it after work.
|
#8 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Mathias, I think that tutorial is for class abilities, isn't it? I believe blzbob is adding new discoveries, which are custom class abilities, so each added ability is unique rather than being a new bootstrapped copy of the same class ability.
|
#9 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Blzbob, there are 2 ways to handle this I see. Have the custom class ability be a single thing added multiple times but have only 1 show and change it's livename appropriately (similarly to the deadly range rogue trick). The other way is a bit more simple, have 3 different abilities, and have each hide the previous one. That's the method I'd recommend below.
Say the unique Ids of your things are cAlcMeta1 (the first one), cAlcMeta2 (the second one) and cAlcMeta3 (the last one). Of course, just replace these unique IDs with your own. cAlcMeta1 does not need any changes. On cAlcMeta2 add the following eval around post level 10000: Code:
perform hero.childfound[cAlcMeta1].assign[Helper.SpecUp] perform hero.childfound[cAlcMeta1].delete[User.Tracker] hero.childfound[cAlcMeta1].field[trkMax].value = 0 |
#10 |
|
|