You are viewing a potentially older version of this package. View all versions.
Date uploaded a week ago
Version 0.999.0
Download link toes-Socks-0.999.0.zip
Downloads 392
Dependency string toes-Socks-0.999.0

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

CHANGELOG

Changelog

v0.1000.0

  • Add: Chat `player_emoted signal
  • Enhanced reliability of ingame and outgame signals
    • This is potentially a breaking change if your mod relies on inconsistent behavior
  • Added new Players signal at_main_menu
  • Fixed Players.get_lobby_owner throwing assertion errors if there was no Actor assigned to the host
    • This is potentially a breaking change as it now explicitly returns null (safely)

v0.999.1 - Misc

  • Hotfixed skip_if_busy hotkey option not saving
  • Added Players.is_ignored to replace Players.is_player_ignored
  • Changed Players.is_ignored to check and consider if the player has been ignored/blocked through Steam

v0.999.0 - New Socks.Hotkeys module

  • Version 1 pre-release build

v0.5.0

  • New Chat.send_letter wrapper method

v0.4.0

  • New outgame signal emitted from Players
    • You can use this like ingame instead of testing for the existence of Players.local_player etc
  • Fixed Players.in_game was never properly reset to false after leaving a game
    • We'd sorta never ended up using this, personally, and honestly forgot about it until now, sorry!

v0.3.3

  • Hotfixed URI messages causing crash; sorry!
    • This happened because of an infinite loop! Link messages would trigger another link and so on.
    • Fixed this by adding a negative-lookahead to the match to exclude messages with BBCode [url=example.com]link[/url]

v0.3.2

  • Hotfixed Chat module issues caused by recent LucyTools update/conflict causing messages to include unexpected BBCode

v0.3.1

  • Hotfixed issue with URIs not being detected due to presence of BBCode in messages (LucyTools mod conflict)

v0.3.0

  • New Socks.Utils module
  • Added Players.get_lobby_owner for retrieving the current lobby's host
  • Changed Players methods to default to the local player when appropriate:
    • get_username
    • get_title
    • get_id
    • get_chat_color
    • get_position
  • Chat links should now open in your browser rather than within the Steam overlay
  • Opening Discord links will now require viewing a safety warning and confirmation from the user

v0.2.7

  • Fixes Recently Seen Players Steam integration. Now everyone you meet in lobbies will be listed in your Game Overview > Recent Players UI.

v0.2.6

  • Hotfix Players.chat

v0.2.5

  • Added Players.is_player_ignored helpers for checking if a player has been muted or blocked

v0.2.4

  • Links will now generate for URL's in messages even when the message contains other preceding text
  • System messages (e.g., MOTD) will now also generate clickable [LINK]s

v0.2.1

  • Added clickable links for URLs pasted into game chat

v0.2.0

  • Fixed player_removed event not emitting as expected
  • Dependency on NoNameFix changed to v1.0.0

v0.1.99

New Socks.Chat methods

  • get_all, get_chatbox

New Socks.Players methods

  • Players.get_chat_color
  • Players.get_names
  • Players.find