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
gwydion2
Junior Member
 
Join Date: Sep 2010
Location: Cardiff, UK
Posts: 10

Old July 30th, 2015, 04:50 AM
I'm trying to create a class abilty similar to armour training, but adding AC to the armour and not giving the ability to move at normal speed.
Obviously I started with copying Armour training and modified from there.
I removed the speed adjustment portion and looking at the relevant area of scripting for armour check and max dex, I tried a simple approach first, adding the lines in red below.

Quote:
field[abValue].value += field[xCount].value
field[abValue2].value += field[xCount].value
field[abValue3].value += field[xCount].value

~ Improve the armor check penalty and max dex stats of our armors.
foreach pick in hero from BaseArmor where "EquipType.Armor"
eachpick.field[arArmorChk].value += field[abValue].value
eachpick.field[arMaxDex].value += field[abValue2].value
eachpick.field[tACArmor].value += field[abValue3].value
This didn't work, but when I replaced
[tACArmor] with [arBonus]
it did work, but not quite how I wanted it.
This increased the armour value of any armour by 1 but also increased the hero's natural armour bonus by 1 (per training level).

This seems to be getting somewhere, making me think I'm close to the answer, but I'm not sure how to fix it so the armour AC increases but not natural armour.
gwydion2 is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old July 30th, 2015, 05:11 PM
Try adding a debug within your foreach, to make it clear all the items which are being iterated through.

Code:
foreach dadadadadaWHATEVER
  debug "The currently iterated pick is " & eachpick.idstring
  nexteach
To see debug messages, go to "Develop -> Enable Data File Debugging", and then go to "Develop -> Floating Info Windows -> Show Debug output"

I think you'll find one of the picks your foreach is finding is incorrect. Once you have found that pick's unique ID, you can go to "Develop -> Floating Info Windows -> Show Pick Tags" and select the errant pick in the window that shows up. What tags are on that pick but not the armors you should be foreaching through? Once you know the tags unique to the wrong thing, you can modify your foreach to exclude that wrong thing.

Hope that helps!
Aaron is offline   #2 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 06:48 AM.


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