Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
I am trying to create two custom abilities. The first one adds damage reduction the second adds acid resistance. I don't get any errors but neither adds the DR or acid resistance to the character. Any suggestions would be hot. Thanks in advance.
final phase/10500 Code:
~These calculations should only happen for the first copy doneif (tagis[Helper.FirstCopy] = 0) ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) field[abValue].value += field[xCount].value #applydr[xDamRd, field[abValue].value] Code:
#applydr[xDamRsAcid, hero.child[aCON].field[aModBonus].value] |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Is the concept for the DR one suppose to be the number of times you take this custom ability increases the amount by one? If so As DR only applies the highest one you can just use the following script: Code:
#applydr[xDamRd,field[xIndex].value] Actually just looked at the DR ability and they do all their calculations at Final/10000 so if your running Final/10500 your after the the value is calculated. Move it back to Final/1000 in that case. 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
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
What I ended up doing is set up three different abilities that could be chosen at different levels. The field[xIndex].value actual sets the value to whatever level the ability was added. So that if you add the ability at 5th level it gives you (dr 5/-). Since the ability could only be chosen three times (adding 1 to the dr each time) it was just easier to create three separate abilities, especially since the dr is equal to the highest dr.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
xIndex controls the value of which Pick we are on the hero. So if you add the same Custom Ability three times xIndex will be 1,2,3 based on which Pick your looking at. Nothing in HL controls or stores the level when it was added to the hero as that info is lost the second you change anything and every script fires over again. 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 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
Well for whatever reason when I added it at fifth level it gave me dr 5, when i added at third level it gave me dr 3. So I assumed it was counting the level that it was added. This was with the ability being added to the hero once.
|
#5 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
So this is resolved now?
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
I am curious if you know how/why xIndex would suddenly hold the level when it became a "Pick"? I tried everything I could think of and xIndex for me always held the "Instance" number it was added to the hero.
So I added it once it was 1, second time it was 2, third time it was 3....... Any thoughts? 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. |
#7 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
You've got it correct as far as I understand it, Shadow. Perhaps he bootstrapped 1 copy of this class ability at each level? Without looking at his file, I'm only guessing.
|
#8 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
I will look at what I did. I don't think I bootstrapped anything to it, maybe something else was going on. To be honest it was quite late (or early) and I was tired and frustrated.
|
#9 |
Senior Member
Join Date: Jan 2011
Location: Flint, MI
Posts: 100
|
I figured out what was going on. It is counting the number of abilities added whether they are that custom ability or other custom abilities. If I only choose that particular ability it works fine. The problem is that I have multiple abilities to choose from, and when I add different ones it causes the index to increase by one. How do I get it to count only instances of that particular custom ability?
Or rather it indexes the number that that particular ability is when added (1st, 2nd, or 3rd, and so on). So if it was the first added it works fine until you try to add it again as the third ability. Last edited by mbran01; March 14th, 2013 at 05:11 AM. |
#10 |
|
|