Modding
Modding refers to modifying any part of the game through means other than gameplay! This includes:
- Editing sprites (the game’s art)
- Editing dialogue
- Editing your save file
- Editing the game world itself with LDtk
- Editing and creating Luau scripts
Modding the game is a great way to learn how it works, and can lead to contributing to the base game itself!
Modifying Sprites
Most sprites in this game are in the .ase format, as opposed to .png.
This is because Aseprite is the primarily used pixel art software, and .ase is a much more convenient format to save sprites in, as it has native integration with Aseprite for things like layers and animations.
To edit .ase files, you can either:
- Purchase Aseprite for $20 USD.
- Compile Aseprite for free (can be a bit more technical, and takes time).
- Use Libresprite, a free and open source alternative.
When you’re ready, simply open any image you want to edit in the assets/sprites directory and let loose!
Modifying Dialogue
WIP
Modifying Save Files
WIP
Modifying Game World
To modify the game world, you need LDtk, a free and open source software for editing 2D levels.
You can then open assets/ldtk/world.ldtk and start changing it how you wish.
Modifying and Creating Scripts
Much of the game’s logic is put inside of Luau scripts, for the sole purpose of being moddable and accessible to beginners!
Knowing how to script the game more deeply does depend on understanding Bevy’s ECS, but you can avoid learning all of that if you’re making small changes to existing code.
Picking a code editor
You really could use any text editor, but it’s better to use one with good Luau support for things like syntax highlighting and autocompletion.
I recommend either Zed or VSCode, both needing the Luau extension installed for the best development experience.
Setting up the Luau LSP in your code editor
NOTE: If you are working directly in the source code these files already exist. If you don’t know what this means, you likely aren’t working in the source code.
All editors:
- Create a file called
.luaurcin the root directory of the game. - Paste the contents of this file in it.
Zed-specific:
- Create a directory called
.zedin the root directory of the game. - Create a file called
settings.json. - Paste the contents of this settings file in it.
VSCode-specific:
- Create a directory called
.vscodein the root directory of the game. - Create a file called
settings.json. - Paste the contents of this settings file in it.
Neovim-specific:
Add the luau-lsp plugin and configure it like this:
vim.pack.add({
{
src = 'https://github.com/lopi-py/luau-lsp.nvim',
},
})
require("luau-lsp").setup({
platform = {
type = "standard"
},
sourcemap = {
enabled = false,
autogenerate = false
},
types = {
definition_files = {
globalTypes = "assets/scripts/library/globalTypes.d.luau"
}
}
})
Basics
The easiest way to modify scripts is just by changing variables’ values!
To see this in action, open up assets/scripts/player.luau and go to the set_player_values() function.
Inside of this function, you can change the values of attributes given to the player, like acceleration and max speed.
-- a function that sets attributes of the player.
function set_player_values()
local acceleration: MovementAcceleration = world.get_component(entity, MovementAcceleration)
local max_speed: MaxLinearSpeed = world.get_component(entity, MaxLinearSpeed)
-- set attributes
acceleration[1] = 850.0
max_speed[1] = 100.0
end
You can even do this while the game is open. Scripts are hot-reloadable, meaning changes are applied in the game the moment you save the file!
Contributing
Contributing is when you make a change to the game that gets officially accepted. There are many ways to contribute, like improving art, improving and optimizing code, and adding missing and highly requested features!