HTF MoreItemAPI

v2.0.0·Updated 2026-08-30

Runtime API for How to Fish custom-item mods, with automatic Item IDs, AssetBundle icons and hand poses, game-component reconstruction, and FishNet spawning.

About this mod Machine translation

HTF MoreItemAPI

Language / Language: English · Simplified Chinese

English

HTF MoreItemAPI is a BepInEx runtime API that lets C# content mods register independent custom items in How to Fish. A content mod loads its own AssetBundle and calls one registration method; the API copies a compatible original item skeleton, reconstructs the game and FishNet components, applies the authored physics and hand-pose data, and registers the result.

Use the separate HTFItemSDK Unity package to author prefabs, embedded inventory icons, visual hand poses, item-definition assets, and validated AssetBundles.

Supported environment

  • How to Fish 1.0.10
  • Unity 6000.4.4f1
  • BepInEx 5.4.23.5
  • HTF MoreItemAPI 2.0.0
  • BepInEx GUID xiaohai.HTF.MoreItemAPI
  • HTFItemSDK / Contracts 0.1.3

The generated-item pipeline validates the current Assembly-CSharp MVID before cloning game structures. An unsupported game update is rejected with a compatibility error instead of registering a partial network prefab.

Install

Copy these two assemblies from dist/ into the game's BepInEx/plugins/HTF-MoreItemAPI/ directory:

HTFMoreItemAPI.dll

HowToFish.ItemSDK.Contracts.dll

Every multiplayer participant must install the same API, content-mod DLL, and AssetBundle versions.

Recommended SDK definition workflow

Declare a hard dependency from your content mod:

[BepInDependency(ItemApiMetadata.PluginGuid, BepInDependency.DependencyFlags.HardDependency)]

Load the HTFItemDefinitionAsset built by HTFItemSDK and register it before connecting or starting a server:

AssetBundle bundle = AssetBundle.LoadFromFile(bundlePath);

HTFItemDefinitionAsset definition =

bundle.LoadAsset("C4ItemDefinition");

ItemRegistrationHandle handle = ItemRegistry.RegisterGenerated(

GeneratedItemRegistration.FromDefinition(

definition,

"com.example.c4item"));

Creators do not select an ItemId. Keep modGuid and the definition's InternalName stable after release; HTF MoreItemAPI uses their normalized modGuid:internalName key as the logical item identity and assigns the game-local byte slot centrally.

Lower-level generated-item workflow

You can load a normal content prefab and icon directly instead of using an SDK definition:

GameObject contentPrefab = bundle.LoadAsset("EnergyDrinkItem");

Texture2D icon = bundle.LoadAsset("EnergyDrinkIcon");

ItemRegistrationHandle handle = ItemRegistry.RegisterGenerated(

new GeneratedItemRegistration

{

ModGuid = "example.author.items",

InternalName = "energy_drink",

ContentPrefab = contentPrefab,

DisplayName = "Energy Drink",

InventoryIcon = InventoryIcon.FromTexture(icon),

PickupRadius = 0.55f,

Buoyancy = 1f

});

An AssetBundle Sprite can also be used:

Sprite icon = bundle.LoadAsset("EnergyDrinkIcon");

InventoryIcon inventoryIcon = InventoryIcon.FromSprite(icon);

The API never reads external PNG, ICO, JSON, or resource-path files. The inventory icon remains inside the content mod's AssetBundle.

Content prefab contract

ContentPrefab must be a prefab asset returned by AssetBundle.LoadAsset(), not a scene instance. Prepare the following normal Unity content:

  • Model, materials, lights, particles, audio, and other presentation assets.
  • Exactly one Rigidbody on the prefab root. Its mass, damping, gravity, interpolation, collision mode, and constraints become the final item settings.
  • At least one Collider for world collision.
  • A Texture2D or Sprite inventory icon.

Do not include Item, RigidbodySync, NetworkObject, FishNet components, or missing game scripts. HTF MoreItemAPI supplies and reconstructs them from a compatible original item template. It resets the cloned content root position and rotation, preserves scale, copies the authored Rigidbody settings to the generated game root, removes the content Rigidbody, and registers the content colliders as Item._worldColliders. A separate game-owned pickup trigger is created from PickupRadius.

The advanced ItemRegistry.Register(ItemRegistration) interface remains available for prefabs that already …

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
HTF_MoreItemAPI-2.0.0.zip
File size
94.6 KiB