inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
4.06k stars 486 forks source link

Adding Tips to Choices #239

Open micabytes opened 7 years ago

micabytes commented 7 years ago

May already have been discussed, but a couple of searches did not find anything.

I'm a big fan of providing the player with as much information as possible, in order to give them the best possible basis for making their decisions. As an eample, one could have a tooltip pop up with additional information, when one mouses over a choice.

E.g.,

* Agree to help Lord Cardigan {tip: +2 to your Noble faction reputation}

Would show a choice "Agree to help Lord Cardigan" and a tooltip "+2 to your Noble faction reputation" if the player moused over the choice.

Any thoughts on what would be a good way to add this sort of thing to Ink? I'm not thinking of the practical implementation (I use my own, jInk), but I'm thinking that there has probably been some thought on this at some point during your work, and I'd like to add this to jInk's syntax in a way which is minimally problematic wrt future Ink expansions/development.

One might also consider this something that could be useful for other purposes (e.g., free-form text), but my primary concern right now is handling this for choices.

joethephish commented 7 years ago

I can see two possible approaches that we might consider for this:

  1. Standard text in a custom format, parsed by the game at runtime. This is usually our preferred approach since game-specific parsing is usually trivial after the hard problems have already been solved by the main ink system, and it keeps the ink engine itself lightweight.

  2. Use tags. But right now, unfortunately, tags can't added to choices! It's something I'd like to support in future though. E.g.:

On 15 Dec 2016, 15:16 +0000, MicaBytes notifications@github.com, wrote:

May already have been discussed, but a couple of searches did not find anything.

I'm a big fan of providing the player with as much information as possible, in order to give them the best possible basis for making their decisions. As an eample, one could have a tooltip pop up with additional information, when one mouses over a choice.

E.g.,

  • Agree to help Lord Cardigan {tip: +2 to your Noble faction reputation}

Would show a choice "Agree to help Lord Cardigan" and a tooltip "+2 to your Noble faction reputation" if the player moused over the choice.

Any thoughts on what would be a good way to add this sort of thing to Ink? I'm not thinking of the practical implementation (I use my own, jInk), but I'm thinking that there has probably been some thought on this at some point during your work, and I'd like to add this to jInk's syntax in a way which is minimally problematic wrt future Ink expansions/development.

One might also consider this something that could be useful for other purposes (e.g., free-form text), but my primary concern right now is handling this for choices.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/inkle/ink/issues/239), or mute the thread (https://github.com/notifications/unsubscribe-auth/AA0bV0yht2V1kLlJm8pOUHmFrvsD2WkWks5rIVnVgaJpZM4LONNK).

micabytes commented 7 years ago

Thanks for the feedback. I might go for the second, since that should be fairly easy to add to jInk (and I prefer to keep that sort of stuff with the base engine, rather than having to re-implement/copy-paste it with every new deployment of the jInk engine).

joethephish commented 7 years ago

The main complexity I've seen is the question of how it should interact with the choice structure:

* A [B] C # tag

...since currently we only have tags on the end of a line. So currently that would mean that he tag is added to the content AC. But I guess we could simply also add the tag to the choice AB, which seems like the most straightforward unsurprising approach. Could potentially be awkward if you really don't want the tag on AC though.

micabytes commented 7 years ago

Not sure I got this, because the jInk implementation is subtly different here, but if I understand it correctly, this is about whether the tag available if the choice is show, or only after it is selected/executed?

I think the former is preferable, simply because if you really want to enforce the latter as a writer, you can always place the tag on a follow-up line.