A bit technical

 Added some more robust versions of a few simple workhorse routines, for more troublesome chores.

For some of the examples in this entry, we’ll be using the Self-Control Roll modifier defined in entry b 5.0.0.53, and for others we’ll be using these :

[MODIFIERS]
<Chronic Pain>
Interval, *0.5/*1/*1.5/*2, upto(4), downto(1), 
   shortname( #format $val(me::levelname) ),
   levelnames(1 hour, 2 hours, 4 hours, 8 hours), group(Chronic Pain), page(B126),
   displaynameformula( $val(me::name): $val(me::levelname) )

Frequency, *0.5/*1/*2/*3, upto(4), downto(1), group(Chronic Pain), page(B126), 
   shortname( #format $val(me::levelname) ),
   levelnames(6 or less, 9 or less, 12 or less, 15 or less),
   displaynameformula( $val(me::name): Attack occurs on a roll of $val(me::levelname) )

 GCA now supports specifying modifiers by reference in initmods(), so an entire modifier definition no longer needs to be included. The existing behavior is preserved, but now you can also specify a reference to a modifier instead, using the #ref directive and this format:

initmods(#ref <Modifier Name>[ = X] [FROM <Group Name>] )

The braces are optional if not needed to protect parsing on the = or FROM keywords, or the pipes separating various initmods() items. (If the modifier has a name extension, you do need to include it inside parens as part of Modifier Name, as per usual.)

The assignment is optional, but if used sets the initial level of the modifier.

The FROM <Group Name> section is optional if the modifier is also found in one of the defined mods() modifier groups, but required if not.

Do NOT include the #ref, FROM, or assignment within any braces around names. (You may include the entire statement inside quotes or braces to separate it from other modifier blocks within the initmods().)

Using the Self-Control Roll modifier example from entry 5.0.0.53 below, you can refer to it in an initmods() like this:

initmods(#ref Self-Control Roll = 2 FROM Self-Control)

which will look for it in the Modifiers group called Self-Control, and assign it at level 2 (12 or less).

In a trait, it might look like this:

[DISADVANTAGES]
<Mundane Mental>
Chronic Depression, -15, mods(Self-Control), page(B126), cat(Mundane, Mental),
   initmods( #ref Self-Control Roll = 2 )

Note that because the mods(Self-Control) tag exists in this item, GCA will find the modifier even though we don’t explicitly provide a group to look in.

You can mix with the full-definition method, too:

[DISADVANTAGES]
<Mundane Mental>
Chronic Depression, -15, mods(Self-Control), page(B126), cat(Mundane, Mental),
   initmods( #ref Self-Control Roll = 2 | _
             Mitigator: Meds, -60%, group(_General), page(B112), 
                mitigator(yes), shortname(w/Meds)_
   )

 GCA now supports specifying modifiers by reference using the new #ref directive in the With/And blocks of the adds() and creates() tags, instead of having to include full definitions. The existing behavior is preserved, but now you can also use this new format to reference existing modifiers:

adds(<Trait> _
   with "#ref <Modifier Name>[ = X] [FROM <Group Name>]" _
   and  "#ref <Modifier Name>[ = X] [FROM <Group Name>]" _
)

For example:

Chronic Depression 4, -15, mods(Self-Control), page(B126), cat(Mundane, Mental),
   adds(_
        DI:Chronic Pain=3 _
        with " #ref Interval=3 " _
        and  #ref Frequency _
   )

If the FROM block is left off, the mods() tag of the newly added trait will be used when searching for the specified modifiers. In the example above, Interval and Frequency will be found because Chronic Pain has those in its mods() tag.

 GCA now supports specifying modifiers using the new #ref directive in addmods(). The existing behavior is preserved, but now you can also use this new format:

addmods(#ref <Modifier Name>[ = X] [FROM <Group Name>] to <TargetTrait> )

This can also be mixed with the other valid addmods() references (“<ModGroup>:<ModName>” or “#newmod()”). For example:

addmods( ( "Chronic Pain:Interval", "#ref Frequency=2 from Chronic Pain" ) to "DI:Chronic Pain" )

The first reference is the existing format of <Group Name>:<Modifier Name>, and the second is the new format. Note also that the new reference format allows for specifying a level for leveled modifiers, while the old reference format does not.

Keep in mind that if you leave off the FROM portion in this usage, the mods() tag of the <TargetTrait> will be used to find the modifier. In our example above, we could have used “#ref Frequency=2” because Chronic Pain has the Chronic Pain mod group in its mods() tag.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.