Undertale background

Basic setup



By this point you'll probably want to set up an encounter of your own. Currently, scripts are set up like this:

  • Monster scripts - will contain information about your enemies. Here, you'll set things like their ATK, DEF, HP, random comments that might show up as encounter texts, random dialogue, and what ACT commands they have.

  • Encounter scripts - will contain a set of monsters, a set of wave scripts (that you can modify at any point), size of the arena, custom interactions for items, etc. A mod can have multiple encounter scripts.

  • Wave scripts - will contain an update function. You may use these to spawn, track, modify and otherwise interact with bullets during the defending phase of the game.

  • Event scripts - used within the Overworld. Will contain different functions that can be set up within Unity to run under certain conditions in game.

  • Shop scripts - used within the Overworld. Will contain many variables and functions controlling not only what items can be sold at what prices, but also shopkeeper dialog, special code and events to run, and the potential to animate the shopkeeper yourself.

From the mod selection screen, you may pick any mod, and play any encounter script within that mod.
In Create Your Frisk, the Overworld exists, and battles can be initiated from the Overworld with proper setup.

As of CYF v0.6.4, the only folder required within a mod is the YOUR MOD/Lua/Encounters/ folder. For all older versions, your encounter will break if the other folders are missing.


Files and directories



It's fairly self-explanatory. If you just want to move on fast, feel free to skip this section and go to the next one. If for any reason some of your files don't work, you might want to read this anyway.

Scripts

The Encounter scripts are located in YOUR MOD/Lua/Encounters/. The Monster scripts are in YOUR MOD/Lua/Monsters/, and your wave scripts at YOUR MOD/Lua/Waves/. If you're getting started, check out these files in example encounters to see how they're put together.

You may also create a YOUR MOD/Lua/Libraries/ folder. You can put libraries other people have made in here (or create your own) for use in your other scripts. Libraries/modules are more Lua functionality than they are Unitale functionality, so please read up about them here instead. There is an example encounter included making use of one such library.

In the Overworld, Event scripts are located in YOURMOD/Lua/Events/, and Shop scripts are located in YOURMOD/Lua/Shops. These features are explained in the Overworld category in this documentation.

Music

Music can be put in YOUR MOD/Audio/. Your music must be in .ogg or .wav format. Audacity can export to .ogg if you're missing the appropriate software.

Sounds

Sounds can be put in YOUR MOD/Sounds/. They must be in .ogg or .wav format. You can play them with Audio.PlaySound(filename); more on this in The Audio Object.

Voices

Voices can be put in YOUR MOD/Voices/. They must be in .ogg or .wav format, although .wav is generally recommended. You can use them with the [voice] text command; more on this in Text Commands.

Sprites

Sprites can be put in YOUR MOD/Sprites/. They must be in the .png format. Note that most vanilla Undertale monster sprites start with a small base resolution, then resize the sprite to 2x its original resolution for an oldschool look.

To add a background you can have one file titled bg.png in the sprites folder. This image will stretch over the entire background, so 640x480 resolution is recommended. Actually modifying and animating the background from the Lua side is not possible; however, in CYF, you may use sprite layers to create a sprite behind the built-in background layer and animate that instead.


The Default directory



Unitale and Create Your Frisk both have a "Default" directory. This is where resources from Undertale reside. It is not advised to modify files in this directory, as they are expected to be the same across all installations.

If you wish to replace any of the files for your mod, create a file with the same name at the same location instead. For instance, if you want to change the player soul hurt sound, don't replace Default/Sounds/hurtsound.wav. Instead, create a new file located at YOUR MOD/Sounds/hurtsound.wav. This also goes for sprites, music, and even fonts.


* YOU WON!
* You earned 0 EXP and 0 gold.
* also the nav menu is broken now


Undertale fake button
Undertale fake button
Undertale fake button
Undertale fake button