From this, I assume that some optoins adjust the die type (e.g. D6 to D8),
while others apply adjustments to the ultimate die roll (e.g. +1). Assuming
this is correct, there are a number of ways to model this within AB. Here
are a few suggestions....
When modeling stats using a die type, simply specify a prefix of "D" via
the definition file. This way, you can have the stat value be the actual
die type. For example, you might have the stat value be 6 to start with (to
represent a D6). When AB outputs the stat, it will automatically add any
prefix you have defined. Therefore, AB will see the value of 6 and will
output is "D6". If you need to adjust the die type up one notch, you can
add +2 to the stat value, for a net value of 8 that is displayed as "D8".
Things get more difficult when you want to adjust the die type and show
modifiers to the die roll. There are two ways to solve this. First, if the
adjustments only happen under a few conditions, you can use a set of types
to indicate which adjustments are applied. Each adjustment will assign a
particular type to the unit (e.g. "elite"). Then you can have a set of
options attached to the unit that employ "utyp" to determine which one is
used, and each of those options uses "stxt" to append the appropriate "+1"
or whatever to the stat value.
The second option is probably a little more complex to digest but a LOT
easier to utilize in the end. The stat value is used to represent BOTH
values in one. For example, the ten's digit represents half the die type
(e.g. 20=D4, 30=D6, etc.) and the one's digit represents the adjustment,
with a value of '5' being treated as zero to allow for positive and
negative adjustments (e.g. 5=+0, 6=+1, 4=-1, etc.). The net result is that
a value such as "44" would translate to a D8 with a -1 adjustment.
Increasing the die type simply involves adding +10 to the stat value.
Adding a +1 adjustment requires simply adding +1 to the stat value. Clean
and simple. You could then use a single "smap" attribute to translate the
encoded stat value to it's proper text equivalent.
Following on with the second solution above, you can make the task easier
on yourself by utilizing a total of 3 stats for each displayed stat. Create
two hidden stats, with one for the die type and another for the adjustment.
All of your internal adjustments would be applied to these stats. The die
type stat would have values of 4, 6, 8, 10, and 12. Adjustments to the die
type would be simply +2/-2. The adjustment stat would be a simple +1, -1,
whatever. Then you would define the visible stat as a calculation upon the
values of the two hidden stats. The calculation would synthesize the
encoded value via something like "stat:vis=(die*5)+adj+5" (where "vis" is
the visible stat name, "die" is the die type stat name, and "adj" is the
adjustment stat name). You would then assign the "smap" attribute to map
the stat to the appropriate ultimate display value.
Hope this helps,
Rob
At 02:24 PM 4/19/01 +0000, you wrote:
>In Piquet charecteristics are expressed as dice values i.e.
>D4 - D6 - D8 - D10 - D12 - D12+1 - D12+2 etc.
>
>Unit options such as weapons and training modify statistics up and
>down this scale. i.e. If Melee Dice stat was D10 and you took elite
>and bayonet as options the stat would be up 2 to a D12+1.
>
>Any ideas on the best way to implement this in AB.
---------------------------------------------------------------------------
Rob Bowes (rob@wolflair.com) (650) 726-9689
Lone Wolf Development
www.wolflair.com