Monthly Archives: February 2017

A hodge podge of bits and bobs


* Transforms

Made an adjustment to the Transform Manager window so that the “All unassigned items” column will have the correct points.

Also, see the Solver section below.

* Updates

I have created a new Login dialog to gather your login credentials for downloading updates.

GCA will now save your credentials for downloading updates. They are encrypted. The new Login dialog has an option you can check to tell GCA not to save your credentials.

* Campaign Settings dialog

Changed the Other Settings box title to Tech Level.

Added a first draft of a Wealth & Money box to the right side.

* Miscellaneous

Added a couple more utility routines to GCACharacter.

GCA will now, for the time being, stick Features, such as those added by a template’s features() tag, into a simple Features collection on the character. (Nothing else being done with them, yet.)

I have added Money entries to the Campaign Log and related data structures. This allows for entering earned or lost money via the Campaign Log, just like you can enter earned or lost points.

For the time being, the Equipment: $XXX value on the Points bar at the bottom of the GCA window will now be offset by the character’s Campaign.TotalMoney value for purposes of hitting the ‘red’ value.

The following items have been made accessible through the character’s tagitem(), all for the corresponding Campaign values: “campaigntotalmoney”, “campaigntotalpoints”, “campaignothermoney”, “campaignotherpoints”, “campaignloggedmoney”, “campaignloggedpoints”. The ‘total’ values are the total of the ‘logged’ and ‘other’ values, while ‘logged’ is the total of all log entry values of that type (points or money).

Corrected text in Character menu from Multiplicities to Transforms.

* Solver

Updated the GetItemVal routine. Should be smarter about duplicate items now.

Updated the @ItemHasMod() function handling. Should be smarter about duplicate items now.

As an experimental testing feature for Transforms and inactive traits, the GetItemVal routine will now return a 0 value for any trait found that is inactive. We’ll see how this works out….

As an experimental testing feature for Transforms and inactive traits, the @ItemHasMod() function will now only consider traits that are not inactive. We’ll see how this works out….

Bits be transformed, yo


* Miscellaneous

Made a slight adjustment to how trait list boxes in Unified view are updated, due to a drawing issue.

Adjusted how the option that requires GCA to always allow you to select a library for the character when creating a new character works. It will now allow you to select the ‘New, with Default Library’ toolbar option to use the default library without actually having to select it again from the Library Manager dialog. This is more consistent with the ‘inversion of normal’ behavior that the option is meant to offer.

* Transforms

Multiplicities have been renamed to Transforms; this should follow through to all windows and whatnot.

Altered some Needs checking processing to disallow inactive traits as valid.

GCA will now save/load transform data.

Updated transforms section of character calculation routine a bit.

Added option for the show/hide Transform dialog explainer to Options.

* Templates

A component owner adding new traits should now always automatically force duplicate items, rather than popping up a dialog about them. A non-owner (such as most types of character templates) should still ask about duplicates.

* Defaults

Expanded the Text Function Solver support in default() to be processed first thing, so that you can use text functions to completely alter the way that a default may be processed. This means you could do something like this:

default( $if(1=2 then “Calc 1 @default(10)” else “Calc 2 @default(12)”) )

which is combining the idea of the text function solver and the @default() function into a single statmement to return the whole definition.

or this:

default( $if(1 = 2 then “SK:Whatever”-2 else “SK:Whatever Else”-6) )

to just return the default statement you want, depending on the evaluation of the $If comparison.

Bits of default hell


* Miscellaneous

Tried again to have the Alt Attacks panel stop showing up uninvited on the Simple Edit window.

A certain circumstance could crash GCA when editing an item that might default to another. That has been addressed.

Added a new option to Options, in a new New Character block, that requires GCA to always allow you to select a library for the character when creating a new character. (If you make a lot of characters with various different libraries, this will help you. This is Off by default.)

When using TagItem() to check a trait’s ‘needscheck’ or ‘taboofailed’ GCA will now ensure that they’re returned as the numeric values (-1 or 0) rather than ‘True’ or ‘False’, which aren’t useful in numeric comparisons.

* Windows

Moved the Groups option from the View menu to the Character menu on the main window.

Changed the order of groups displayed in the Groups window to show Character groups first, then Library groups.

The Messages dialog should now respect Tablet Mode.

The Character Tags and the Groups dialogs should now respect Tablet Mode.

The Select X dialogs should now respect Tablet Mode.

* Right-Click Bait

Changed the right-click menu (on Classic and Unified views) sub-menu option “Bonus Granting” to “Active/Inactive” instead.

Added a Loadout sub-menu to the right-click menu (on Classic and Unified view) to allow adding the currently selected items to, or removing them from, the current loadout.

* Library Books and Bins

If you load a character with a library file that doesn’t exist (such as when opening an old GCA4 character), GCA should be a bit smarter about placing a new library file in the correct bin, if you select the option to create a new one with the same files.

GCA will now attempt to use the gcaaliaslist.ini file to find missing library books.

GCA will now attempt to search more diligently through the various bins when trying to find missing library books referenced by libraries. (This is usually a problem when a new library is created based on an old character’s referenced books.)

* Solver

Added a trap for one known type of crash error when bad data is in a Solver expression. GCA will now put a warning in the log, and return a 0 for the expression, since it can’t solve it.

* Defaults

I haven’t touched the code for defaults in a long while, but there were some things I wanted to do with it. Of course, I didn’t want to break it, either. I think I succeeded, but please be warned that I *did* mess with some things (gently, I hope) that may have broken it.

First, parsing the default() tag should now honor quotes, braces, and parens. Before, it only honored quotes, so if you had a trait name that included a comma within the name extension, it would parse on that unless you put quotes around it. Now, you should only need quotes or braces around traits that have commas that aren’t otherwise contained.

Second, I have allowed some non-trait defaults to pass as valid within GCA, primarily for reasons in the next bit. This shouldn’t break anything because such things, on their own, should still evaluate to 0 if they’re nonsense, but if they’re numeric, they allow for defaults from numbers and such. (Any non-trait item gets a deffromid() of 0, since such things obviously have no IDKey.)

Finally, I have added special support for finally allowing a complex expression to be used to set the default level. Doing this requires the use of the @default() specialty function, which isn’t really a function so much as a wrapper around your expression, but anything inside the @default() is sent to the full Solver. The @default() function should be at the end of the default item, while at the beginning of it should be the text that will be shown to the user as the deffrom() text. So, it should look something like this:

default(Some Expression @default(@max(10, 12))

which would give us deffrom(Some Expression) and deflevel(12). That’s a dumb expression, but that’s the idea. Also, the text portion is Text Function enabled, so you could do this kind of thing:

default( $if(1=2 then “Calc 1” else “Calc 2”) @default( @if(1=2 then 10 else 12) ) )

Since 1 <> 2, the user would see “Calc 2” as the deffrom(), and 12 as the deflevel().