Senior Member
Volunteer Data File Author
Join Date: May 2005
Location: Matawan, NJ, USA
Posts: 158
|
This is for the AB3.1 & the WH40K files.
The Faith point counter for the Witchhunters uses a Stat Calc to determine to total number of faith points available. This calculation used to be shown on all rosters, although it was recently revealed that it could now be tied down to a roster, (e.g, roster.ohw | roster.omd | roster.sm | roster.ig). The question is, is it possible to bring this down to a more specific situation - such as if it will only display if a unit with the "Faith" stat has been selected, or a unit with a tag (which is known to give faith points) has been selected? |
#1 |
Member
Volunteer Data File Author
Join Date: Apr 2005
Location: North Western Arizona
Posts: 97
|
Perhaps calculate a hidden faith points count overall. Then create a statcalc to show the faith points. But in the display expression put something like roster.wh & (statCalc[FaithPoints] > 0).
Dunno if it'll work that way. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
The tag expression used by a stat calc must be comprised of global tags. Normally, this means you are limited to "roster" tags and "ruleset" tags. However, since stat calcs are processed AFTER the roster has been fully evaluated, you ought to be able to utilize ANY global tag. This means that you can define your own global tag, assign it via an entity or option, and then test against it within the tagexpr for a stat calc. So you could assign a global tag to all units that have the "Faith" stat or to options that adjust the "Faith" stat, and then the tag expression ought to work against that tag.
** IMPORTANT NOTE! ** Adding global tags to options is generally a **BAD** idea. There are a variety of reasons, and they are outlined in various places within the documentation. Only uses global tags on options as a last resort. If there is ANY way that you can tie the dependency to tags assigned by top-level units or items, please make sure to do it that way. -Rob At 11:20 PM 12/27/2005, you wrote: Quote:
|
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
You can only access the value of a stat calc from within a script. The display of a stat calc is controlled via a tag expression. That means that you have to utilize tags (that can be tested in via the tag expresion) to control the visibility.
This is a critical distinction that is relatively easy to overlook, so I thought it was important to clarify here. :-) -Rob At 01:46 PM 12/28/2005, you wrote: Quote:
|
|
#4 |
|
|