Last updated 10 hours ago
Total downloads 23083
Total rating 4 
Categories Tools Libraries Client Side
Dependency string toes-Socks-0.999.2
Dependants 19 other packages depend on this package

This mod requires the following mods to function

toes-NoNameFix-1.0.0 icon
toes-NoNameFix

Hotfix for annoying no-name chat bug, by Toes & Balls

Preferred version: 1.0.0

README

Socks

Sockpuppet pixel art
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


📚 Project Links