• 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

The "vwst" option attribute

  • Thread starter Thread starter scbd at btopenworld.com
  • Start date Start date
S

scbd at btopenworld.com

Guest
Hi,

I'm having a bit of trouble with the vwst attribute on an option.

I have two hidden stats defined on each unit. The first is the total
number of models in the unit, and the second is the total number of
models in the unit divided by 3.

These are then accumulated up on to a "leader" unit using the "lead-
accum" switch. I know this works fine as I've temporarilt made the
stats visible while I work on the file.

Since I don't want these stats to appear on all the units in the
roster, I wanted to use an option linked to the leader which used
the "vwst" attribute to print out these accumulated stats, but it
appears that it will only display the original un-accumulated stats
from the leader unit.

The descriptive text indicates that the stat displayed is always the
fully adjusted value, so does this only apply to other stat adjusting
options which are linked to the unit, or should it also cover the
accumulated stats on leaders and I'm doing something wrong ?

BTW - many thanks for the new "shuffle" facility to move attributes
around, it makes dealing with attributes a lot easier since you don't
have to remember to add them in the correct order since you can
rearrange them later.

Cheers,
Simon.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE COLLEGE MONEY
CLICK HERE to search
600,000 scholarships!
http://us.click.yahoo.com/ujOgTC/4m7CAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
--- In armybuilder@y..., scbd@b... wrote:
> Hi,
>
> I'm having a bit of trouble with the vwst attribute on an option.

[snip]

> The descriptive text indicates that the stat displayed is always
> the fully adjusted value, so does this only apply to other stat
> adjusting
> options which are linked to the unit, or should it also cover the
> accumulated stats on leaders and I'm doing something wrong ?

>From the descrption of the -accum switch to the lead: attribute :-
"Warning: Use of the "-accum" qualifier will cause any adjustments to
the calculated stat to be ignored. The accumulated stat value is
calculated after all other roster updates are processed, and the new
value simply overwrites any value that was calculated normally for
the leader unit. If automatic roster validation is disabled, then the
accumulated stat value will not be updated until the next validation
is triggered, as the accumulation is performed as part of the roster
validation processing. For this same reason, it is not possible to
use an accumulated stat value within a derived stat, as the
accumulated value does not exist when the derived stat is calculated."

So, the problem you are having is with lead-accum, not with vwst :-)
I know that doesn't solve your problem, but it does explain what is
happening and why it doesn't work. In the past lead-accum has only
been used for triggering validation errors, thus the reason for it to
be carried out as part of validation...

Cheers,
Russell.
----
Russell Sparkes - rjs@inorbit.com - http://www.freecfm.com/r/rjs
"Experience is what you get just after you needed it" - Unknown


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE COLLEGE MONEY
CLICK HERE to search
600,000 scholarships!
http://us.click.yahoo.com/Pv4pGD/4m7CAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
As Russell pointed out, using the accumulation mechanism won't work due to
how it is design and what it is intended for (e.g. games like DBM where you
need to calculate the element equivalents per leader). However, there is a
way to do this that is easy to implement. Here's how I would do it.

First of all, you already have the hidden stats for each unit. Using the
"prnt" attribute on an option, have every unit add its model count into the
parent unit. For convenience, you can even make this a global option so
it's automatically attached to every unit. The second step is to limit the
display of these stats to the topmost unit. This can be achieved by using
the "preq" option attribute on the option with teh "vwst". With "preq", you
can limit things so the option only appears on topmost (non-child) units.

Hope this helps,
Rob


At 07:39 PM 9/28/2001 +0000, you wrote:
>Hi,
>
>I'm having a bit of trouble with the vwst attribute on an option.
>
>I have two hidden stats defined on each unit. The first is the total
>number of models in the unit, and the second is the total number of
>models in the unit divided by 3.
>
>These are then accumulated up on to a "leader" unit using the "lead-
>accum" switch. I know this works fine as I've temporarilt made the
>stats visible while I work on the file.
>
>Since I don't want these stats to appear on all the units in the
>roster, I wanted to use an option linked to the leader which used
>the "vwst" attribute to print out these accumulated stats, but it
>appears that it will only display the original un-accumulated stats
>from the leader unit.
>
>The descriptive text indicates that the stat displayed is always the
>fully adjusted value, so does this only apply to other stat adjusting
>options which are linked to the unit, or should it also cover the
>accumulated stats on leaders and I'm doing something wrong ?
>
>BTW - many thanks for the new "shuffle" facility to move attributes
>around, it makes dealing with attributes a lot easier since you don't
>have to remember to add them in the correct order since you can
>rearrange them later.
>
>Cheers,
>Simon.


---------------------------------------------------------------------------
Rob Bowes (rob@wolflair.com) (650) 726-9689
Lone Wolf Development www.wolflair.com


------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE COLLEGE MONEY
CLICK HERE to search
600,000 scholarships!
http://us.click.yahoo.com/Pv4pGD/4m7CAA/ySSFAA/IMSolB/TM
---------------------------------------------------------------------~->
 
Back
Top