R2API ArtifactCode

v1.0.1·Updated 2023-05-29

API for making Artifact Codes

About this mod Author’s original text

R2API.ArtifactCode - Artifact Codes and Compound addition

About

R2API.ArtifactCode is a submodule assembly for R2API that simplifies the process of adding new Artifact Codes to the Artifact Portal Dialer in Sky Meadow,

alongside the additon of custom Artifact Compounds (Such as the vanilla compounds, Circle, Square, Triangle & Diamond).

Use Cases / Features

R2API.ArtifactCode can be used for mods to add their own ArtifactTrials to the game so their artifacts can be unlocked like regular, vanilla artifacts.

This is done via the ArtifactCode scriptable object, which works as a simplified way of creating the required Sha256HashAsset using int values to represent the individual Compound Values.

The Int values are represented by 3 Vector3Ints, representing the top row, middle row and bottom row of compounds.

Adding compounds is done using the ArtifactCompoundDef scriptable object from the base game. The value of the ArtifactCompoundDef must be unique.

A static class populated with constant values that represent the default, vanilla compounds, these are:

Empty = 11

Square = 7

Circle = 1

Triangle = 3

Diamond = 5

Related Pages

The page for Artifacts in the R2Wiki contains a tutorial on how to use the API

Changelog

'1.0.1'

  • Fix the NuGet package which had a dependency on a non-existent version of R2API.Core.

'1.0.0'

  • Split from the main R2API.dll into its own submodule.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

bbepis-BepInExPackRiskofThunder-HookGenPatcherRiskofThunder-R2API_Core

File & checksum

Filename
R2API_ArtifactCode-1.0.1.zip
File size
17.4 KiB