My aching brain bits (b147)

b147

Made a slight change to the weight capacity calculations to try and account for variances in double precision values.

Updated saves to save various known tags in the normal xml blocks rather than end up as extended tag blocks.

Adjusted how most of the modal dialogs are called so GCA should no longer fall behind all other open windows when returning from them.

Made some minor drawing and labeling adjustments to the new Attack Mode boxes. Also added a GuideBoxes option that draws dotted boxes around the data cells, instead of just drawing a line between rows of them.

I decided that I liked a different way of showing an item’s used capacity, so I switched to that. The new way draws a bar across the bottom of an item’s display line on the trait list (not including the icon columns), and shows the filled percentage as a darker segment of that line. If the item’s capacity has been exceeded, the entire line is filled red, otherwise it is green or blue.

* Calculations, Text Functions, and NoBase

The NoBase keyword for a bonus was not supported as part of a conditional operation in a bonus, rather it was the unconditional point of a particular bonus. It was always processed first, before anything else, and then other bonus parts were applied to that ‘clean slate’. This may have been unclear, or was forgotten over time, and a number of bonuses started using nobase as a possible return option to clear certain values when various conditions applied. This was a great idea, but it didn’t actually work correctly in GCA 4 or 5, and instead cleared all modes of the targeted tag of all values in all cases.

Since this was a good idea, I have now adjusted GCA5 so that it will process Text Functions at the top of the process of evaluating and calculating bonuses to some tags (currently only reach()). This should enable the use of NoBase in a conditional operation as it already exists in all the cases that I’ve found so far.

* Links

Added a new type of relationship between two traits: linked(IDKey) and linkedfrom(IDKey). These are instantiated during adds() or creates() using a links(yes) tag on the source trait, which is the one doing the adding or creating.

The linked(IDKey) tag on the target trait (the one that was added or created) will get the IDKey of the source trait. It is assumed that this target trait depends on the source trait for some data that it needs.

The linkedfrom(IDKey) tag will be added to the source trait (the one that did the adding or creating), so that it will know that it’s being linked to from another trait and can update that trait when it changes.

Linkedfrom() can have many different IDKeys in a comma-separated list, but linked() can be only a single IDKey value.

The destination trait can then depend on having current data, and can refer back to the linked() trait in formulas using “linked::”, much as you can refer to parents with “parent::” or modifier owners with “owner::”.

You can not have links(yes) and owns(yes) on the same source trait; owns() will take precedence and links() will not be applied.

GCA will also create these related supporting tags: linkedname() and linkedfromnames(), which are the names of the traits related to the IDKeys in the linked() and linkedfrom() tags, respectively; and brokenlinks() which contains the IDKeys from linked() or linkedfrom() that can no longer be found.

* Simple Text Export

Made a minor change to how it exports components.

* Data Files

New version of Payload.

Updated some fencing weapons to use fencingweaspon().

Updated a bunch of containers to include weightcapacity() or countcapacity().

A few other bug fixes.

* TagDefs.XML

Updated with info for these tags: brokenlinks(), linked(), linkedfrom(), linkedfromnames(), linkedname(), links().

* GCA5.XSD

Added brokenlinks, linked, linkedfrom, linkedfromnames, linkedname elements to the ‘ref’ block of GCATrait
Added weightcapacity, weightcapacitylevel, overweightcapacity, overweightcapacityby elements to the ‘ref’ block of GCATrait
Added countcapacity, countcapacitylevel, overcountcapacity, overcountcapacityby elements to the ‘ref’ block of GCATrait
Added countasneed, ident elements to the ‘ref’ block of GCATrait
Added displaynameformula, vars elements to the main block of GCATrait
Added drnotes element to the ‘armordata’ block of GCATrait

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.