Monthly Archives: November 2014

Bits of bits and bits

Added the @totalchildrentag(<tag>) function, which will total up the values of a specified tag from all children. Note that children only are viewed; it does not recurse through nested children. It does, however, multiply the tag value by the child’s Count to get the total value. If you don’t want the value * count, include the #nomult directive in the function call: @totalchildrentag(<tag>#nomult).

Added the @totalownerchildrentag(<tag>) function, which is the same as @totalchildrentag() but meant to be used from a modifier, to get the owning trait’s children.

Added a small chunk of code to improve handling of needs checks that use ‘me’ references, such as needs(me::childrenweights<40).

Adjusted some text in Options.

Adjusted the Armor Layers Manager dialog explainer a bit.

Adjusted the Portrait dialog a bit.

Updated Explainer on Random Character dialog to remove problematic third-party controls.

Updated the Save Body Type dialog to remove problematic third-party controls.

Updated the Message dialogs to resize the caption space as needed.

Updated the Resynchronize dialog to remove problematic third-party controls.

Added support for the #DeleteMe directive, which instructs GCA to delete the item once it’s been fully processed. This may seem a bit odd, but it allows for creating templates that add things to the character and are then removed, so that the user doesn’t have to manually remove them later when they no longer serve any purpose. (Note that many users will find it confusing if a trait doesn’t appear in the Character list after they’ve added it, so this directive is mostly for those that want to use it in their custom data.)

Fixed a bug that prevented Modifiers from correctly importing extended tag blocks from XML data, resulting in the loss of some tag data, and having other data incorrectly assigned to incorrect tags within the modifier.

When creating the protection values for body parts, GCA will now honor the RAW that Deflect and Fortify bonuses do not stack on protected areas. (This does require that those bonuses be from the chardeflect() and charfortify() tags so that GCA knows what’s going on.) Only the best value will be applied, and in the case of ties, the first one found is used (usually the innermost layer with that value).

Added UI items to the Options dialog to support the new options that will allow stacking of Deflect and Fortify bonuses.

Fixed a bug in the logic for building and simplifying the default protection values.

Made a change to loadouts so that only items with a db() value (rather than a chardb() value) might be considered shields. This is because GCA is now also calculating chardb() for non-shield items that get a Deflect bonus.

Updated the GCA5.xsd to include the new character options that allow stacking of Deflect and Fortify bonuses.

Display Names and Totals from Children

This preview is of something a bit more esoteric than the previews we’ve done so far, and also covers two different things that I can show the results of in one image:


Here on the right side, you can see the use of the new displaynameformula() tag to create a custom name for each of the grimoire items, which includes the number of pages contained in that chunk. And the pages are totaled up using the new @totalchildrentag() function, coupled with custom pages() and pages#() tags.

This combination of features allows you to customize things a bit more, although it’s definitely not the easiest of things to do. The data file code for the three items above looks like this:

Grimoire Book, basecost(1000), baseweight(10), pages(0), pages#(me::pages + @totalchildrentag(pages#)), isparent(yes), displaynameformula($val(me::basedisplayname) ($eval(me::pages#) pages))

Grimoire Chapter, basecost(100),baseweight(1), pages(12), pages#(me::pages + @totalchildrentag(pages#)), displaynameformula($val(me::basedisplayname) ($eval(me::pages#) pages))

Grimoire Signature, basecost(50),baseweight(0.5), pages(6), pages#(me::pages + @totalchildrentag(pages#)), displaynameformula($val(me::basedisplayname) ($eval(me::pages#) pages))

The pages() tags include the number of pages each individual item contains.

The pages#() tag is a separate tag from pages(), but is auto-calculated by GCA when referenced (as denoted by the # in the name), and returns the total pages for the chunk and all children.

The displaynameformula() tag defines the display name as the default display name, plus the number of pages in parens after that. It determines the number of pages using the pages#() tag, so that children and nested children will all be included automatically.

As I said, this particular thing isn’t the easiest to deal with, but perhaps we can improve on that in the future.

Whole lotta bits goin’ on

Simple Edit should no longer allow changes to the names or extensions of attributes.

The mergetags() and replacetags() trigger tags have been updated to allow targeting ‘char’ or ‘character’ with tag values. For example: replacetags( in char with “race(gremlin),laugh(cackle)” ).

Zooming out in Sheet view will now reduce the size, to the built-in minimum, of any interactive editing buttons that may have grown bigger from zooming in.

Added the ITaggedObject Interface to the GCASystem.

Added a form to edit character tags. Added an option to the Character menu to access it. (This is ‘shallow’ in that it only displays any extended tags, not all property values that might also be accessible through the TagItem property. So things like Name, Player, and Race will not appear here, even though they can be accessed through TagItem.)

Updated the Advanced Edit Grid to fix some bugs, and to allow editing of Character tags.

Added Copy Tags and Paste Tags to the right-click menu in the advanced edit grid.

Updated the Add Tag dialog to fill the drop-down box from, and to show help references for, the correct class of item (traits, modifiers, or characters) rather than always using the traits references. Note that there are currently no defined character references, because characters have been more property oriented than tag oriented so far.

Updated character saving/loading to remember character tags.

Updated the GCA5.xsd to include the character Tags block.

Reconstructed parts of the Options dialog to remove problematic third-party controls.

Hooked up the option to group trait modifiers by type.

Hooked up the options for child ordering within parent/child relationships. Changing this will force a refresh of the UI upon exiting Options. Note that setting an Order By in the UI orders the displayed children as well.

Changed ‘Alternative Attacks’ reference on Simple Edit to ‘Alternative Abilities’.

Built custom Enumerator for my custom sorted collections to allow For..Each iteration in sorted order (for multi-sort enabled collections, this is the default sort order of alphabetical by name). Implemented IEnumerable on all of those collections.

Added some functionality to the loadout and the loadout manager objects; and made a couple internal changes.

Updated headers of Loadout Manager dialog to make it more clear that the values in the third row for the various loadout columns are for total weight and encumbrance level

Added support for the new trigger tag loadout() which automatically adds the item being added to the character into a particular loadout or loadouts. For example, loadout(Crime, Punishment) will add the item to both the Crime and Punishment loadouts when added to the character. If the loadouts don’t exist, they’ll be created.

Added the new #loadout() #command to the adds() and creates() tags, allowing you to specify loadouts that equipment items should be added to automatically. This works like the loadout() trigger tag. Note that owned items will not be added to loadouts through this command, because owned items are always included with their parent items in loadouts.

Addressed a small issue in the creates() tag so that created items aren’t owned automatically, which it was doing even when owns(yes) wasn’t included in the creating item.

Fixed a display issue with the checkboxes in the library lists for Compact and Sheet views if explainers were dismissed and then reset in Options.

Found a bug in saving/loading data that could change character damage values (due to my missing how things worked in the writing/reading of the XML). If the value saved for an XML tag is an empty string, the XML saves an empty version of the tag, instead of a full tag with an empty string value. The XML reader then doesn’t return any value for the empty tag, so default values are used for that data, rather than the data getting filled with a ‘new’ empty value. In Basic Damages, this resulted in incorrect values for any levels in the chart that had no adds to the dice (because the defaults weren’t 0). Those defaults are now 0. I believe this is the only case where default data wasn’t set to ’empty’ or ‘null’ values. If you’re using saved .GCA5 characters, you should Resync the Basic Damage List for those characters to correct this.

I found the bug above because I finally atomized down to the object level most of the XML Read and Write handling, where it should have been all along.

Fixed a crash bug in equipment items related to calculating child values when children and parents are being removed from the character.

Data Files:

Updated: GCA5 Changes.gdf: Fixed included versions of the ~Fortify and ~Deflect modifiers to load as modifiers, not advantages.

Bits of complex interaction

Named Modifiers dialog correctly.

Added an explainer to the paper doll panel in the Protection window.

Since the items affecting a location on the paper doll in the Protection window are highlighted in gold/yellow when the location is selected, I have turned off the redundant marking of those items with the shield icon.

Addressed some drag & drop issues in Classic trait lists.

Pressing the Enter key will now end the in-list editing of values in a Classic trait list.

Updated the Compact View trait lists so that the buttons on the selected item will no longer display if the trait is locked, or the increment/decrement buttons will not display if the trait is not leveled.

The TL of an equipment item will now be displayed in the DisplayName if a TL() tag exists.

Changing the name of the character or the player will now update the tab text for that character immediately.

Added new support for fortify()/charfortify() and deflect()/chardeflect() item tags. Recent discussion in the GURPS forum has alerted me to the fact that the Fortify and Deflect enchantments aren’t intended to stack when coverage would otherwise allow them to do so; only the best of the bonuses should apply. These tags are part of the work needed to support this. If there is a fortify() or deflect() value on the item, it’s used as the base value for calculating these new tags. The charfortify() value will be automatically applied as a bonus to the item’s dr() value when figuring chardr(), and the chardeflect() value will be automatically applied as a bonus to the item’s db() value when figuring chardb(). The Fortify and Deflect modifiers should be adjusted to give their bonuses to the owner::fortify and owner::deflect targets, respectively. *NOTE* that the needed stacking rules in Protection aren’t implemented yet.

Did a bunch of work to customize the Sheet View’s preview pane to allow for additional needed functionality.

Finally have a working draft of the interactive editing features for the Sheet view. Double click on an area in the sheet when it’s highlighted to activate the editing features that the sheet author has implemented.

GCA should now remember your settings for Zoom and Sheet in Sheet View between sessions.

Data Files:

Updated: GCA5 Changes.gdf: Included updated versions of the ~Fortify and ~Deflect modifiers from Magic, changing their gives() to the new targets.


ColorBlockSheet updated to use the updated SheetActionField system for interaction in Sheet View, and to demonstrate how it works right now. Double click on a area when it’s highlighted to activate the editing features within GCA.