
Socks
Socks is a library to facilitate joy in Webfishing mod development
Date uploaded | 2 weeks ago |
Version | 0.3.3 |
Download link | toes-Socks-0.3.3.zip |
Downloads | 684 |
Dependency string | toes-Socks-0.3.3 |
This mod requires the following mods to function

README
Socks
<center>
<center>

Socks is an evolving (work-in-progress) development library for 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.
The Players module is borrowed from BlueberryWolf's
but with performance and developer-experience improvements at the cost of being backward-compatible.
Nonetheless, you should find Socks.Players
will suit your existing needs without many changes.
In addition, our modules introduce convenient utilities to make mod building more straightforward.
The Socks.Chat
module was created to address the naturally opaque and cumbersome process of hooking into the game's chat methods.
Sockpuppet pixel art by okayo top hat
Usage
Example
onready var Players = get_node("/root/ToesSocks/Players")
onready var Chat = get_node("/root/ToesSocks/Chat")
func _ready():
Chat.connect("player_messaged", self, "_on_player_messaged")
func _on_player_messaged(message: String, player_name: String, is_self: bool):
if is_self: return
Chat.send("Hi, %s!" % player_name)
Example projects
Help!
Please feel free to submit RFC issues with ideas for
new utilities or even modules. I can be reached on Discord @toes
for discussion, collaboration, or questions.
If you need general help building mods, you might consider joining the Webfishing Modding Discord.
[!TIP] You can reach out to me for help with building your mod project.
CHANGELOG
Changelog
v0.4.0
- New
outgame
signal emitted from Players- You can use this like
ingame
instead of testing for the existence ofPlayers.local_player
etc
- You can use this like
- 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