Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old December 13th, 2016, 01:37 PM
I seem to be having trouble calling from this field (basically I can't find the proer reference info). Anyone know what I need to use to pull this value into a script?
DeltaMasterMind is offline   #1 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old December 13th, 2016, 02:00 PM
Can someone explain the best way to acquire the Arcane Spell Failure total?

I am currently doing attempting it within a class special via script and I am lost. I am using this:
Quote:
var arc as number
foreach pick in hero from BaseArmor where "Hero.EqpArmor"
arc = eachpick.parent.tagvalue[ArmorArcFl.?]
nexteach

Last edited by DeltaMasterMind; December 13th, 2016 at 02:28 PM.
DeltaMasterMind is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,730

Old December 13th, 2016, 02:44 PM
Quote:
Originally Posted by DeltaMasterMind View Post
Can someone explain the best way to acquire the Arcane Spell Failure total?

I am currently doing attempting it within a class special via script and I am lost. I am using this:
I am not near HL but the "parent" looks wrong because only a Gizmo has a parent to work from.

I think the value by the way is stored as a field on armor. But to use the tag:
Code:
var arc as number
foreach pick in hero from BaseArmor where "Hero.EqpArmor"
  arc = eachpick.tagvalue[ArmorArcFl.?]
nexteach
Should work but maybe better to use a findchild as you "hope" to only get one worn suite of armor. Also your not listing your timing of your script. Sense your going after the "Hero.EqpArmor" tag and your on a class special I assume your at least Post-Level/10000?

If too early the Hero.EqpArmor tag will not be present on the armor.

Code:
~ If we are not wearing anymore get out now!
doneif (hero.tagis[Hero.EqpArmor] = 0)

~ Set our focus pointer to the currently equipped armor
perform hero.findchild[BaseArmor,"Hero.EqpArmor"].setfocus

~ if we don't have an equipped armor, there's nothing we can do
doneif (state.isfocus = 0)

~ Get the tag value
field[abValue].value += focus.tagvalue[ArmorArcFl.?]

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   #3 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old December 13th, 2016, 03:15 PM
Perfect! That did it and I decided to follow your latter example.
DeltaMasterMind is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,169

Old December 13th, 2016, 03:30 PM
Take another look at the fields on armor - that tag only stores the original arcane failure chance, not the current value. For example, test your script with the Arcane Armor Training feat present and turned on - the tag doesn't change, because that only stores the base value for that type of armor, but there's a failure chance field that does change when that feat is turned on.
Mathias is offline   #5 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old December 13th, 2016, 04:10 PM
Thanks for the advice on this problem Mathias! You definitely nailed that on the head and glad you did otherwise that would be trouble later on. The script I am running creates a percentage of failure rate based on all arcane spell failure percents and reductions from certain skills and now that you brought that up those feats will help out in this endeavor. It is needed to because it isn't easy to get the numbers low enough that the players can feel at ease.
DeltaMasterMind is offline   #6 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old December 13th, 2016, 04:37 PM
This post is for anyone else who comes later to review this thread:
Quote:
Post-Levels / timing: 10000
foreach pick in hero where "EquipType.Armor"
if (eachpick.field[gIsEquip].value <> 0) then
field[abValue2].value = maximum(eachpick.field[arArcFail].value,0)
endif
nexteach
field[abValue2].value += 75
This way even if the player sets up a feat to drop the Arcane spell failure below the Armor Spell Failure chance they won't get an additional bonus.

Last edited by DeltaMasterMind; December 13th, 2016 at 04:39 PM.
DeltaMasterMind is offline   #7 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 11:09 PM.


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