Skip to content

Feature Request: Changing Text #18

@requiemaeterna

Description

@requiemaeterna

Hi! Other than Visual Novels, I also write text adventure games. One of the features I like from inkle's ink engine is a syntax for variable text, intended to make variations of repeating text simpler. While you can already produce this kind of effect with existing tools, the shortcuts are easily readable and scriptable without having to deal with actual variables. I think it's neat to have it in Light.vn too.

Here are some samples:
A. Sequence
The radio hissed into life. {"Three!"|"Two!"|"One!"|There was the white noise racket of an explosion.}

When played, this section will produce the following in order:
1st time: The radio hissed into life. "Three!"
2nd time: The radio hissed into life. "Two!"
3rd time: The radio hissed into life. "One!"
4th time: There was the white noise racket of an explosion.

B. Cycles
It was {&Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday} today.
Just like above but now it will loop back to Monday after Sunday

C. Random Shuffle
Today I eat {~Ham|Fish|Cake}.
This will produce any of the following at random:

  • Today I eat Ham
  • Today I eat Fish
  • Today I eat Cake

Together these shortcuts can make something complex such as:

It was the {first|second|third} day. I went to {~the market|the plaza|the gate} and earned {~+20 coins|+5 coins|+10 coins} selling the treasures I found in the dragon's lair.

allowing for quick procedural variations in short form.

The implementation I look for in Light.vn doesn't have to be as robust as the ink version. For information, the one I use the most is the shuffler.

I have included the documentation to make it clearer:
https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#8-variable-text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions