Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

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

Old July 30th, 2013, 02:18 PM
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
Help me Obi Wolf, you're my only hope!

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

Old July 31st, 2013, 06:55 AM
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
bodrin is offline   #12 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old July 31st, 2013, 08:23 AM
For every point of Enhancement Bonus, doesn't hardness increase by 1 and Hp by 10? I don't see that in the screencaps
Aaron is offline   #13 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 31st, 2013, 09:18 AM
Quote:
Originally Posted by Aaron View Post
For every point of Enhancement Bonus, doesn't hardness increase by 1 and Hp by 10? I don't see that in the screencaps
Hardness increases by 2 and HP by 10.

Quote:
Pathfinder table says

1 Add +2 for each +1 enhancement bonus of magic items.
2 The hp value given is for Medium armor, weapons, and shields. Divide by 2 for each size category of the item smaller than Medium, or multiply it by 2 for each size category larger than Medium.
3 Add 10 hp for each +1 enhancement bonus of magic items.
4 Varies by material; see Table: Substance Hardness and Hit Points.
The screen caps were to show what was currently achieved, wrong figures and all, the scripts amended as of today calculate only the BASE MAGIC ITEM hardness and HP correctly, I amended the value mathematics to reflect the Pathfinder CRB.

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

Old July 31st, 2013, 10:50 AM
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.
ShadowChemosh is offline   #15 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old July 31st, 2013, 11:08 AM
Quote:
Originally Posted by ShadowChemosh View Post
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.
Go right ahead, it's in Dropbox ready for tinkering.

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

Old July 31st, 2013, 08:07 PM
Quote:
Originally Posted by bodrin View Post
Go right ahead, it's in Dropbox ready for tinkering.
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:
Originally Posted by bodrin View Post
I just started it as an experiment to see if it was possible.
Enough time and money and I can make the Hero Lab software read my mind.

Quote:
Originally Posted by bodrin View Post
Frustration set in regarding the material issue, then the maths began acting weird.
See everything is possible actually the important question is do you have the time?

Quote:
Originally Posted by bodrin View Post
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.
Its a good idea but I can see a bunch of work in trying to figure out how many handed the weapon is to take into account the base values. Then adding in the special materials and magic bonuses. But that is what is nice about computers to do that number crunching for us lazy humans.

Quote:
Originally Posted by bodrin View Post
Oh and stupid early long work hours are the bane of my life to. :P
Yea no doubt. Combined with 3 days of working with IBM support staff to be told its a "WAD" (Works as Designed). And to have to take a crash course in XA Architecture methodology to figure out why a Java programs J2EE connections are affecting the internal memory pointers for a trigger program. Because of course it makes perfect sense that an external process can mess with the Internal Memory Pointers that are getting lost which causes the programs to crash. Yea right that does not sound like a bug at all IBM!!!!

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

Old July 31st, 2013, 09:10 PM
Quote:
Originally Posted by ShadowChemosh View Post
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

Enough time and money and I can make the Hero Lab software read my mind.
I knew it had to test for the eAdamant ability, see the first code efforts using
#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:
Its a good idea but I can see a bunch of work in trying to figure out how many handed the weapon is to take into account the base values. Then adding in the special materials and magic bonuses. But that is what is nice about computers to do that number crunching for us lazy humans.
Which is why I wanted to code it, I'd already realised that we'd need to test for Size, Material, Weapon Class, Handedness and hafted. Custom tags forwarded from a bootstrapped ability to add the needed values were going to be my solution.

Quote:
Yea no doubt. Combined with 3 days of working with IBM support staff to be told its a "WAD" (Works as Designed). And to have to take a crash course in XA Architecture methodology to figure out why a Java programs J2EE connections are affecting the internal memory pointers for a trigger program. Because of course it makes perfect sense that an external process can mess with the Internal Memory Pointers that are getting lost which causes the programs to crash. Yea right that does not sound like a bug at all IBM!!!!

blah! I think its time to get some sleep.
In that case I'd have declared Pimms 'o Clock

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

Old July 31st, 2013, 09:16 PM
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
bodrin is offline   #19 Reply With Quote
Portilis
Senior Member
 
Join Date: Feb 2013
Location: Blandford, UK
Posts: 164

Old February 24th, 2014, 04:19 AM
Thread necromancy!

Bodrin, did you ever get this all working? If you did, I'd be rather interested in it
Portilis is offline   #20 Reply With Quote
Reply


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 12:11 PM.


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