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)
-   -   Arcane Spell Failure (http://forums.wolflair.com/showthread.php?t=57207)

DeltaMasterMind December 13th, 2016 01:37 PM

Arcane Spell Failure
 
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 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

ShadowChemosh December 13th, 2016 02:44 PM

Quote:

Originally Posted by DeltaMasterMind (Post 239601)
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.?]


DeltaMasterMind December 13th, 2016 03:15 PM

Perfect! That did it and I decided to follow your latter example.

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

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


All times are GMT -8. The time now is 05:19 PM.

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