694 lines
36 KiB
Plaintext
694 lines
36 KiB
Plaintext
//---------------------------Menus--------------------------
|
|
//This .dic file is primarily concerned with the double-click menus for each of your ghosts. If you don't want to have menus for your characters, you'd just have to delete the OnMouseDoubleClick functions near the end of mouse.dic and then ignore this file, as none of it will be called I believe. Menus can be cool though, since you can put stuff in them and create new functions if you know what you're doing. For example, I've added a lot of games and interactions and little linked icons to my Hunter Smoker ghost to keep track of their feelings and such. Much of that is pretty complicated though (and kind of messy, cough), so I won't go into it here, but I covered some of the concepts in the coding page of the walkthrough, and enterprising ghost makers can study the menu.dic file I set up for Hunter/Smoker and see how I put it together.
|
|
|
|
//The complexity of this file depends on how customized you want your menus. If you just want to leave them as they are, then all you'll have to do is replace dialogue appropriately. Many of the options here can be ignored if you don't care. You only have to fill in the things that interest you! The default template dialogue will handle anything you don't. If you get bored or tired, you can skip a lot of these if it comes down to it. You can always go back and fill them in later too. Your ghost will function fine either way!
|
|
|
|
//And of course, this file will always be waiting for you when you've gotten more familiar with ghosts and want to add cool features! It can be a flexible playground, but don't feel too stressed out about it. As mentioned, just fill in what comes to you and the template dialogue will cover the rest.
|
|
|
|
|
|
|
|
//Make sure to read the walkthrough (http://www.ashido.com/ukagaka/) for more details about how to properly format ghost dialogue!
|
|
//I will reiterate that you should be editing these in Notepad++, and in particular, you should set the Language to C (or Java I guess) to properly highlight all the text. It will make things A LOT EASIER for you, trust me! It will also help you keep track of your brackets in case you forget some. If you click on a line with a bracket in Notepad++, it should highlight where the other bracket ends, or turn purple if there's no finishing bracket (which you should definitely fix!)
|
|
//It will also highlight my commented lines in green, so you'll know where they are. Any line beginning with // is a commented line that the code will not read. It's just for your reference!
|
|
|
|
//If you see a big block of commented text you want to uncomment, highlight the text and then hit ctrl-shift-k in Notepad++ and that should uncomment it. Mostly this is intended for advanced users.
|
|
|
|
|
|
//--OpenSakuraMenu
|
|
//This is a bit of intro dialogue before the main character opens their menu. You can see below that there are three pieces of separate dialogue listed before it goes to MenuRun. The character will randomly choose one of those pieces of dialogue before opening the rest of their menu. You can customize this with individual greetings for the character, such as "Yes, %(username)?" or "Need something, %(username)?" or things like that. Note that none of the lines end with \e!
|
|
//The \b2 tag tells the ghost to use their big balloon for this dialogue. If your menu has a lot of stuff, this'll probably look better than the small one.
|
|
//If you don't want multiple responses before opening the menu, you can delete the dialogue and just leave MenuRun.
|
|
|
|
OpenSakuraMenu
|
|
{
|
|
"\0\s[0]\b2This is the first random menu open dialogue."
|
|
"\0\s[0]\b2This is the second random menu open dialogue."
|
|
"\0\s[0]\b2This is the third random menu open dialogue."
|
|
--
|
|
MenuRun
|
|
}
|
|
|
|
//--MenuRun
|
|
//As you just saw above. This actually fills out the rest of the menu. If you're going to be adding or changing functions, this is where you'll be doing your edits.
|
|
|
|
MenuRun : all
|
|
{
|
|
wd = GetWeekDay
|
|
ap = GetAP
|
|
//These four statements basically get the day of the week, whether it's AM or PM, the hour, and the time. It's putting together the information to display the time at the bottom of the balloon. Pay it no mind.
|
|
--
|
|
"\n\n\_q\b2" //The \n\n means two new lines as detailed in the walkthrough, and \_q means quick session, meaning all the text from this point on will display instantly instead of a few letters at a time like normal ghost dialogue. You can ignore it.
|
|
--
|
|
if lastTalk != "" //What this does is check to see if the ghost has already said a random bit of dialogue on its own, essentially by seeing if the lastTalk thing is NOT empty (!= means "does not equal").
|
|
{
|
|
"\![*]\q[Repeat Last Dialogue,OnLastTalk]\n\n[half]"
|
|
//If the ghost has said something, it will then display this menu option. You can replace "Repeat Last Dialogue" with whatever caption you like, such as "What were you saying?" or "What did you say?" or "Could you repeat that?" or something like that.
|
|
|
|
//*********************Advanced User Info*******************************
|
|
//These text boxes are meant for those who have an interest in expanding or using more complicated functions in their ghost. Also for my own reference in the future since I plan on using this template too, haha. If you have no interest in any of this and just want to keep things as simple as possible, feel free to skip these boxes.
|
|
|
|
//I briefly touched in bootend.dic about \q, but I'll again cover it here. Pay very close attention to how this bit of dialogue is formatted. You'll see it goes \![*]\q[Displayed Name,linkedfunction]. Breaking it down, \![*] puts the balloon's option icon in front of the choice (usually a > or something), \q sets up the choice, Displayed Name which is the text that will display in the ghost's balloon, then linkedfunction, which is what the choice is linked to when the user clicks it. As you go through this file, look at how every menu option is set up, and you will see they all follow this format, give or take a \![*]. If you're going to be adding new options to menus or creating your own functions and such, make sure you follow this format and learn it well. Make sure to read the coding page of the walkthrough.
|
|
//***********************************************************************
|
|
}
|
|
--
|
|
"\![*]\q[Say something,OnAiTalk]\n"
|
|
|
|
//"\![*]\q[Say something 2,OnAiTalk]\n"
|
|
|
|
//This option will force the ghost to say something from aitalk if the user clicks it. Just replace "Say something" with whatever caption you think would be appropriate.
|
|
//Advanced users, you can add multiple captions for any option you add to a menu you make just like this, as long as you separate it from the other options into its own section with two dashes above and below. Note that you can't do this if the Function above has ": all" after it, since that will put every potential option in. You'll have to set it your menu up differently to take --s into account. I commented it out here because of ": all" above, but you can see the basic idea.
|
|
--
|
|
"\![*]\q[Config Menu,configmenu]\n"
|
|
"\![*]\q[Functions,dosomething]\n\n[half]"
|
|
"\![*]\q[Nevermind,CANCEL]\n\n\n[half]%(wd) %(nowhour):%(nowmin) %(ap), %(month)/%(day)/%(year)\e"
|
|
|
|
//These three lead to the Config Menu, the Function menu, and Cancel. You can leave these alone if you like. All the envelopes at the end (see word.dic) basically display the year, month, day, weekday, and time.
|
|
}
|
|
|
|
//Leave this alone
|
|
OnLastTalk
|
|
{
|
|
"%(lastTalk)\e"
|
|
}
|
|
|
|
//This is figuring out what day of the week it is. Leave it alone.
|
|
GetWeekDay
|
|
{
|
|
if weekday == 0
|
|
{"Sun"}
|
|
elseif weekday == 1
|
|
{"Mon"}
|
|
elseif weekday == 2
|
|
{"Tue"}
|
|
elseif weekday == 3
|
|
{"Wed"}
|
|
elseif weekday == 4
|
|
{"Thu"}
|
|
elseif weekday == 5
|
|
{"Fri"}
|
|
else
|
|
{"Sat"}
|
|
}
|
|
|
|
//This is finding out whether it's AM or PM. Leave it alone.
|
|
GetAP
|
|
{
|
|
if hour >= 0 && hour <= 11
|
|
{"AM"}
|
|
else
|
|
{"PM"}
|
|
}
|
|
|
|
nowhour
|
|
{
|
|
if hour12 == 0; "1"
|
|
else; "%(hour12)"
|
|
}
|
|
|
|
nowmin
|
|
{
|
|
if minute >= 0 && minute <=9; "0%(minute)"
|
|
else; "%(minute)"
|
|
}
|
|
|
|
|
|
//If someone selects an option linked to BACKTOMENU, it will go back to MenuRun.
|
|
//Advanced users, note that this is formatted as Select.linkedfunction? Remember how it went \q[Displayed Name,linkedfunction] above? When a user clicks an option that doesn't begin with On, they'll be linked to Select.linkedfunction. Pay close attention as we go through and you'll see this in action.
|
|
|
|
Select.BACKTOMENU
|
|
{
|
|
MenuRun
|
|
}
|
|
|
|
//If someone selects configmenu, this will lead to TalkConfig.
|
|
Select.configmenu
|
|
{
|
|
TalkConfig
|
|
}
|
|
|
|
//*********************Advanced User Info*******************************
|
|
//Some of you may be wondering why some of these Select.options lead to another function. Why not just put the config menu coding under Select.configmenu, instead of linking to TalkConfig?
|
|
//Basically any function that's preceded with Select. is limited in its complexity and can only be called within its own .dic file in my experience. Why should you care, you ask? Well, if you're going to link to this function any other way, such as linking it in other .dic files or as a page in a menu, it needs to be a stand-alone function so it can be properly called. I'm pretty sure.
|
|
//The basic jist is this; if you're going to reuse whatever it is the option leads to, you should make it its own function. Otherwise, you can leave it in Select.option. As a rule of thumb I'd probably put any complicated stuff in its own function, then use the Select.option to call the full function as you can see above. Simple dialogue responses to a choice can stay as a Select.option though (Like "Do you like going to raves and partying? Yes/No"). Study what stays as a Select.option and what links to another Function as we go through the file.
|
|
//***********************************************************************
|
|
|
|
//--TalkConfig
|
|
//This menu allows the user to change their name and other information, as well as put in their birthday and change how often the ghost speaks. You can restructure how this looks if you want, but it's perfectly functional as is. You can of course change the dialogue though if you like.
|
|
//I commented out birthday and pronoun options, you can uncomment them if you want to add them back. They are optional! It's up to you if you want those features or not.
|
|
|
|
TalkConfig : all
|
|
{
|
|
"\0\b[2]\_q\"
|
|
//This bit of dialogue sets up a large balloon and a quick session, like above, so all the text will appear immediately. The rest is formatted to display the information and options to change it. I wouldn't touch any of it if you don't know what you're doing.
|
|
//I'll briefly explain the font tags I used here. \f[bold,1] turns bold on, \f[bold,0] turns it off, not unlike a <b> tag. \f[sup,1] turns superscript on (making it tiny and above the text) and \f[sup,0] turns it off. I touch on these tags in the walkthrough on SakuraScript.
|
|
|
|
|
|
|
|
"f[bold,1]Your name:\f[bold,0] %(username) \f[sup,1](\q[Change it?,TEACHNAME])\f[sup,0]\n"
|
|
|
|
|
|
//If you want your user to set their pronouns, you can uncomment this menu option by removing the two slashes in front. Read more on the walkthrough about commenting.
|
|
|
|
//"\f[bold,1]Your pronouns:\f[bold,0] %(heshe)/%(himher)/%(hisher) \f[sup,1](\q[Change them?,TEACHPRONOUN])\f[sup,0]\n"
|
|
|
|
|
|
//If you want your user to be able to set their birthday, you can uncomment this menu option.
|
|
|
|
//"\f[bold,1]Your birthday:\f[bold,0] %(birthdayprint) \f[sup,1](\q[Change it?,TEACHBDAY])\f[sup,0]\n"
|
|
|
|
|
|
|
|
"\n\f[bold,1]Talk Rate:\f[bold,0] - every %(talktime) \f[sup,1](\q[Change it,talkinter])\f[sup,0]\n\n"
|
|
|
|
|
|
|
|
{
|
|
"\![*]Enable Uninstall? (NOW : %(deleteshitai))\n\q[ON,deleteon] \q[OFF,deleteoff]\n\n[half]\n"
|
|
}
|
|
|
|
|
|
|
|
"\![*]\q[Back to the menu,BACKTOMENU]\e"
|
|
}
|
|
|
|
|
|
|
|
|
|
// ______ _____ _ _
|
|
// | ___ \ / ___| | | |
|
|
// | |_/ / __ ___ _ __ ___ _ _ _ __ ___ ______ \ `--.| |_ __ _ _ __| |_
|
|
// | __/ '__/ _ \| '_ \ / _ \| | | | '_ \/ __| |______| `--. \ __/ _` | '__| __|
|
|
// | | | | | (_) | | | | (_) | |_| | | | \__ \ /\__/ / || (_| | | | |_
|
|
// \_| |_| \___/|_| |_|\___/ \__,_|_| |_|___/ \____/ \__\__,_|_| \__|
|
|
|
|
|
|
|
|
|
|
|
|
//This and the next few set up the pronouns, as you can see by the linkedfunction names. You can replace "\0\s[0]What pronouns do you want?" with your own dialogue if you prefer, but leave the rest of it alone.
|
|
//If you're not going to add this feature, you can ignore these. I marked where the pronoun section begins and ends with some ascii banners. :3
|
|
|
|
Select.TEACHPRONOUN : all
|
|
{
|
|
"\0\s[0]What pronouns do you want?\w5\n\n[half]\_q"
|
|
"\![*]\q[He-His-Him,choicemasc]\n"
|
|
"\![*]\q[She-Her-Her,choicefem]\n"
|
|
"\![*]\q[They-Their-Them,choiceneither]\e"
|
|
}
|
|
|
|
Select.choicemasc
|
|
{
|
|
presuffix = "masculine"
|
|
himher = "him"
|
|
heshe = "he"
|
|
hisher = "his"
|
|
hesshes = "he's"
|
|
--
|
|
"\0\s[0]The pronouns are now he him and his.\e"
|
|
//Leave the part above the double dashes alone. You can replace the snip of dialogue however with whatever you like.
|
|
}
|
|
|
|
Select.choicefem
|
|
{
|
|
presuffix = "feminine"
|
|
himher = "her"
|
|
heshe = "she"
|
|
hisher = "her"
|
|
hesshes = "she's"
|
|
--
|
|
"\0\s[0]The pronouns are now she her and her.\e"
|
|
//as above, you can also replace this dialogue.
|
|
}
|
|
|
|
Select.choiceneither
|
|
{
|
|
presuffix = "undefine"
|
|
himher = "them"
|
|
heshe = "they"
|
|
hisher = "their"
|
|
hesshes = "they're"
|
|
--
|
|
"\0\s[0]The pronouns are now they them and their.\e"
|
|
//and this one.
|
|
}
|
|
|
|
//Here are some examples of these envelopes in use.
|
|
//"%(heshe) left that there."
|
|
//"%(hisher) work is really cool."
|
|
//"I'll ask %(himher) later."
|
|
//"%(hesshes) really good at it."
|
|
|
|
//These envelopes only apply if the pronouns are set! If the user can't set their pronouns, that then you don't have to think about these envelopes.
|
|
|
|
|
|
|
|
// ______ _____ _
|
|
// | ___ \ | ___| | |
|
|
// | |_/ / __ ___ _ __ ___ _ _ _ __ ___ ______ | |__ _ __ __| |
|
|
// | __/ '__/ _ \| '_ \ / _ \| | | | '_ \/ __| |______| | __| '_ \ / _` |
|
|
// | | | | | (_) | | | | (_) | |_| | | | \__ \ | |__| | | | (_| |
|
|
// \_| |_| \___/|_| |_|\___/ \__,_|_| |_|___/ \____/_| |_|\__,_|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//These two options toggle whether or not you can delete your ghost. Leave them alone.
|
|
|
|
Select.deleteon
|
|
{
|
|
deleteshitai = "ON"
|
|
TalkConfig
|
|
}
|
|
|
|
Select.deleteoff
|
|
{
|
|
deleteshitai = "OFF"
|
|
TalkConfig
|
|
}
|
|
|
|
|
|
|
|
|
|
// ____ _ _ _ _ ____ _ _
|
|
// | __ )(_)_ __| |_| |__ __| | __ _ _ _ / ___|| |_ __ _ _ __| |_
|
|
// | _ \| | '__| __| '_ \ / _` |/ _` | | | | _____ \___ \| __/ _` | '__| __|
|
|
// | |_) | | | | |_| | | | (_| | (_| | |_| | |_____| ___) | || (_| | | | |_
|
|
// |____/|_|_| \__|_| |_|\__,_|\__,_|\__, | |____/ \__\__,_|_| \__|
|
|
// |___/
|
|
|
|
|
|
//This next set of functions handles inputting the user's birthday. If you don't want this to be a feature, you can ignore all of this. I marked where the birthday code starts and ends for you with some good old-fashioned ascii banners. :3
|
|
|
|
Select.TEACHBDAY
|
|
{
|
|
"\0\s[0]What month were you born? \w8Name or number is fine.\![open,inputbox,OnUserBornMonth,-1]\e"
|
|
|
|
//You can replace the dialogue up to the \![open,inputbox,OnUserBornMonth,-1] tag, leave that alone. You'll need the input box to get the information.
|
|
|
|
//*********************Advanced User Info*******************************
|
|
//I also touched on this in bootend.dic and explained it in the walkthrough page on coding, but I'll also go into it here. I'm going to break down the tag there at the end of the sentence so you know what it's doing. Basically, \! means a function is going to happen, open tells it to open something, inputbox tells it to open an input box, and OnUserBornMonth is the function the input box will be linked to, which is just below here. -1 means the input box should not time out. If you want to add input boxes to some new function for whatever reason, you should follow this basic format.
|
|
//On a related note, you can raise any function at the end of any piece of dialogue by using this format - \![raise,InsertFunctionName]. This can be handy for testing things if the function is hard to get to run otherwise.
|
|
//***********************************************************************
|
|
}
|
|
|
|
//--OnUserBornMonth
|
|
//This takes the value that the user put into the input box above and evaluates it. Most of this you won't have to touch, but I'll explain what it's doing anyway. I'll point out where you can change the dialogue.
|
|
|
|
OnUserBornMonth
|
|
{
|
|
_tempmonth = TOSTR(reference0) //this stores what the user put in as a variable called _tempmonth
|
|
_tempmonth = TOLOWER(_tempmonth) //changes it to lowercase
|
|
|
|
//this is attaching the right value to the input from the user
|
|
if _tempmonth == "january" || _tempmonth == "1" {bornmonth = 1; bornmonthprint = "January"}
|
|
elseif _tempmonth == "february" || _tempmonth == "2" {bornmonth = 2; bornmonthprint = "February"}
|
|
elseif _tempmonth == "march" || _tempmonth == "3" {bornmonth = 3; bornmonthprint = "March"}
|
|
elseif _tempmonth == "april" || _tempmonth == "4" {bornmonth = 4; bornmonthprint = "April"}
|
|
elseif _tempmonth == "may" || _tempmonth == "5" {bornmonth = 5; bornmonthprint = "May"}
|
|
elseif _tempmonth == "june" || _tempmonth == "6" {bornmonth = 6; bornmonthprint = "June"}
|
|
elseif _tempmonth == "july" || _tempmonth == "7" {bornmonth = 7; bornmonthprint = "July"}
|
|
elseif _tempmonth == "august" || _tempmonth == "8" {bornmonth = 8; bornmonthprint = "August"}
|
|
elseif _tempmonth == "september" || _tempmonth == "9" {bornmonth = 9; bornmonthprint = "September"}
|
|
elseif _tempmonth == "october" || _tempmonth == "10" {bornmonth = 10; bornmonthprint = "October"}
|
|
elseif _tempmonth == "november" || _tempmonth == "11" {bornmonth = 11; bornmonthprint = "November"}
|
|
elseif _tempmonth == "december" || _tempmonth == "12" {bornmonth = 12; bornmonthprint = "December"}
|
|
|
|
else //if the month isn't a valid month, like 32 or something.
|
|
{
|
|
"\0\s[0]That's not a valid month. Try again."
|
|
--
|
|
"\![open,inputbox,OnUserBornMonth,-1]\![set,balloontimeout,-1]\e"
|
|
|
|
//You can replace this dialogue in the first line. You need to leave the tag for the input box so they can put in a correct month. That last tag there for ![set,balloontimeout,-1] makes it so the input box won't time out if the user takes too long.
|
|
}
|
|
--
|
|
//If it's a valid month
|
|
|
|
"\0\s[0]So you were born in %(bornmonthprint).\n\w8What day was it?"
|
|
--
|
|
"\![open,inputbox,OnUserBornDay,-1]\![set,balloontimeout,-1]\e"
|
|
|
|
//Here you can see the use of a bornmonthprint envelope to show the user what month they put in. Notice that it opens an inputbox at the end the same way the one above did. You can replace the dialogue in the first line just as with above.
|
|
}
|
|
|
|
//This adds an appropriate suffix to the number for the day. No need to mess with this.
|
|
|
|
Printday
|
|
{
|
|
if bornday == 1 || bornday == 21 || bornday == 31
|
|
{ "%(bornday)st" }
|
|
elseif bornday == 2 || bornday == 22
|
|
{ "%(bornday)nd" }
|
|
elseif bornday == 3 || bornday == 23
|
|
{ "%(bornday)rd" }
|
|
else
|
|
{ "%(bornday)th" }
|
|
}
|
|
|
|
//--OnUserBornDay
|
|
//This is much like the above function OnUserBornMonth. It'll take the value the user put in for the day and analyze it. Again, there'll be comments explaining how it works, but all you really need to do is change the dialogue appropriately. I'll point out where you can add new dates to check for.
|
|
|
|
OnUserBornDay
|
|
{
|
|
_tempday = reference0 //storing the input in _tempday
|
|
_tempday = TOLOWER(_tempday) //changes it to lowercase
|
|
_tempday = REPLACE(_tempday,"st","") //if the user types something like 2nd, 3rd, etc, this will make it just the number. It'll just add the suffix back later on the one that actually shows.
|
|
_tempday = REPLACE(_tempday,"nd","")
|
|
_tempday = REPLACE(_tempday,"rd","")
|
|
_tempday = REPLACE(_tempday,"th","")
|
|
_tempday = TOINT(_tempday) //Converts it to an integer
|
|
|
|
if ((bornmonth == 1 || bornmonth == 3 || bornmonth == 5 || bornmonth == 7 || bornmonth == 8 || bornmonth == 10 || bornmonth == 12) && _tempday >= 1 && _tempday <= 31) || (bornmonth == 2 && _tempday >= 1 && _tempday <= 29) || ((bornmonth == 4 || bornmonth == 6 || bornmonth == 9 || bornmonth == 11) && _tempday >= 1 && _tempday <= 30) //This ugly function checks if the day falls into a valid range. If it does, we set some variables and continue down.
|
|
{
|
|
bornday = _tempday
|
|
borndayprint = Printday
|
|
userbirthday = "%(bornmonth)month %(bornday)day"
|
|
birthdayprint = "%(bornmonthprint) %(borndayprint)"
|
|
|
|
"%(birthchecked)"
|
|
//Mostly defining envelopes and values in here. No need to touch any of this! Eagle-eyed readers will notice the new envelope birthchecked on its own line like a tiny king. We'll get to that momentarily, but pay it no mind for now.
|
|
}
|
|
else //If the day isn't valid, like the 10046th or something, this will open the input box again and have a \e so the dialogue below doesn't play. You can replace the dialogue in the first line here.
|
|
{
|
|
"\0\s[0]That's not a valid day. Try again."
|
|
--
|
|
"\![open,inputbox,OnUserBornDay,-1]\e"
|
|
}
|
|
}
|
|
|
|
//--birthchecked
|
|
//This is the new envelope you saw me point out above. As you can see here, you can actually call dialogue in a function with an envelope, even when it has if and else statements like here! Which can be pretty handy. Again, more on envelopes in word.dic. Creative ghostmakers can find handy ways to exploit this, I'm sure.
|
|
|
|
birthchecked
|
|
{
|
|
if userbirthday == dayslot //if today is the user's birthday
|
|
{
|
|
"\0\s[0]It's the user's birthday.\w8\1\s[10]Happy birthday, %(username).\e"
|
|
//replace this dialogue with whatever you like
|
|
}
|
|
elseif userbirthday == "12month 25day"
|
|
{
|
|
"\0\s[0]The user was born on Christmas.\w8\1\s[10]Happy birthday, %(username). \w5\s[15]AND JESUS!\w8\0\s[9]\n\n[half]We're supposed to be a blank template, knock it off before we get in trouble.\e"
|
|
//As you can see, you can set up an elseif statement to check if the user's birthday is any day you want! More on elseif statements in bootend.dic. In this case, there's specialized dialogue if the user was born on Christmas. You can replace this with whatever you like, or change the date you're checking as well, like to one of your character's birthdays if you want. You can also delete this elseif if you don't care.
|
|
}
|
|
else //if the birthday is not listed above.
|
|
{
|
|
"\0\s[0]Your birthday is %(bornmonthprint) %(borndayprint). We'll remember.\e"
|
|
//note the use of envelopes to display the newly set birthday properly. You can replace this dialogue as well, and you can use %(bornmonthprint) and %(borndayprint) to display the month and day in the new dialogue, if you want.
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// ____ _ _ _ _ _____ _
|
|
// | __ )(_)_ __| |_| |__ __| | __ _ _ _ | ____|_ __ __| |
|
|
// | _ \| | '__| __| '_ \ / _` |/ _` | | | | _____ | _| | '_ \ / _` |
|
|
// | |_) | | | | |_| | | | (_| | (_| | |_| | |_____| | |___| | | | (_| |
|
|
// |____/|_|_| \__|_| |_|\__,_|\__,_|\__, | |_____|_| |_|\__,_|
|
|
// |___/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//--Talk Rate
|
|
//This is when the user chooses to adjust the talk rate in the config menu. The talk rate is how often the ghost will read some dialogue from aitalk.dic.
|
|
|
|
|
|
Select.talkinter : all
|
|
{
|
|
"\0\s[0]\b2How often should we speak?\w8\1\s[10]The interval is currently set to %(talktime)."
|
|
//note the new envelope here for %(talktime). You'll see it again in a second. You can replace the dialogue above with whatever you like, just make sure it ends with ./ and not \e.
|
|
"\0\n\n[half]"
|
|
"\![*]\q[Every 30 seconds,TALKMAX]\n"
|
|
"\![*]\q[Every minute,TALKHIGH]\n"
|
|
"\![*]\q[Every 3 minutes,TALKNORMAL]\n"
|
|
"\![*]\q[Every 5 minutes,TALKPOOR]\n"
|
|
"\![*]\q[Don't speak,TALKNONE]\n\n[half]"
|
|
"\![*]\q[Don't change,TalksTill]\e"
|
|
}
|
|
|
|
//If the user doesn't want to change the rate. You can change all of the dialogue in any of these options if you want to reflect the choice the user made. You TECHNICALLY could also change the value in talktime to reflect some other way of measuring time but I wouldn't recommend it, it'd just be confusing I'm sure.
|
|
Select.TalksTill
|
|
{
|
|
"\0\s[0]No change to the talk rate.\e"
|
|
}
|
|
|
|
//If the user chooses every 30 seconds.
|
|
Select.TALKMAX
|
|
{
|
|
talktime = "30 seconds" //this sets up the envelope properly
|
|
aitalkinterval = 30 //this changes the actual rate
|
|
|
|
"\0\s[0]We will speak every 30 seconds.\e"
|
|
}
|
|
|
|
//If the user chooses every minute.
|
|
Select.TALKHIGH
|
|
{
|
|
talktime = "minute"
|
|
aitalkinterval = 60
|
|
|
|
"\0\s[0]We will speak every minute.\e"
|
|
}
|
|
|
|
//If the user chooses every three minutes.
|
|
Select.TALKNORMAL
|
|
{
|
|
talktime = "3 minutes"
|
|
aitalkinterval = 180
|
|
|
|
"\0\s[0]We will speak every three minutes.\e"
|
|
}
|
|
|
|
//If the user chooses every five minutes. This is the default rate the ghost will start up in, as seen in bootend.dic.
|
|
Select.TALKPOOR
|
|
{
|
|
talktime = "5 minutes"
|
|
aitalkinterval = 300
|
|
|
|
"\1\s[10]We will speak every five minutes.\e"
|
|
}
|
|
|
|
//If the user chooses to not have them speak. This is one case where you MIGHT want to make talktime equal something else, if you have a snappier way of saying the ghost won't talk. Make sure it flows well in your menus though, since it will be displayed in your config menu.
|
|
Select.TALKNONE
|
|
{
|
|
talktime = "...actually we won't talk at all"
|
|
aitalkinterval = 0
|
|
|
|
"\0\s[0]We will not speak.\e"
|
|
}
|
|
|
|
|
|
|
|
//This is when the user chooses to change their name. It's linked to the functions outlined in nameteach.dic. Nothing to touch here.
|
|
Select.TEACHNAME
|
|
{
|
|
OnTeachName
|
|
}
|
|
|
|
|
|
//If the user selects cancel in a menu. Replace as you like, or just leave them blank.
|
|
Select.CANCEL
|
|
{
|
|
"\0\s[0]This is a cancel message.\e"
|
|
|
|
"\0\s[0]This is another cancel message.\e"
|
|
}
|
|
|
|
|
|
//In the MenuRun function above, if someone selects Functions (linked to dosomething), it will take them here to Select.dosomething.
|
|
|
|
//If you want to have your ghost pick from multiple intro lines for this menu, you can uncomment FunctionMenuIntros here, and add in dialogue as you like.
|
|
|
|
// FunctionMenuIntros : nonoverlap
|
|
// {
|
|
// //I mentioned this above in MenuRun, but you can have a set of multiple different responses that may randomly appear when the menu is opened. Try opening this menu yourself with the template to see how it works. The character will randomly choose one line as the intro.
|
|
// //If you don't want to deal with this, just delete the extra lines and leave one. Otherwise, replace the dialogue below as you like, but note that they don't end with \e here.
|
|
|
|
// "\0\s[0]\b2This is the first function menu intro.\n\n"
|
|
// "\0\s[0]\b2This is the second function menu intro.\n\n"
|
|
// "\0\s[0]\b2This is the third function menu intro.\n\n"
|
|
// }
|
|
|
|
Select.dosomething : all
|
|
{
|
|
//FunctionMenuIntros
|
|
//this line ^ calls one of the intros above. If you are using the extra intros, you can uncomment this line.
|
|
|
|
//the -- splits the intros and the menu choices
|
|
--
|
|
|
|
//the actual menu options.
|
|
|
|
"\![*]\q[Open Calendar,CALENDAR]\n"
|
|
"\![*]\q[Check Email,MailCheck]\n"
|
|
"\![*]\q[Open SSP Preferences,sspconfig]\n"
|
|
|
|
//"\![*]\q[Empty Recycle Bin,ChoiceGarbagecan]\n"
|
|
//I commented out the Empty Recycle Bin one because that one will need some tweaks to the dialogue to work for every ghost, since it uses Girl and Triangle's names. If you want your ghost to have this feature, uncomment this and fill out the corresponding dialogue below for Select.ChoiceGarbageCan.
|
|
|
|
"\![*]\q[System Information,ChoiceSystemInformation]\n\n"
|
|
"\![*]\q[Back to main menu,BACKTOMENU]\e"
|
|
}
|
|
|
|
//When the user clicks Open Calender. This will open the calender function of SSP, an in-built feature that you don't have to worry about in the least. You don't have to write dialogue here if you don't want to, the template's default dialogue will handle it, but it is an option.
|
|
Select.CALENDAR
|
|
{
|
|
"\0\s[0]Opening the calender.\w8\![open,calendar]\e"
|
|
|
|
//You can replace the dialogue here up to the \!.
|
|
//Advanced users, can you break it down yet? It's basically just using \! to open calender.exe or dll or whatever SSP uses to make it happen.
|
|
}
|
|
|
|
//When the user chooses SSP preferences. This will open the same window that shows up if you right click your ghost and go to Utilities - Preferences. You don't have to write dialogue here if you don't want to, the template's default dialogue will handle it, but it is an option.
|
|
Select.sspconfig
|
|
{
|
|
"\0\s[0]Opening the SSP config menu.\w8\![open,configurationdialog]\e"
|
|
|
|
//Again, you can replace up to the \! tag.
|
|
}
|
|
|
|
|
|
//If the user chooses to empty the recycle bin. Make sure to uncomment the "Empty Recycle Bin" option above in the Select.dosomething menu if you want to include this feature.
|
|
|
|
Select.ChoiceGarbagecan
|
|
{
|
|
_gomicheck = FUNCTIONEX("gomi.dll", "-n") //Don't touch this line. for those curious, it's referencing a SAORI, which are optional user-made plug-in dlls you can download to enable different functions on your ghost. gomi.dll is one included with this template. All SAORI are in Japanese (maybe Korean or Chinese as well idk) and many have disappeared by now, so don't concern yourself very much with SAORI. They're for skilled developers, mostly.
|
|
|
|
if _gomicheck == 0 //If the recycle bin is empty.
|
|
{
|
|
"\0\s[0]Triangle, go check the recycle bin.\w8\1\s[19]Fine.\w8\w8\s[-1]\w8\w8\w8\w8\w8\1\s[10]\cIt was empty.\e"
|
|
|
|
//This isn't the usual flat template dialogue, mostly because I wanted to show that this is a good place to use s[-1], which I covered in the walkthrough file. You can have your ghost disappear momentarily like they're going to check your recycle bin, then come back. \c clears the ghost's balloon of text. Replace dialogue as you desire.
|
|
}
|
|
elseif _gomicheck >= 1 //If the recycle bin is full.
|
|
{
|
|
"\0\s[0]Emptying the recycle bin.\w8\1\s[19]I'm going.\w8\w8\s[-1]\w8\w8\w8\w8\w8\![raise,OnGarbagecanEmpty]\w9\w9\w9\1\s[10]\cDone.\e"
|
|
|
|
"\0\s[0]This is the second recycle bin emptying dialogue.\w8\1\s[19]I'm going.\w8\w8\s[-1]\w8\w8\w8\w8\w8\![raise,OnGarbagecanEmpty]\w9\w9\w9\1\s[10]\cDone.\e"
|
|
|
|
//Somewhat similar to the above, but notice the \![raise],OnGarbagecanEmpty] tag in there. That's what actually empties the recycle bin, so make sure you don't delete that tag. Otherwise, replace the dialogue as you want.
|
|
//As you can see, you can have multiple pieces of dialogue in here, just like you can for many other functions scattered through the .dic files. If you only want the one, just delete the others, or if you want to add more, just copy and paste and write new dialogue as it comes to you. This applies to when the recycle bin is empty as well.
|
|
}
|
|
}
|
|
|
|
|
|
//This is for the SAORI, don't touch it.
|
|
OnGarbagecanEmpty
|
|
{
|
|
_gomi = FUNCTIONEX("gomi.dll", "-f")
|
|
}
|
|
|
|
//This is when the user chooses System Information. Don't touch any of this either. For those curious though, note that this is done using another SAORI, this time saori_cpuid.dll.
|
|
Select.ChoiceSystemInformation
|
|
{
|
|
os_name = FUNCTIONEX("saori_cpuid.dll","os.name")
|
|
os_version = FUNCTIONEX("saori_cpuid.dll","os.version")
|
|
cpu_name = FUNCTIONEX("saori_cpuid.dll","cpu.name")
|
|
cpu_clockex = FUNCTIONEX("saori_cpuid.dll","cpu.clockex")
|
|
"/
|
|
\0\s[0]\b[2]/
|
|
\_q\f[bold,1]OS:\f[bold,0] %(os_name) %(os_version)\n/
|
|
\f[bold,1]Memory Load:\f[bold,0] %(memoryload)%\n/
|
|
\f[bold,1]Physical Memory:\f[bold,0] %(memoryavailphys) KB\n/
|
|
\f[bold,1]CPU:\f[bold,0] %(cpu_name) %(cpu_clockex)MHz\n/
|
|
\f[bold,1]Ukagaka:\f[bold,0] %property[baseware.version]/
|
|
\e"
|
|
}
|
|
|
|
//This is when the user chooses to check their email. The rest of this function plays out in etc.dic. You can leave this alone.
|
|
Select.MailCheck
|
|
{
|
|
"\![biff]\e"
|
|
}
|
|
|
|
|
|
|
|
//---- OnChoiceTimeout ---------------------------------------------------------
|
|
//If the user is given a menu with choices, but doesn't pick one of the choices, it will eventually time out. At that point, they will say this dialogue. Replace with whatever you like, or leave it blank.
|
|
|
|
OnChoiceTimeout
|
|
{
|
|
"\0\s[0]The menu has timed out.\e"
|
|
}
|
|
|
|
|
|
//---- Secondary Character Menu ---------------------------------------------------------
|
|
//This section has to do with the menu for the second character. If you don't want your second character to have a menu, you can just delete to the end of the file. Advanced users, you can also move the menu options from here to the main character's menu instead and then delete it, if you want to keep these.
|
|
|
|
KeroMenuIntros : nonoverlap
|
|
{
|
|
"\1\s[10]\b[2]"
|
|
"\1\s[15]\b[2]"
|
|
"\1\s[16]\b[2]"
|
|
|
|
//You've seen so far that you can set up multiple options for menu introductions. You can also set up multiple poses to match up to multiple dialogue. So for example, when you open Triangle's menu, he may randomly do any of these three poses, and randomly choose from any of the four dialogue options below, before continuing with his menu. Make a close note of the -- dashes breaking these up.
|
|
//if you aren't interested in such tomfoolery, you can cut them each down to one line.
|
|
|
|
--
|
|
|
|
"This is a menu introduction dialogue."
|
|
"This is another menu introduction dialogue."
|
|
"This is the third menu introduction dialogue."
|
|
"This is the fourth menu introduction dialogue."
|
|
}
|
|
|
|
OpenKeroMenu : all
|
|
{
|
|
//this calls the intros above
|
|
KeroMenuIntros
|
|
|
|
//this splits the intros from the menu options
|
|
--
|
|
|
|
//these are the menu options
|
|
"\n\n[half]"
|
|
"\![*]\q[Update,keroupdatecheck]\n"
|
|
"\![*]\q[Bug report,bugreport]\n\n"
|
|
|
|
"\![*]\q[Test variable,testvariable]\n\n"
|
|
//When you are done with the test variable, aka your ghost is finished or you just don't want it showing up when you publish your ghost beta or whatevs, simply add two // slashes in front of "\![*]\q[Test variable,testvariable]\n\n" to comment the line out. In Notepad++, it will turn green. When you want to use it again, erase the two slashes to turn it back to normal.
|
|
|
|
"\![*]\q[Nothing,keroCANCEL]\e"
|
|
}
|
|
|
|
//There are no real set things for the second character to do, really. You can mostly add whatever functions you want to them, their menu is totally free reign. In mine for example, Hunter has some games, a pseudo-FAQ for users, a bug report, an update option, and most importantly, a test variable. A lot of that is fairly complicated though, so I won't get into it here. Advanced Users can pick up Hunter and Smoker and study their menu.dic to see how I did it though, and those who read the coding page of the walkthrough and want to make their own functions can feel free to add them here.
|
|
//For the purposes of this simple template, I'll include two options that may come in handy - an update option and a bug report option, as well as the test variable.
|
|
|
|
//If you click cancel. Replace dialogue as you want.
|
|
Select.keroCANCEL
|
|
{
|
|
"\1\s[10]This is menu cancel dialogue.\e"
|
|
}
|
|
|
|
|
|
//This is when they select bug report. This is mostly meant to briefly give the user information about you, the creator, and how to report a problem to you. This can be handy if the person forgot where they got their ghost or how to contact you. Add whatever info you like here.
|
|
Select.bugreport
|
|
{
|
|
"\1\s[10]This is the bug report dialogue. \w5Report bugs to youremailaddress@emailprovider.com. \w5We were downloaded from \_a[http://www.whereveryoupostedthem.com/]some place\_a.\e"
|
|
}
|
|
|
|
//When clicked, this will automatically tell the ghost to check for updates. More detail on updates in etc.dic. You can leave this alone.
|
|
Select.keroupdatecheck
|
|
{
|
|
"\1\s[10]\![updatebymyself]\e"
|
|
}
|
|
|
|
//--Test Variable --------------------------------------------------------
|
|
//I briefly mentioned the test variable in bootend.dic and possibly in etc.dic as well, I'm not sure. What exactly is the test variable? Basically, it's a place you can plug in anything you want to test out. While you can use Script Input to test most of your ghost's dialogue, there are some lines it just can't do, and it can't help you test choices. But the test variable can!
|
|
//You can also use this to test functions as I mentioned above by adding \![raise,function] at the end of it, although you can do this with Script Input as well. Advanced Users, the test variable is also great for testing out any new stuff you may add to your ghost, like mode settings, item values, functions, raising or lowering numbers, what have you, particularly if you have a bunch you want to change all at once.
|
|
|
|
//It is ALWAYS A GOOD IDEA to test your dialogue! If you won't check it with the test variable, at least test it with Script Input! It'll save you so much trouble!
|
|
|
|
Select.testvariable
|
|
{
|
|
"\1\s[10]Testing!\e"
|
|
}
|