Forum rules - please read before posting.

Procedural Text akin to Tracery?

Hi there, I'm working on a game that is driven by a lot of random events (which I'm handling with AC: Variables using random ints to trigger them) and one key aspect is procedural text akin to Tracery (which has been migrated to unity too)

I'm using a PopUp Variable to store the pronouns a players chooses when creating a character (she, he, them, ze, etc) and another one for possesive pronouns. But adding dialogue options and several other instances of typing can be a real mess if using a lot of token vars when developing the game.

Is there a proper way to integrate Tracery to AC or making procedural text a more tangible option?

Comments

  • It is possible to trigger dialogue entirely through script - the Dialogue: Play speech Action can be replaced with a custom subclass if need be, which is able to replace portions of the text dynamically.

    That said, this'd be most "nicely" done by using "speech event tokens". See the Manual chapter of the same name. Essentially, they allow you to insert custom tokens into your speech text (e.g. [tracery:animal]).

    Currently, these are used to trigger custom events that cause something else to occur when the token is encountered (for example, [anim:wave] might cause the speaking character to wave their arms.

    Normally, such tokens are removed from the speech text itself. However, it may be possible to similarly introduce an event that requests a replacement text. Using the "tracery" token example above, an event could read the key value ("animal"), and return one from a random selection.

    I'll see if this feature is possible to introduce in AC 1.68.

  • That's the method I'm using now, by storing the players choice into a global variable and calling the [var:x] as a token.

    What I'm looking for is to automate the process of writing all this: "this is [var:0] and [var:1] is looking for you. [var:1] is all by [var:2]self" which will turn into "this is player name and player pronoun is looking for you. Player pronoun is all by player pronoun"

    I've check tracery.io and found a port of it in the unity store. I'm not sure exactly how to integrate it to AC tho'

    Tracery port: https://assetstore.unity.com/packages/tools/input-management/tracery-100911

    But if I have to do it by single variables. So be it.
  • I'm not talking about variable tokens - I'm talking about speech event tokens.

    Like I said, this will need an update to AC itself to allow for the replacement of such tokens with dynamically-generated text through script - but should be part of the upcoming v1.68. I shall include an example on how to replace such a token with a random word in the Manual.

  • Chris, you're the BEST PAL EVER!

    Ok, meanwhile I wait, I'll focus on other aspects of the game.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.