Category Archives: Build Notes

Excerpts from the change log and other notes related to new builds.

So few bits, so much time

b69

* Other

Created a Library Settings object that will take settings that are set in books, and hold them for applying to characters. (** This is still a work in progress. **) This changeover will take some settings that were universal to GCA and make them character-specific instead, although not all of these options can currently be set separately through character options.

The boxes for melee and ranged attacks in Unified View are now interactive. They’re now based on listboxes, like the trait boxes are. Not much you can do with the new clickability yet, but you can double-click to edit the trait that has the attack mode you double-clicked.

Added a window for when an update is available, rather than cramming info into a message box.

* Build Campaign Book window

Added tabs to allow for dealing with more types of data than just Traits. (Although they’re NOT hooked up yet.)

You can now filter the displayed traits on the Traits tab in the Filter pane using the “ [ = | > | < | <> | >= | <= | is | isnot | includes | excludes | listincludes | listexcludes ] [ , repeat as needed ]” format, which should look familiar, but allows for the chaining of multiple specs separated by commas and adds some comparisons (note tha “=” and “is” are identical in use, as are “<>” and “isnot”. Of course, the data should be in quotes if it includes a comma or space. (Additional filters add additional requirements a trait must fulfill to be displayed.)

* Bug fixes

Fixed text for “Hide the Select Export Sheet dialog explainer” text in Options that was incorrectly displaying as a copy of the text for the option above it.

When adding a new character along with choosing a library, closing the Library Manager with the close box will now abort adding a character entirely.

In the Mismatched Libraries dialog, clicking “Cancel loading this character.” was not actually doing that. Now it does.

Changes in data types being used in calculations due to the new platform result in more decimal places being used in some calculations, which means that some places where math is done no longer automatically round off certain types of division due to limited precision, which affects some things oddly. I have made an adjustment to the modifiers calculation code to address one such instance that was returning unexpected results.

Some bits are more complicated than they look

b68

* Updater

The first draft of the update checker should now be working. It can check for updates to the program and to data files. GCA will do initial processing, but will then shut down and run the GCA5Updater.exe app with elevated permissions to actually do the data updates. GCA5Updater will also run any setup program downloads. Once finished, the updater will re-launch GCA.

Added stuff to Options to support the update checker.

Added a menu option to the Help menu to check for updates regardless of the update checker settings.

* Bug stomping

Fixed a bug related to not removing items correctly from OrderBy lists in the SortedTraitCollection. I believe this will fix the serious parent/child issue that was being encountered.

* Other stuff

Added a few more error traps and validity checks in various places.

Internal plugin reference adjusted slightly to store running versions.

Another teeny little bit

b67

Fixed some drag-n-drop drawing/updating issues resulting from support for multi-line trait items in Unified and Classic views. This only affected drawing indicators and such, not the functionality itself.

Added the initial infrastructure for possible auto-update-checking in the future.

Added some more checks to AddChild/RemoveChild to be much more verbose any time anything unusual happens after loading, in a continuing attempt to track down weirdness.

Teeny tiny little bit

b66

There is a bug somewhere causing parents to sometimes lose track of some of their children. I have not been able to determine how or where this happens. To address it for the time being, I’ve written a pair of routines that will hopefully reconnect children with parents when one has forgotten the other.

When drawing shown but normally hidden traits in the Unified View or Classic View trait lists, the text is now drawn with some transparency, which has the effect of ‘graying them out’ regardless of the actual color they’re drawn in. The options related to adjusting the transparency level are in the Display box in Program Options.

Even more bits of cleanup

b65

Compact View has been renamed Unified View.

* Bug fixes

Added a trap for an instance where mismatched parens might crash GCA more ugly than usual.

Added a bit of code so that hopefully otherwise untrapped exceptions can still send related data to the log and to the debug.run file.

Adjusted the in-column editor in the Classic View Attributes list to allow entry of a decimal point. GCA will generally round that off once entry is done, unless the value actually supports decimals.

Adjusted the calculation order of skills/spells to apply modifiers, and then to include any child point costs. This is consistent with the calculation order of other traits, and avoids total included child costs being unintentionally affected by any modifiers applied to the parent skill.

Library modifiers being read from book files were losing the group they were meant to be a part of if the group was assigned passively by the group heading rather than by a group() tag. This has been fixed. The FastLoad version number has been updated to force a reload-from-source for all libraries to address this issue, but that won’t fix character data that may have carried through this issue (GCA does put Read Validation Error warning in the log when loading a character file that has missing XML data, so you should see a message about the Modifier element if that’s the case; it just won’t be a very helpful message beyond that).

Fixed a couple minor issues in the trait lists in Unified View that resulted from a couple routines not having been updated when support for symbols was added.

* Advanced Edit

Changed the edit control for grid cells to a standard text box.

Changed the context menu option for Paste Modifiers to use the CTRL+SHIFT+V key combo. This will allow CTRL+V to once again work as intended within the text editor for pasting normal values. If whole tags have been copied, using CTRL+V will still work to paste them into the whole grid, as that handler still exists, so long as you’re not inside a cell editor at the time (because that will paste the tag info into the editor, instead).

* Other features

Added support to run GCA in ‘portable’ mode. Run GCA with the /p command line option and GCA will use the folder it’s launched from as the base folder for program data, app data, and as the root folder under which it will create the /GURPS Character Assistant 5/ folder tree for all the user data. (GCA will set the window title to include “(Portable Mode)” when this mode is being used.)

When the Verbose Book Processing option is on, GCA will now print the line number where a warning was encountered during processing of traits and modifiers. This line number is printed in blue just after the warning in the log. That should speed up locating such things in the data files. Note: be aware that for items that cross multiple lines, the line number will always be the last line of the set, not necessarily the exact line of that set with the issue.

* ColorBlockSheet

Weapons are now included normally in the equipment list. Not including them was an oversight from recycled code.

Adjusted how the protection block shades body part headers and the colors it uses for text.

Adjusted the protection block’s armor/shield listings text to use the Equipment color settings like the rest of the block.

Tiny bit of cleanup

b64

* Bug fixes

A previous fix that addressed the issue of equipment items not raising notification that they’d changed, and therefore not triggering recalcs, surfaced a bug that it had hidden. Certain items that didn’t have their own base values, such as equipment parent items, could now trigger an endless recalc loop. This should now be fixed.

* ColorBlockSheet

Obliquely noted in b63, but this was updated in b63 to support the character’s selected trait grouping options.

Fixed a bug.

* OfficialCharacterSheet

Now has a couple of options (Yes by default) which will attempt to reduce overflowing of the weapon tables by allocating  available free space from one table to the other.

Added an option to print the Protection paper doll on page two, bumping the Equipment listing to the overflow pages (No by default).

Added support for trait grouping.

Fixed a bug.

Scrub them bits

b63

* Export

As with print plugins for character sheets, GCA now offers default/current character settings for export sheets. These options follow the existing ones for the character sheets in Options, and work the same way.

There is now an Export button on the toolbar, between the Close button and the Print button. I found it less confusing to put it before the Print/Preview buttons, rather than after them. The Export button works like the Print/Preview buttons, with a drop-down portion to provide access to any alternative sheets that may have been set, and the primary button launching the primary export sheet selection.

GCA will save/load/track all these new options.

* Misc fixes and clean-up

Restored ability to type in the Description & Notes dialog without accidentally closing the dialog by pressing Enter. You’ll need to activate the OK button in another way, such as ALT+O, the mouse, or tabbing to the button.

GCA will now save/load the character settings for the trait list grouping options in the character file.

GCA will now recalculate the character when leaving the Loadouts window.

Added the StorePortraitsInCharacterFiles option. When True (default setting) it saves character portrait image data encoded as Base64 within the character file. The option for this in Options is currently in the Experimental Features block on the Program Options tab.

Fixed a bug that prevented Equipment items from correctly reporting that they’d changed when various things that change them were applied or adjusted. This prevented related items and $ cost totals from being correctly and automatically recalced.

Fixed a bug in displaying grouped traits using a tag matching a specific tag value.

* Other features

GCA now loads an internal copy of the character’s portrait, which is kept in the PortraitImage property. If the character has the image file saved to the character file, that image will be loaded from the saved data in the file. If the character does not have the saved data in the file, the image should be the one set by having loaded the file reference, instead. (That is, the file reference is loaded and the image set if possible, and then the saved data is loaded to overwrite the reference-created data.) This way, the image is available, even if the referenced file is not. This does mean that if you change the original reference file, you’ll need to re-load it in the Portrait dialog to re-set the internal image data, whereas the old behavior would always be loading the current version of the source file, if found.

GCA now supports retrieving the campaign’s base TL through the character’s TagItem property, which means you can now use char::basetl or char::campaigntl to get the TL for the overall campaign, rather than only for the character.

Created the GroupedTraitListBuilder class, which should simplify allowing sheets to support the trait list grouping options by doing the work of breaking a trait list into grouped sub-lists (as specified by the character’s options) for the sheet author. The author can then take the generated lists and output them as the user would like to see them. Example usage in the ColorBlockSheet plugin.

* SheetOptionsManager

Added functions for retrieving typed Values for specific options.

Some generic functions:

Public Function ValueBoolean(Index As String) As Boolean
Public Function ValueInt(Index As String) As Integer
Public Function ValueULong(Index As String) As ULong
Public Function ValueDouble(Index As String) As Double
Public Function ValueString(Index As String) As String
Public Function ValueBooleanArray(Index As String) As Boolean()

And by optType:

Public Function ValueColor(Index As String) As Color
Public Function ValueFont(Index As String) As Font
Public Function ValueList(Index As String) As String
Public Function ValueListArray(Index As String) As Boolean()
Public Function ValueListOrdered(Index As String) As String
Public Function ValueListFlag(Index As String) As ULong
Public Function ValueListNumber(Index As String) As Integer
Public Function ValueText(Index As String) As String
Public Function ValueVar(Index As String) As String
Public Function ValueTrueFalse(Index As String) As Boolean
Public Function ValueYesNo(Index As String) As Boolean

* GCA5.xsd

Added some nodes to allow for saving export sheets and trait list grouping options.

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.