User:Velocity Chicken/undertale.ini

The undertale.ini file is one of the storage files for Undertale, the others being file9 (autosave), file0 (save) and config.ini.

(Note that this page is not yet complete, and that we are still testing. So if you find anything, add it!)

The only way to reset this file, without looking for the file on your computer, is to do a True Reset found after the True Pacifist Route has been completed and Flowey suggests not to reset everyone's memories, or to erase the world and sell your soul at the end of the Genocide Route. Although the last method resets undertale.ini, note that there are other "Memory" files of the game, and that your game still "remembers" the genocide run.

How the file works
Data is stored in '''Variables. '''A variable is a symbolic name for a value of any type (string, number, boolean, etc.). The value of a variable can be changed to another of the same type. For example, the string (text) variable Name can be changed to "Papyrus the great!", this in turn makes every instance of Name to "Papyrus the great!".

GameMaker Studio, the program used to make Undertale, classifies data into different types : It's important not to confuse booleans with reals, as the game processes booleans set to true as 1.000000, this may mislead people into thinking the data type is a real number.
 * string - A string is a series of characters (text).
 * real - A real number is a floating point or an integer value.
 * boolean - A boolean value is one that can only be true or false. These values are also referred to as flags. The game determines if specific events have occurred by checking if certain flags are true or false. A boolean set to anything lower than "0.000011" will be taken as False by the game.
 * undefined - Also known as "null", it's the value returned when the searched value isn't found.

Something to make sure when manipulating the file is that the data types of the variables are left unchanged. For example, a boolean cannot take a numeric value, a real cannot take a string value, etc. Changing the data type of variables will make the game unstable or crash.

Undertale.ini is not a 'thinking' part of the game, it's a piece of 'memory'. In order to know how the file works, one needs to understand Triggers and Events. Triggers and events are located inside the game's code, and not in the undertale.ini file. When a trigger is activated, an event happens.

For example: if Papyrus is killed, when his HP reaches 0, a trigger (Papyrus reaches 0 HP) is activated. This event sets the variable "PK" to 1.000000 (True) in undertale.ini. What does that do? Nothing, except being in the file. Now, later on, there's a random chance of getting a phone call from Papyrus, ergo, a random trigger. The phone call event will only occur under the conditions that Papyrus was not killed (and by consequence spared), in other words, PK=0 and '''PS=1. '''Since Papyrus is dead, the event does not happen.  

A simplified view of the process follows: Changing the value of a variable affects what the game "remembers". If in the previous example, the file was manipulated to have PK set to 1 and PS set to 0, the phone call event would happen when the trigger activates.
 * 1) Trigger1: Papyrus reaches 0 hp
 * 2) Event1: PK is set to 1.000000 in undertale.ini
 * 3) Trigger2: Random trigger
 * 4) * Condition: is PK=0 and PS=1 in undertale.ini? (No)
 * 5) Event2: Papyrus doesn't call.

One must beware of softlocking the game when manipulating the file. Certain combinations of values can leave the character in a place with no exit, cause the game to crash when a specific trigger is activated, or make the game downright unplayable. Also note that while setting a boolean to any value  greater than or equal to  "0.000011" will be taken as True, and anything  lower than that will be taken F alse, the safest option is to stick to "1.000000" and "0.000000".

It's also worth noting that creating new variables in the file is useless. For example, creating a variable random="Random" won't do anything, as the game never checks for a string with that name.

General Section

 * Room (string): The Room ID number where you, the player, has last saved.
 * Kills (real): The number of kills the player has committed.
 * Time (real): The amount of time the player has spent on the game.
 * Love (real): The player's level of violence.
 * Name (string): The first human's name.
 * Fun,fun (real): Randomly generated fun value. Only changes on resets.
 * Gameover (real) : The total number of times the player has died.
 * Tale (Boolean): You’ve heard the story the monsters tell you through combat cutscenes in “New Home”.
 * Won (Boolean): Defeated Flowey in the Neutral route.

Reset Section

 * Reset (Boolean): True reset has been used.
 * s_key (Boolean): All “Special Thanks” credits dodged.

Flowey Section

 * Met1 (real): Increases with "1.000000" every time you meet Flowey in the start of the game.
 * alter2 (boolean): Set to "1.000000" after triggering a Genocide run and meeting Flowey in the room before the ruins exit.
 * NK (Boolean): You decided to spare Flowey during the neutral ending. (Requires extra testing for confirmation)
 * IK (Boolean): You decided to kill Flowey during the neutral ending. (Requires extra testing for confirmation)
 * Alter (boolean): Appears after beating and sparing Photoshop Flowey in the Neutral run and then resetting.
 * TrueName (Boolean): Appears when the player has figured out Flowey's true name.

Toriel Section

 * TK (Boolean): Toriel Killed.
 * Bscotch (Real): Preference to Butterscotch (Set to 1.000000) or Cinnamon (Set to "2.000000")
 * TS (Boolean): Toriel Spared.

Papyrus Section

 * M1 (real): Amount of times you first meet Papyrus after the Box Road save point. This causes extra dialogue where Papyrus recognizes the human from somewhere
 * PS (Boolean): Papyrus Spared.
 * PD (Boolean): finished the date or hangout with Papyrus.
 * PK (Boolean): Papyrus Killed.

Undyne Section

 * UD (Boolean): Undyne Date completed.

Alphys Section

 * AD (Boolean): Alphys Date completed.

Mettaton Section

 * BossMet (Boolean): Mettaton Dialogue before Mettaton EX fight can be skipped.

MTT Section

 * EssayNo (real): Number of essays written (requires testing).

Mett Section

 * O (Testing): (Still Testing)

Sans Section

 * MP (real): Number of times you've reached the "midpoint" of the Sans fight in a Genocide run.
 * EndMet (Boolean): Met Sans in the chapel near the end of the neutral run. (Still Testing).
 * Intro: (Testing)
 * M1 (boolean): Appears when you first meet Sans. This allows the player to shake his hand without being told to.
 * F (real): Times fought.
 * Pass (real): Number of times the player has reset to get the key to Sans' Room.
 * SK (real): Number of times the player has killed Sans.
 * Meet lv1 (real): times meet at lv1.
 * Meet lv2 (real): times meet al lv2+.
 * SS (real): Sans spared in the "midpoint".
 * SS2(real): (still testing).

Asgore Section

 * KillYou (real): The amount of times you have been defeated by Asgore.

FFFFF Section

 * E (Boolean): Killed by Photoshop Flowey
 * F (Boolean): Force's Photoshop Flowey Battle
 * P (real): Number of souls on your side
 * D (Still testing): (Still testing)

F7 Section

 * F7 (Boolean): The barrier was broken

EndF Section

 * EndF (Boolean): Appears after the player has viewed the True Pacifist Ending Credits to the end and exited.