Monthly Archives: April 2015

Take yer bits

Fixed some bugs in the new stuff for the Protection box in Compact View.

Protection box’s Copy to Clipboard option now copies the entire graphic area (except the buttons in the header).

The Protection box will now add a message between the paper doll and the armor list if the user has enabled Allow Deflect Stacking or Allow Fortify Stacking on the character.

Made attack modes a separately managed collection of objects within a trait. This has upsides and downsides, but obviously I feel the upsides outweigh the downsides. This means various places had to be updated or modified. For sheet authors, I tried to retain all previous methods of access as well as allowing for the new system. In addition to the old access methods, accessing mode data can now be handled through the ModeManager class that all traits now have (Modes as ModeManager), and individual mode data can be accessed through that or by getting a single mode as a Mode object.

Note: Because of the new Modes system, notes() and itemnotes() are explicitly mode enabled tags. This means a Mode will be created if a notes() or itemnotes() tag exists, even if no other mode data applies.

The ItemNotes system implemented last build no longer applies given the new Modes handling, so it has been removed. Equivalent functionality has been included in the Mode object.

Adjusted the Edit Trait dialog weapon mode displays; they now allow for setting DamageBasedOn individually within them, and will display ItemNotes() if present.

For the record, these are all the currently supported, GCA-handled Mode tags (also available from the ModeTags collection in GCACharacter):

  • “mode”, “notes”, “itemnotes”, “damageistext”, “minstbasedon”, “damagebasedon”, “lc”
  • “acc”, “armordivisor”, “break”, “damage”, “dmg”, “damtype”, “minst”, “parry”, “radius”, “rangehalfdam”, “rangemax”, “reach”, “rcl”, “rof”, “shots”, “skillused”
  • “characc”, “chararmordivisor”, “charbreak”, “chardamage”, “chardamtype”, “charminst”, “charparry”, “charradius”, “charrangehalfdam”, “charrangemax”, “charreach”, “charrcl”, “charrof”, “charshots”, “charskillused”, “charskillscore”, “charparryscore”

Adjusted calculation of charlocation() so that there will now always be a charlocation() tag if there was also a location() tag.

Added code to handle partial coverage for armor items, finally making use of the coverage() tag. This system will use charlocation() and coverage() to generate new charcoverage() and locationcoverage() tags, and to rebuild the charlocation() tag if it had mulitiple entries for the same body part. The system takes tags that might look like this: “location(Skull, Face, Face, Face),coverage(1, 1/6, 2/6, 1/6*)” and should end up with something that looks like this: “charlocation(Skull, Face),charcoverage(1, 4/6*),locationcoverage(Skull, Face (4/6*))”. For technical reasons, coverage() may have values that are empty or are some other whole value to represent full coverage; any partial coverage should be in the form of X/6.

I also created a correction routine to fix location() values that may have partial coverage values within them. For example, location(Skull, Face (1/6)), which aren’t valid within GCA itself, but are generated by some of the existing armor builder items. GCA will see and fix these so that they are correctly formatted location() items without the partial coverage values. If a coverage() tag already exists, the coverage values in location() are discarded; if no coverage() exists, GCA creates it from the values in the location() tag.

Updated the Protection dialog, Layers dialog, and the Protection box to show the new locationcoverage() value where applicable.

Touched a lot more places to update code and strengthen type references.

Updated the FootnoteManager to allow for Alpha footnote markers. Also allows for optionally enclosing the marker in parens, braces, or brackets when returning the FootnoteWithMarker() or FootnoteBlock(). This did change the interfaces a bit, so plugins will need to be recompiled.

  • Public Function FootnoteBlock(Optional ByVal Separator As String = vbCrLf, Optional ByVal MarkerEnclosure As FootnoteEnclosureStyle = FootnoteEnclosureStyle.None) As String
  • Public Function FootnoteWithMarker(ByVal Index As Integer, Optional ByVal MarkerEnclosure As FootnoteEnclosureStyle = FootnoteEnclosureStyle.None) As String

Updated ColorBlockSheet to use LocationCoverage() in the Protection section.

I got yer bits right here

Addressed an element name case-matching error related to ‘launchcodes.xsd’ tripping an XML error message.

When GCA saves backup copies of open characters, it now saves current program settings as well.

In the Launch PDFs window, adjusted the base system folder used when browsing for the home PDF bin.

Added support for the ItemNotes system:

* Public Function ItemNotesModeCount() As Integer

Returns the number of modes represented in the ItemNotes

* Public Function ItemNotes(Mode As Integer) As Collection

Returns a Collection containing all the ItemNotes for a given mode. Collection will be empty if no notes are found. If Mode is < 1, data for first Mode is returned. If Mode is > Mode count, data for last found Mode is returned.

* Public Function ItemNotesModeCollections() As Collection

Represents a Collection of Modes, each Mode item containing a Collection of ItemNotes. (You have a collection of Modes, with count = ItemNotesModeCount(); each collection item contains a collection of item notes as per ItemNotes(Mode as Integer) as Collection.)

* Public Function ItemNotesText(Mode As Integer, Optional ByVal Sep As String = ” • “) As String

Returns all the ItemNotes for a given mode as a single string, separated by Sep. (Default Sep is a bullet.)

Updated some of the things in the Protection system:

* Layers

If using User Managed Layers, the markers used to designate correspondence between armor items and layer values have been changed to use capital letters instead of the various footnote symbols. Within the location’s DR/DB value strings, the letters will be within brackets. This system appears much more readable and much easier to cross-reference.

* Deflect and Fortify stacking

The way Deflect and Fortify stacking issues are flagged has changed. If using User Managed Layers, then the layer that has had its Deflect or Fortify value ignored due to stacking will have a lower case ‘s’ appended to the Layer marker within the brackets. If not using User Managed Layers, then the ‘s’ marker just appears in brackets after the value string.

If there are Deflect or Fortify stacking issues at a location, a ‘-s’ marker is appended to the layers ‘L’ marker in the location box title.

* Other

Updated the values displayed in the Layers listbox of the Layers panel of the Protection window.

Updated the Protection box in Compact View to include a list of the applied armor. Clicking on an armor item will now highlight in gold all affected location boxes on the paper-doll. Conversely, clicking on a location box will highlight the armor items that affect it.

Updated the drawing of thee Protection box to reduce flashing during self-contained redraws.

Updated the default display order of the boxes in Compact View: Protection now comes directly after Equipment and before Melee Attacks; Messages is moved to the end.

In the Options dialog, the active character in GCA should now be the initial character active on the Current Character Options tab.

Updated ColorBlockSheet character sheet to include a listing of the applied armor and shields for the current loadout in the Protection block.

Updated code in a bunch of places to make use of newer systems and references, and to correct some hidden bugs resulting from bad references.

Updated some menu item handling.

Updated the Random Character system, and added support for it to the ChoiceList dialog and some of the message dialogs. The system will now allow for creating multiple random characters from the selected character template, or simply applying the randomized character template to the current character.

Updated Options for the hide/unhide of the explainer on the Random Character dialog.

I have changed the IDKey generation in GCA5 to be sourced from the System, rather than independently per character. The character still saves the last key it was issued, and this serves as a floor for future key requests in case a situation should arise where the System last key is lost. The new System key floor starts at 10,000 and increments from there–unless given a floor above the current last key, in which case the new key jumps to floor+1. This new system should ensure that all IDKeys are unique for all traits across all characters across an installation of GCA5 — assuming that no existing characters already had keys over 10,000.

IMPORTANT: I was going to do something a bit more complex for the new IDKey generation, and therefore had changed the IDKey to use Long values instead of Integer values. Changing to Long values required touching a lot of places in the code, and some may have been missed. If you encounter an overflow error, or a math exception, please let me know! This is very unlikely to be noticed until the auto-incrementing actually reaches the limits of Integer values.