R2API Items

版本 v1.0.8·更新於 2026-02-13

API for adding custom items

模組介紹 作者原文

R2API.Items - Item, ItemTags, Equipments, ItemDisplays and more

About

R2API.Items is a submodule assembly for R2API that allows mod creators to add new Items, Equipments, ItemTags, and manage the Items and Equipment's ItemDisplays.

Use Cases / Features

R2API.Items is mainly used for adding new ItemDefs and EquipmentDefs to the game, To facilitate the inclusion of Itemdisplays, R2API.Items provides wrapper classes for both Items and Equipments.

CustomItem: Represents a new ItemDef being added, includes a field for handling the Item's ItemDisplayRules

CustomEquipment: Represents a new EquipmentDef being added, includes a field for handling the Equipment's ItemDisplayRules.

The ItemDisplayRuleDictionary is a class included with the module, which provides utilities and systems for adding new ItemDisplays to your items, including default display rules if a character does not provide it's own item display for your item.

Finally, ItemAPI includes the ability to add new ItemTags to the game, which can be used for multiple things ingame.

Related Pages

A detailed tutorial on how to make custom items using ItemAPI can be found here

Changelog

'1.0.8'

  • Fixes for Alloyed Collective DLC3.

'1.0.7'

  • Ensure followerPrefabAddress is never null.

'1.0.6'

  • Add support for followerPrefabAddress and pickupModelReference, also use GenerateRuntimeValuesAsync inside AddingItemDisplayRulesToCharacterModels

'1.0.5'

  • Fix for 1.3.9 game patch.

'1.0.4'

  • Make sure ItemDef never have a null tags array.

'1.0.3'

  • Add missing BepInDependency to R2API.ContentManagement.

'1.0.2'

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

'1.0.1'

  • Fix invalid IDRS checker telling IDRS are not correct when they actually are.

'1.0.0'

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

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

bbepis-BepInExPackRiskofThunder-HookGenPatcherRiskofThunder-R2API_CoreRiskofThunder-R2API_ContentManagement

檔案與校驗

檔案名稱
R2API_Items-1.0.8.zip
檔案大小
22.0 KiB