Some fancy bits

Implemented a work-around for redrawing the Character lists correctly in Classic View when wrapping is used and the form is resized to change the widths of the lists.

Fixed a drawing bug in displaying traits in most character lists when there isn’t actually room to display the trait name.

Added support for saving traits to a data file from the Edit and Advanced Edit dialogs. Templates and meta-traits are not supported, and parents will not save children.

Added a Save to File… button to the Edit dialog for traits.

Added a Save to File… button to the Advanced Edit dialog. You can save Modifiers as well.

To address some issues, I have rebuilt/rearranged some things on the Advanced Edit dialogs, and altered how some of the features worked. While doing that, I added some icons to the Add Tag and Remove Tag buttons, and relocated all the grid-oriented buttons to a new row just under the grid. (To be specific, those buttons are now a part of the per-item grid control, rather than part of the overall form itself.)

Compact View trait lists now support multi-line (text wrapped) trait lines. Updated Options text to reflect this change.

Removed some calls that printed things to the splash dialog, as they were redundant with the Working dialog that appears anyway.

Simplified a bit of the ConfigEngine and GCASystem inter-relationship, to simplify handling, to promote more modularity, and to allow for better handling of multiple possible GCASystem objects.

With the change to GCASystem, GCA now just creates a new GCASystem for the Build Campaign Book dialog, which ensures that even when using the same Library as might be loaded in GCA already, any changes will be made to a different copy. This means it can now use the standard FastLoad files, if available for the starting Library, without having to load everything from scratch.

Fixed a problem around since GCA4, where bonuses to Block or Parry (as in Enhanced Block or Enhanced Parry) did not correctly spark a recalc/update of traits that had blockat() or parryat() values.

I have added support for “user targetable” bonuses, which will allow the user to choose the targets to which the bonus is meant to apply. Items that grant this new type of bonus will use %chosentarget% as the Target part of the bonus, such as gives(+1 to %chosentarget%). GCA will manage the new chosentargets() tag, which will keep the names of the target items, and provide a UI for it through the use of a new button on the Edit Traits dialog, which will pop up a pick list from which they can choose target items. When bonuses are generated by the trait, GCA will create one bonus for each target, in each case replacing the %chosentarget% with the name of the target item.

File authors can limit the available targets presented to the user by using the targetlistincludes() tag on the item, which includes one or more criteria for adding traits to the list, using a structure similar to that in the #BuildSelectList directive. It’s structured like this:

targetlistincludes( <Type> [ where <tag> [ is | isnot | includes | excludes | listincludes | listexcludes ] <tagvalue> ][, <etc.>] )

which allows for specifying just the list type in <Type> if that’s the only limit required. If more restriction is needed, see the docs for #BuildSelectList to see how the Where block works. Note: GCA will never include locked or hidden traits as valid targets. In addition, <Type> may be Any or All to specify selecting from all traits, not just one type.

As an example, instead of requiring users to add a Weapon Master Damage Bonus modifier to every weapon that gets the bonus, the bonus can be included with the Weapon Master advantage, and can use the new %chosentarget% target instead. The user can then select or modify the weapons that apply whenever they need to do so in the Edit window.

Here’s the modified version of Weapon Master:

Weapon Master (Targets), 20/25/30/35/40/45, levelnames(one specific weapon, two weapons normally used together, a small class of weapons, a medium class of weapons, a large class of weapons, all muscle powered weapons), page(B99), upto(6), cat(Mundane, Physical),
   x(_
      #InputToTagReplace("Please specify the weapon, weapons, or class of weapons you have Mastery of:", nameext, , "Weapon Master")_
   ),
   gives(_
         =+@if(_
               $modetag(charskillscore) = ST:DX+1 _
              THEN @textindexedvalue($modetag(dmg), ("thr", char::basethdice), ("sw", char::baseswdice), ELSE $solver(me::dmg)) _
               ELSE @if(_
                        $modetag(charskillscore) > ST:DX+1 _
                        THEN @textindexedvalue($modetag(dmg), ("thr", 2 * char::basethdice), ("sw", 2 * char::baseswdice), ELSE 2*$solver(me::dmg)) _
                        ELSE 0 _
                        )_
               ) to %chosentarget%::damage$ listas Weapon Master Damage Bonus _
      ),
   targetlistincludes(_
         Equipment where charreach isnot "", 
         Equipment where charrangemax isnot ""_
         )

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.