Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
I'm trying to develop an adjustment that shows the Hit point total of a selected armor.
I've managed to create this Final Phase 10000 Code:
~ If we're not enabled, get out now doneif (field[pIsOn].value = 0) ~ Lets multiply our armor bonus by 10 which should give us our HP total field[abValue].value += round(field[arBonus].value * 10,0,-1) ~ Now lets add to the Hit point total to our name field[livename].text &= "Armor HP " & field[abValue].value HTML Code:
Attempt to access field 'arBonus' that does not exist for thing 'pBodObHdHp' Any suggestions. Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
So I assume you set the selection menu to armor so you would want to change the script to the following: Code:
~ If we're not enabled, get out now doneif (field[pIsOn].value <> 1) ~ If nothing chosen, get out now doneif (field[pChosen].ischosen <> 1) ~ Lets multiply our armor bonus by 10 which should give us our HP total field[abValue].value += round(field[pChosen].chosen.field[arBonus].value * 10,0,-1) ~ Now lets add to the Hit point total to our name field[pChosen].chosen.field[livename].text &= "Armor HP " & field[abValue].value 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: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Can't see the wood for the trees sometimes.
I'd tried pChosen earlier but discarded the code due to numerous errors on compile. I was tinkering with the code and just trying to get it to compile first! Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
It is interesting that HL doesn't currently display this, but for the most part you usually need to know HP for NPC items more often than PC. GM's don't frequently Sunder PC items, but PC do GM's NPC items.
|
#4 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Unless that GM is a *cough* slightly vindictive *cough* GM that likes to see players gawp at the unexpected audacity. /Evil Grin
Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#5 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
weapon.JPGarmor HP.JPG
Okay I have something working but I just can't quite get it correct. Heres some of the code i'm using and a screenshot of current state. Code:
~ Set up some variables to use later Var ObjHard as Number Var ObjHp as Number Var ObjSize as Number ~ Set the Variables to 0 as a base number ObjHard = 0 ObjHp = 0 ObjSize = 0 ~ Lets multiply our weapon bonus by 10 and 2 for each +1 enchantment field[abValue].value += round(field[pChosen].chosen.field[wBonus].value * 10,0,-1) field[abValue2].value += round(field[pChosen].chosen.field[wBonus].value * 2,0,-1) ~ Now lets check our material if (#hasability[eAdamant] = 1) then ObjHard = 20 ObjHp = 40 endif What am I missing??? Should I be checking the weapon / armor Gizmo? Also notice the Non Magical Longsword in the Screenshot HP 0 Hardness 0 so just a minor annoyance there. But notice the Armor HP total which currently displays (almost) correctly. Hardness code to be applied after the weapon scripts are working properly. Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
Last edited by bodrin; July 30th, 2013 at 09:21 AM. Reason: Added Weapon and Armor Pictures. |
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
#hasability[] is a function that looks at abilities on the hero. You need to look at this particular item to see if it's adamantine.
|
#7 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
The only other thing I can see is wMagMat which relates to the material. Is this something I ought to investigate? Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
|
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
In the SGG community data set their is a bunch of special magic powers that only go on to Dragonhide armor. Its like the 5 bullet point Dragonhide file. I have the checks correctly looking for the presence of the special material Dragonhide.
You could look that up for reference if you want. 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. |
#9 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
|
#10 |
Thread Tools | |
Display Modes | |
|
|