• 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

conditional ability on the specials list...

drakahn99

Well-known member
trying to get an ability that will add show in the specials list that you may prepare/cast a silent spell without the level adjustment 1/day "if the character also has the silent spell feat, this goes with the wisperium language in midgard setting. ideally i would like to to turn off show in specials and inplay tab under tracked resources but no where close to an idea what to code for turning off that, so working on an alternative to change the text depending on if the feat <> 0.

using this code. however when testing/compiling i get a syntax error source.fSilentSpl not defined

if (hero.tagis[source.fSilentSpl] <> 0) then
field[abSumm].text = "You may prepare or spontaneously cast a silenced spell without the normal corresponding level adjustment"
else
field[abSumm].text = " "
endif
 
using this code. however when testing/compiling i get a syntax error source.fSilentSpl not defined

if (hero.tagis[source.fSilentSpl] <> 0) then
field[abSumm].text = "You may prepare or spontaneously cast a silenced spell without the normal corresponding level adjustment"
else
field[abSumm].text = " "
endif
Feats are well feats not sources. A source is something you check mark in the "Configure Your Hero" window. In this case to check for a feat use the built in macro #hasfeat[] instead as its allot easier.

My advice would be to watch the four Intro videos to the HL Editor. Video #3 goes into how to find Tags and Fields and you appear to really need to be getting to that info.

Also controlling when something shows in the In-Play tab is pretty easy. In this case when you click on the "Show in tracked resources" on say a Racial Special you will see the number of "Tags" grow by one. When you unclick it the blue button 'Tags' decreases by one. So that is one way to find the tag that controls displaying or not. :)

Your above code changed to use the macro is:
Code:
~ If we have silent spell feat
if (#hasfeat[fSilentSpl] <> 0) then
  field[abSumm].text = "You may prepare or spontaneously cast a silenced spell without the normal corresponding level adjustment"
else
   field[abSumm].text = " "
endif

Also my advice is to "comment" code and get into the habit now. Comments are any lines that start with "~". This will help you allot when you have to go back and figure out what your trying to do or someone else. Comments should be in plain English describing what it is your trying to do.
 
Back
Top