Category Archives: Build Notes

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

Even more bits get updated

b111

Changed some flags in GCATrait to use boolean states instead.

Had to perform some surgery on trait lists in Unified View to correct a logic error, and there and in Classic View to fix issues caused by some previous work and by the new boolean states.

There is an option to gray-out library traits for which the character hasn’t met the preqeqs. When this option is active, and a trait makes use of certain optional features, a crash could result. That should now be fixed.

I added the double-width option to the gear drop-down on trait boxes in Unified View.

Noticed there were some other oddities related to ctrl key combos in trait lists, so adjusted my copy/paste fix to fix that.

Traits pasted into character lists should now be selected.

I have created a small program called ‘thecleaner.exe’ that gets installed into the GCA5 system folder. When uninstalling GCA5, this program will be run to clean up the known source folders (\books\, \characters\, \images\, and \plugins\) in the *system folder only*. Without this, the update system might install new files to those folders, and they will not normally be removed by uninstalling, because the installer did not put them there. With this little program, each folder is fully removed, and no remnants should be left behind in the Program Files folder after an uninstall. Again, this *does not* delete anything from your Documents folder.

* Type Safety and Object Cleanup

Did a little more of this.

* Resync dialog

Rejiggered things to adjust better to resizing, and allow for it to be resized.

Removed some things from the dialog for which support was never added.

* Build Campaign Book dialog

I have hooked back up the Settings tab, and it now allows for changing many of the settings discussed in the last build.

You can choose whether or not to work with two groups of settings: Campaign and Rules. When saving the book to disk, GCA will only save the settings for the groups that you choose to include, but will include all settings from those groups.

Also updated some of the code so that deleting traits and changing libraries will work a bit better. Note that if you change libraries, any existing work on your book will be lost, so be sure to start with the right library.

* Updater

I have built a new system for packaging updates of the various files (books, images, etc.). This new packager ZIPs the changed files to reduce bandwidth requirements, and creates a manifest of all the files in the update.

Supporting the new ZIP files, GCA itself has been updated to download and extract the ZIPs before running the Updater.

The new system also considers an update ‘package’ to be the correct state of the GCA install files. This means that any files that GCA finds in the system folders that are not reflected by the new ‘state’ will be flagged for deletion by the Updater. (There are ‘bins’ of files, so an update can ignore all the Plugins, for example, and GCA won’t delete them; it knows they were ignored.) This very much reinforces that users should not change the files in the system folder.

This new process should allow us to make changes to the files included in the system folders, and not have outdated files left behind. It also means that files no longer being used can be deleted by the system automatically, without any additional work by those creating the update.

Note that GCA passes the file deletion requests to the Updater, so those will only happen if there is something else pending (file copying or new installer) that needs the Updater to be run.

Eventually you get a byte

b110

I had noticed a while back that adding a new trait didn’t always result in all the boxes in Unified View correctly displaying the changes resulting from that new trait. That should now be fixed.

If a trait’s calculated damage changes, it will now be tagged as ‘dirty’.

If a trait’s skill used changes, or if the skill used score changes, it will now be tagged as ‘dirty’.

* Bonuses

Added the ability to target a standard bonus (a target with a prefix tag and a name) to a trait name of #any, which means you can target a whole class of things for a specific targetable tag, if you wish. For example

-1 to EQ:#Any::minst

would allow you to reduce the minst() requirements for all equipment items by 1 per level.

* Type Safety and Object Cleanup

Continued where encountered, but less aggressively as a whole.

* Settings, Default Settings, and Books

The [Settings] block of a Book file has long been able to set certain basic settings for operation. However, these settings changed the *overall* configuration of how GCA operated, and that model doesn’t fit well with how GCA5 allows for each character to be operating with different libraries, and therefore potentially the intention of very different intended settings.

The model now works a bit differently, and has expanded. Default settings are either set internally for normally expected GURPS operation, or they’re set on the Default Character Options pane of the Options dialog (depending on the type of setting). These go into the initial engine configuration, as loaded before any library is loaded. Then, when a library is created, it’s created with a set of options that match the default engine configuration. Once the library loads data, that data may change the defaults as set by the [Settings] blocks in book files. Finally, when a character is created, it is initialized with the settings in the library, and some of those can be changed on the Current Character Options pane of the Options dialog.

This is another change that reaches deep into GCA, but the effects of a mistake are unlikely to cause exceptions; instead the proper setting may not be honored as expected.

What settings can be set in [Settings] has been expanded with additional options, a quickie list of which is here:

CampaignName = value
DefaultTL = value
BasePoints = value
DisadLimit = value
QuirkLimit = value
HasDisadLimit = yes/no
HasQuirkLimit = yes/no
RuleOf = value
GlobalRuleOf = yes/no
UseDiceAddsConversion = yes/no
ModMultPercents = yes/no
AllowNonIQOptSpecs = yes/no
ModMaxNegPercentLimit = value
NoDefaultLevelDiscount = yes/no
AllowStackingFortify = yes/no
AllowStackingDeflect = yes/no
AllowHalfPointSpells = yes/no

This change to Settings has also changed the FastFileVersion, so all fastload files will be rebuilt.

* GCACharacter

All the character settings that match those initialized from library settings are now found through the Settings property, which returns a LibrarySettings object with those properties.

The AllowUserTraitOrdering setting (not part of the group above) was never saved/loaded from character files, but should be now.

* GCA5.XSD

Updated with the missing ‘allowusertraitordering’ element for GCACharacter.

And a bit for today

b109

Made a slight visual adjustment to the Select Export Sheet dialog (to not show the dark ‘Sheet Description’ label, which is kinda redundant and negatively impacts the look and feel of the dialog).

Fixed an issue with double-clicking the empty modifiers list in the Modifiers dialog.

Fixed an issue with trait name boxes in Simple Edit losing their background color for Attributes (which are non-editable).

The splash screen should now close earlier during startup.

Pasted in traits should now get any applicable symbol icons assigned correctly.

If you tried to copy-n-paste traits in trait lists using CTRL+C and CTRL+V, the list would read that C or V as part of the type-to-search feature. (Did it always do that?) That was incredibly annoying. I have fixed that.

I have included the current weight of each loadout in the drop-down lists for loadout selection in the Movement box and on the Attributes tab.

I have partially restored a feature we had early on with GCA5, which is highlighting everything affected when you change a trait. I disabled it a long while back because the event model being used resulted in completely unreliable results. However, I realized that with some minor adjustments I could probably get it to work again. This is considered experimental, and it only works correctly when incrementing, decrementing, or directly setting the score of a trait. I can probably enable other circumstances, but things are definitely not updated correctly after editing tags or other such things.

* Updater

I have added a check during the Updater process to be sure that GCA doesn’t try to track duplicate assemblies when gathering data on what might need to be updated.

* Type Safety and Object Cleanup

Continued as per last build.

Fixed various bugs that popped up because of this work, but that weren’t caught during it.

* Accessibility

I have added some additional accessibility names in some places. This work continues slowly. I have found that Narrator will sometimes read a label that is supposed to be invisible because it doesn’t currently apply. This is a bit annoying, and I’m not sure if I’ll be able to fix that.

Also, I’m pretty sure I’m not well qualified to create a good interface for GCA to assist with accessibility issues. I will happily accept guidance if you have some.

A bit more of the same

b107

* Type Safety and Object Cleanup

I have continued to tighten up type conversions, to aid in the quest for stronger type safety.

I have also created some new objects as typed versions of previously generic systems. This has helpfully exposed some hidden issues, but may surface some others in ways that weren’t obvious.

In some cases, I have elected to change to a different sort of collection or list, if it was also typed. This was usually one that should be faster or have lower overhead when not all the features of the original variety were required for a particular implementation or type of data. This may introduce unexpected errors due to the difference between various types being 0-based or 1-based, and some routines iterating based on assumption of the base. In every case I can think of right now (BasicDamages, DamageBreaks, SkillCosts), I went from a 1-based collection to a 0-based list, so problems may show up in two primary ways: (1) the first value in the list never being seen, or (2) the program crashing as it tries to access an item beyond the end of the list.

These factors have, of course, resulted in some changes to the object model.

NOTE: These few sentences don’t do justice to the full impact this work has, especially since it’s not particularly complex in nature. However, this is the most foundationally impactful and invasive work on the core of GCA5 in years, and affects nearly every system and subsystem in use. Hundreds of lines of code were touched, and thousands more affected by the new custom collections, with many previously generic systems replaced by strongly typed ones. If I touched everything I needed to touch correctly, you shouldn’t even notice; if not. . . all sorts of wrong.

And I’m not done yet.

* Miscellaneous

Removed the remaining code for saving characters back to the old GCA4 format. (Saving to GCA4 format was removed a long time ago; this was just some left over code.)

Disabled/hid the Modifiers and Settings tabs on the Build Campaign Book dialog, as those are nowhere near working yet.

Next day, a bit more

b106

I have been tightening up as many cases of implicit type conversion, to use explicit type conversion, as I can. This may result in errors if I made a mistake in specifying the conversion myself.

I have replaced all uses of the Decimal data type in GCA’s objects with Double. This may result in previously unseen artifacts resulting from floating point math issues, but does fix an annoying artifact resulting from the way Decimal remembers decimal precision.

One more bit in the wall

b105

* Unified View

I have finally removed the Viewport boxes from Unified view, and restored the previous versions of the trait boxes. I hope to revisit Viewports some day, but as of now, they are no longer supported in the UI.

* Miscellaneous

Apparently the newmode() tag for adding modes to traits from datafiles was never supported by Spells. I have fixed that.

I have updated the Classic view so the library in use will be listed in the Library list header for most trait types.

If a character isn’t currently using a loadout, the Loadout options on the right-click menus for traits will be disabled.

Added a setting to control the number of MRU files that are remembered.

Moved the option to change the character’s library from the library toolbar button to the Character menu. Also, improved usability so that the dialog that opens shows the character’s current library selection, and if the user selects nothing, no changes are made.

One primary bit

b104

* Edit Modes dialog

I have implemented the first draft of the Edit Modes dialog. This allows for editing, adding, and removing attack modes for traits. You can also drag the columns around to rearrange the order of the modes.

* Edit Items dialog

Added a button to launch the Edit Modes dialog.

* Advanced Edit dialog

Mode-enabled tags have been removed from the tag list in the Advanced Edit dialog.

With the mode tags removed, I had to add some code to preserve the mode data when moving in and out of this dialog.

Added an Edit Modes button to the bottom of the form, so that you can get to the Edit Modes dialog from here as well.

* Miscellaneous

Fixed a typo on the Options dialog.

Reverted a change I had made to where some event handlers for characters were enabled, due to that change resulting in dialogs and such being called two or more times for some events.

Given the reversion above, I have changed the updating of the UI for Unified view a bit to keep it updated correctly when changing to it when a character was opened in a different View.

Updated the character tab images so that the ‘unsaved’ icon should show when new traits get added to the lists.

Added some Interface references to some of the objects to allow simplifying things in some areas of code.

Made a small visual change to the attack modes in the Simple Edit display.

A mess of bits splattered about

b103

* Accessibility

I have just begun adding proper accessibility names and descriptions for things where I can. This will take time, but the excellent Windows Narrator built into Windows 10 is helping me identify the many places where I need to improve things.

The interface in GCA5 is pretty busy for screen readers. I’ll probably have to offer a stripped down version at some point.

* Miscellaneous

Added some code to let my controls display styled text if I want to update them to do so.

Added some additional error traps.

Restructured some code.

Repaired the code in Updater for integrating libraryupdates.xml into the new system that uses fileupdates.xml. The intent was that the old library update generator would still work for updating library specific book files, while the new general file update generator would allow for all files, including the library files if specified. At some point, the code for actually integrating the libraryupdates.xml information into the process was bypassed, but now it should be included correctly again.

Closing characters in the UI should trigger slightly less chaotic UI refresh behavior.

Characters should no longer be getting marked as Dirty every time they are loaded into GCA.

Having fixed the ‘Dirty’ issue mentioned above, I found that there was also an issue with how tabs were changing the ‘dirty’ or ‘clean’ image for the tab, so I changed how that is set.

Discovered a problem with where I was assigning certain event handlers for characters in the UI. Changed where they are assigned.

Changed some of the graphic elements for the third toolbar, to help clarify which ‘buttons’ are checkbox style, which are either-or radiobox style, and which are selected.

Changed the images used on the character tabs for ‘dirty’ and ‘clean’ characters.

Slightly improved some of the drawing code for trait boxes when drawing traits, group headers, and header information.

Added a character option for “No default level discount,” which effectively turns off the ability to improve skills from the default level, and requires every point spent to buy levels normally, ignoring any discount defaulting might have provided.

Added a button to Unified View which provides a horizontal override, similar to the existing vertical version. This mode limits boxes to the height of the display area, and turns off flow-wrapping of boxes in the worksapce. This allows for a horizontally scrolling workspace, and limits scrolling to within the lists themselves, rather than scrolling the entire workspace to move within long trait lists.

* Plugins

Recompiled for changes in interfaces and structures.

* Trait Viewports

Viewports are a new way of organizing traits for interaction and display. Basically, a Trait Viewport (Viewports for short) is a list of a particular type, such as Spells, that only includes those traits that meet specific criteria, such as all being Druidic. This new way of handling traits allows for much more freedom in what can be displayed and how the user can interact with it, over the previous way of being restricted to one list per type of trait.

In addition, with each Viewport being its own thing, it’s possible to match that up with particular display preferences based on the Viewport, so users can customize how they view different Viewports without it affecting other data of the same type.

GCA still organizes all traits internally by trait type (spell, skill, advantage, etc.), but each character will also track and manage all the viewports that are defined for it, so that they can be carried along whereever the character goes. Importantly, the Viewports are only saved in the character by definition, which is the criteria used to create it; the traits are not saved in the character file with that information actually applied to trait or list data, so you will not be able to just read the XML file to get a list of a Viewport’s traits; the Viewport will have to be created and filled somehow (which GCA does automatically while managing the character).

The display information for each Viewport, however, is user specific, and is not saved with the character at all. Different users or different computers or whatever may call for different display options, so those Viewport display options are maintained with the other user settings for your GCA installation. GCA has default settings for each type of trait, so loading a character with a Viewport that you’ve never specified settings for will result in the default settings for that type being applied.

I have created new trait boxes for Unified View, based on Trait Viewports. These new boxes embrace the whole new Viewport structure, including display options. Because of the changes, I’ve also changed how ordering is indicated in the column headers for the lists. Although the three standard color options (grey, red, yellow) are still provided, since they’re drawn into the header area using transparency, you may find the results often aren’t quite what you’d expect. The default ‘gray’ option tends to look best.

Trait Viewport Usage Notes

When building a Display Template for a Viewport:

You can format the TAG column of a Column two ways, if TagIsFormatted is True. If TagIsFormatted is False, then only the Tag name may be specified and only that value retrieved.

1) You can support String.Format() style substitution by including {X} markers where X is 0 through whatever.
Then include a comma separated list of values that will be inserted into the {X} markers. This list is counted from base 0, so the first item goes into {0}, second in {1}, etc.
This allows you to format the Tag field with whatever values you like, so long as the following list of values are valid Tags.
For example, you could use “{0} lbs, weight” for the Weight column of Equipment, where the value of the Tag ‘weight’ is inserted for {0}.

2) You can specify a numeric format for tag values that are themselves numeric values. If you do this for a non-numeric value, results will be unexpected.
You do this by including the keyword #format followed by the numeric format to use, best enclosed in quotes or braces (required if the format includes a comma).
The format uses the .Net Numeric Format strings, so there’s online docs for that out there.
For example, our Weight column could use “{0} lbs, weight #format {#,0.00}” to build on our example above, which formats the weight value to use commas to separate thousands, and always include two decimal places.

You can use the tag numeric formatting without the substitution, such as “weight #format {#,0.00}” to just show the weight without including the ” lbs” from our example.

Only one Tag can be specified, unless you use the substitution method.

Viewport Development Note

Right now, it looks like Viewports are too much for me to get done, UI wise, for other parts of GCA. So, I’ll probably not be rolling them out to Classic or anywhere else for initial release. However, they’re supported internally.

For this build, and maybe the future (we’ll see), they’re the way the Unified view displays traits. Since the default Viewports are the same as the standard way of doing things, that shouldn’t change anything for you. However, the tools for changing the display outputs, and the viewports themselves, are basically half-baked. They usually work for the first change you make, but then don’t, for some reason. If I can fix that, maybe I’ll keep Viewports here for now. Otherwise, I’ll roll them back in Unified as well.

However, regardless of how that works out, Viewports can still be used programmatically for output sheets if authors want to use them.

Addressing some broken bits

b102

* Miscellaneous

If you click on one of the point boxes in the Status bar, and you’re in Classic view, GCA will change to that tab.

When saving a trait to a GDF file, GCA was erroneously deleting the step() tag for attributes. Deleting the tag for other trait types is correct, but it is required for attributes to function correctly. That is now fixed.

Fixed a crash bug in the Save as Book function of the Build Campaign Book window.

Some bugs were identified in the new updater code in GCA, so those have been addressed.

The XML writing code for GCABonus overlooked writing out target name extensions, turning all specific bonuses into general bonuses for all saved and re-loaded characters. That has been fixed.

When pasting traits into a character, GCA was not correctly handling a temporary parent-child relationship tag that was being created automatically as part of XML processing, but wasnt’ needed for the pasting process. This caused problems when the character was saved and loaded again later. That temporary tag is now being removed during processing.

* GCA5.XSD

Updated with the missing ‘targetext’ element for GCABonus.