• 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

Disabling Situational Bonuses

tcharleschapman

Well-known member
Hi Everyone,

How would you code to have one thing disable the situational bonuses of another thing.

For example, High Jump provides a situational bonus to Acrobatics. I want that removed by another thing.

I tried basing it off of the script for Improved evasion.

Code:
      ~once we're shown, the basic evasion ability doesn't need to be displayed
      perform hero.childfound[cEvasion].assign[Helper.SpecUp]

Something tells me I'm going the wrong direction, though.
 
If your trying to totally disable the ability you could do the following. You want to assign the "Helper.SpcDisable" tag to class ability.
Code:
      ~once we're shown, the basic evasion ability doesn't need to be displayed
      perform hero.childfound[cEvasion].assign[Helper.SpcDisable]
 
Tried the [bold]"Helper.SpcDisable"[/bold] as listed in the code provided by ShadowChemosh. That really didn't work. My original way at least removed it from the specials list. The code you provided left it there but said "Requirements not met".

AndrewD2, not sure what you are asking. My original thing, a Class Special, provides the following:

Code:
#situational[hero.child[skAcrobat],"+5 to Jump checks",field[thingname].text]

But, when I reach a higher level and the second thing, another Class Special, kicks in, I want it to say "+10 to Jump Checks" and I want the original thing to disappear.
 
why not do it as

Code:
if (field[xAllLev].value >= HIGHERLEVEL) then
  field[abValue].value += 10
else
  field[abValue].value += 5
endif

#situational[hero.child[skAcrobat], signed(field[abValue].value) & " to jump checks.", field[name].text]
 
Now, I have another one. For perception I want the first one to say:

"Cut penalties in half for unfavorable conditions due to fog, rain, or other weather."

Then:

"Take no penalties for unfavorable conditions due to fog, rain, or other weather."

I don't think I can use the same field[abValue] script.
 
Oh ok you want a class special that levels with the class. This is done the same way say a Fighter's Fear bonus is done. But instead of giving a +1 bonus you want to give a +5 bonus. The below script does not care what levels you bootstrap the special at. This allows you to use the same script logic over and over again as the Level is taken care of when you bootstrap. So in this case we will assume you bootstrap your class special twice to the class and set for both level 3 and level 8.

You want to think in more "soft-coded" ideas instead of hard-coded. Having the bonus be part of the text you want to add is hard-coding. By having the value be in a variable you are soft-coding it and allow it to adjust as the class levels.

Post-Levels/10000
Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] <> 1)
~ if we've been disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)
~ only perform the rest on the first copy
doneif (tagis[Helper.FirstCopy] <> 1)

field[abValue].value += field[xCount].value * 5

~ Set the situational text on Acrobatics
#situational[hero.child[skAcrobat],signed(field[abValue].value) & " to Jump checks",field[name].text]
~ Set live name
field[livename].text = field[thingname].text & " " & signed(field[abValue].value)
This script does not care what levels you attach it too. It does not care what class. It does not care even what the name of the Class Ability is. The only part that is hard-coded is that you get +5 bonus each time it shows up in the class leveling.

The reason we want to use abValue is so that outside Things can affect this class.

For example lets say we have a feat that gives a +4 bonus to this class ability. We can adjust the abValue from the feat at timing at Post-levels/9000 and that value will be increased then. This is also why you always do += and not =.

Post-Levels/9000
Code:
~ Give +4 bonus to the Class Special
hero.findchild[BaseClSpec,"thingid.MY_CLASS_SPECIAL_ID & Helper.ShowSpec & Helper.FirstCopy"].field[abValue].value += 4
 
Now, I have another one. For perception I want the first one to say:

"Cut penalties in half for unfavorable conditions due to fog, rain, or other weather."

Then:

"Take no penalties for unfavorable conditions due to fog, rain, or other weather."

I don't think I can use the same field[abValue] script.
The key is to use the xCount value from the script above. Try and modify my script so that it sets the correct text and without putting in the class level in the script....
 
Back
Top