hi! i'm really new to making an ukagaka but i was wondering if there is any tutorial to refer to when setting up a custom talk option in the main sakura's menu (something like aster having an option to ask about who they are)? i have been wanting to make something similar in function but i have been having troubles understanding how and where to create code to do that
Hi! Creating a custom menu response is generally simple, although the specific syntax depends on what SHIORI you're using. Unfortunately, you haven't specified what you're using, so I can't point you to something specific to your situation. I'll give you a general rundown, and if you need more specific help, please send another ask specifying which SHIORI you're working with!
This was a really hard concept for me to grasp at first too, because it's so open ended. As a newbie it really feels like there should be some special setup or rules that make it work, but there's really nothing of the sort!
A couple of key things to know here:
1) The different files that you write your code in (such as bootend.dic in YAYA, ghost-bootend.kis in Kawari, bootend.as in Aosora, etc.) are completely arbitrary. They are only separated for organization purposes, and you can organize them how you want to! None of the files have any special attributes to them.
For example, in YAYA ghosts it is common to write word groups (sometimes called "envelopes") into a file called word.dic. However, there's no reason that you have to do this. You could write word groups into your menu file, or your boot file, or any other dic file that you like! YAYA doesn't care where the word groups are written. However, it is generally considered useful to put them all in one file because then you can easily find them later.
Don't stress over what file to put what code in! It generally does not matter unless you are instructed otherwise, so you should just organize it in a way that makes sense to you.
(Some complex coding concepts, like YAYA's preprocessor and Aosora's units, do actually require you to set up your files in a certain way. These are very advanced features that most ghost devs will never use, and if you do use them, you'll know.)
2) Everything can be handled as an event. Everything! SHIORI Events are the backbone of ghosts. When you write a menu choice tag (\q or \__q, or even \_a if you want), you can specify an event name that starts with On. This makes it call the specified name directly as a SHIORI event.
For example, if you write this menu tag: \q[About me,OnAboutMe] when the user clicks it, the event OnAboutMe will run. What to do then? Just write an event definition with the text that you want to display!
Here's an example in YAYA:
OnAboutMe
{
"\0\s[0]I'm a ghost! Does that answer your question?"
}
Here's the same example in Aosora:
talk OnAboutMe
{
\s[0]I'm a ghost! Does that answer your question?
}
This is pretty much the most basic response to a SHIORI Event you can get. But you can get more detailed with this! For example, add a few tags and you can create a submenu:
OnAboutMe
{
"\0\s[0]About me? What do you want to know?\n\n\![*]\q[Are you a ghost?,OnAbout.Ghost]\n\![*]\q[How do you have such fabulous hair?,OnAbout.Hair]\n\![*]\q[What's your favorite food?,OnAbout.FavoriteFood]"
}
(Of course, this is a bit hard to read, and each SHIORI generally has a way you can break this up to be more easily readable. But this isn't a guide on menu design!)
Learning how to work SHIORI Events is one of the most important things for ghost development. If you can get a solid grasp on them, then the rest of ghost development is much easier to understand!
And of course, once you've established a custom SHIORI event like this, you can do anything you want with it! Change variables, add a back button that leads back to your main menu, open an input box, whatever you want. It's all SHIORI events!
Further reading about SHIORI events on Ukadoc
Hopefully that helps! If you have further questions, feel free to send in another ask, or ask on our forum where other ghost devs may be willing to offer advice!