Uses bits (b133)

b133

When GCA outputs to the log that it found plugins, it now also lists their names and versions, to provide an easy way at startup to verify exactly what is being loaded.

Changed the code in Unified trait boxes slightly, to allow clicking an empty trait box to set the focus there, which clears active selections in other boxes.

Added some helper features to ModeManager: made the modes in ModeManager enumerable, added a function to get a sub-set ModeManager for all modes that have a value for a given tag.

Added the calculated tag charskillusedkey() to modes. This allows for more easily referencing the trait found and used for charskillscore() and charskillused().

Updated the Edit Modes dialog to properly show/hide the calculated values while also allowing the rows to be auto-resized to show long text strings.

Made some adjustments to the Edit Modes dialog to attempt to work around a bug in the grid that prevents user-resizing of the last column at times.

Hooked up hiding/showing the Edit Modes dialog explainer on the Edit Modes dialog and in Options.

When a Mode is in the clipboard as an XML fragment, in the same format as copied from the Edit Modes dialog, it can now be pasted to traits. A mode pasted in this way is tacked on as a new mode, with no value checking or any attempt at avoiding duplicates.

Fixed a bug related to some old code in the Colors & Layout dialog.

Noticed that GCA wasn’t saving/loading the order of the boxes in Unified as set in Colors & Layout. Fixed that.

Found a bug that would crash GCA and prevent it from loading if the Horizontal Page Override setting was On in Unified view. I’ve adjusted some of the form initialization code, which fixed it.

Added an option to opening and closing GCA. If the Shift + Ctrl keys are being held down when GCA starts up, GCA will not load most saved settings values. This should allow for a way to get GCA started if a rogue setting is crashing things, although all the other settings will also be lost. Likewise, if the Shift + Ctrl keys are being held down when the main GCA window is closing, GCA will not save the current settings. This allows for a way to avoid saving settings you changed but don’t want to keep.

Fixed an issue where GCA was keeping way more files in the saved MRU files list than was correct for the value set in Options.

* Select()

Select() dialogs will now return the number of items selected and the points spent, and the number of items unselected and points unspent when it’s possible to determine that, when the user finishes the dialog. This allows for referencing those values in other Select() dialogs down the line.

Note that if ‘atleast’ is specified for points or count, the unused or unspent values will always be zero.

To use these values, you will need to add a name() tag into the tag list for the Select(), and specify a name. If you don’t specify the name(), the default name is just the number of the Select() in the processing order (if you used SelectX() outside of triggers(), X will be the number, otherwise it’s counted from 1 with the first Select() dialog). You can then reference the desired value in the pointswanted() or itemswanted()/numberwanted() tags, just as you would with a #ChoiceList substition, using the name of the Select() and the desired value within % signs.

The variables are: %Xunspentpoints%, %Xspentpoints%, %Xunusedslots%, %Xusedslots%, %Xnumberunused%, %Xnumberused%.

The X in each is replaced by the Select’s name() value.

%Xunspentpoints% and %Xspentpoints% return unspent and spent points, respectively, for the specified Select().

%Xunusedslots% and %Xnumberunused% will both return the allowed number of picks that went unused, and %Xusedslots% and %Xnumberused% will both return the number of picks actually used.

So, a Select() with name(Alpha) would use %alphaunspentpoints% in a subsequent Select() pointswanted() tag to reference those unused points, maybe something like pointswanted(30 + %alphaunspentpoints%) to allow for those unused points to be spent here.

Of course, this means that math is now enabled for pointswanted() and itemswanted()/numberwanted().

Also fixed a bug in the Select() code while I was doing this, where the MaxCost was being set incorrectly when ‘exactly’ was used for pointswanted().

* Protection

Changing the text in the Description boxes on the Locations and Hit Table tabs will now remember that for the character, and for the currently selected Body Type or Hit Table while in the same session of the Protection dialog. However, opening the dialog again later will have the library versions of the descriptions restored, so if you choose a different option from the drop-downs, the standard library text will replace the text in the Description box.

Renamed the Locations tab to Body & Locations.

* Uses

Started integrating support for the uses() tag, as pioneered by Phoenix. Right now, this includes a floating window with the uses for all selected traits, but that likely won’t stick around.

Added a Uses block to the Simple Edit dialog.

All of this support is mode-enabled, so each of the tags mentioned here are mode-specific tags. Even a trait that otherwise would have no modes will have at least one mode to support the uses() system.

Support currently exists as a mini-subsystem within GCA, utilizing the uses(), uses_sections(), uses_settings(), and uses_used() tags.

Uses() allows for specifying how many uses (doses, shots, bullets, etc.) are available, and to create check boxes for them. The special variable ‘count’ is supported as it is for Phoenix.

Uses_sections() allows for specifying how many groups of the uses() check boxes to create, which are shown in different sections on the current display control. This was called usescount() by Phoenix, but I wanted to have all the sub-tags use underscores and thought this would more clearly show how I see it working. I have set up aliases in GCA to allow using the usescount() tag to access the uses_sections() tag data. GCA should handle that transparently, but will save it out to the save files as the uses_sections() tag.. The special variable ‘count’ is supported as it is for Phoenix.

Uses_settings() contains a uses() specific set of tags that specifies display and operational settings for the Uses subsystem and controls. These tags should be formatted exactly like any other tag list, separated by commas. For example: usersettings( selectioncolor(orange), trackusesbysection(False), uselargerboxes(True) ).

Uses_used() tracks how many uses have been used of the uses() available. If tracking uses by section, then this may be a list of numbers separated by + signs, such as ‘4+0+1’ to show that there are three sections, and there have been 4 uses used in the first section and 1 uses used in the last section. If not tracking uses by section, then even if you have different sections specified, all uses are consumed as if from one big pile. Tracking uses by section is currently the default behavior.

If you right-click on a Uses display, you should get the option to make changes to the block’s settings.

* GCA5.xsd

Updated for uses(), uses_sections(), uses_used(), and uses_settings() in the GCAAttackMode block.

Updated for charskillusedkey().

* tagdefs.xml

Updated for the uses(), uses_sections(), uses_used(), and uses_settings() mode tags.

Updated for charskillusedkey().

* Basic Set

In the Basic Set file, the Karate skill has an extra | in itemnotes() at the end, which results in an unnecessary second Kick mode being added. I haved added a corrected version of Karate to the GCA5 Changes.GDF file.

* Official Character Sheet

This now has options for printing the User Notes and/or Description tags for traits, settable per trait type in Sheet Options.

A bit more byte, really (b132)

b132

In Unified view, at some point the Encumbrance & Move box stopped updating the Loadout pulldown correctly when the Loadout in the Protection box was changed, unless some of the traits referenced within it had also changed. Since the pulldown is meant to always be the same in both places, that discrepancy has been fixed..

* Book processing

I’ve adjusted how loading category headers for some data blocks works. For blocks that are not traits, but use sections in the style, GCA will now allow a colon to be used in the category name instead of unnecessarily separating out a non-existent category/college code.

I’ve updated the code for saving GDF files from the Build Campaign Book tool so that it will save the new or updated [Bodies], [HitTables], and [Wizards] sections.

Made some minor adjustments for how a Body is now built in the Library, but the files themselves aren’t changed.

* Body processing

I have changed the way that a Library handles the bodies and the [Body] block. Instead of a huge list of body parts that belong to various bodies, the Library now manages Body objects, each of which has its own BodyPart collection; like how a Character handles it. This has required some changes in the Book loading code, but the Book files themselves require no changes.

You can also now specify a [Body] section in a Book file using [Bodies].

Because I went ahead and changed this, the code I previously shoehorned in for body descriptions is no longer necessary, but you still add a description to a body the same way: just put a line into the Body data like this: description(This is the description). It should be the only thing on the line.

* Body part definitions

I was annoyed at myself that there’s a mix of body parts/locations with or without appropriate spaces in the name, so I’ve standardized on having spaces in the names. (This was my fault, since the default body messed this up. I think the Humanoid Expanded body always had spaces in the part names.). This will have an effect on any item/trait with a location() coverage that uses a name without a space when now the name has a space, so we’ll need to update data files to fix those where appropriate.

The body parts affected by this (just the Humanoid ones since other bodies didn’t exist before): LeftEye, RightEye, LeftArm, RightArm, LeftHand, RightHand, LeftLeg, RightLeg, LeftFoot, RightFoot.

I’ve adjusted GCA5 Changes.GDF and the GCA5 version of GURPS Additional Body Types.GDF to fix the bodies defined there to use spaces as appropriate.

* Protection dialog

Added a box for the Description of the Body Type to the Locations tab of the Protection dialog.

Added a new tab for Hit Table to the Protection dialog.

Made a lot of changes in the Protection dialog for the new handling of Bodies, Hit Locations Tables, and per-Loadout images.

You can now set and change the protection image for each loadout, allowing you to customize as you’d like.

Fixed the grids in use to support the dialog’s Zoom mode.

Description fields don’t currently save any changes.

Hit Location Tables aren’t currently editable.

The buttons on the Hit Table tab are not working.

* GCACharacter

GCA now has an ImageStore object (a Collection of the new ImageReference object), and GCACharacter is using that for the BodyImageStore, which stores the various body images. When images are loaded, they’ll be loaded in the store and referenced as needed. This should mean that no image ever needs to be in memory more than once, no matter how many Loadouts may specify it.

The character now has a bunch of new or reorganized properties related to the default body and body image. These defaults are used when a new Loadout is created, and are used for the “All unassigned items” loadout, so changing those values in the Protection dialog will affect the default values. All of these properties are too esoteric to get into here.

* Saved Characters

With each Loadout able to have its own image now, the character file can get pretty large. (Actually, it was already getting pretty large with the various possible images stored inside.)

The existing experimental program option “Store character portraits within the character files” is now also used to determine whether or not the new Body Image Store writes the stored images out to the saved character file. If this option is not set, the images are not saved, and must be loaded from the file name references when first needed after a character is loaded.

GCA should also no longer be saving an image out to the BodyImage element of the file, since if it exists now, it should be found inside the Body Image Store.

GCA also now saves a Hit Location Table with each Loadout, and a default one within the main character body.

* Hit Location Tables

GCA will now read and store the HitTables block from data files. That block looks like this:

[HitTables]
<Quadruped>
description(Like a dog or a cow.)
roll(-), location(Eye), penalty(-9)
roll(3-4), location(Skull), penalty(-7)
roll(5), location(Face), penalty(-5)
roll(6), location(Neck), penalty(-5)
roll(7-8), location(Foreleg), penalty(-2), notes(*)
roll(9-10), location(Torso), penalty(0)
roll(11), location(Torso), penalty(0)
roll(12), location(Groin), penalty(-3)
roll(13-14), location(Hind Leg), penalty(-2), notes(*)
roll(15-16), location(Foot), penalty(-4), notes(*)
roll(17-18), location(Tail), penalty(-3), notes(T)
roll(-), location(Vitals), penalty(-3)
note(*), text(note text here)
note(T), text(other note text here)

Using a section with a HitTable name that already exists will replace the existing one with the new one.

There are three different types of data lines there, which shouldn’t be mixed: description, roll, and note.

I elected to separate notes() from note() like this so I could specify exactly the note markers for the notes to be used, rather than relying on GCA’s footnote system later. I figured in this case, where these tables are often printed in truncated form, it was better to use the same markers as might appear in the source material for easier book reference.

This is just data. GCA makes no effort to check roll ranges, or to verify that notes() entries match note() lines.

Each Loadout can specify the appropriate Hit Location Table to use. If a table uses the same name as a body type, it should be the default when the body type is changed. However, if the Body Type and the Hit Location Table name do not match, GCA won’t change the Hit Location Table to match the Body Type when Body Type is changed, because it’s assumed you wanted a different table.

* Data Files

GURPS Additional Body Types.GDF is now included in \books\, and includes both the Body body part definitions and the HitTables hit location tables.

FastLoad files will be rebuilt, because I updated a bunch of code related to [Bodies] and [HitTables].

* Plugins

The GCACharacter object model has had some changes with the work to support various things in this update, plus I made a couple things that weren’t properties into properties, so you’ll likely need to recompile any compiled plug-ins.

* GCA5.xsd

Updated for various new stuff.

Some bits friendlier (b131)

b131

The warning panel in Classic view that advises a resync when Character categories don’t match Library categories was appearing on all tabs even when the categories in that tab actually matched. That has been fixed.

Adjusted the Advanced Edit dialog’s tag info to honor the minimum RTF size.

Shoehorned in the ability to add a description to a Body. The old code for loading a Body and tracking BodyParts in the Library needs to be updated to better reflect how things are done now, but until then, I’ve just made it so you can add and track descriptions for the Body. To add a description, just put a line into the Body data like this: description(This is the description).

There were some legacy values GCA5 was tracking and filling for backward compatibility with GCA4 save files. These values were related to DR and PD for body parts such as feet and hands, which don’t exist on all body types. GCA trying to store those values was crashing the program. Since I no longer write GCA4 files, those compatibility values are no longer needed. Rather than trapping for the missing bits, I have removed the related code. Should I later decide to try writing a backward compatible save file, those features can easily be replicated through other means.

* FastLoad

FastLoad files will be rebuilt because I changed some of the data being tracked related to Body.

* Uses

I have built a new control to allow tracking of how many uses a trait may have, and how many may be used. This supports the uses() tag that the Phoenix sheet supports, and will likely add some additional support tags, such as uses_used(). *Not yet integrated into GCA.*

* ModeManager

Added two new functions MeleeAttackModes() As ModeManager and RangedAttackModes() As ModeManager. Each returns a ModeManager that contains the subset of the trait’s modes related to that type of attack. Remember that some traits may use features with modes that are not types of attacks.

* LoadOut

Added the function ProtectingLocation(Location As String) As Collection, which returns a collection of GCATraits that provide protection to the specified Location (aka BodyPart). Only returns traits that are *applied* in the current loadout!

* Body

Added functions AllLocations() and AllBodyPartNames(), both of which return a Collection of Strings which is all the body parts (aka Locations) in that Body.

Added functions AllVisibleLocations() and AllVisibleBodyPartNames(), which are the same as above, but only include body parts that are displayed on the body diagram.

Changed the Add(BodyPart) routine to not use an optional Key (it always uses the BodyPart CollectionKey now).

Added the CollectionKey property to the BodyPart object, to match most other objects, which returns the CollectionKey for the object (in this case, the lowercase Name).

Added a Contains(Location) function to return True if the location is one contained in the body.

Added properties for both Name, so the body can know itself, and Description, so the user might know more about it.

* GCA5 Changes.GDF

Updated to include a couple body types with dummy description() tags for testing.

* GCA5.xsd

Updated to reflect changes to Body.

Sweeping up the bits (b130)

b130

Updated the code for pasting modifiers and tags into traits to ensure that the targets are marked dirty and will redraw immediately.

Updated the code for saving traits to save the recently added tags within the normal structure, rather than in the Extended tags block.

You can now use drag-n-drop in the Attributes list (on the left side) of the Attributes pane of Classic view to rearrange the mainwin() order of the attributes by dragging them to new positions.

Added a new option to the right-click menu for traits on the Attributes pane of Classic view, and to the gear menu on the Attributes box in Unified view: Create New Attribute. This will create a new attribute with a few possible options, but the user will have to do most of the editing to fully flesh out the attribute they want. This works by injecting a simple “new attribute wizard” into the system. The wizard is effectively a system trait, but attributes have no system lists to pick from.

Added a button to the bottom of the center section of the Attributes pane of Classic view to also add a new attribute.

Added a new section to data files which allows for creating system wizards using data file features. This section is called [Wizards] and must have a specific format where each category in the section is a particular trait type, such as . If this ever gets used for anything else, different trait names within each trait-type category would likely serve as the names of the various wizards for that type of trait.

GCA now reads the [Wizards] block and stores the data in the Library. This block is library specific, and is never saved within the character data. Support of this new section requires new FastLoad files, so those will be rebuilt as you use your libraries. NOTE: At this time, only the Create New Attribute wizard uses this data, and it currently uses only the first Attribute-specific wizard it finds, regardless of name.

Added a setting in the Options dialog for the preferred minimum font size for the RTF text displays.

Added an explainer to the Resync dialog, and adjusted the text at the bottom of the window.

* GCA5 Changes.GDF

Updated to include the new [Wizards] block with a copy of the built-in Attribute wizard for reference or replacement in your files.

* gca5.xsd

Updated for recently added tags.

* tagdefs.xml

Updated for recently added tags.

Mostly updating bits related to bits in the previous build (b129)

b129

Updated the Traits menu, and the right-click menus for traits on the Classic and Unified views, to allow setting Highlight colors of yellow, pink, magenta, lime, cyan, red, green, or blue.

Updated the Traits menu, and the right-click menus for traits on the Classic and Unified views, to allow Collapse/Expand of parent traits.

Updated the UI to include expanded/collapsed indicators on the tree for parent/child items. You can currently only expand/collapse using the menu options, however.

I have updated Paste for traits so that you can now paste Tags that may be on the clipboard as XML (such as when you copy them using Copy Tags or CTRL+SHIFT+C in Advanced Edit). Pasting Tags in this way replaces any existing tags with the same names, and pastes to all selected traits.

I have updated drag-n-drop in the Attributes box in Unified to allow you to rearrange the mainwin() order of the attributes by dragging them to new positions. (This only works when you are not currently viewing a re-ordered list in the box.)

It is now possible to cut-n-paste attributes. Duplicate attributes are still not allowed, so pasting an attribute with a name that already exists will be refused.

Type-to-search in the Classic Attributes lists should now update the search buffer display on the toolbar as other trait lists do.

* Sheets

My print sheets have been updated with support for highlight colors and collapsed parents.

Bits of a variety pack (b128)

b128

You can now delete attributes from a character. GCA will pop up a dialog that warns against it and asks for confirmation. The dialog will also tell you what other traits appear to be directly affected by that attribute, if any. You may then proceed to delete it if you wish.

The way that Attributes are Resynchronized has changed, so it’s a bit less of a special case than before. It first ensures that all attributes in the library exist on the character, and then it uses the standard system (as for the other traits) to resync all the attributes with the library. The standard system will then notify you of any traits that were not found. You can then keep or delete the unfound attributes as desired, depending on whether they’re unneeded or perhaps added by you.

GCA will no longer list all the traits that it’s examining as it does a Resync, but continues to list all the exceptions.

Toolbar now shows a full recycle bin when a trait has been deleted from the character.

Created and included an alternate image for the full recycle bin.

Added some additional procedure header docs to a bunch of routines in GCATrait, and added a couple new helpful properties.

I’ve updated the GCA UI code to support any predefined color as an option for the highlight() tag. GCA will use the name of the color to derive the highlight that is drawn, with a transparency value of 100 (out of 255). The predefined colors that can be used are shown here . If the tag is highlight(yes), GCA will pick yellow as the highlight color. I will be updating the UI soon to support picking the traditional highlight colors of yellow or pink, plus the additional options of red, blue, or green.

Added hideme() tag. This uses the Solver to return a numeric result. If zero, hide() is removed, otherwise hide(yes) is added to the trait.

Added highlightme() tag. This uses TextFunctionSolver to return a text result. If the result is empty (“”, nothing), the highlight() tag is removed, otherwise the result is placed into the highlight() tag.

Added collapse() tag for parents, to indicate if children are intended to be shown or not. This is currently a flag tag, but I’m wondering if there shouldn’t be values to show certain children for special cases. GCA currently supports the tag, but the UI currently does not provide any means to set/unset it.

Added collapseme() tag for parents. This uses TextFunctionSolver to return a text result. If the result is empty (“”, nothing), the collapse() tag is removed, otherwise the result is placed into the collapse() tag. Currently collapse() is a flag tag, but this uses the text functions in case I decide to add special cases later.

* Sheets

My sheets do not yet provide support for any of the new tag features, but I will be including it soon.

* Updater

I discovered that the licensing issue that caused me to have to reinstall all my ComponentOne tools affected the PackageUpdater, which I’d overlooked. I’ve rebuilt it, which should fix the issue. If the Updater crashes when trying to Unzip, you’ll have to update manually because you still have the impacted updater files.

* Basic Set

In the Basic Set file, the Brawling skill has an extra | in itemnotes() after the note for the Kick mode, which results in an unnecessary second Kick mode being added. I haved added a corrected version of Brawling to the GCA5 Changes.GDF file.

* Installer

Because of the way Windows handles permissions for the ProgramData directory, the setup program now alters the permissions for GCA’s specific ProgramData folder during installation.

Body bits (b127)

b127

Custom body image selections, either from the drop-down or from the Open button, in the Protection window were not being properly assigned to the character, which prevented GCA from using them correctly in other places.

The tool tip on the Protection window for loading a custom body image had the wrong text.

When the All Unassigned Items loadout was active, the print sheet protection graphic didn’t show protection boxes in the correct places. Now it does.

I made some dumb coding decisions when the initial work was done to embed images within the character. This resulted in the loss of the associated image filename for body images when interacting with the body in the Protection window, and meant that saving the body out to a file didn’t save the associated image file name correctly. That has now been fixed.

Removed Force Update from the Help menu, as it no longer serves a purpose.

Removed some additional code related to the old updater.

Moved some control constants from the main form to a module.

* Plugins

I had to update the ComponentOne components again, which may result in your compiled plugins needing to be recompiled.

Looking Back at 2020

Things continued to move in fits and spurts over this last year (and through 2019 before that).

I made some good progress on various things, and the engine is looking solid to me. There are definitely some things that still need work, but nothing that I can see stopping us from doing a larger-scale beta test to help shake out issues in the core. Ugh, so close I can almost touch it.

Anyway. A pretty standard year, I think. Sorry it’s taking so many of them.

Happy holidays, everyone!