Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
weapon HP error 2.JPG
Well almost, Its applying the correct HP and Hardness value, however all the time. Regardless of Material too. Script follows 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) ~ Set up some variables to use later Var ObjHardB as Number Var ObjHpB as Number Var ObjHard as Number Var ObjHp as Number Var ObjSize as Number ~ Now lets check our material if (hero.childlives[eAdamant] <> 1) then ObjHard += ObjHard + 20 ObjHp += ObjHp + 40 endif ~ 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 use abValues to store the value field[abValue2].value += ObjHard field[abValue].value += ObjHp ~ Now lets add to the Hit point total to our name field[pChosen].chosen.field[livename].text &= field[livename].text & " HP " & field[abValue].value ~ Now lets Show our Hardness total on our name field[pChosen].chosen.field[livename].text &= field[livename].text & " Hardness " & field[abValue2].value 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
|
#11 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Still having problems trying to get this to work so i'm leaving it as a work in progress.
It calculates the Base HP and Hardness values of Magic Armor and Weapons only, but at least its a start! weapon Hp and Hardness.JPG armor HP and Hardness.JPG 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
|
#12 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
For every point of Enhancement Bonus, doesn't hardness increase by 1 and Hp by 10? I don't see that in the screencaps
|
#13 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
Quote:
Copy and paste is my enemy sometimes. 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
|
||
#14 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
I will take a look at this when I can Bodrin as I think it would make a nice adjustment for many groups. I just worked stupid long hours yesterday and honestly didn't feel like turning on the PC when I got home.
I may get time tonight to look hopefully. 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. |
#15 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
I just started it as an experiment to see if it was possible. Frustration set in regarding the material issue, then the maths began acting weird. Many work arounds later I thought, "to much time is being spent basically trying to get functionality that is easy to calculate once the base values are known, so revert the code just to display Base Values!" Behold Bodrins unfinished symphony No 1. Oh and stupid early long work hours are the bane of my life to. :P 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
|
|
#16 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Ok here is the code you need to see if a special material is on the weapon or not.
Code:
~ If adamantine add 40 hit points and 20 hardness If (field[pChosen].chosen.tagis[Ability.eAdamant] <> 0) Then field[abValue].value += 40 field[abValue2].value += 20 Endif Quote:
Quote:
Quote:
blah! I think its time to get some sleep. 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. |
|||
#17 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
#hasability macro. That didn't work and from that error the code path began its dark and twisted route. Curse you twisted route, you're a twisty turny thing that twists and turns like a twisty turny thing in the twisted turning parade.: Quote:
Quote:
WAD? I thought that was "Where's all the Data?" aka Doom / Quake files. 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
|
|||
#18 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
And I would love to have the code fu skills to make HL read my mind.
I even made a pretty flow chart with variable nodes and branches this time to show the data route. That's how deadly experimental I was to get this to work. 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
|
#19 |
Senior Member
Join Date: Feb 2013
Location: Blandford, UK
Posts: 164
|
Thread necromancy!
Bodrin, did you ever get this all working? If you did, I'd be rather interested in it |
#20 |
|
|