Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 28th, 2013, 11:54 AM
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
which compiles but I get this error when HL loads

HTML Code:
Attempt to access field 'arBonus' that does not exist for thing 'pBodObHdHp'
Likewise same error if I substitute arBonus with tACArmor.
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
bodrin is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old July 28th, 2013, 02:09 PM
Quote:
Originally Posted by bodrin View Post
Code:
~ Lets multiply our armor bonus by 10 which should give us our HP total
  field[abValue].value += round(field[arBonus].value * 10,0,-1)
Your problem is on this line in the bolded section. You didn't give any transition so HL is looking for arBonus on the adjustment itself (thingid.pBodObHdHp). Basically your saying hero.child[pBodObHdHp].field[arBonus].value which an adjustment does not have that field.

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.
ShadowChemosh is offline   #2 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 28th, 2013, 02:47 PM
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
bodrin is offline   #3 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 28th, 2013, 03:19 PM
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.
risner is offline   #4 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 28th, 2013, 08:57 PM
Quote:
Originally Posted by risner View Post
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.
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
bodrin is offline   #5 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 30th, 2013, 09:14 AM
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
I can't get the above red code to apply the special material Hp and Hardness values (20 Hardness / 40 HP)

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.
bodrin is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old July 30th, 2013, 09:40 AM
#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.
Mathias is offline   #7 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 30th, 2013, 09:55 AM
Quote:
Originally Posted by Mathias View Post
#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.
I've checked the tags on the weapon and I saw ability.eAdamant so I presumed #hasability would check for the eAdamant tag.

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
bodrin is offline   #8 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old July 30th, 2013, 12:04 PM
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.
ShadowChemosh is offline   #9 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 30th, 2013, 01:02 PM
Quote:
Originally Posted by ShadowChemosh View Post
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.
Will do, thanks for the heads up.

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
bodrin 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 01:52 AM.


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