Junior Member
Join Date: Jun 2016
Posts: 25
|
Ok, maybe I am approaching this the wrong way.
This is what I tried to do: I have tried to take an existing script and apply it to a new special ability and I have no success. Part of the reason is I do not understand the foreach, eachpick and nexteach arguments and how those arguments work, also the script i was trying to modify is dependant an a feat and its activation to work. In simple terms this what I am looking to accomplish: A special ability that sets the value of arcane spell failure to zero if light armor is worn. I don't know if if an abValue can be set to zero or it just needs a number to modify it. If it can be set to zero, what is the argument for that? If it cannot be set to zero then the logical choice would be to set the abValue to a - of the max value for arcane spell failure for light armor which would be 20. |
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
WSG123, there's nothing wrong with the copy and modify approach. Keep going.
But if you want us to help, you need to work on explaining what point you're at, and what problems you're having. Posting your code is a very helpful thing to do, in terms of letting us see what you're working on. Because in your last post, you talk about changing abValue, but you also talk about changing the arcane spell failure, and those are two different things. So I don't understand what problem you're currently trying to solve. |
#12 |
Junior Member
Join Date: Jun 2016
Posts: 25
|
So, poking around looking for a better script to use, I noticed there is a selection under each class called Ignore Spell Failure from... if you check the edit button, you get the obligatory Warning, this is part of a supplement... message, but the dialogue box that open contains 4 check boxes, the first of which is "None from light armor" if you hover over the ? it reveals CastArmor.Light
Is there a scrip I can write that will enable this ability in the class Arcanist when the Arcane Exploit i have created Armored Caster is chosen in the Hero's sheet? |
#13 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
perform linkage[table].assign[CastArmor.Light]
I believe is the script that would add that, probably like post-levels 5000 |
#14 |
Junior Member
Join Date: Jun 2016
Posts: 25
|
Hi Andrew, that worked perfectly.
I tested it two ways, 1. I deleted the Arcane Exploit and the Arcane Spell Failure value went to its normal amount. 2. I equiped a suit of heavy armor un-equipping the light armor and the Arcane Spell failure returned to the correct value. Now to finish the Arcane Exploit so it will work as worded would I start creating an If statement and have the value of how many times the Exploit is selected to then assign the next variable? If (hero.tagis[Armored Caster] = 2) then perform linkage[table].assign[CastArmor.Meduim] Endif |
#15 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Write a series of if/thens, each of which checks for the presence of a CastArmor tag, and if it is present apply the next higher one.
Code:
if (linkage[table].tagis[CastArmor.Medium] <> 0) then perform linkage[table].assign[CastArmor.Heavy] elseif (linkage[table].tagis[CastArmor.Light] <> 0) then perform linkage[table].assign[CastArmor.Medium] else perform linkage[table].assign[CastArmor.Light] endif |
#16 |
|
|