BlueberryWolfiAPIs

版本 v1.0.2·更新於 2024-11-07

Comfy APIs for Webfishing Mods

模組介紹 作者原文

Comfy APIs for WEBFISHING Mod Development

A collection of APIs designed for use in the Comfy WEBFISHING mod within GDWeave, providing streamlined management for player interactions, keybinds, and more.

Installation (for the peeps)

  • Ensure GDWeave is installed and working properly
  • Download the latest release
  • Extract the zip to BlueberryWolfi.APIs and be careful to not rename it.
  • Place the folder in WEBFISHING/GDWeave/Mods/BlueberryWolfi.APIs
  • Install any other mods which use my API, like

Developer Usage (for the nerds)

  • Import the downloaded source code folder into your godot project directory as mods/BlueberryWolfi.APIs.
  • Add an autoload entry in your project settings named BlueberryWolfiAPIs (no dot) to ensure that the APIs load before your mods.
  • Important: When exporting your project, be careful not to include the source code of these APIs.

Code Integration

PlayerAPI Example:

Importing PlayerAPI

var PlayerAPI

func _ready():

PlayerAPI = get_node_or_null("/root/BlueberryWolfiAPIs/PlayerAPI")

PlayerAPI.connect("_player_added", self, "init_player")

func init_player(player: Actor):

example:

print(PlayerAPI.get_player_name(player))

KeybindsAPI Example:

Importing KeybindsAPI

var _keybinds_api

func _ready():

_keybinds_api = get_node_or_null("/root/BlueberryWolfiAPIs/KeybindsAPI")

var pushtalk_mic_signal = KeybindAPI.register_keybind({

"action_name": "toggle_ptt",

"title": "Toggle Push to Talk",

"key": KEY_T,

})

_keybinds_api.connect(pushtalk_mic_signal, self, "_on_to_talk_button_down") # key down signal is automatically created.

_keybinds_api.connect(pushtalk_mic_signal + "_up", self, "_on_to_talk_button_up") # key up signal is automatically created.

func _on_to_talk_button_down() -> void:

print("Push to talk on")

func _on_to_talk_button_up() -> void:

print("Push to talk off")

PlayerAPI

The PlayerAPI simplifies player-related tasks such as managing actors, steam IDs, and player states.

Variables

PlayerAPI.local_player # Local player as an actor

PlayerAPI.in_game # Checks if the player is in the game

PlayerAPI.players # List of player actors in the game

Signals

_player_added(player) # Triggered when a player joins, returns the player actor

_player_removed(player) # Triggered when a player leaves, returns the player actor

_ingame() # Triggered when the local player is in-game

Functions

is_player(node: Node) -> bool # Checks if a node is a Player

get_player_from_steamid(steamid: String) -> Actor # Gets player by Steam ID

get_player_name(player: Actor) -> String # Returns player's name

get_player_title(player: Actor) -> String # Returns player's title

get_player_steamid(player: Actor) -> String # Returns player's Steam ID

KeybindsAPI

The KeybindsAPI allows mods to register custom keybinds and trigger signals for input events. Configurable in the in-game controls menu.

Signals

_keybind_changed(keybind: String, title: String, input_event: InputEventKey)

Functions

register_keybind(keybind_data: Dictionary) -> String # Registers a keybind, returns the signal name

Note: A signal with "_up" appended to the signal name is automatically created for key release.

Requirements

  • Ensure GDWeave is properly installed to use these APIs.

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

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

不同模組的安裝位置差異較大,包內說明是最可靠的依據。 WEBFISHING 的模組多數需要 GDWeave 載入器,包內 readme 會說明具體位置。

前置依賴

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

NotNet-GDWeave

檔案與校驗

檔案名稱
BlueberryWolfiAPIs-1.0.2.zip
檔案大小
48.8 KiB
SHA-256
4d1dddc3152838b1516dfd1fb6d6450c52857964b0bf5c0da06402ed11c4ae10
入庫時間
2026-10-06 19:10