Store bits, get bits, edit bits

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.

8 thoughts on “Store bits, get bits, edit bits

  1. Loofou

    Hey Armin, say is there some kind of beta people can join at the moment? And quite as important: Do you have something like patreon going, so we can support the project? I use GCA4 for a long time now and can’t wait to get my hands on the new version and I just want to show some support for your hard work 🙂

    Reply
  2. Armin Post author

    Hello. I am not adding anyone to the small private beta team at this time, but I am hoping to have some kind of public beta at some point in the future. As for a Patreon, I don’t have one right now because I haven’t been able to figure out how to structure one, but maybe that will happen in the future, too.

    Thanks!

    Reply
    1. Loofou

      Well, that is unfortunate. I hope you let us know here as soon as you have infos about how the rest of us non-beta-testers can support you! 🙂

      Reply
      1. Armin Post author

        Thanks. I am currently taking another look at possibly setting up a Patreon. I’ll definitely post should it come to fruition.

        Reply
  3. Onkl

    Another vote for a Patreon, I want to chip in too. Thanks you very much for all the work you put into GCA5!

    Reply
  4. Raekai

    Yet another vote for a Patreon. I haven’t checked back in on this in a while, but I would love to give any support that I can.

    Reply

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.