b78
* Various
Set the Duplicate Card dialog to fixed borders.
Session files should no longer be getting inserted into the most-recently-used list.
Updated FastLoad structure to support inclusion of #Store values.
* Store and Get
Finished something started way back in b57: support for #Store and #Get().
#Store is a data file directive that allows storing text as a named block for use elsewhere in the Library, such as ‘#store warning=Don’t Do That!’. These are basically global variables on the Library level, rather than at the trait level, and in concept are similar to Lists, but store only a single item of text, rather than a group of related text items.
#Get allows you to retrieve #Store values.
Like with #Choice or other such directives, these are for use in building other library features, such as SelectX dialogs, or #Choice dialogs. You can use these to insert what will be character features, such as storing a formula that’s inserted into a trait, but remember that #Get is only processed when a trait is added to the character.
The #Store template looks like this:
#store VarName=text
The VarName should be simple, but if necessary (when it includes an = sign) it can be enclosed in quotes or braces.
The text bit can be whatever text you want, so long as it conforms to GCA’s data file rules (one line, or put together from multiple lines using line continuation). Don’t enclose text in quotes or braces unless you want them whereever the text is going to be inserted. Includes support for ~P (that’s a tilde followed by a capital P) for inserting a carriage return/line feed into the text, which is converted during #get() retrieval.
Be conscious of where the text is going to go; don’t include things like unbalanced parens or other characters that might result in the destination no longer being correctly parseable after the value is inserted.
Whitespace at the front or end of either part is trimmed.
The #Get() template looks like this:
#get(VarName)
And simply replaces the entirety of the #get() command with the retrieved value.
A couple examples:
[ADS] <_TESTING> #Store TestData=This is a Test Example 1 (#GET(TESTDATA)), 5/10 #Store DialogTitle=Test Dialog #Store DialogText = Hello!~PThis is a dialog to demonstrate the #Store and #Get commands.~PTry it! #Store DialogList = Item 1 Chosen, Item 2 Chosen, Item 3 Chosen Example 2 (%choice%), 5/10, x(#ChoiceList(list(#get(dialoglist)),Title(#get(dialogtitle)),Text(#get(dialogtext)) ))
In Example 1, the name extension becomes ‘This is a Test’ when added to the character.
In Example 2, a Choice dialog pops up when added to a character, and the dialog is populated with the #Store values.
* Simple Edit
Rebuilt Simple Edit’s display features, to correct a bug, and to allow for more easily expanding it with additional features in the future.
Added support for additional full-cost ‘active slots’ in Alternative Abilities, so that you pay full cost for X slots, and pay 1/5 cost for the rest of the Alternative Abilities in the group. This now has UI in Simple Edit and is supported with the altabilityslots() tag.
All the multi-line text boxes in Simple Edit should now support CTRL+A to select all the text.