|
|
Thread Tools | Display Modes |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
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 by bodrin; February 21st, 2009 at 04:35 AM. Reason: Spelling mistake! |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.
|
#2 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
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! |
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#4 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
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 |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.
|
#6 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
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!
|
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#8 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
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! |
|
#9 |
|
|