Modding

From Noita Wiki
Jump to navigation Jump to search
For a guide to downloading and enabling mods, see How to install mods.
For info about some specific existing Mods, see Mod:Noita Mods.
Modding Navigation
Fundamentals
BasicsData.wakGetting startedLua ScriptingUseful Tools
Guides
AudioEnemiesEnvironments (Fog of War) • Image EmittersMaterialsPerksSpecial BehaviorsSpellsSpritesheetsSteam WorkshopUsing CMake
Components/Entities
Component DocumentationEnumsList of all tagsSpecial TagsTags SystemUpdate Order
Lua Scripting
Lua APIUtility Scripts
Other Information
Enemy Information TableMagic NumbersSound EventsSpell IDsPerk IDsMaterial IDs

Modding Noita is quite straightforward and fun, but can still hide many implementation details in itself. These pages hope to lower the barrier of entry and address any common pitfalls.

All the tools you need to get started are:

  1. a proper text editor (eg. VSCode, Vim)
  2. a proper image editor (eg. Aseprite, Gimp, Paint.net, Photoshop)
  3. Component Explorer is an extremely useful mod that lets you view component values and run lua scripts from in game. Practically essential for mod debugging and development.
  • VSCode has several extensions which are designed to make working with Noita mods significantly easier, see:
    • Noita API
    • Noita File Autocomplete
    • Noita API def (An alternative source definition for Evaisa's Noita API featuring type safety and up to date function definitions, view README.md for install instructions)
      • These require Lua and XML support to function properly.

Noita gameplay logic is mostly implemented in Lua and XML, as an Entity Component system (ECS). Every separate "thing" in the game (enemies, bullets, wands, items, even the player) are just entities, composed of different components. A good understanding of Lua is recommended, but a lot can be done without any programming knowledge at all, simply by editing the entity XMLs or associated spritesheets.

Getting Started

First step before moving on, is to find the Noita base folder (Open Steam -> Go to Library -> Right Click Noita -> Manage -> Browse Local Files) then go and read the tools_modding\READ_ME_FIRST.txt.

Extracting data files

All of Noita's base assets (spritesheets, scripts, entity definitions) are packed inside Noita\data\data.wak. It is not technically required to have these extracted, but seeing the file structure and any example code is immensely helpful.

On Windows

To access Noita's data files, do the following:

  1. Copy all of the files inside of the tools_modding\ folder into Noita's root folder.
  2. Run data_wak_unpack.bat. A terminal window should open.
  3. A File Explorer window opened to Noita's resources should appear: (%UserProfile%\AppData\LocalLow\Nolla_Games_Noita).
  4. Bookmark or copy this folder somewhere for easy later access.
  5. Many of the resources might be hidden. Click the "View" button and check "Hidden items" to see all them.

Now you have plain access to all of Noita's Lua code, entity XML definitions and spritesheets. You can now literally go and check out any gameplay secrets, so keep a spoiler alert in mind as well.

On Linux

Launch options
  1. Start Noita on Steam, once, using -wizard_unpak as a launch parameter. (I.e. Right-click, Properties, General, Launch options)
  2. This will extract the data files into .steam/steam/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/
  3. Remove the launch parameter again.
  4. Bookmark or copy this folder somewhere for easy later access.

Next steps

Good starting points and further reading:

Need help?

Noita Discord server has an active and friendly modding community with channels for #mod-discussion, #mod-development, #mod-support, #mod-showcase, and #mod-releases. Don't be afraid to join and ask questions!