Clean up the bits

b.62

* Misc fixes and clean-up

Fixed drawing/redrawing bug with Compact View trait lists, which would cause them to periodically disappear entirely when the option for multi-line display was turned on.

Changed default color of SheetOptionDisplayFormat.CaptionLocalBackColor to Color.Transparent to allow for expected behavior when changing SheetOptionDisplayFormat.BackColor but not SheetOptionDisplayFormat.CaptionLocalBackColor.

Fixed Sheet Options dialog to no longer redraw options when window is moved, or when sized only vertically.

Added a number of new constructors to the SheetOption class. Fixed bug that prevented existing alternate constructors from assigning the Name value.

Added a couple more tags to the list of tags not written to the file when saving a trait to file.

* Exports

Altered the order of operations a little bit for exporting characters, and added support for the PreviewOptions function of export sheets, so that the options settings are available to them before they’re asked to supply any requested data.

Changed the suggested default file name for exports to be based on character file name.

Changed the default starting target folder for exports to the gca5 folder, rather than the gca5\characters folder.

* Interfaces

Added Function PreferredFilterIndex() As Integer to the IExportSheet Interface for export sheets. Given the filter specified in SupportedFileTypeFilter(), this is the 0-based index into that filter list for the filter that should be selected by default.

Added Function PreviewOptions(Options As GCA5Engine.SheetOptionsManager) As Boolean to the IExportSheet Interface. This function is called after options are loaded, to give the sheet a chance to do any unusual housekeeping before the Filter functions are called. Return FALSE only if the export should be canceled.

* FileWriter

Added Write(ByVal Text As String) and WriteLine(ByVal TextLine As String) as the preferred ways to write text or text with appended newline, respectively. Deprecated AddText() and Paragraph(); removed LinePrint() and FilePrint().

Added WriteLine() without params to just write a NewLine to the file.

Added ReadOnly Property NewLine As String, which returns the string used for line termination/new line markers (currently fixed at CR+LF).

Updated to not emit BOM for the UTF-8 encoding.

* GCA5.xsd

Added ‘itemnotes’ node to GCATrait ‘ref’ node.

* Plugins

Simple Text Export sheet updated to implement new Interface functions, and recompiled.

Dense bits

This is a dense one, as a lot of interrelated stuff got done. In summary, two major new features got added in this build: the ability to group character traits by category or tag, and the display of trait symbols/flags (those markers for Physical, Exotic, and such).

* Grouping

I have added a UI in Options to allow specifying how the trait lists in Compact View should, if desired, group traits by category or by arbitrary tag. These options are tracked and managed within the GCACharacter, so the options are on the Current Character tab. Note that these options are in the character so that print/export sheets can make use of them, if desired.

NOTE: GCA currently does NOT save the grouping options to the character file, or provide the Default Character options version of them. I want to make sure they appear to work for people before doing that.

To support grouping in the Compact View trait lists, some rewriting of the internal handling of traits and fields within the list was required (since multiple copies of each trait might now appear).

Standard grouping behavior works like this: If grouping by all values of a tag or category, each trait will appear under any and all such groupings to which it belongs. However, if grouping by specific values only, then traits will appear under any and all groups to which they belong, but will not be listed in the ‘ungrouped’ section at all, unless it appears in none of the specified groups. Groups will appear in ascending alphabetical order (or ascending numerical order if grouped by an numeric-values-only tag) regardless of the list’s current ordering options.

A couple common examples of grouping would be grouping just the Techniques category in Skills, or just a particular college category in Spells.

* Symbols, System

I have settled on the term ‘symbols’ for the icons/images/symbols/flags/whatever that mark traits with icons for Physical, Mental, Social, Supernatural, and Exotic. Its just easiest, seems clear enough, and is what SJGames apparently calls them anyway. (Note that there is a symbol() tag for attributes, which represents the math symbol or abbreviation to use in math expressions for that attribute. I don’t think there’ll be much confusion over this, but it is possible that it might happen.) Where confusion may occur in docs or GCA, I may use ‘symbols/flags’ to refer to these trait symbols.

GCA will now display trait symbols (if any are defined) in the system trait lists. It displays them right-justified inside the Name column of library trait lists in Compact and Classic view.

System traits have been updated to support tracking the symbols that apply to them.

GCALibrary has been updated to support loading and managing trait symbols.

I have added support for a [Symbols] block in the data files. This allows specifying images for the symbols representing various flags within GURPS (such as those for Supernatural, Physical, or Exotic advantages and disadvantages; see B32), as well as how to apply them.

The one in the GCA5 Changes.GDF looks like this:

[Symbols]
 Mental Advantage, mental_16.png, Ads where cat listincludes Mental
 Mental Disadvantage, mental_16.png, Disads where cat listincludes Mental
 Physical Advantage, physical_16.png, Ads where cat listincludes Physical
 Physical Disadvantage, physical_16.png, Disads where cat listincludes Physical
 Social Advantage, social_16.png, Ads where cat listincludes Social
 Social Disadvantage, social_16.png, Disads where cat listincludes Social
 Exotic Advantage, exotic_16.png, Ads where cat listincludes Exotic
 Exotic Disadvantage, exotic_16.png, Disads where cat listincludes Exotic
 Supernatural Advantage, supernatural_16.png, Ads where cat listincludes Paranormal
 Supernatural Disadvantage, supernatural_16.png, Disads where cat listincludes Paranormal

There are three sections per line, separated by commas.

The first section is the name of the symbol. This is so that every symbol can be unique internally, which will allow for using the same name in another file to replace it if defined earlier, such as with a new image or a new rule. The name should not include commas or other punctuation.

The second section is the name of the image to use as the icon for the symbol. It should be in one of the image bins, so that GCA can find it. (Note that GCA will check the User image bin before the System image bin, so that users can change the default system images, if desired, simply by adding replacement images with the same name to their own image bin.)

The last section is the rule for application of the symbol, which works like what you’d find in a #BuildSelectList:

TYPE where TAG [ is | isnot | includes | excludes | listincludes | listexcludes ] TAGVALUE

Note that the system allows for specifying whole new types of symbols, should users wish to make use of the system for custom tagging their traits. Custom images should be 16 pixels tall (because GCA will not resize them to fit, and 16 pixels is the standard height for other icons in trait lists), but may vary in width. The best image type for them is PNG, with alpha channel transparency if desired, but solid backgrounds are okay if you like them. BMP files may also be used.

The [Symbols] block supports two commands at this time, which must be within the block to work:

#Clear

#Clear stands alone, and when encountered causes GCA to delete all currently defined symbols, so that any defined after that point will be the only ones used.

#Delete <list of names>

#Delete specifies a list of symbols to be deleted. This should be a comma separated list of the names of the symbols as defined in the data files.

I have changed the FastLoad file structure and version number to add support for the new symbols/flags, so all FastLoad files will be rebuilt.

I have added support for adding the various trait symbols to the file touchlist tracking. Because the symbols can be defined anywhere, and later definitions can replace earlier ones, symbols are assigned to system traits after all the files have been loaded, so the touchlist will track the assignments as “Post Processing.” Note that touchlist tracking will not help you see when one symbol is replaced by another; for that you’ll need to watch the log messages with Verbose logging turned on.

* Symbols, Character

GCACharacter now maintains its own collection of symbols. This is initialized with whatever Library is used to create the character, but will later need to be resynchronized to update for any changes.

GCATrait now maintains a collection of strings called SymbolNames which contains the names of any symbols that are determined to apply to the trait. GCA will use the SymbolNames to index the character’s Symbols collection to display the correct symbols for each trait in the UI.

GCA will now display character trait symbols right-justified inside the Name column of trait lists in Compact and Classic Views.

Added support to GCATrait.TagItem to get the list of applied symbols using the ‘appliedsymbols’ tag name. This returns the comma separated list of symbol names, if any, that apply to the trait. (GCA will determine applicable symbols automatically, so there is no Set variant of this.) This is a ‘courtesy’ tag, so it’s not contained by the tag dictionary, as SymbolNames is its own collection.

Character symbols can now be resynced in the Resynchronize dialog.

* Other Stuff

Fixed a bug in reading the <categories> block in the GCA5 XML reader. This didn’t impact anything since that was the last block in the file up until now.

Fixed some bugs where system traits and modifiers didn’t always know what library owned them.

Fixed a bug that crashed GCA when an item wasn’t actually added in a Selection dialog due to the user not completing, or Canceling out of, a text entry request.

Updated the GCA5 XML writer to output the portrait image file (if there is one) as a Base64 encoded text string in a CDATA in the <portraitimage> element. GCA doesn’t currently read/track it any differently otherwise, but that’ll be added eventually.

Updated the GCA5 XML writer to output the ‘appliedsymbols’ element of GCATrait. (This contains the contents of the SymbolNames collection.)

Updated the GCA5 XML writer and reader to support the character’s new Symbols collection. GCA will now read and write these, including image data.

Added two routines to modHelperFunctions to serialize/deserialize internal images as Base64 strings:

 Public Function BitmapToBase64String(ByVal SourceImage As System.Drawing.Image) As String
 Public Function Base64StringToBitmap(ByVal Source As String) As System.Drawing.Bitmap

Added options to Options dialog for displaying symbols in Library or Character lists. Displaying in Library lists is a general display setting, while displaying in Character lists is a character managed setting, so there are settings on the Default Character Options tab as well as the Current Character Options tab for that one.

Characters now save/load their symbol option setting.

* GCA5.xsd

Added a <portraitimage> element to the <vitals> element to support storing the character’s portrait image as a Base64 encoded string inside the XML file. The string should be enclosed in a CDATA block. I do not yet load this image, because the GCACharacter doesn’t currently handle the actual image; that’s more work elsewhen.

Added GCASymbolsBlock and GCAFlagSymbol types, and added support for GCASymbolsBlock to GCACharacter.

Added ‘appliedsymbols’ element to the ‘ref’ block of GCATrait, which is a list of all the character’s Symbols that apply to it. (This contains the contents of the SymbolNames collection.)

Added ‘showcharactertraitsymbols’ elements to the GCACharacter settings block.

Premature bits

Fixed issue where GCA would pop-up a ‘changed TL’ dialog even if no traits were affected.

Made a couple changes to the SheetOption object’s existing constructors, and added a new one.

I have added code to allow the trait lists in Compact View to group traits by category. I have not yet hooked up any UI for that.

Recompiled plugins.

More exported bits

Moved calculation of charparry() up in the order of calculations for secondary characteristics, because it, too, is used in the calculation of some values in the routine that does charskillused, charskillscore, and charparryscore.

Added another special case check for trickle-through issues related to failing to meet minimum ST for a weapon.

Fleshed out the SimpleTextExport output.

Updated GCA5.Interfaces again: updated the RequestRunSpecificOptions event of IExportSheet; added the DialogOptions_RequestedOptions class. Shouldn’t affect print sheets.

Updated GCA5 to handle RequestRunSpecificOptions event handling for export plugins.

Added a form to display and process the selection of RunSpecificOptions by users.

Updated SimpleTextExport to raise the RequestRunSpecificOptions event if the user requests it in Options. (My current implementation would probably be better served with a simple message box, but I hope that it shows that much more sophisticated options could be requested, such as providing a character list and having only the selected characters exported.) Plus, added some more options for output handling.

Plug in these bits

Adjusted quick pick dialog a tiny bit.

Changed the GCA5.Interfaces structure as I broaden the plugin support. This necessitated creating a basic, minimal interface for the shared plugin features, and having the other interfaces inherit it. You will need to recompile any plugins you have, but you shouldn’t need to change anything else.

Added IBasicPlugin and IExportSheet to GCA5.Interfaces.

Created the SimpleTextExport plugin, which, as the name suggests, exports characters to a text file. This is still a work in progress, but does export stuff.

Added an Export… option to the File menu.

Added the Select Export Sheet dialog, which is what comes up when you select Export… from the File menu. This dialog allows you to select the Export Sheet you want to use for exporting purposes, and allows you to proceed through the export process if a sheet is selected.

Adjusted how GCA tracks plugins and Print Sheets, given that there are now more types of plugins and the other types are not suitable for printing/previewing.

NOTE: Export Sheets are not automatically compatible with Print Sheets, as they were for GCA4. This is due to the fact that the system now used by the print engine does an absolutely abysmal job of converting to other types of data, most of which is absolutely useless (PDF is okay, and is currently supported from Print Preview). Therefore, there’s no good way to translate the printer output to other output types automatically any more.

All included plugins have been recompiled due to interface changes.

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 ""_
         )

Some nice bits

Added support for the SystemTrait only tag invisible(yes), which is a flag tag telling GCA that the item is ‘invisible’, and should never be shown to the user. Support for this is added with the understanding that it simplifies certain types of data constructs, allowing an ‘invisible’ trait to be added to the character by another trait, whereupon it will be visible, but presumably as a child trait, or perhaps otherwise linked to the adding item. For example, you could create Equipment versions of certain advantages by duplicating the advantages with “Gear” name extensions and zeroed costs, but make them invisible so they aren’t taken accidentally (or make invisible the current ones if they’re only available as gear in your game). Then you could make Equipment items that add those invisible traits to get the appropriate effects–the added traits are visible to the user as normal traits. (Note: GCA does not support this tag for attributes. Also note that categories for these traits are still considered valid, so a category filled with invisible items will appear like an empty category to the user, which may be confusing in some cases.)

Fixed bug in last build that allowed backup characters that were loaded after a crash to incorrectly be listed in the Recent Files list.

Fixed a bug introduced some time back in how certain GCA elements displayed child items that were of a different type than their parent items.

Fixed some outstanding issues with the Campaign Settings dialog, and with the display score builder feature for campaign TL.

Added missing support to undo changes to TL when canceling Campaign Settings dialog.

After the Campaign Settings dialog has closed, if the TL has been changed, GCA will now pop up a dialog to let you adjust the TL to match the new TL for any existing /TL traits the character has.

Added a ‘url’ tag to the bookcodes.xsd, to support linking to the SJGames page for the book. Updated bookcodes.xml with URLs for included books. Added ability to visit the URL given in bookcodes.xml from the PDFs dialog.

Added a flag and changed the loading of book codes slightly so that the new URL tag will flow through to the user’s data even if they have modified existing book code info (such as setting files for their PDFs). This will only apply for data saved to the user’s bookcodes.xml without a url tag; once saved with one, any future changes to the system url can’t flow through.

Also updated many book names in bookcodes.xml to match SJGames style, rather than the filename style I started with, but if you’ve made any changes to book data (such as setting files for your PDFs), you won’t see them changed in your PDFs dialog.

Updated a bunch of tag definitions in tagdefs.xml.

I have created a new child profile option that you can activate with a checkbox in Edit. This cannot be combined with the Alternative Abilities option, so turning on one automatically disables the other. The new option is: the parent item applies its Modifiers to child items. (It’s probably more appropriate to state it as all child items also use parent modifiers, but whatever.) When this is checked, each child item will apply the parent item’s cost Modifiers as if they were their own; they are applied in conjunction with any modifiers the child item has of its own. I think this will be called a Shared Modifiers Parent unless a better name comes up.

Trying out a second column of icons on the right side of character trait lists. This column has icons for parent items, and for certain types of child items, such as items that are children of an Alternative Abilities Parent or are children of a Shared Modifiers Parent.

A bit different

Added an Unspent entry to the points bar.

Added first draft of dialog for Party Log Entry, from the Party menu.

Added support for saving a Party list file from the Party menu. A Party file saves references to all the currently loaded characters in a GCA5party file, which allows you to load them all at once in the future by loading just that one GCA5party file.

Updated CampaignLog to allow fractional point values in log entries.

Reworked how a couple of my controls work to better handle scaling for the zoom modes.

Changed a couple icons in Options.

Added some icons to the Tools menu.

Added first draft of the Build Campaign Book window. This allows you to load a library, delete traits you don’t like, and then save the entire thing as a single book file (.GDF file), and to optionally save a campaign library (.GDS file) for it as well. This should help simplify building campaign specific files for sharing with players.

Updated library manager to delete FastLoad files when deleting the owning library.

When creating a new character using New, Choosing Library…, the Manage Your Library dialog is now properly set to allow you to double-click on a library to select it and close the window.

For quite a while, I’ve been intending to redo the system for loading character files, so that more of the logic would be handled entirely within the GCAEngine, where it really belongs. I have now done a big chunk of that, and have switched to the new system as of now for the standard handling. Along with this support, it’s now possible to load these additional file types: GCA4base, GCA5base, GCA4party, and GCA5party.

With the new file loading system, you can now load files as “Read Only”, which effectively means GCA won’t assign them a filename right away (usually it starts with the one it was loaded from). You will be required to use Save As… to save the file; but of course you can save over the old file if you wish, because that will not be prevented beyond the confirmation dialog that pops up.

When loading a GCA4 file, GCA5 will now automatically treat it as “Read Only”, as described above. This is a safety precaution to avoid accidentally overwriting older files with newer data that may not be completely compatible with GCA4.

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.

Some crunchy bits

* Added a sort-of explainer tile to the top of the Default Character Options tab in Options.

* Added an option to allow multi-line/word-wrapped trait names in Classic View trait lists. (It is Off by default.)

* Updated the image for the Export PDF button in Print Preview.

* Fixed bug that prevented loading a character with a chosen library, if that library was already loaded by a character and any changes were made to the library books, requiring the library to be reloaded.

* Fixed a couple issues in the Find Traits dialog.

* Fixed crash if changing a sheet in Sheet View when no character is loaded.

* I’ve added support for a base() tag for advantage-type traits. If base() exists, GCA will calculate it, and add it on to the final level of the advantage as a ‘base value’ instead of the normal base value of 0.

* Adjusted the order for calculating secondary characteristics for traits (damage, reach, skill used, etc.) because calculating the skill used was being done after damage, when it should have been done before damage; certain bonuses (such as weapon master) are based on character skill. This fixed a problem with damage values for such instances being a step behind unless you did a recalc everything, and now they stay current.

* Messed about with the Explainers again. They’re now even easier for me to create and adjust, and I think they look more consistant with other elements across the program.

* Added a dialog for the character’s messages. This content already appears as a box in Compact View, but it’s now accessible as a dialog from the Character menu.

* Character messages are now saved with a character, so they’ll stick around unless dismissed.

* The color selections for the Compact View boxes as set in the Colors & Layout dialog should now be remembered.

* Modifiers now support downto() and displaynameformula().

* Modifiers now have access to a some additional values through TagItem(): levelname, shortlevelname, caption, levelcaption,  displayname, and basedisplayname. (Like Caption returns values using shortname(), LevelCaption returns values using shortlevelnames(); shortlevelname and levelcaption are aliases, and return the same value.)

* Modifiers now support a new directive, #format, within the shortname() tag, which tells it to format the output in a particular way–pretty much just like displaynameformula(), but obviously set up a tad differently. It is used like so: shortname( #format $val(me::levelname) ). #Format must be the first part of the tag value, and everything that follows is the format/formula to use. If you need spaces on one end or another, enclose the text after the #format directive in quotes or braces.

* These changes to modifiers mean that you can now define a modifier something like this:

<Self-Control>
Self-Control Roll, *0.5/*1/*1.5/*2, upto(4), downto(1), group(Self-Control), page(B121),
   shortname(#format $val(me::shortlevelname) ),
   levelnames("15 or less, almost all the time",
              "12 or less, quite often",
              "9 or less, fairly often",
              "6 or less, quite rarely"),
   shortlevelnames(15 or less,
                   12 or less,
                   9 or less,
                   6 or less),
displaynameformula( You resist on a roll of $val(me::levelname) )

(I set up this example in order of increasing costs, which is in decreasing order of Roll value. It could, of course, also be set up for the reverse order, instead.)

Inside GCA, the user sees “Self-Control Roll” in the Available Modifiers list; when added to the character they see “You resist on a roll of 15 or less, almost all the time” in the Applied Modifiers list; and for the caption within the item using this modifier, they see “15 or less, *0.5”. If the user then increments the modifier, the values change appopriately to the next levels.

Further, if you need some item to check for the existance of this modifier with @hasmod(), you can simply use @hasmod(Self-Control Roll), rather than needing to check for the name of each individual level, as is the case now with each level being a separate modifier.

* Made a small code adjustment to how the Edit dialog displays an item’s included modifiers.

* Added a warning to the log when a PDF can’t be launched because it wasn’t found.

* Added a safety check to ColorBlockSheet so it won’t try to print non-existant current loadout information.

* Updated OfficialCharacterSheet to add an option for the color of the ‘Included’ and ‘Conditional’ lines for bonuses.