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.