YarnSpinnerTool / YSDocs

Source code to the documentation for Yarn Spinner.
https://docs.yarnspinner.dev
6 stars 27 forks source link

Create an FAQ / How do I... ? page #10

Closed radiatoryang closed 2 years ago

radiatoryang commented 2 years ago

Started working on an FAQ / cookbook page. Would be good to direct people to this for common questions and problems.

Is this something the YS team might want? Or no?

KXI-System commented 2 years ago

As requested from the discord, here are some more FAQs found in the help channel:

How do I change the LineView or OptionListView? This usually comes from users who are new to using Unity Packages, but the answer usually involves explaining Dialogue Views and the possibility of making your own.

How do I continue the story with key/button press instead of the continue button? The answer is basically use the DialogueAdvanceInput.cs script, but calling UserRequestedViewAdvancement on any view or OnContinueClicked specifically on the LineView are valid answers too. Most are satisfied with the first answer though.

How do I show a C# variable in my yarn story? Basically yarn functions and explaining a basic way to set that up.

How do I change a yarn variable in C#? How do I change a C# variable in yarn? Not asked too much anymore, but a simple code snippet is enough.

How do I "sync" a variable between my yarn story and C# script? This comes from not knowing its possible to access a C# variable in yarn and vice versa. Basically answered in the previous two questions, but extra explanation on why its bad to have the same variable in two places and where the variable should live.

How do I show the last seen line of text when the options are shown? How do I skip the last line of text before a set of options? Basically a modified LineView that uses the #lastline tag to do what's wanted, though this might be better as a feature added to LineView by now. It could also be a good idea to have a guide to modify the existing views and have this be the feature added.

How do I start a dialogue from a node? How do I start a dialogue while another node is running? It's just StartDialogue

How to save a dialogue "history"? A feature where previous seen lines are displayed to the player, this could be a guide by itself explaining the concept of line IDs as well.

How do I jump to a specific line in a node? This is usually for the purpose of having a VN style saving and loading.

How do I display a specific line from a node? This is usually for line descriptions or using YarnSpinner as a localization tool.

How do I use Yarn Markup? This is better off being an entire guide.

How do I create a yarn project during runtime? Rarely asked, and its either a misunderstanding on how to use Yarn Projects or a niche use case.

How many yarn files should I have? Can my entire story be in one yarn project/file? Should I have a yarn project for each scene? Is my yarn project/file too big? Some helpful tips about yarn projects and yarn files will help answer these questions.

How should I stop my dialogue while its still running? Why doesn't DialogueRunner.Stop work? Part of a bigger discussion on DialogueRunner.Stop but basically outlining a way to stop the dialogue runner and the views.

radiatoryang commented 2 years ago

OK, there's probably some broken links, and/or bad info, but it's 90% of the way there

Would appreciate feedback and/or edits, thanks!

link to the page for easier reading: https://github.com/radiatoryang/YSDocs/blob/patch-1/using-yarnspinner-with-unity/faq.md

radiatoryang commented 2 years ago

OK I think this initial version is ready for review! It's not exhaustive, but it has a lot of info and will help a lot of people I think

https://github.com/radiatoryang/YSDocs/blob/patch-1/using-yarnspinner-with-unity/faq.md

desplesda commented 2 years ago

Updated this PR to the current state of the staging branch, and did a pass over this!

Main changes:

Overall, this is absolutely fantastic! If you're happy with my changes, I can merge this and get it added to the site.

radiatoryang commented 2 years ago

lgtm thanks!