• 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

Hiding an old version of a "Charge" when replaced by a "Greater" variety!

bodrin

Well-known member
Hiding an old version of a "Charge" when replaced by a "Greater" variety!

Okay here's another one, How would I remove the entry for a Feat with a number of uses (charges) per day once a Greater version of the feat is taken?

For example the Feat Kiai Shout can be used 3 times per day, opponents become shaken for 1d6 rounds, and the Feat Greater Kiai Shout replaces the Kiai shout can be used 3 times per day, opponents become panicked for 2d6 rounds.

The show Charges option in HL works but when both feats are active it shows 2 boxes each with 3 charges when only the greater version charges should be showing.

I can't visualise the script required to check for both instances i've looked at the Cleric turning ability scripts but they are a tad confusing trying to apply them to a feat!

Any ideas that can help please would be appreciated!
Thank you for any help in advance!
 
Last edited:
Does the greater version need its own charges? It sounds like its just an upgrade to the existing one, which means it can describe the changes it makes to the base feat, and the user can continue using those charges.
 
Does the greater version need its own charges? It sounds like its just an upgrade to the existing one, which means it can describe the changes it makes to the base feat, and the user can continue using those charges.


The Greater variety doesn't require charges, it is just an upgrade to the base feat as you rightly state, however I would like to show the Greater feat name in the charges panel whilst removing the base feats' name so the character sheet only displays the "Greater Kiai Shout 0/3" . in the relevant section!
 
Option 1: in your script for the base feat(UserFinal, anytime):

if (tagis[HasFeat.fGrKiaiSh] <> 0) then
field[livename].text = "Greater Kiai Shout"
endif

That simply changes the name that is displayed, both in the feat's own name and the charges list.

The other option:

Don't check the "Show Charges" checkbox on your lesser feat, and put the following in its script (UserFinal, anytime):

if (tagis[HasFeat.fGrKiaiSh] = 0 ) then
perform assign[Helper.ShowCharge]
endif

That way, your base feat won't think it needs to show its charges (even if hTotal records that there are 3 charges) unless the greater feat isn't present. The greater feat does have "Show Charges" checked, and comes in showing its version once it's added.

Note on timing; for pure display scripts like these, later is better, just in case you want to write some feat from book x that modifies these feats in some way. That's what the UserFinal phase is for - anything that nothing else will ever use, like displays.
 
Quirky

Once more thank you mgehl for the script,

I decided to try both scripts and went with this one, that changes the charges showing

Code:
if (tagis[HasFeat.fGKiaiShou] = 0 ) then
perform assign[Helper.ShowCharge]
endif

However once the Greater variety is added the lesser version is still shown on the charges display. Is there a way to remove the charge box once the greater variety is assigned?
 
You removed the charges checkbox on the feat when you put in that script? The whole purpose is to remove it from the charges panel unless the greater feat is missing. I've used it in other cases, and it works for me.
 
You removed the charges checkbox on the feat when you put in that script? The whole purpose is to remove it from the charges panel unless the greater feat is missing. I've used it in other cases, and it works for me.

Yes I removed the Show charges Checkbox on the Kiai Shout feat but kept the Show charges on the Greater version however it now shows both feat names in 2 charges boxes!
 
I asked bodrin to send me his files, because I couldn't figure out what was going wrong, and I found my mistake.

if (hero.tagis[HasFeat.fGrKiaiSh] = 0) then

without the hero. transition, you're checking whether or not the Kiai shout feat has been given a tag marking that the greater kiai shout feat has been taken. That's always going to fail, because feats only add their tag to the hero.
 
I asked bodrin to send me his files, because I couldn't figure out what was going wrong, and I found my mistake.

if (hero.tagis[HasFeat.fGrKiaiSh] = 0) then

without the hero. transition, you're checking whether or not the Kiai shout feat has been given a tag marking that the greater kiai shout feat has been taken. That's always going to fail, because feats only add their tag to the hero.

Thank you for the feed back Mgehl

This is excellent the Feat name now changes to the Greater variety and removes the lesser feat charges box.

Once more the versatility of the script editor makes entering the amended script only a few mouse clicks.
Fully tested and fully working on a test character!
 
Back
Top