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
WGS123
Junior Member
 
Join Date: Jun 2016
Posts: 25

Old August 25th, 2016, 07:02 AM
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.
WGS123 is offline   #11 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old August 25th, 2016, 07:17 AM
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.
Mathias is online now   #12 Reply With Quote
WGS123
Junior Member
 
Join Date: Jun 2016
Posts: 25

Old August 25th, 2016, 08:35 AM
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?
WGS123 is offline   #13 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old August 25th, 2016, 09:20 AM
perform linkage[table].assign[CastArmor.Light]

I believe is the script that would add that, probably like post-levels 5000
AndrewD2 is offline   #14 Reply With Quote
WGS123
Junior Member
 
Join Date: Jun 2016
Posts: 25

Old August 25th, 2016, 09:42 AM
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
WGS123 is offline   #15 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old August 29th, 2016, 10:12 AM
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
Aaron is offline   #16 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 12:55 PM.


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