HOW TO ADD A "CREEPY/SCARY/HALLOWEEN/ETC" MODE TO YOUR GHOST
want to add a spooky surprise to your ghost for halloween or just in general? not sure how to do it? maybe i can help! maybe not though idk.
Note: this is written for yaya, but the code basics should still apply for other languages!
first, we want to create a variable or two, preferably in wherever your initial variables are located. there's a couple ways you can do so:
... and possibly some other ways i'm forgetting. doing so here will *initialize* your variable, and presumably you want to start your ghost with the mode set to normal, or off. for the purposes of this guide, i'll be using the "mode" method, in case we want to add a silly mode or something later.
to initialize a variable in script input, first ctrl+s to bring up the input box, then type
%(mode = 'normal')
and hit the enter key. to check if it's initialized properly, simply bring up the input box again and input %(mode) — this should make your ghost display the contents of the mode variable in the balloon.
-
so, now we have our variable. but how do we use it?
to turn it on, you can use random chance:
to turn it off, you can either use the toggle, a different random chance in OnMinuteChange or similar, or simply add
(Note that the font i'm using here ligatures >= and <= — normally they're written without a space in between!)
or a toggle:
mode = "normal"
to OnClose.
-
using a case/when statement vs an if/else here is mostly a matter of personal preference - i'm a little more used to using case/when for things like this, but it's pretty much the same thing in yaya anyways, so if you don't like it, don't worry about using it!
to change the aitalk pool, you only need to change one thing:
-
There is also another way: one that requires dynamically loading *all* affected .dic files, using a second yaya.txt, dicif, and include, ... but i haven't actually done that myself yet! so, unfortunately, i can't tell you how to do that, or if it's any easier in the long run.
changing other functions may be a little different:
anyways, that's the basics of how to add a mode! since chains have a unique identifier anyways, there's no need to add a separate check for them.
Zichqec also has some cool text functions that you can use!
that's all i have to say about that! drawing surfaces is just a matter of drawing and surfaces. i'm not getting into all that, but there's a possibility of using dressups to change surfaces instead of trying to remember everything else. also, surface.alias can be used to group certain surfaces together! but like i said, not getting into all that.
remember to add checks to OnSurfaceRestore, OnBoot, OnClose, OnMouseMove, and anything else that may need to be changed! if you write your menus the right way, you may not even need to add if-checks for every little function, either. here's an example of a way to have fun with the menu, without sacrificing functionality too much!
hope this helped some!
-
guide made for etc jam 2025, in the first 48 hours of the event.
















