top of page

Errors and Emotions

Overview

Working on Fateful Remedies had its ups and downs and there were a fair bit of scripting errors along the way that the programming team had to fix. Also since the game is a narrative adventure game, we had to have each customer emote as they expressed their lives. Overall this section of the website describes the process I had fixing one major error and the much more uplifting process I went through programming the emotions for each customer.

Error and Emotion Scripting: Text

The One Major Error

Overview

Originally when Fateful remedies was running the fungus narrative handler instead of ink's handler, we had a function that let the player know that the player couldn't take a potion while the customer wasn't done explaining. In the transition, the function not only became obsolete, it got overshadowed by an ink error that would stop the game from running.

Error and Emotion Scripting: Text

Potions and Ink (Part 1)

Summary

Initially I had thought that fixing this was a matter of adding a function that disabled the potions when it wasn't time yet would fix the issue. So I made two functions that would render them inaccessible until my team member's DialogueHandler Script said so. Both the TogglePotions functions worked on their own, but at this point there was no way to turn potions back on without manually doing it.

Toggle Potions On and Off.jpg
Error and Emotion Scripting: Text

Potions and Ink (Part 2)

Summary

Initially I had thought that fixing this was a matter of adding a function that disabled the potions when it wasn't time yet would fix the issue. So I made two functions that would render them inaccessible until my team member's DialogueHandler Script said so. Both the TogglePotions functions worked on their own, but at this point there was no way to turn potions back on without manually doing it.

choice checker.jpg
Error and Emotion Scripting: Text

When Fixed

Error and Emotion Scripting: Text
Toggle Shop.gif

End Result

While the potions are now not visually present throughout the entire process, overall this was the simplest solution. If selecting the potions while the problem was being explained broke fateful remedies, then the potions just couldn't be selectable until they were needed.

Error and Emotion Scripting: Video

Emotions

Section Overview

Of all the tasks within fateful remedies that needed to happen in the transition to fungus, the easiest of all of them was making sure our customers could emote during their appointments. Overall each customer has a general emotion script, and a character specific emotion script (with Dante's being our example). From a visual standpoint all that the script really needs to work is for image files for each emotion to be in place, and the rest of the set up is taken care of within both scripts.

Emotion%20Scripts_edited.jpg
Error and Emotion Scripting: Text

Emotions (Part 1)

Summary

Within both the actor and the emotion logic scripts are short functions like these three. After the script grabs the customer’s image component in the game object, then when my colleague’s dialogue handler script reaches a certain variable holding the current emotion in the ink script, it will change the image to a sprite that matches it (For example, if the current emotion being happy sets the customer sprite to happy).

Emotion Functions.jpg
Error and Emotion Scripting: Text

Emotions (Part 2)

Summary

How the dialogue handler of Fateful Remedies changes the emotions of a given customer is with a secondary function I made called “character portrait change.” When an emotion string is inserted into this function, if it matches up with one of the preexisting emotions contained here it should change the current customer to the emotion listed. The function itself activates every time the text refreshes.

Emotion Activator.jpg
Error and Emotion Scripting: Text

Emotions End Result

Error and Emotion Scripting: Text

Emotions in action

Thanks to this set of functions, the customer (in this case Dante) can freely emote as the dialogue handler transcribes the text. As he explains the problem the emotion that he needs to show next is being saved to the current emotion variable and set to the function. Every customer follows similar logic, and every customer has emotions exclusive to them.

Error and Emotion Scripting: Video

Back To Home

Error and Emotion Scripting: Text
bottom of page