Modding:Special Behaviors

From Noita Wiki
Jump to navigation Jump to search
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

Descriptions of various special behaviors for different objects, components, and other items.

Orbs

There are 12 different normally obtainable orbs in each world (if you include the missing Lava Lake orbs). The first 11 come from the naturally spawned orbs, and the last can come from a Great Treasure Chest. Each of these orbs has a unique orb_id within their OrbComponents. The naturally spawned orbs have an orb_id between 0 and 10. The Great Treasure Chest orb has an orb_id of 11. Orbs in the West parallel world have their orb_ids increased by 128, and orbs in the East parallel world have their orb_ids increased by 256. The game determines if the orb is in a parallel world by checking if the orb is outside of the box bounded by (X-17920,Y-7166 and X+17920,Y+17408), then checking whether the X position is positive or negative. A negative value increases its orb_id by 128 (to correspond with a West world), and a positive value increases its orb_id by 256 (to correspond with an East world). Please note that Y-17,408 starts just below the bottom of the upper part of The Work (Hell), and Y-7166 starts just below the beginning of The Work (Sky).

The OrbComponents can be placed on non-orb items. When you pick up an item with an OrbComponent on it, your orb counter increments by 1 if that is the first time you picked up an item with that item's specific orb_id on it in that run. Picking up a second item with the same orb_id as an item you picked up already will not increment your orb counter. If you create and pick up a false orb with an orb_id that matches the orb_id of one of the 12 normal orbs, then you will be unable to pick up the associated normal orb. Instead, the art on the orb will disappear, leaving just a blank orb. If you pick up a false orb with an orb_id that does not match an existing orb, then your orb counter will be incremented as normal. Additionally, a flag will be created within your save file's persistent/orbs_new folder, with the number of the orb as its name.

Due to the CameraBoundComponent on an orb, it will despawn when you move far enough away from it and respawn when you get closer again. When it respawns, it will run its initialization script again, orb_init.lua. If you append a script to orb_init.lua in a mod, that script will also be run when the orb respawns.

Below is a list of the different orbs and their corresponding orb_ids.

Orb IDs
Description Main World ID West World ID East World ID
Floating Island Orb 0 128 256
Pyramid Orb 1 129 257
Frozen Vault Orb 2 130 258
Lava Lake Orb 3 131 259
Sandcave Orb 4 132 260
Magical Temple Orb 5 133 261
Lukki Lair Orb 6 134 262
Abyss Orb Room 7 135 263
The Work (Hell) Orb 8 136 264
Snow Chasm Orb 9 137 265
Wizard's Den Orb 10 138 266
Great Treasure Chest Orb 11 139 267