Mod-Making Help: An Eventing Question

When writing an event, you may want the player to make a choice. This is great, because it makes the player feel more involved with the scene, and gives them the opportunity to help decide how the story might pan out.

These choices may be a simple dialogue response to a question from the NPC (which I enjoy more than the mods that put words into my farmer’s mouth), or they may determine which path the event takes, or even influence future behavior of an NPC. You can also use them to gain friendship, lose friendship, change schedules, or sprites, or more!

There are FIVE ways to add questions in this game. Four of which I am well versed with. The fifth, $Y I believe is outdated and not actually used in the game.

1. Question Null: The illusion of choice

Where how they answer the question does not matter, question null is the simplest way to give the farmer a sense of agency/immersion.

For example, this sentence where you discover Dwarf has a book they have “acquired”.

question null \"#You took Jasper's notes!#What are you reading?\"/...

2. Question Fork: You determine the path

When the answer does matter, and can change the outcome of the event, you want to use question fork. Note that this one is somewhat trickier than the above!

In this event you watch Jasper enter the clinic, you can make an active choice to proceed with the event (or not).

question fork1 \"...#"(follow him in)#(continue on your day)"\"/fork Jasper_Continue_Day/...

Note the “fork1”, you can also use “fork0” the first answer (follow him in) is 0, and the second (continue on your day) is 1. So in this instance the fork is set for when you answer the second option, thus moving you to another event that begins:

"Jasper_Continue_Day": "pause 500/..."

After the second option is forked away, the first option continues onward in the original event.

Note: If the question is asked in a map that is NOT the map the event is triggered on (in this instance Town), the forked event (Jasper_Continue_Day) needs to be written into the Data/Events for the map they are on when the question is asked.

If the map is a temp map, you need to add the forked path to “Data/Events/Temp” or the game will crash.

You can also set mail flags and lose friendship points in forked events using:

friendship Jasper 50
addMailReceived Jasper_ClinicEvent

3. $P, $Q and $R: for affecting friendship and setting flags

This is the trickiest, the most prone to crashing and the most annoying to code. Sure, it allows you to change friendship values and set mail flags, but as seen above – you can do those with Question fork – and also quickQuestion. Use this one with caution – or if you want to show off.

Generally speaking $P, $Q and $R is better to use for questions in dialogue rather than events. But you can if you want to!

speak Jasper \"$q 5070123 null#If the opportunity arises, should I rekindle our friendship?#$r 5070124 25 Rekindle_Yes#Yes, definitely, just... be careful.#$r 5070125 -25 Rekindle_No#I think you're better off without them.\"/...

Firstly, you always need to have a “null” when asking these questions in events. I’m never sure what the number after $q is actually used for, so I usually just make it unique as a precaution.

If first option is chosen, it sets a $p as 5070124, adds 25 friendship points and displays the dialogue “Rekindle_Yes”. If option 2 is chosen, it sets the $p as 5070125, removes 25 friendship points and displays the dialogue “Rekindle_No”.

These two pieces of dialogue need to be added to the character’s Dialogue file (in this case, Characters/Dialogue/Jasper). Otherwise you will get a crash and a “Key is not in the dictionary” error.

Later, you can use:

"When": { "HasDialogueAnswer": "5070124" }

to change the character’s behavior/add dialogue/change sprites etc.

For example, you could change Abigail’s hair to bubblegum pink after she asks you that question using:

"When": { "HasDialogueAnswer": "27" }

You can also use $r 5070124# in dialogue to make the character say something if that response was given or something else if it is not.

But the majority of these can also be covered just by setting a MailReceived.

4. quickQuestion: Easy and Versatile

I’ve saved my favorite until last. QuickQuestion wasn’t added until 1.5, probably why all of the above exist, and has an entirely different formatting structure, but overall is the easiest to use (although it is still possible to break it/soft lock the event – be warned).

quickQuestion allows the NPC to give different responses without having the added complication of having to include said responses in the character’s dialogue file. As you can see below:

quickQuestion #You're not old!#You're allowed to be sad - you've been through a lot!#Please, let me help.(break)speak Jasper \"(response1)\"(break)speak Jasper \"(response 2)\"(break)speak Jasper \"(response 3)\"/

Note that there are no / until the end of the code. It IS possible to add emotes and other things into the (break) response, but the coding is subtly different:

(break)emote Jasper 20\\friendship Jasper 25\\addMailReceived Jasper_NotOld\\speak Jasper \"(response1)\"(break)...

You can also use it to fork events – as can be seen in the Date Night mod.

Leave a comment