Member
Join Date: Sep 2008
Posts: 48
|
I am trying to implement an adjustment for the spell Holy Aura which gives, among other things, SR 25 vs evil spells.
I would like an item to show up in the Specials tab when the adjustment is enabled, but I can figure out how to set the condition correctly on the bootstrap in the Adjustment so that it shows/hides when the adjustment is enabled/disabled Any thoughts? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Actually, there's something helpful hidden in the SR special (and the various damage resistance/reduction and movement (ex: flying speed) specials) - they won't show themselves unless they have a value set. (I think it's the line in their scripts; "call CalcValue", which calls a function that hides them).
So, all you need to worry about is setting the value only if the special is enabled. Final,100: if (field[hIsOn1].value <> 0) then #applysr[25] endif Since I have needed to set a bootstrap condition for things like the psionic item Skin of the Claw, which adds a natural attack when activated: fieldval:hIsOn1 <>0 BTW, field[hIsOn1] refers to "Charge Effect 1". Use hIsOn2 for "Charge Effect 2" |
#2 |
Member
Join Date: Sep 2008
Posts: 48
|
OK, this got me closer...
If I use the default SR pick (xSplRs) this works great. However, for various reasons I am not going to bore you with, I need to create a new special which was duplicated from the default SR special. The applysr macro relies on having that specific pick boostrapped. How can I duplicate the effect of the applysr macro for my new special? |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
hero.childfound[whatever].field[value].value = 25
or, if you're worried about two things setting the value: hero.childfound[whatever].field[value].value = maximum(25, hero.childfound[whatever].field[value].value) |
#4 |
Member
Join Date: Sep 2008
Posts: 48
|
Sweet!
Had to change the case of the Value field, but other than that it worked perfectly. Thanks! |
#5 |
Member
Join Date: Sep 2008
Posts: 48
|
Woops - here's another one...
Tenser's Transformation grants the feats Simple Weapons (all) and Martial Weapons (All), how do I make these feats show up only if the adjustment for the spell is enabled? Right now they show up if the adjustment is on the character - whether it is enabled or not. (Yes, I *am* writing adjustments for all the spells... ) |
#6 |
Senior Member
Lone Wolf Staff
Join Date: Dec 2008
Posts: 4,690
|
You can add a condition to the bootstrap. Each adjustment has a field (pIsOn) for whether it's active or not; you can use that as part of the bootstrap condition for the feat:
Code:
fieldval:pIsOn > 0 |
#7 |
Member
Join Date: Sep 2008
Posts: 48
|
Works great! Thanks Colen!
|
#8 |
|
|