Socks
社區 Mod
模組介紹 作者原文
S☃️cks
(Original) Sockpuppet pixel art by okayo top hat
Socks is the _best_ library for Webfishing modders writing GDWeave mods.
Our motivation publishing this library is primarily to share these solutions and utilities we've written to address
problems we've personally encountered while making mods,
with the hopes you might be able to spend more time focused on fun than overcoming technical roadblocks.
You may also like to check out Better Webfishing Mod Template for a template/guide to making
patch mods that write over the game's code.
Example Usage of building a mod with Socks
onready var Players = get_node("/root/ToesSocks/Players")
onready var Chat = get_node("/root/ToesSocks/Chat")
var currently_worn_hat:= "hat_none"
var is_lobby_owner:= false
func _ready():
Chat.connect("player_messaged", self, "_on_player_messaged")
Players.connect("ingame", self, "_on_ingame")
Players.connect("outgame", self, "_on_outgame")
func _on_player_messaged(message: String, player_name: String, is_self: bool):
if is_self: return
Chat.send("Hi, %s!" % player_name)
func _on_ingame() -> void:
Initialize mod, once we are in-game
currently_worn_hat = Players.get_cosmetics()["hat"]
is_lobby_owner = Players.local_player == Players.get_lobby_owner()
func _on_outgame() -> void:
Teardown in prep for next lobby
currently_worn_hat = "hat_none"
is_lobby_owner = false
Modules
GDScriptify has started breaking when generating our docs - forgive our outdated docs in the meantime until we fix that...
Chat
Players
Hotkeys
tablecopter.gd
var enabled:= false
func _ready():
T Hotkey
var toggle_signal_name = Hotkeys.add(
{"name": "toggle_tablecopter", "label": "Toggle Tablecopter", "key_code": KEY_T, "repeat": false }
)
Hotkeys.connect(toggle_signal_name, self, "_handle_toggle")
CTRL+T Hotkey
var mode_toggle_signal_name = Hotkeys.add(
{"name": HOTKEY_NAME + "_mode", "label": HOTKEY_LABEL + " Mode", "key_code": KEY_T, "repeat": false, "modifiers": ["control"] }
)
Hotkeys.connect(mode_toggle_signal_name, self, "_handle_mode_toggle")
func _handle_toggle():
enabled =!enabled
See Hotkey Configuration Documentation for all hotkey options
Example projects
- Finapse X
- Jarvis
- Trivia
- Pip Pals
📚 Project Links
- Changelog
- Contributing (PRs welcome)
- Known Issues
- Feedback & Bug Reports (Discord)
- Roadmap & Feature Requests
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。 WEBFISHING 的模組多數需要 GDWeave 載入器,包內 readme 會說明具體位置。
下面這些內容需要先安裝,否則該模組不會生效: