Category Archives: Build Notes

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

I got yer bits right here

Addressed an element name case-matching error related to ‘launchcodes.xsd’ tripping an XML error message.

When GCA saves backup copies of open characters, it now saves current program settings as well.

In the Launch PDFs window, adjusted the base system folder used when browsing for the home PDF bin.

Added support for the ItemNotes system:

* Public Function ItemNotesModeCount() As Integer

Returns the number of modes represented in the ItemNotes

* Public Function ItemNotes(Mode As Integer) As Collection

Returns a Collection containing all the ItemNotes for a given mode. Collection will be empty if no notes are found. If Mode is < 1, data for first Mode is returned. If Mode is > Mode count, data for last found Mode is returned.

* Public Function ItemNotesModeCollections() As Collection

Represents a Collection of Modes, each Mode item containing a Collection of ItemNotes. (You have a collection of Modes, with count = ItemNotesModeCount(); each collection item contains a collection of item notes as per ItemNotes(Mode as Integer) as Collection.)

* Public Function ItemNotesText(Mode As Integer, Optional ByVal Sep As String = ” • “) As String

Returns all the ItemNotes for a given mode as a single string, separated by Sep. (Default Sep is a bullet.)

Updated some of the things in the Protection system:

* Layers

If using User Managed Layers, the markers used to designate correspondence between armor items and layer values have been changed to use capital letters instead of the various footnote symbols. Within the location’s DR/DB value strings, the letters will be within brackets. This system appears much more readable and much easier to cross-reference.

* Deflect and Fortify stacking

The way Deflect and Fortify stacking issues are flagged has changed. If using User Managed Layers, then the layer that has had its Deflect or Fortify value ignored due to stacking will have a lower case ‘s’ appended to the Layer marker within the brackets. If not using User Managed Layers, then the ‘s’ marker just appears in brackets after the value string.

If there are Deflect or Fortify stacking issues at a location, a ‘-s’ marker is appended to the layers ‘L’ marker in the location box title.

* Other

Updated the values displayed in the Layers listbox of the Layers panel of the Protection window.

Updated the Protection box in Compact View to include a list of the applied armor. Clicking on an armor item will now highlight in gold all affected location boxes on the paper-doll. Conversely, clicking on a location box will highlight the armor items that affect it.

Updated the drawing of thee Protection box to reduce flashing during self-contained redraws.

Updated the default display order of the boxes in Compact View: Protection now comes directly after Equipment and before Melee Attacks; Messages is moved to the end.

In the Options dialog, the active character in GCA should now be the initial character active on the Current Character Options tab.

Updated ColorBlockSheet character sheet to include a listing of the applied armor and shields for the current loadout in the Protection block.

Updated code in a bunch of places to make use of newer systems and references, and to correct some hidden bugs resulting from bad references.

Updated some menu item handling.

Updated the Random Character system, and added support for it to the ChoiceList dialog and some of the message dialogs. The system will now allow for creating multiple random characters from the selected character template, or simply applying the randomized character template to the current character.

Updated Options for the hide/unhide of the explainer on the Random Character dialog.

I have changed the IDKey generation in GCA5 to be sourced from the System, rather than independently per character. The character still saves the last key it was issued, and this serves as a floor for future key requests in case a situation should arise where the System last key is lost. The new System key floor starts at 10,000 and increments from there–unless given a floor above the current last key, in which case the new key jumps to floor+1. This new system should ensure that all IDKeys are unique for all traits across all characters across an installation of GCA5 — assuming that no existing characters already had keys over 10,000.

IMPORTANT: I was going to do something a bit more complex for the new IDKey generation, and therefore had changed the IDKey to use Long values instead of Integer values. Changing to Long values required touching a lot of places in the code, and some may have been missed. If you encounter an overflow error, or a math exception, please let me know! This is very unlikely to be noticed until the auto-incrementing actually reaches the limits of Integer values.

Just a few little bits

Updated some of the menu icons.

Added a Traits menu to the main menu bar, which allows access to the same features as the right-click menu in trait lists.

Added options and UI to allow the user to select and use a page number link color of their choice, and to underline the links if desired. The default color is blue. (Changed the data file ‘touches’ tracking info text to the purple color.)

Added support for various default PDF readers to the launchcodes.xml file, which will be available for selection in the Options dialog by clicking the ‘…’ button next to the ‘PDF reader’ text box. Selecting one of the options will replace the text in the related text boxes with the info from the selected option. Only has codes for Acrobat and Sumatra right now.

Trying out a new trait icon in the right-side icon column: eye glasses, to show that the trait is to be included on the GM sheet.

Added a couple additional small bits of info to the View Info text for character traits: “Include on GM Sheet” if the trait is so flagged; and “Component Of: X” if the trait is a component item. Both of these also currently have icons in the right-side icon column of trait lists, but icon precedence may prevent the icons from showing, or make them difficult to see.

Launched bits

Fixed an issue related to needs items in braces when auto-adding prereqs.

Added a ‘Copy from Default’ button to Current Character Options.

Added trap to exit a Random selection of traits in a Select dialog if too many tries has still failed to create a valid set of random selections.

In Select dialogs, you can now add traits that already exist on the character to the character list from the Available list. Such items in the Available list are marked with a green check mark. Note that the points already spent in the trait won’t count against the points needed in the dialog. (Doing this previously required using the existing() tag on a #newitem to reference a known existing trait that you wanted to make use of. That option still remains.) This should simplify some constructions in templates.

Added an “override requirements” checkbox to the Select dialog. This allows you to activate the OK button and move on with the template, even though you may not have satisfied the specified requirements.

Adjusted the layout of the Select dialog a little, allowing for dynamic resizing of the user instruction area, and added an Explainer panel.

Added the UI in Options for the hiding of the Explainer panel in the Select dialog.

Moved the page info higher up in the View Info text display.

Added code to allow double-clicking on a page reference in View Info to launch the associated PDF. If GCA has information about a PDF for the given page reference, the page info will be a purple color, and double-clicking will perform the launch. If the page number isn’t purple, it’s not a link, and double-clicking will only irritate you. Right now, all page info is in the “bookcodes.xml” file in the GCA install folder. It only has a couple test references, since I don’t have any idea what the default names are for the official PDFs.

Added code & UI to Options to allow the user to specify their PDF reader and necessary launch arguments. Default is for Acrobat.

Added code & UI for a dialog, accessible from the PDF Launching box in Options, to allow the user to set a base PDF bin, and to set specific files and offsets for the PDFs that match the various book references that GCA uses. Changes made here are saved to a user version of the “bookcodes.xml” file in the user’s Books bin.

Bits modifiers

Added code to allow the Sheets drop-down on the Sheet View and Print Preview dialog toolbars to stretch out more if there is room for it.

Added some functions to SortedTraitCollection.

Restored drag-n-drop to Sheet view.

Sheet View should now retain its view position as much as possible when adding or removing items from the character sheet.

Added initial support for a Substitutions system, which allows one trait to substitute for another when GCA is tracking down references. This means you could create a ‘Guns (Small)’ skill that substitutes for ‘Guns (Pistol)’, and then when a reference to ‘Guns (Pistol)’ is being sought by GCA, ‘Guns (Small)’ would be considered a valid return. You create a substitution table by using the subsfor() tag in the item that is intended to substitute for the others. For example, our ‘Guns (Small)’ item would include ‘subsfor(“SK:Guns (Pistol)”)’ in order to create the substitution table. Multiple entries can be submitted at once in subsfor() by separating them with commas. The trait type prefix code is required in the subsfor() definition. Implementation is currently limited, but should be working in most places, such as defaults and weapons tables. Note that the item that is the substitute also qualifies as an existing instance of anything for which it substitutes, so adding one of those items after the substitution table is created would be considered a duplicate by GCA, and will be refused by default.

If the CTRL button is held down when drag-n-dropping a system item into a Character list in Compact View or Classic View, or onto the sheet in Sheet View, GCA will now add that trait even if it is a duplicate of an existing trait.

Added initial support for tracking what files ‘touch’ system items as they’re created and modified by data files. This will allow data file authors or debuggers to click on a system item and see in the View Info pane how the item was affected by various data files. Currently supports trait creation, replacing of previous traits, automatic replacement or merging of duplicate tag data, cloning, mergetags, and replacetags. (The related option in Options must be On when the fastload files are built in order for the data to be available; GCA won’t bother to track it if the option is Off.)

Added UI for the data file ‘touch’ tracking system option to Options, and altered the title/text of the enclosing options block from Logging to Book Processing.

Added #CloneMod data file command. Works like #Clone, but clones a modifier. Unlike traits, modifiers don’t have an item type, so they’re unique within their groups, so #CloneMod requires specifying the group and the full name of the modifier, like so: #CloneMod “group:modifier name” as “group 2:modifier name 2”.

Added #MergeModTags and #ReplaceModTags data file commands. You must target them using a group and name as specified for #CloneMod, but otherwise work as you’d expect from #MergeTags and #ReplaceTags. (For example: #replacemodtags in “Burning Attack Enhancements:Partial Dice” with “cost(+1/+2),formula(%level * 5)” ) The ALL keyword is not supported.

Added #DeleteModsFromGroup data file command. This allows for deleting specific modifiers from existing data. Similar to #DeleteFromGroup in structure, you specify the Mod Group from which you’re deleting items, then a space, then all the modifiers from that group that you want to delete, in a comma separated list. Enclose the mod group name in quotes, and enclose any modifier names that contain commas inside quotes as well. (For example: #DeleteModsFromGroup “Burning Attack Enhancements” Partial Dice, “Partial Dice, Per Die” )

Added #DeleteModGroup data file command. This allows deleting an entire group and all its modifiers at once. Specify the mod group name to remove, and its all removed. (For example: #DeleteModGroup “Burning Attack Limitations”)

Updated OfficialCharacterSheet to correctly reduce the component name column widths by the component indent level when printing traits.

Rebuilt plugins.

That’s a lotta bits

Missed from b44: Fixed an issue when pasting modifiers into an item that prevented proper recalculating of those modifiers and any bonuses they granted.

Updated Protection dialog to note the Deflect and Fortify values for armor in the Apply Armor list.

Updated Armor Layers Manager, and the Layers list in Protection, to show Fortify values.

Updated Loadout code to properly clear footnote markers for items that may have lost applicability for the current ordered layers.

Adjusted some of the GCACharacter properties/functions related to sheets.

Added some Sheet View related functions to GCACharacter.

Characters should now remember the sheet selected for Sheet View, and should switch to it if you switch between characters.

Switching between characters should now terminate editing within a Sheet View sheet.

Within a session, characters will now remember their position and zoom factor in Sheet View when switching between characters, or between views.

Added InSheetView property to the SheetOptionsManager, which is set to True when GCA runs a sheet in Sheet View.

GCA should now remember settings for default character options of stacking deflect and fortify.

Fixed Compact View box for Encumbrance & Move to let the encumbered move values be 0 if the starting score is 0.

Hooked up Options UI for default player name, and saving/loading of it.

Hooked up Options UI for default Character Sheet and Alternative Sheets, as well as the per-character selections, and the saving/loading of them all.

Hooked up the drop-down lists for Print/Preview buttons on the main window’s File toolbar, to make use of the active character’s specified sheets. (Since GCA5 handles sheets via plugins, and GCA4 handled them via script files, older characters will have things show up here that won’t work.)

Updated the GCATrait XML output to include chardeflect() and charfortify() in the ‘armordata’ block.

Renamed some internal controls.

Made some changes to the text/functionality of the dialog for restoring characters from auto-backups after a crash.

Updated the way GCA checks for the library & books used by a saved character.

Made some changes to the text used in the dialog when there are issues with a character’s library references.

Added a function to the character (QuickRulesOptionsCode(Optional ByVal Sep As String = “”) As String) which returns a short string code for which rules options are being used by that character. Returns only the non-default options in use, so the string will be empty if only the standard rules are being used.

Fixed an oversight in the handling of trait vars when assigning them to vars() using TagItem().

Updated the GCA5.xsd to include a reference for the SheetViewSheet to the GCACharacter ‘output’ block.

Updated the GCA5.xsd to include references for ‘chardeflect’ and ‘charfortify’ in the  ‘armordata’ block of GCATrait.

Updated ColorBlockSheet to include an Encumbrance & Move block, and modified the internal gridlines of the various blocks a little bit. Also added the QuickRulesOptionsCode output to the footer in parens after the GCA ident (but it only shows up if non-default options are in use).

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.

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.

Sheets:

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.

A few bits and new pieces

Classic View and Sheet View should now clean up better when the last open character is closed.

Fixed recently introduced bug that zoomed in the Sheet View when clicking on the page (only double-clicking should do that).

Views should now refresh better when the Protection window is closed with OK.

Protection window should now remember the layer pane’s orientation and size (when activated).

Updated the Library’s book loading function to correctly read [Languages] and [Cultures] sections from book files. These are just like [Advantages] in structure.

Updated processing to add Languages and Cultural Familiarities at the correct starting level.

Changed the character closing and program shut-down process a bit to allow for canceling the program exit and closing of some characters.

Revamped all the current explainer panels.

Fixed the Getting Started box in Compact view to work with zooming.

GCA will now offer to load any auto-backups it finds when restarting GCA after a crash. If you don’t load them, they’ll be lost when GCA does a normal shut down and cleans things up. (They’re now stored in C:\Users\[USER]\AppData\Roaming\Steve Jackson Games\GURPS Character Assistant 5\autobackup\ when they exist.)

Fixed a drawing refresh issue in the trait boxes in Compact view.

I’ve implemented the first draft of support for ‘gains’ type bonuses. Gains bonuses are bonuses that a trait claims for itself, based on some other trait, rather than having to edit that other trait to have it give a bonus. Right now, these are implemented through the existing gives() tag, but the format requires the use of the ‘from’ keyword, instead of the ‘to’ (actual or implied) keyword. For example, the tag gives(+1 from AD:Magery) would apply a bonus of +1/level of the Magery advantage to the trait containing the gives(+1 from AD:Magery) tag. This implies a ‘to Me’ clause, but actually including such is not supported. The ‘gains’ feature should support expanded keywords such as ‘onlyif’ and ‘upto’ and whatnot, but doesn’t currently support drawing from specific tags of the given source.

Data Files:

Added: GCA5 Changes.gdf to the system books. This includes Languages and Cultural Familiarities sections, but doesn’t remove them from the Advantages section yet, since all other places that add/need them would need to be updated too. It’ll include other needed changes as they occur to me.

Updated: GCA5 Changes.gdf: Added updated version of Language Talent, to reflect that the bonus shouldn’t apply if there are no levels in the language.

Plugins:

Once again, updated controls required recompiling Plugins. This is annoying.

Bit of interaction

* Started work on allowing for some kind of user interaction with the Sheet View. This uses the new SheetActionField object in the engine.

This system relies on the ability of C1 render objects to store user data. Unfortunately, neither table cells nor table rows support UserData, so if you’re using a table, as I am for almost everything in ColorBlockSheet, you’ll need to assign the text for the cell to a RenderText, then assign that as the cell’s render object, in order to also assign a SheetActionField to the RenderText’s UserData object. See this in the PrintTraitBlocks procedure of ColorBlockSheet.

GCA will look at the rendered items under the mouse pointer in Sheet View, and if one of the render objects has a SheetActionField in the UserData then it’ll allow highlighting of that object (and change the mouse pointer).

Right now, no matter what else is set, so long as the SheetActionField has an ActionObject that is a GCATrait, then GCA will allow the user to double-click the field to open the Edit window. That’s the only bit of this currently working (although you can also change the HighlightPen to change the color and size of the highlight box around active items).

All other bits of this are in flux.

* Fixed points bar not updating when switching between characters in Sheet View.

* GCA will now automatically enter into the Log the plugin.Name and plugin.Version of the sheet the user has switched to in Sheet View. This should mean that the sheets themselves no longer need to do that, which means they won’t keep filling up the log with version notices.

* OfficialCharacterSheet updated to reflect user font/color options in Reaction Modifiers box.

* Both included sheets updated to no longer print name and version to log.

* ColorBlockSheet updated to use the new SheetActionField to allow interaction in Sheet View, and to demonstrate how it works right now.