• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Arcane Spell Failure

DeltaMasterMind

Well-known member
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?
 
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:
var arc as number
foreach pick in hero from BaseArmor where "Hero.EqpArmor"
arc = eachpick.parent.tagvalue[ArmorArcFl.?]
nexteach
 
Last edited:
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.?]
 
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.
 
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.
 
This post is for anyone else who comes later to review this thread:
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:
Back
Top