RiskofThunder-R2API_ArtifactCode icon

R2API ArtifactCode

API for making Artifact Codes

Last updated 10 months ago
Total downloads 1261667
Total rating 4 
Categories Libraries
Dependency string RiskofThunder-R2API_ArtifactCode-1.0.1
Dependants 636 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2109 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.2109
RiskofThunder-HookGenPatcher-1.2.3 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.3
RiskofThunder-R2API_Core-5.0.8 icon
RiskofThunder-R2API_Core

Core R2API module

Preferred version: 5.0.8

README

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.