What Artifact Code Is and Why It Matters
In Risk of Rain 2, artifact code is the numerical identifier that the game uses to track every artifact and its rules. Each artifact in the game is defined by a unique artifact ID, stored alongside flags that determine whether it is enabled, hidden, or granted, and whether it can appear in certain pools. These IDs are referenced by item definitions, scene gates, and run modifiers to control spawning and behavior. Understanding artifact code helps explain why some combinations work, why others are suppressed, and how the game resolves conflicts when multiple artifacts are active.
How Artifact Code Is Used in the Game
The artifact code itself is an integer key that maps to a row in the game’s artifact definitions table. Through this mapping, the engine checks enabled rules, eligibility constraints, and UI visibility settings. Artifact code is also used by Lua hooks and in game configuration to conditionally grant or block items, respawns, and interactions. Because many systems refer to artifacts by code rather than by name, the IDs provide a stable reference across game versions, even when display names are localized or reordered.
Definitions Table and Internal Lookup
Internally, artifacts are stored in a definitions table where each row includes the artifact code, name token, icon, description token, and rule flags. Common flags include whether the artifact can stack, whether it is disabled in certain stages, and whether it conflicts with run-specific bans. Item definitions may also reference artifact codes through OnUnlock or OnInstall scripts, allowing developers to tie powerful item behaviors to artifact ownership.
Scene Gates and Stage Rules
Scene definitions can include artifact gates that require or forbid specific artifact codes to unlock teleporters, shrines, or intermission events. These gates use artifact code to decide which paths are available in a given run. Because the rules are checked at runtime using the numeric code, the behavior remains consistent regardless of language or UI ordering. This system also supports modular run modifiers that can globally enable or disable certain artifact codes for challenge runs or private servers.
Artifact Code References in Practice
For players and modders, artifact code is most visible when using debug commands, analyzing logs, or configuring custom stages. Console commands that refer to artifacts typically accept the code or the matching name token, while logs show the artifact code when unlocks are granted or suppressed. In custom stages and challenge configurations, authors list artifact codes to control availability, ban problematic combinations, or create progression gates that depend on specific artifact states.
Debug Commands and Log Output
Using console commands, you can query artifact states by code or name. Logs record artifact unlock attempts alongside the artifact code, making it easier to diagnose why an item did or did not appear. When a run modifier alters global artifact availability, the logs will show the artifact code being enabled or disabled, which helps creators validate their configurations and helps players understand why certain interactions are missing.
Custom Stages and Challenge Configurations
In custom stages and challenge presets, authors specify artifact codes to precisely control which unlocks are permitted. This allows them to design runs around particular artifacts, disable broken or overlapping combinations, and create gated teleporter or shrine options. Because artifact codes are stable across language and patch, challenge maps remain reliable even as item names or UI strings change between updates.
Verification and Stability of Artifact IDs
The artifact codes in Risk of Rain 2 are assigned by the development team and remain fixed unless a major content update renumbers definitions, which is rare. Community documentation and mod tools generally agree on the core set of codes for vanilla artifacts, and discrepancies are usually due to localized name tokens or optional debug IDs not meant for public use. From a technical standpoint, artifact code is best understood as a stable integer key used by the engine to resolve rules, rather than a player-facing statistic.
Artifact Code Reference Table
| Artifact Code | Vanilla Artifact Name | Effect Type | Source Type |
|---|---|---|---|
| 1 | Symbiotic Blob | Healing on hit | Vanilla |
| 2 | Beads of Hermes | Cooldown reduction | Vanilla |
| 3 | Crowbar | Interact speed | Vanilla |
| 4 | Egglet Rain | Spawn helper | Vanilla |
| 5 | Lunar Bad Luck | Increased curse | Vanilla |
| 6 | Meteorite Reboot | ||
| Cooldown reset | Vanilla |
Compatibility, Conflicts, and Best Practices
Not all artifact combinations are equally stable. Some artifact pairs create powerful synergies, while others conflict due to rule flags that prevent them from coexisting in certain configurations. Developers and server operators use artifact code lists to ban specific combinations in challenge runs or community servers. Understanding how artifact code maps to rules helps identify why a particular interaction is allowed or suppressed and supports more reliable custom content design.
Conflict Patterns and Rules
- Artifacts with conflicting rule flags may be automatically suppressed when both are detected.
- Some challenge presets disable entire categories of artifacts by filtering on code ranges or specific IDs.
- Lua hooks can read artifact code to implement custom logic, but they should preserve expected conflict rules to avoid undefined behavior.
Artifact Code in Modding and Tooling
Modders use artifact code when writing hooks, defining custom items, or building challenge presets. Plugin APIs and mod loaders expose functions that accept artifact code to conditionally modify behavior, grant achievements, or adjust stats. Because artifact code is numeric and stable, it is safer to use than string names that may change across language or localization updates. Tools that export artifact lists commonly include code, internal name, and description tokens to help authors reference artifacts reliably.
Common Patterns in Mod Hooks
- OnArtifactAcquired(artifactCode) for tracking specific unlocks.
- ModifyArtifactChance(artifactCode, multiplier) for custom progression tuning.
- RuleOverride(artifactCode, enabled) for disabling problematic combinations in mods.
FAQ
Reader questions
Can artifact codes change between game versions?
Artifact codes are generally stable in Risk of Rain 2, but major content updates or engine migrations could renumber definitions. Community-maintained tables are regularly updated to reflect official changes, and discrepancies due to localized tokens do not affect the underlying numeric code used by the engine.
How can I find the artifact code for an item I unlocked?
You can check logs for artifact unlock messages, use debug commands in development or private server environments, or consult community tables that map artifact code to name tokens. In custom stages, authors often list codes alongside teleporter options to communicate requirements clearly.
Are artifact codes the same as item IDs or network object IDs?
No. Artifact codes specifically refer to the artifact definitions that govern unlock rules and eligibility. Item IDs refer to the catalog of equipment, while network object IDs identify entities in multiplayer. Each system uses different keys, and artifact code is only one part of the larger identification scheme used by the game.