YarnSpinnerTool / YarnSpinner

Yarn Spinner is a tool for building interactive dialogue in games!
https://yarnspinner.dev
MIT License
2.3k stars 201 forks source link

Proposal: Enhancements to File Tags + Header Tags #294

Closed FaultyFunctions closed 7 months ago

FaultyFunctions commented 3 years ago

Introduction

File tags can currently contain anything after the #, this functionality could be extended to header tags. We could also add a separator for file tags, similar to === and --- for nodes and node headers respectively.

Rationale

File tags are extremely useful because you can store whatever data you want in them. The user has complete control over how to use them. This is great on a file-wide level but this should also be available on a node-level.

The file tag separator would also follow the convention and enable easier parsing for node files. This would also allow us to get rid of the # requirement for file tags. File tags would be read per line just like everything else.

Proposed solution

Proposed file format:

Filetag1
Filetag2, I can do whatever here!
~~~
title: My Node Title
a node header tag, I can do whatever here!
Another node tag!
---
node content here
===

Backwards Compatibility

This obviously isn't compatible with the current language set but it would actually simplify parsing the language. This wouldn't be too hard to convert between I don't think, but since the 2.0 spec is still in beta, breaking changes are to be expected.

McJones commented 2 years ago

There's been a bunch of discussion around this feature internally and we are genuinely unsure as to the best way to proceed around this. We like bits and pieces of this but are not in agreement as to how this would work or what changes it would need (if any). Despite not being a hard feature to implement because us internally can't agree on this we don't think we will be able to get this in before the v2 release. As such I am punting this down the path for a future version of the language.

FaultyFunctions commented 2 years ago

Perhaps in the future these internal discussions can be discussed here instead of leaving a proposal hanging for 10 months and then making the decision to push it back indefinitely, 7 days before the release of v2.

McJones commented 2 years ago

Totally agreed.

Overall we feel we have done a bad job with the spec, or rather done a bad job with the process of the spec (we think most of the details contained within are quite good). We aren't really sure what future versions of the spec evolution will go like, but the existing process is bad and we have no intention of doing that again, both for our sanity and everyone else.

desplesda commented 7 months ago

We feel that the functionality described in this proposal is now better served by extending the Yarn Project JSON file, rather than adding support for file-level hashtags in the source files themselves. Accordingly, I'll close this issue here. Thanks for the discussion in this thread, everyone!