Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Armor Hit Point adjustment (http://forums.wolflair.com/showthread.php?t=45045)

bodrin July 28th, 2013 11:54 AM

Armor Hit Point adjustment
 
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.:confused:

ShadowChemosh July 28th, 2013 02:09 PM

Quote:

Originally Posted by bodrin (Post 161590)
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


bodrin July 28th, 2013 02:47 PM

Can't see the wood for the trees sometimes. :o

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!:cool:

risner 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.

bodrin July 28th, 2013 08:57 PM

Quote:

Originally Posted by risner (Post 161597)
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 :rolleyes:

bodrin July 30th, 2013 09:14 AM

Hit Point and Hardness Adjustment
 
2 Attachment(s)
Attachment 2396Attachment 2395

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.
:cool:

Mathias 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.

bodrin July 30th, 2013 09:55 AM

Quote:

Originally Posted by Mathias (Post 161725)
#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?

ShadowChemosh 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.

bodrin July 30th, 2013 01:02 PM

Quote:

Originally Posted by ShadowChemosh (Post 161739)
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.:)


All times are GMT -8. The time now is 02:29 AM.

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