Author Archives: Armin

Rebuilt the update bits (b125)

b125

* Miscellaneous

Updated my BBCodeSurfaceEngine with a PlainText function, which returns the text stripped of the BBCodes.

Updated MiserBBCodeLabel with a PlainText function, and now use the PlainText as the AccessibileName of the control.

Added some image features to MiserOptionsBlock, and updated MiserWarningLabel’s image features a bit.

* Updater

I have created a new Updater system. Things may be a little rough, still, but it looks to be working mostly as intended. The system is a couple parts: a Package Builder and a Package Updater.

The Package Builder is currently working well enough as a tool for me and/or Eric, to create packages of files for required or optional updates.

The Package Updater is the piece that will do the hard work of checking for and installing updates. It also provides access to the selection of Optional Packages that may be installed by users if they want them. This actually includes two EXEs, the PackageUpdater, which does the work of evaluating, downloading, and unzipping; and PackageUpdaterElevated, which just operates as an elevated permissions copybot to move the files to their destinations, or deletes files and folders for packages that are being uninstalled.

This system, which is mostly separate from GCA, makes it much easier to manage. It’s still missing some features that might be nice, and working with it is a bit clunkier for the end user than before, I think, but I also think the general operation, and ability to maintain the packages, is far simpler and easier.

So, GCA is now updated to work with this new system. I have also removed some files from the standard installation and turned them into Optional Packages instead. Be aware that you may suddently be missing things that you had before, if you used Eric’s images, 3rd Edition files, or my Color Block Sheet. Be sure to Check for Updates, and click the Optional Packages tab, to select and install those features!

* Plugins

I have updated the ComponentOne components, which may result in your compiled plugins needing to be recompiled.

Tightened some slipped bits (b124)

b124

If multiple locations were specified for a piece of armor, and those locations overlapped (such as ‘full suit’ and ‘neck’), GCA5 threw an exception and died. Instead, locations specified later in the list are supposed to apply more specific armor values. For example, location(full suit, neck) and dr(4/2) should apply ‘4/2’ to all locations covered by ‘full suit’ and by ‘neck’, even though ‘neck’ is covered by ‘full suit’ and the DR is the same; if instead that dr() tag was dr(4/2, 1) then locations covered by ‘full suit’ should all get the ‘4/2’ value, while ‘neck’ should only receive the ‘1’ value. This should now be fixed.

Armor with multiple locations was also counting each location as another layer. That is now fixed.

Added entries for postformulacost, postformulaweight, prechildrencost, prechildrenweight, preformulacost, and preformulaweight to the tagdefs.xml file.

Bits just chucked in (b123)

b123

(A quickie bug fix to the PushRecalcItems routine was made. The fix changed two casts from object into GCATrait into ICollectibleObject instead. The program was recompiled, a replacement installer was built, and then b123 was re-released.)

Added support for scopeacc() and charscopeacc(). The scopeacc() tag reflects the bonus to acc that derives from a scope or similar such aiming aid. The charscopeacc() tag holds the bonus after any bonuses to scopeacc have been applied. The charscopeacc() value will now be used to create the suffix value for the final characc() tag, so acc(2) and scopeacc(2) with a ‘+1 to scopeacc’ bonus would result in charscopeacc(3) and characc(2+3).

Added ‘fencingweapon’ and ‘charfencingpenalty’ to the tagdefs.xml file.

There is a piece of the Trickle code that I had disabled because it seemed to be obsolete with the way GCA tracks things these days. Turns out I was mistaken, and it has been restored.

* Target Tag bonuses

Changed the method that GCA uses to keep track of target tag bonuses. Previously, it was a mass of individual flags. It’s now a dictionary that tracks what tags are being targeted for bonuses. You shouldn’t see the difference, but it will be considerably easier to adjust for supporting new target tags later. If I made a mistake, you’ll see some bonuses fail to be applied.

With the change in target tag bonus tracking, it’s possible to see if a bonus exists for any tag on a trait, even one that’s not supported as a targetable tag, or even for tags that don’t actually exist. So I have added some functions to grab the bonus values targeting any desired tag, so you can make use of them. This allows for you to make use of custom tags and custom tag targets to handle custom situations you could not handle in the past.

The new functions are:

@bonusadds() – Returns the total of all add and subtract bonuses/penalties targeted to the given tag, or 0 if there are none.

@bonusmults() – Returns the multiplicative total of all multiplier functions targeted to the given tag, or 1 if there are none.

$bonusstrings() – Returns the concatenated string of all text bonuses targeted to the given tag, or an empty string if there are none.

* Setup

I have switched to a new program to create the installer. This should avoid the issues I identified with using the Updater to update program files installed by the MSI install system. However, additional testing is still needed.

This installer doesn’t currently have a way to check for, and install if necessary, the .Net Framework 4 system files that are required. Most people should already have those, as they come with Windows, but some may be missing. That’s still something I’ll have to figure out.

A bit of something or other (b122)

b122

Added support for parent:: as a target for bonuses and as a reference in the solver, so you can do something like having a scope as a piece of equipment that is added to a rifle as a child, and then grant a bonus to that parent rifle’s acc. This will work for both the parent/child and the meta-trait/component relationships.

Added support for child:: as a target for bonuses, so you can have a parent that grants the same bonus to anything that is made a child of it. This will work for both the parent/child and the meta-trait/component relationships. This is not available as a reference in the solver because there’s no way to resolve what child of many may be intended.

Techniques are not limited by the Rule of 20, but GCA5 was doing so. GCA4 did it correctly, so that was broken during some rewrites at some point. That error should now be fixed.

Clicking inside the Library Traits listbox but not on an item caused a crash, which is now fixed.

Added PreferredRTFMinimumFontSize to UIConfig, to help set a minimum floor for the font size used in RTF displays. Currently works for most things sent to ViewInfo and the Log. (No UI for this option yet.)

You can now drag-n-drop character files onto GCA to open them.

You can now drag-n-drop image files onto GCA to set the current character’s portrait, or onto the Portrait window to set the image there. Note that since GCA only supports a single portrait image, if you drop multiples only the last valid image will be applied.

I noticed that if you’re using the “GCA5 Symbols.GDF” book, and are using a large library, it can take forever to process symbol assignments. (For example, a full GURPS Dungeon Fantasy library has over 6000 traits to examine; that takes approximately 12 years.) I now have GCA printing “X% complete” lines into the Working window at intervals, so it’s clear to the user that GCA hasn’t crashed. Luckily it only needs to do that when initially loading/building the FastLoad files. (I’ve also noticed that a bunch of the items in the file refer to the _Cinematic.png which we don’t actually appear to have.)

Hurt myself a bit during this build (b121)

b121

Removed some obsolete code.

In #Choice and #ChoiceList handling, I made updates last year to improve type checking, and while doing that also changed the type of collection being used during the processing of the various lists. That change used a new collection that, it turns out, didn’t properly handle being used without also using unique keys. Since the usage here doesn’t use unique keys, only one item was ever being added to the collection. I have updated the collection in use so that it should now work correctly when used without keys.

* Gains Bonuses

I have finally updated Bonus to track gains bonuses with separate From values, rather than overloading the Target values. This should allow for gaining a bonus that can be applied to a target tag on the gaining trait. Doing this requires explicitly including the previously implied ‘to me’ clause, like so: gives(+1 to me from ST:Magery listas “I’m a spell. Really!”). You’d then just use the standard “me::tag” format to target a targetable tag.

Updated the code in various places for the change in Bonus when the bonus is a gains.

* Bonus Builder

Fixed an initializing issue with some object references.

Updated Bonus Builder to read better when the bonus is a gains.

* GCA5.xsd

Added the fromX elements for gains bonuses to GCABonus.

A bit less (b120)

b120

GroupedTraitListBuilder would return no results if the character had no grouping options set for the given trait type. It will now return the no-match (“”) collection, filled with all the valid traits, as the only entry in the GroupedTraits dictionary. This makes more sense.

I don’t see any reason for the NoRestart option for Updater to not be working. I made a couple small changes in GCA and in GCAUpdater that shouldn’t really change anything, but we’ll see if it fixes it.

Removed some obsolete code.

* Files

ColorBlockSheet and OfficialCharacterSheet, as well as the IPrinterSheet interface, have been reverted to use C1PageSettings.

The XML help files for the GCA components should now be included in the distribution. This should allow for users writing plugins in Visual Studio to have what XML help I included in the system to be available within Visual Studio intellisense. I think.

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.