Category Archives: Build Notes

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

Some bits may have been harmed in this build (b119)

b119

* Bug Fixes

Fixed a crash bug related to trying to draw library list items that don’t have prereqs met when creating a random character and the option for dimming system traits with unmet prereqs is turned on.

Fixed a logic error in the code that determines if one trait is affected by another, if the only connection might be an attribute affecting the trait through the skill type (seriously don’t know how this went unnoticed for so long).

Fixed an issue with Sheet view, where some event handlers existed twice, causing unexpected behavior, such as drag-and-drop adding traits twice.

When you hit the Enter key when editing a tag in the Advanced Edit dialog, it should now save the changes to that tag before closing the dialog.

* Bonus Builder

I did some work on this, but I broke something somewhere with a cascading effect. I had to revert the code to last build, because I couldn’t figure out what the heck was going on. I’ll revisit expanding this next build.

* Miscellaneous

Since the Show Dirty feature has been functional and apparently stable for a while, I’ve made that a saved setting and moved the toolbar button for it to the section of the toolbar next to the Hidden and Component display options.

During Check for Updates, GCA will now print the various timecode folder names to the Working dialog as it checks for previous update data. Since this may take a while, printing these will let users know it is still working.

Noticed that the View Info pane output looks kinda crappy at higher zooms, especially when the fonts are sized up or styled, so I changed most of the Info pane output to use Arial instead of the default font.

Added “displayname” as a valid tag to get returned from a system trait’s tagitem().

I generalized the selection-by-tag features of #DeleteByTag so that they could be used in future commands. This rendered most of that function, and the functions supporting it, obsolete, so they were refactored or removed.

* Lists

I built a new manager for Lists in libraries, since they were using Groups and wasting space on things that Lists didn’t handle. FastLoad files have to be rebuilt because of this change.


* Data File Commands

We have some new ones related to lists.

#DeleteFromList

To remove entries from Lists.

#DeleteFromList “LI:ListName” Whatever, “Whatever (Three)”, Buncha Stuff
#DeleteFromList ListName Whatever, Whatever (Three), Buncha Stuff

This is like #DeleteFromGroup, with the name of the List first, then a space, and then a comma separated list of items to delete from the List. For the targeted List, the LI: is optional, as are enclosing quotes or braces unless the name includes a space. Quotes around each item in the target list are optional, unless the item text includes a comma. Unlike DeleteFromGroup, there is no ALL keyword.

#AddToList

To add entries to Lists.

#AddToList “LI:ListName” Whatever, “Whatever (Three)”, Buncha Stuff
#AddToList ListName Whatever, Whatever (Three), Buncha Stuff

Everything about the structure except the actual command name is the same as #DeleteFromList above.

Note that normal List behavior is to aggregate [Lists] entries, so #AddToList may be redundant, but does allow adding outside of a [Lists] block.

#AddToListByTag

To add entries to Lists based on Library Traits already loaded and the value of a tag.

#AddToListByTag “LI:ListName” [template(text)] , Text|Num,

The first thing on the line is the name of the list that you’re targeting. The LI: is optional, as are enclosing quotes or braces unless the name includes a space. Follow with a space to separate it from the template() tag or the selection criteria.

The template() tag is optional. This should be separated from the list name and the selection criteria by spaces. Since this option is in tag format, the parens should protect it from parsing issues, but you do have to ensure that you don’t mismatch quotes, parens, or braces.

Finally is the comma separated list of selection criteria. This uses the same select-by-tag syntax as #DeleteByTag. Please reference that for the details.

The template() tag makes use of some templating support that I wrote to allow for customizing the Info display in the GUI. This means that it knows what trait it’s looking at, and just needs to potentially fill in values. You can reference any tags from the current trait by enclosing them in % characters, such as %nameext% for name extension, or %points% for points. There are a few special case variables that require extra processing and are therefore enclosed in double %% signs, such as %%costprog%%, but most of those apply only to character traits, not system traits.

An example template might be template(%name%, %type%) for a skill, which would become ‘Accounting, IQ/H’ for the Accounting skill.

As an experimental addition, I’ve hooked up the TextFunctionSolver, so you have some additional power available. This is an experiement because most of the Solver features were designed to operate on character traits, so some things just won’t work correctly. I’ve added some to allow for functions that don’t depend on character traits to work and not cause problems, so I think we’re good there, but actively using such a feature will still probably crash something.

The TextFunctionSolver will normally run after the template variables are replaced by the trait tag values. However, if the very first piece of your template() text is ‘$first’, then GCA will remove that flag and call the TextFunctionSolver first, then replace variables, and then do the normal pass through TextFunctionSolver if it looks like there might still be text functions in there.

An example using text functions might look like this:

template($if(@len(%nameext%)=0 then “%name%” else “%name% (%nameext%)”))

That’s pointless as it’s replicating just using %fullname%, but it’s a functional example.

If template() is left out, what is added to the list is the selected trait’s FullName property.

Example:

#AddToListByTag “LI:TestingStuffList” Advantages, Text, name isnotempty echolog

This command will select every Advantage and add the full name for each one to the TestingStuffList, because every valid Advantage has a name that is not empty. (It will also spit some processing info into the log as it works.)

* View Info

I’ve made it so that you can customize the trait information that is displayed to you in the Info panel. This will allow users to customize the displayed information to their own preference. The Info panel uses RTF, so it’s not necessarily the easiest thing to read and deal with, but I include the default templates with GCA so at least there’s something to start from.

All modifier or trait tags for which you want to check the value must be enclosed in percent (%) characters. This applies anywhere within the template to retrieve that value from the trait or modifier being viewed, whether in a command or just as part of template output.

There are also a few special variables that provide additional support to display things that may be wanted. Since these aren’t tags, but are still intended to be treated like tags, we format them similarly, but use double % characters to tell GCA they need extra handling.

%%costprog%% returns the ad-type trait’s cost progression.
%%keeper%% returns the item that owns this one, if this one is a component of another trait.
%%modscount%% returns the number of applied modifiers.
%%appliedmods%% returns a captioned listing of the applied modifiers (short names and values)
%%appliedmodifierss%% returns a fully expanded listing of the applied modifiers

Template Commands

There are currently two slightly different ways to insert commands into your template. There are two because I didn’t care for the way I initially did the commands, so I did them again, and then decided to keep both because one is easier in a code editor, and the other is easier in an RTF editor.

Regardless of method, when a command is processed the text of the command itself is never supposed to end up in the display, only the specified output. If you see your commands in the display, you probably have an error of some kind (probably missing brackets).

Standard Method

I’m going to talk about the ‘standard’ way first, which is easier when you are coding by hand and using a code editor that will highlight matching sets of containers (parenthesis, braces, and brackets). This method also relies on the open/close nature of matched brackets.

Here are all the currently defined commands for this method.

[Lib ]
[Char ]
[NotEmpty %tag%=]
[Size[+|-|*]]
[DebugMode]

All of these commands are self-contained; that is, all of them start with an opening bracket and end with a closing bracket, and everything that they might do or change is contained within those brackets.

For each command with , that can be plain text, RTF codes, tag variables, or other commands.

%tag% in these commands is the name of the tag that you are checking. It must be enclosed in % characters as shown, just as tags must be enclosed in % marks anywhere within the template to retrieve that value. You can also use special variables there.

[Lib ]

The Lib command tells GCA to include only if the trait or modifier being looked at is from a library. If it is not from a library, the entire command block is removed from display.

[Char only if the trait or modifier being looked at is from a character. If it is not from a character, the entire command block is removed from display.

[Empty %tag%=]

The Empty command tells GCA to include only if the %tag% is empty or has a value of 0. Notice that the and the %tag% are separated by an = sign, which is required. If %tag% is empty or 0, the entire command is replaced by the contents of .

[NotEmpty %tag%=]

The NotEmpty command tells GCA to include only if the %tag% is not empty or 0. Notice that the and the %tag% are separated by an = sign, which is required. If %tag% is not empty or 0, the entire command is replaced by the contents of .

[Size[+|-|*]]

Size allows for adjusting the relative font size of the output.

Normally you would have every font size specified outright in the RTF. This is fine if you want your output fixed, and don’t want it to resize based on the user’s zoom factor.

However, if you want the output to change based on Zoom, you can make adjustments with the Size command. You would include this command in place of the font size value in a normal RTF \fsXX size tag. So \fs[Size+10] would increase the size of the font by 10 points relative to the default font size, and \fs[Size*1.25] would increase the size by 25 percent.

(To me, the default TrueType fonts I’ve set feel a little small compared to other interface elements, so my default templates upsize them all a little bit.)

[DebugMode]

[DebugMode] is a special marker that can be anywhere in the template. I usually just tack it on the end where it’s out of the way.

[DebugMode] tells GCA to run this template in Debug Mode, which will cause GCA to reload the template from the source file every time it is requested, which is pretty much every time you click on a trait. This will allow you to easily adjust your templates and see immediate results inside GCA.

Without this marker, GCA would load the templates only during the initialization process when you first launch the program.

Here’s an example of a template coded using this method. In plain text, it can be a bit hard to follow until you get used to RTF, but it’s much easier in a decent code editor.

Example A

\pard\f0\fs[Size*1.1]
{\cf2\b\fs[Size*1.3] %DisplayName%}\par
[LIB
{\f1\fs[Size*1.2] Library Item (%TraitType%)}\par
]
[NotEmpty %inactive%={\f1\cf1 This trait is Inactive.}\par]
\par
{\f1\b Page:} %page%\par
\par
{\f1\b Type:} %type%\par
{\f1\b Cat.:} %cat%\par
\par
[NotEmpty %upto%={\f1\b Upto:} %upto%\par]
[NotEmpty %needs%={\f1\b Needs:} %needs%\par]
[NotEmpty %taboo%={\f1\b Taboo:} %taboo%\par]
[NotEmpty %default%={\f1\b Default:} %default%\par]
[NotEmpty %gives%=\par{\f1\b Gives:} %gives%\par]
\par
[NotEmpty %description%={\f1\b Desc.:} %description%\par]
[NotEmpty %notes%={\f1\b Notes:} %notes%\par]

[CHAR
\par
{\b\f1\cf2 Character Info}\par

[NotEmpty %locked%={\f1\cf1 Trait is locked, and can’t be edited.}\par]
[NotEmpty %gms%={\f1 Include on GM Sheet.}\par]
[NotEmpty %keep%={\f1\b Component Of:} %%keeper%%\par]
[NotEmpty %deffrom%={\f1\b Defaulted From:} %deffrom%\par]

[NotEmpty %%modscount%%=
{\f1\b Modifiers Applied:} %%appliedmods%%\par
{\f1\b Modifiers Applied:} %%appliedmodifiers%%\par]

[NotEmpty %tabootext%=
{\f1\cf1 Current Taboos:}\par
{\cf1 %tabootext%}\par]

[NotEmpty %bonuslist%=
{\f1\b Bonuses:}\par
%bonuslist%\par]
[NotEmpty %conditionallist%=
{\f1\b Conditionals:}\par
%conditionallist%\par]

{\f1\b User Notes:} %usernotes%\par
][DebugMode]

Alternate Method

Now I’ll cover the alternative method.

These commands are very similar to those in the standard method, but some of the commands are not entirely self-contained, and instead rely on other commands to mark the end of a defined block.

Here are all the currently defined commands for this method.

[Lib][EndLib]
[Char][EndChar]
[Empty %tag%][End]
[NotEmpty %tag%][End]
[Size[+|-|*]]
[DebugMode]
[AlternateMode]

[Lib][EndLib]

These together mark the start and end of a Lib block.

If you are looking at a trait in the Library listing, then will be included in the display. If not, eveything in that block is removed. You can

You may include NotEmpty and Empty commands within Lib or Char blocks..

[Char][EndChar]

These together mark the start and end of a Char block.

If you are looking at a trait in the Character listing, then will be included in the display. If not, eveything in that block is removed.

You may include NotEmpty and Empty commands within Lib or Char blocks..

[Empty %tag%][End]
[NotEmpty %tag%][End]

Empty and Notempty commands both end at the next found End command. Because of this, you can never successfully include one of these commands within the of one of these commands; is limited to plain text, RTF commands, and variables.

Empty will include the text between the Empty command and the next End command only if the %tag% value IS nothing or 0. If the %tag% is not nothing or 0, then that block from Empty through End is not displayed.

NotEmpty will include the text between the NotEmpty command and the next End command only if the %tag% value IS NOT nothing or 0. If the %tag% is nothing or 0, then the entire block from NotEmpty through End is not displayed.

[Size[+|-|*]]
[DebugMode]

Size and DebugMode are the same as above.

[AlternateMode]

[AlternateMode] is another special marker. Put it anywhere, it’s removed during loading. When found, it sets a flag telling GCA that the commands in this template should be processed using the alternate method.

Working with RTF

Here are two examples of the same simple template, formatted differently, using Alternate Mode to make commands stand out a bit:

Example 1

\pard\f0\fs[Size*1.1]
{\cf2\b\fs[Size*1.3] %DisplayName%}\par
[Lib]
{\f1\fs[Size*1.2] Library Item (%TraitType%)}\par
[EndLib]
\par
{\fs[Size+10] {\f1\b Page:} %page%}\par
\par
{\f1\b Type:} %type%\par
{\f1\b College:} %cat%\par
[NotEmpty %upto%]
{\f1\b Upto:} %upto%\par
[End]
[NotEmpty %needs%]
{\f1\b Needs:} %needs%\par
[End]
[Empty %needs%]
{\f1\b Needs:} Yay! No prereqs!\par
[End]
[NotEmpty %taboo%]
{\f1\b Taboo:} %taboo%\par
[End]
\par
{\f1\b Prereq Count:} %prereqcount%\par
{\f1\b Casting Cost:} %castingcost%\par
{\f1\b Casting Time:} %time%\par
{\f1\b Duration:} %duration%\par
\par
{\f1\b Desc.:} %description%\par
{\f1\b Notes:} %notes%\par
[DebugMode][AlternateMode]

This example uses the RTF grouping grouping with curly braces, so that a change you make, such as to bolding, only applies within the braces. This is my preferred method, as I find it easier to read and code by hand. I also put each command on its own line to improve readability when using the chunky commands.

Example 2

\pard
\cf2\b\f0\fs[Size*1.3] %DisplayName%\cf0\b0\fs\par
[Lib]\f1\fs[Size*1.2] Library Item (%TraitType%)\fs[Size]\par [EndLib]
\par
\f1\fs[Size+10]\b Page: \f0\b0 %page%\fs[Size*1.1]\par
\par
\f1\b Type: \f0\b0 %type%\par
\f1\b College: \f0\b0 %cat%\par
[NotEmpty %upto%]\f1\b Upto: \f1\b0 %upto%\par [End]
[NotEmpty %needs%]\f1\b Needs: \f0\b0 %needs%\par [End]
[Empty %needs%]\f1\b Needs: \f0\b0 Yay! No prereqs!\par [End]
[NotEmpty %taboo%]\f1\b Taboo: \f0\b0 %taboo%\par [End]
\par
\f1\b Prereq Count: \f0\b0 %prereqcount%\par
\f1\b Casting Cost: \f0\b0 %castingcost%\par
\f1\b Casting Time: \f0\b0 %time%\par
\f1\b Duration: \f0\b0 %duration%\par
\par
\f1\b Desc.: \f0\b0 %description%\par
\f1\b Notes: \f0\b0 %notes%\par
[DebugMode][AlternateMode]

This example uses the RTF commands like switches, so each time you change bolding or color, you have to switch it back again when you are done. I also show using the commands inline with the text.

The RTF coding can make it a bit hard to read, but you can see the use of the commands and the required enclosing of tag names in % signs. Notice that there are two possible outputs for needs(), depending on whether it’s empty or not. GCA also knows to hook up the page() data for the jump links to PDFs.

It’s also usually a good idea to explicitly set what you consider the default font values right up front, especially if you prefer to use the braces method of isolating the RTF commands. Don’t assume that the ‘default’ font size is automatically set, for example, or that font 0 is set if you didn’t set it.

RTF codes

Each RTF tag begins with a \ and must be followed by either another RTF tag or a space. Also, font sizes specified are *double* the point size you actually want, so \fs20 means a 10 point font size.

RTF doesn’t allow you to specify inline color coding or fonts. Instead, you define a font table and a color table in the header, which is something that GCA does for you behind the scenes. GCA has defined two different fonts in the table: \f0 switches to Times New Roman and \f1 switches to Arial. If either isn’t available, a similar system font should be substituted automatically. GCA defines six colors: red, green, blue, gray, purple, and whatever color you’ve specified in Options for page links. These colors are selected in the order given with the \cfX tag, so \cf2 selects green. Restore black text using \cf0.

The RTF box included with GCA handles a lot of RTF commands, but not everything, and documentation for it isn’t great. However, you can find RTF references online, and many of the character and line formatting codes will work.

Using an RTF Editor

If you’d like to use an RTF editor, don’t use Word, because it fills the file with tons of crap. I’ve found WordPad works pretty well as a basic RTF editor, and the files it writes are pretty lean.

Here is an example of a template as it might appear within WordPad. I don’t have formatting showing because most of my notes are plain-text. However, aside from that, take a look at how I formatted the various blocks.

Example 3

%DisplayName%
[LIB]Library Item (%TraitType%)
[ENDLIB][NotEmpty %inactive%]This trait is Inactive.
[END]
Page: %page%
Cost: %%costprog%%
Cat.: %cat%

[NotEmpty %upto%]Upto: %upto%
[END][NotEmpty %gives%]Gives: %gives%
[END][NotEmpty %needs%]Needs: %needs%
[END][NotEmpty %taboo%]Taboo: %taboo%
[END][NotEmpty %description%]Description: %description%
[END][NotEmpty %notes%]Notes: %notes%
[END]
[CHAR]Character Info
[NotEmpty %locked%]Trait is locked, and can’t be edited.
[END][NotEmpty %gms%]Include on GM Sheet.
[END][NotEmpty %keep%]
Component Of: %%keeper%%
[END][NotEmpty %deffrom%]Defaulted From: %deffrom%
[END][NotEmpty %%modscount%%]Modifiers Applied:
%%appliedmodifiers%%
[END][NotEmpty %tabootext%]Current Taboos:
%tabootext%
[END][NotEmpty %bonuslist%]Bonuses:
%bonuslist%
[END][NotEmpty %conditionallist%]Conditionals:
%conditionallist%
[END]User Notes: %usernotes%
[ENDCHAR]
This is from the full RTF file.[DebugMode][AlternateMode]

Notice that I have each [End] command actually starting the line after the command started? That’s so that when GCA removes inapplicable blocks, the paragraph markers go away as well. This helps to avoid the problem I mentioned above with extra blank lines appearing in the Info pane.

The Files

There is a template for every trait type and modifiers. The template files go into the \plugins\ bin, for lack of anywhere better. The file names that GCA looks for are these:

viewinfo_template_attributes.rtf
viewinfo_template_advantages.rtf *
viewinfo_template_perks.rtf *
viewinfo_template_disadvantages.rtf *
viewinfo_template_quirks.rtf *
viewinfo_template_cultures.rtf *
viewinfo_template_languages.rtf *
viewinfo_template_features.rtf *
viewinfo_template_templates.rtf *
viewinfo_template_skills.rtf
viewinfo_template_spells.rtf
viewinfo_template_equipment.rtf
viewinfo_template_modifiers.rtf
viewinfo_template_adtypes.rtf

The viewinfo_template_adtypes.rtf file can substitute for any, or all, of the advantage-style traits if their file is missing. All the files for which this one can serve as backup are marked with a * in the list.

Note that these files don’t have to be full RTF, even though they have that extension. The Examples above are sufficient for GCA’s use, and would be what you could find in these files. Opening a file like that with a standard RTF editor will most likely not treat such a file as valid RTF, and would likely treat it as plain text instead.

You can, however, use a full RTF file. If you do so, you don’t have to worry about hand-coding your RTF tags, but you’ll get fixed font sizes, because that’s what the file will write in the background. Also, you may find that the formatting in GCA often results in apparently extra blank lines. That is because GCA removes blocks that don’t apply, and paragraph/line-breaks often fall outside of the related tags.

* Files

Updated targettags.xml to match the text in the documentation.

Included the following info templates in the \plugins\ install folder:

viewinfo_template_adtypes.rtf
viewinfo_template_attributes.rtf
viewinfo_template_equipment.rtf
viewinfo_template_modifiers.rtf
viewinfo_template_skills.rtf
viewinfo_template_spells.rtf
viewinfo_template_templates.rtf

A few more bits than last time

b118

Cleaned up some code in the Bonus object.

Changed some of the code in the Bonus object to better support changing the properties of a bonus without having to remove it and then recreate it.

Show All Fields on the simple edit dialog is now a persistant option.

Special case substitutions for ListAs were not working. That has been fixed.

GCA should no longer post unnecessary warnings to the log about possible duplicate items when leaving the Advanced Edit dialog.

* Bonus Builder

I think I’m calling this Gives Builder inside GCA, since that’s specifically what it’s building, but I refer to it as bonus builder because it’s catchier.

This provides a GUI method of creating and editing gives() bonus statements, and is on the simple Edit dialog.

This is still in-progress at this time, and I’ve mostly hit the easier stuff to do, but you can already cover a large number of typical bonuses.

* Files

Added targettags.xsd and targettags.xml to the included files. These specify the available target tags and provide some assistance in what they’re for and what they affect. For use with the bonus builder GUI stuff.

GCA no longer includes or supports the very outdated gca5charschema.xsd.

Included files from Eric’s FixedFiles.ZIP.

Another in a series of little bits

b117

I have added code to the handling of type-to-search in those lists that support it. This should address the issues noted in testing where the selected item may jump around unexpectedly.

There is a small chunk of code that clears old auto-backup files upon startup. At some point this chunk was moved up in the startup sequence. Unfortunately, it was moved above the code that allowed for restoring the auto-backup files, rendering that function useless. I have moved the chunk back down, so restoring auto-backups upon startup should work again.

I spent a lot of time, effort, and research figuring out how to make plugins reloadable within a session. I succeeded, but to no avail, as various structural elements within GCA simply don’t allow the available solution to work for us the way we need it to. So, unfortunately, that was basically a dead end. I apologize to those writing plugins that I wasn’t able to make that work out.

Rather delayed little bit

b116

GCA will now save attack mode data as separate elements within the saved character file. This reflects how it’s now handled internally and should help avoid possible parsing errors in the future. It should also simplify use of the data by third-party tools that may someday want to use it.

* GCA5.XSD

Updated with the new elements and changes to support the new attack mode elements.

A little bit is better than nothing

b115

I had code in place in the Edit dialog to allow for changing the level of leveled traits by typing the desired level into the level box, but had it disabled for ads and disads. I believe I did this because I decided to show LevelNames in that field, and text names don’t work well with numeric levels. I have shortened the Level field and reenabled the abiltity to change the value for leveled traits. It is now meant for numeric values. I have added a display field after the +- buttons to show the LevelName, if available, for the trait.

I’ve added a checkbox to the Update Available dialog to allow for not restarting GCA after the update runs. Check the box, and the updater will quit after installing updates without launching GCA again.

Updated GCAUpdater to support the NoRestart option.

Updated SimpleTextExport to output skill lines more like the SJGames format.

Basically a bit of a plugin

b114

During some part of a previous conversion from engine values to character.settings values, several places were accidentally changed to use NeedsDefaultLevel (a number) or NeedsDefaultValue (a tag) when the other was called for. Fixed.

Fixed a recent bug in the Sheet View for sending Edit items to the Edit dialog, resulting from the conversion of the selected traits collection to SortedTraitCollection.

* Plugins

All the plugins included with GCA should now be the code versions, rather than the pre-compiled versions.

A bit of reference

a113

Fixed a bug in the processing of damage breaks due to an earlier change from Collection (1-based) to List (0-based).

Fixed a display bug that sometimes resulted in the new Applied Modifiers list in Simple Edit getting all scrunched up.

Fixed a bug created in b112 related to checking for ownership of a bonus that is supposed to be removed. This bug prevented bonuses from being removed, which in turn resulted in multiple identical bonuses getting applied.

Added some data validation checking to the Edit Traits dialog, to check for unmatched parens or quotes.

Added some data validation checking to the Advanced Edit Traits dialog, to check for unmatched parens or quotes.

Was given a valid reason for letting modifiers be reduced to level 0, so I have restored that. In turn, I have added a default level name of ‘none’ to display when applicable.

Changed the wording of the instructional text on the Resynchronize dialog slightly.

There has been an issue since the beginning of Unified View, where clicking on any list in a box that was not already the box with focus would cause that box to scroll into view, usually selecting a bunch of items in the list unintentionally. I was unable to find a way to avoid that behavior without either building something new, or just subclassing the panel and then overriding the behavior of that event handler. So, I have done the subclassing thing, and that behavior should no longer happen. However, that means that scrolling a box into view is now the responsiblity of the user.

Bit by the code bug

b112

Changed some of the process GCA uses to check for updates. Previously it was partially asynchronous and partially synchronous. It will now all be synchronous (this means you can’t do other things in GCA while the check for updates is running). It will also pop up the Working dialog while performing the process.

There was a shockingly convoluted system in place for sending messages to the logging pane. I simplified the system and shuffled around a few related routines while doing so.

Did some code cleanup in various areas and with various controls.

Found a pretty insidious little bug that had to do with the ownership of modifiers and traits when making copies of them (such as when making copies to undo changes when cancelling out of dialogs). This resulted in the ownership appearing to be correct, but not actually being so, because ownership was actually assigned to an identical object that was not actually in the correct ownership tree. I believe this mattered only in a tiny number of cases, but that’s still an issue. Anyway, it should now be fixed.

Made some changes to the Simple Edit and Modifiers dialogs in support of correct handling of undo when cancelling out of the dialog.

* Type Safety and Object Cleanup

Did a little more of this.

* Modifiers

It was possible to decrement a modifier to level 0, but it almost never provided any indication that you had done so (unless it had levelnames() set to account for that). At least it always set the value to a neutral value, so it no longer affected cost. But this just strikes me as extremely odd behavior, especially for non-leveled modifiers. GCA’s history is very long, so it’s possible that I did this for a reason back in the day, but I can’t think of any good reason for it now. So, I have now set Modifiers to have a minimum level of 1.

* Simple Edit

I’ve moved the Current Modifiers Applied block up above most other things.

I’m trying a new list for the Current Modifiers Applied block, as a listbox instead of a text block. You can do basic manipulation of the modifiers here, such as incrementing, decrementing, or removing.

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.