Another big haul o’ bits (b193)

Another much bigger update than usual. I have been putting the money from my Patreon to good use! Much of the new stuff in here is only available now thanks to the funding provided by my Patreon supporters. If you’d like to see improvements, bug fixes, expansions, and more added to GCA sooner rather than later, please consider pledging if you can afford to do so. (Not required, not expected, but very, very much appreciated!)

b193

* Miscellaneous

I have added support for requesting the worst of available skills, instead of the best, from the skillused() list when calculating charskillscore(). You do this using the #worst directive somewhere in the list (I suggest as the first thing). Do not separate the directive from the list with a comma, as GCA will identify it and remove it before parsing the list. This flag must be in the skillused() list for a mode in order to apply, otherwise GCA will continue to select the best possible skill for use.

GCA’s internal data handling is generally fine with CR+LF usage almost everywhere, but they’re not allowed in the data files. So, I have added some logic to convert these carriage return/line breaks to <CRLF>, <CR>, or <LF> (depending on how they’re found; RTF often uses line feeds but not carriage returns, for example) when saving data out to a data file, and to convert <CRLF>, <CR>, or <LF> back to the appropriate control characters on reading book data in. This has been done in the routines that save character data to book files, read data in from book files, and in the reading and writing of the FastLoad files. This should allow users to use hard returns in descriptions and notes for traits and modifiers within GCA itself, and <CRLF> to represent them when editing data files. If you paste RTF code into a book file manually, you will also have to manually change all the line feeds to <LF> to keep things kosher. Note that this change is not currently supported for anything that isn’t a trait or modifier.

GCA now supports the trait tag vttnotes() and the mode tag vttmodenotes() for users to make notes intended to be used in the virtual tabletops of their choice. Of course, this requires an appropriate exporter that knows to export these fields in the correct way to be useful for whatever VTT is the target.

I’ve created a very simple tool-style dialog to allow selecting a color; it’s basically just a form to show you the color picker drop-down that I use in Sheet Options for picking colors. This is currently used by the simple RTF editor that I mention in the RTF-Related section below.

I have enabled the gear menu on the Reaction Modifiers box, and added an option: Show Bonuses By Line. This allows for changing the display of bonuses and conditionals in the box so that they’re one per line, instead of in paragraph format. (Turns out that I prefer it this way, so I’ve made that the default behavior now. You can turn that option off to restore the previous paragraph-style output.)

Both Sheet View and the Print Preview dialog now have the ability to switch between Single Page and Facing Pages modes using new buttons on the toolbar. (The View Whole Page button now has a new image since the previous image is now used for Single Page.)

When you use Save to File from the Edit Traits, Advanced Edit Traits, or Edit Modifiers dialogs, or use Save as Template from the File menu, GCA will now ask you if you want to reload any libraries that make use of the changed book. This allows you to have GCA do it automatically rather than you having to reload the libraries manually, but by asking first it allows you to refuse, in case you have a bunch of other stuff to save as well.

* Bug Fixes

Fixed a bug in damage calculations related to text functions with damage multiplier bonuses.

I found that GCA really disliked fixed value (non-dice) base values for attack damage (such as ‘1’ instead of ‘1d’), and having one would often result in getting a weird result that might include unsolved expressions. I tracked down where that result was decided upon, and can’t figure out if there was a good reason for me to return that weirdness, or if it’s just a bug. I decided it was a bug, and fixed the value that gets returned so that it should now return the non-dice flat value result that I think should have been correct. If I was wrong, and just didn’t remember some esoteric reason for that particular configuration, I apologize, and hopefully it’ll come up and I can figure out something else.

The Reaction Modifiers box in Unified View would sometimes get its bottom cut off, and sometimes that would result in not seeing all the text. I have made a change in how it is refreshed to address this.

Fixed some text on the Symbols and Optional Display panels of the Character Options tabs in Options. Also moved the ‘Include your shield DB in the scores/levels for your active defenses’ option to the bottom of that panel.

* Minor Adjustments

Adjusted some bonus display string creation to show ‘+0’ instead of just ‘0’.

Advanced Edit Traits will now show the IDKey of a trait just above the tag data grid. It’s not editable, but it can be selected and copied.

Fixed Sheet View so that the Library pane will stay the set size when the window is resized, as it does on Unified View.

I’ve updated some mode based bonus messages to refer to the mode name instead of the number.

Added a bunch more tags to the list of tags that are not saved as data when saving a character trait as a system trait.

* Modes in General

I have updated some code, and added some routines, to better support certain mode calculations using Modes directly instead of passing a mode index. This should be transparent, but its a change that could potentially break something.

I have added Public Function DamageDisplayText() As String to the Mode object. This function returns a string that represents the standard damage notation including damage, armor divisor, damage type, and radius. Example: 2d+1 (2) cut (2). You can also access this using Item.DamageModeTagItem() with “DamageDisplayText” as the tag, if you’re accessing mode values that way.

I have updated various attack mode displays in GCA to use the new Mode.DamageDisplayText function.

* Damage Mini-Modes

Damage mini-modes allow you to store more than one set of damage values in a single attack mode. If you apply them manually, you need to set damage(), damtype(), armordivisor(), and radius() manually, using comma-separated values, one per mini-mode desired. Damage() is always required, but the other tags are not. You can also apply a mini-mode via a bonus to ‘minimode$’ in standard damage notation, such as ‘1d cut’ or ‘sw+1 (2) burn (3)’; GCA will parse those damage strings into the appropriate tags (remember to put armordivisor and radius in parens, and that armordivisor comes before the damage type while radius comes after it).

This is considered an experimental feature, but it is ON by default. You can turn it OFF on the Experimental Features panel on the Program Options tab of the Options dialog.

NOTE: If you have mini-modes that you created manually by editing tag values, turning the option OFF in Options may result in a crash as that can result in illegal data. However, if you apply mini-modes via a bonus, that bonus will simply no longer get processed, so no crash will result.

The new DamageDisplayText function of a Mode will return the damage string correctly, whether there are mini-modes in use or not. When mini-modes are in use, damages will be displayed as comma-separated damage notations.

Using mini-modes results in some new calculated tags being managed in each Mode: minimode_damage(), minimode_damtype(), minimode_armordivisor(), and minimode_radius(). These shadow the original tags but have all the extra mini-mode data included, or slots for them when values are missing or empty.

For plugin authors, if you need to access mode data for purposes other than display, you can use the new GetMiniModes() function of a Mode. This returns all the mini-modes as part of a ModeManager, as full modes using the data of the mode in question, but the damage data for each mini-mode. That is, if you have a mode with two mini-modes of ‘1d cut’ and ‘sw+1 (2) burn (3)’, then GetMiniModes() will return two modes that are identical to the original mode, but with the damage(), damtype(), armordivisor(), and radius() tags set for each type of damage for each of the two mini-modes.

* Notes, Notes(), UserNotes()

The Notes panel in Edit Traits wasn’t serving any purpose any more as handling of modes changed how that data was used and viewed, (The old usage of Notes was muddied between general notes and the original intended usage of the short notes-reference-numbers in equipment tables and such. Nowadays, notes() is enforced as a mode-specific tag, and I’ve made an effort to change the long-form notes that were sometimes used in data files to use either usernotes() for general trait notes, or itemnotes() for mode-specific notes.) As such, the Notes panel in Edit Traits has been re-tasked to support VTT Notes, which would be a specific place for people to enter notes or formulas for use on virtual table tops, if supported (Foundry, for example, could use it for OTF expressions without cluttering up any other fields.)

The Notes property on GCATrait has been removed. I have replaced it with Public Function Notes(Optional ByVal AsPlainText As Boolean = True) As String which returns any usernotes() for the trait. Usernotes() is an RTF-enabled tag, so by default the Notes() function returns that data as plain text; you can pass False for the AsPlainText optional parameter if you are okay with getting the RTF-encoded text.

* RTF-Related

The helper function RTFtoPlainText() wasn’t smart, and if an exception occurred because the text being processed wasn’t valid RTF, it would just fail. Now it attempts to convert again using a simple RTF header, and if that also fails, it simply returns the text it was provided. I also improved the logic significantly, which provides a huge improvement in processing speed. (This routine also used to convert any CR+LF that exists in the text after conversion, or failed conversion, to the text marker “<CRLF>”. That no longer happens here.)

Added some additional routines to assist in RTF processing, and adjusted some of the existing RTF routines so fewer controls will be instantiated and destroyed as GCA runs and handles RTF features.

I’ve created a very simple RTF editor, which just allows for setting bold, italic, or text colors, and offers access to the font dialog for changing fonts and font sizes.

Currently the RTF enabled fields using the new simple RTF editor are: the Description and User Notes boxes in Edit Traits; the Notes field in the Selected Log Entry area of the Campaign Log; and the Notes field of the Party Log Entry dialog.

With the added support, and likely increased use, of RTF in Description and User Notes, the existing code for displaying the description() and usernotes() in the Info pane no longer worked correctly. Since the content of the Info pane was already RTF, it already had a header with a color table. That meant that when the new RTF tag content was inserted, any color information it had would be matched against the existing color table, shifting the colors from what the user applied. (They were still correct in tag itself, just displayed incorrectly.) I have fixed this in various pieces of the system that generates the display, allowing me to insert the description() or usernotes() using the Info pane control’s RTF handling, which allows it to merge the color tables and display the data correctly.

* View Info Templates

I have adjusted the included templates for the information that is displayed in the View Info pane for the various types of traits. I have removed notes() because, as mentioned above, it’s not what was intended. I have also moved the usernotes() display to under the description() display, since it will often include important information, and moved both of them upward to just under the Page display.

* GCA Prime Sheet (now 1.0.5)

Updated to allow for properly printing the RTF text of description() and usernotes() for traits.

Added options to have description() and usernotes() print as plain text instead of rich text.

Add options to always show description() or usernotes() for traits that are highlighted a certain color (or highlighted at all).

Updated to use Mode’s DamageDisplayText for damage displays.

* GCA5.xsd

Added element ‘vttnotes’ to the ‘ref’ block of GCATrait

Added element ‘vttmodenotes’ to GCAAttackMode block

Added elements ‘minimode_damage’,’minimode_damtype’,’minimode_armordivisor’, and ‘minimode_radius’ to GCAAttackMode block

* TagDefs.xml

Updated ‘mode enabled’ text to instead be ‘mode specific’.

Updated to include text for vttnotes() and vttmodenotes().

Updated to include text for minimode_damage(), minimode_damtype(), minimode_armordivisor(), and minimode_radius().

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.