HowtoFishIdentityAPI

版本 v1.0.1·更新於 2026-09-06

HowtoFishIdentityAPI is a shared identity verification API for How to Fish mods. It gives server-authoritative mods a stable, verified player key.

模組介紹 作者原文

Note: This description is bilingual. The Chinese section is provided below the English section.

說明:本描述爲中英雙語版本,中文內容位於英文內容下方。

HowtoFishIdentityAPI (English)

HowtoFishIdentityAPI is a shared identity verification API for How to Fish mods. It gives server-authoritative mods a stable, verified player key.

Main Features

  • Verifies Steam players with the SteamID confirmed by the game's Steam transport.
  • Verifies non-Steam players with a local RSA key and a server-issued challenge.
  • Exposes a stable key such as steam: or key: after verification.
  • Uses dedicated FishNet broadcasts for the handshake.
  • Provides a verification event so dependent mods can initialize server-side player data.

For Players

This mod is an API/dependency. It does not add gameplay, UI, commands, or currency by itself.

Install it when another How to Fish mod lists HowtoFishIdentityAPI as a requirement. If the dependent mod is multiplayer, the host and participating clients should install the required dependency as instructed by that mod.

Non-Steam identity keys are stored locally in:

Saves/HowtoFishIdentityAPI.identity

Do not share this file. A copied non-Steam identity file can be used to impersonate that identity. This API confirms possession of the key; it is not a permission, ban, or anti-cheat system.

For Mod Authors

Reference HowtoFishIdentityAPI.dll and add a hard BepInEx dependency:

using BepInEx;

using FishNet.Connection;

using HowtoFishIdentityAPI.Api;

[BepInPlugin(PluginInfo.PLUGIN_GUID, "My Mod", "1.0.0")]

[BepInDependency("IceBoxStudio.HowToFish.IdentityAPI", "1.0.1")]

public sealed class MyPlugin: BaseUnityPlugin

{

private void Awake()

{

IdentityApi.Verified += OnVerified;

}

private void OnVerified(NetworkConnection connection)

{

if (IdentityApi.TryGetKey(connection, out string key))

{

// Load or create server-side data using key.

}

}

}

Useful API methods:

  • IdentityApi.IsVerified(NetworkConnection) checks whether a connection has completed verification.
  • IdentityApi.IsVerified(Player) checks a player's current connection.
  • IdentityApi.TryGetKey(NetworkConnection, out string key) returns the verified stable key.
  • IdentityApi.TryGetKey(Player, out string key) returns the verified key for a player.
  • IdentityApi.TryGetLocalKey(Player, out string key) resolves the local player's key on the client for UI filtering; it is not a server authorization check.
  • IdentityApi.IsSteam(NetworkConnection) and IdentityApi.IsSteam(Player) identify Steam transport identities.
  • IdentityApi.Verified fires on the server after a connection is verified.

The identity handshake uses IdentityHelloBroadcast, IdentityChallengeBroadcast, and IdentityProofBroadcast. Do not patch or read Server.RpcReader___SendChatMessage___3264264606 for custom protocols.

Compatibility

  • Game version: 1.0.12+
  • BepInEx: 5.4.23.5+

Bug Reports & Feature Suggestions

If you have any questions or feature suggestions, please submit them through GitHub Issues, contact me on Discord at iceboxcool, or email 764884112@qq.com or ibox2333@gmail.com.

If you enjoy my mods, feel free to support me! / 如果你喜歡我的模組,請支持我一下吧!

 

HowtoFishIdentityAPI(中文)

HowtoFishIdentityAPI 是供 How to Fish 模組使用的共享身份驗證 API。它爲需要服務器權威身份的模組提供穩定、經過驗證的玩家標識。

主要功能

  • 使用遊戲 Steam 傳輸確認的 SteamID 驗證 Steam 玩家。
  • 使用客戶端本地 RSA 密鑰和服務器隨機挑戰驗證非 Steam 玩家。
  • 驗證完成後提供穩定身份鍵,例如 steam: 或 key:。
  • 使用獨立 FishNet Broadcast 完成握手。
  • 提供身份驗證完成事件,方便其他模組在服務器端初始化玩家數據。

給玩家

這是一個 API/依賴模組,本身不會添加玩法、UI、命令或金錢功能。

當其他 How to Fish 模組要求安裝 HowtoFishIdentityAPI 時,請按該模組的說明安裝。聯機模組通常需要房主和參與遊戲的客戶端都安裝所需依賴。

非 Steam 身份密鑰保存在:

Saves/HowtoFishIdentityAPI.identity

請不要分享這個文件。複製非 Steam 身份文件後,其他人可能冒用對應身份。本 API 只確認客戶端是否持有對應密鑰,不負責權限、封禁或反作弊。

給模組作者

在項目中引用 HowtoFishIdentityAPI.dll,並添加 BepInEx 硬依賴:

using BepInEx;

using FishNet.Connection;

using HowtoFishIdentityAPI.Api;

[BepInPlugin(PluginInfo.PLUGIN_GUID, "My Mod", "1.0.0")]

[BepInDependency("IceBoxStudio.HowToFish.IdentityAPI", "1.0.1")]

public sealed class MyPlugin: BaseUnityPlugin

{

private void Awake()

{

Iden

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

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

BepInEx-BepInExPack

檔案與校驗

檔案名稱
HowtoFishIdentityAPI-1.0.1.zip
檔案大小
129.3 KiB