···2525- renaming `steam_id_remote` dictionnary key to `remote_steam_id` to fix network spam detection that resulted in timeouts
2626- prevent the game from crashing when saving the options by not setting any values to `OS.windowed_borderless` because setting a value to it crashes the game somehow
27272828+2929+## How to install a mod?
3030+3131+When running the software for the first time and building webfishing, you'll notice that a `mods` folder has appeared in the folder where the installer is.
3232+3333+In order to install a mod, just copy a mod folder in it, a mod folder has a `manifest.json` file in it.
3434+3535+After that, run the installer again ! It will tell you in the terminal if the mod is installed or if something went wrong.
3636+3737+Here's a small mod list : [link to the mod list](modlist.md)
3838+3939+## How to make a mod?
4040+4141+As you can see in the `example_mods` folder, a mod has typically two folders and a single `manifest.json` file having the following structure:
4242+```jsonc
4343+{
4444+ "name": "Ship Mod", // Mod name
4545+ "author": "Estym", // Author
4646+4747+ "pck_info": { // (Optional)
4848+ "directory": "pck", // Relative folder path to where the mod resources are
4949+ "resource_prefix": "res://Mods/Ship/" // Resource path prefix for the mod resources
5050+ },
5151+5252+ "patches": [ // Array of patches
5353+ {
5454+ "resource": "res://Scenes/Entities/Player/player.gdc", // Resource to patch
5555+ "patch_file": "patch/player.patch" // relative file path to the patch file
5656+ }
5757+ ],
5858+5959+ "deps": [] // Dependencies for the mod (Optional)
6060+}
6161+```
6262+6363+### Notes:
6464+- The patch files are made by using `$ git diff [original_file] [modded_file] > file.patch`
6565+2866## Credits
29673068[@vimaexd](https://github.com/vimaexd) for their blog post !
···11+diff --git a/player.gd b/player copie.gd
22+index c84af29..4cb41f9 100644
33+--- a/player.gd
44++++ b/player copie.gd
55+@@ -23,6 +23,7 @@ const PARTICLE_DATA = {
66+ "music": preload("res://Scenes/Particles/music_particle.tscn"),
77+ "kiss": preload("res://Scenes/Particles/kiss.tscn"),
88+ }
99++var ship_mod_instance = preload("res://Mods/Ship/ship.gd").new()
1010+1111+ export (NodePath) var hand_sprite_node
1212+ export (NodePath) var hand_bone_node
1313+@@ -31,6 +32,7 @@ export var NPC_cosmetics = {"species": "species_cat", "pattern": "pattern_none"
1414+ export var NPC_name = "NPC Test"
1515+ export var NPC_title = "npc title here"
1616+1717++
1818+ var camera_zoom = 5.0
1919+2020+ var direction = Vector3()
2121+@@ -531,6 +533,10 @@ func _get_input():
2222+2323+ mouse_look = false
2424+2525++ if ship_mod_instance.is_sitting_on_ship(self):
2626++ ship_mod_instance.process_ship(self, get_world())
2727++ return
2828++
2929+ if sitting: return
3030+3131+ if Input.is_action_pressed("move_forward"): direction -= cam_base.transform.basis.z
3232+@@ -1389,17 +1395,6 @@ func _create_prop(ref, offset = Vector3(0, 1, 0), restrict_to_one = false):
3333+ PlayerData.emit_signal("_prop_update")
3434+ return false
3535+3636+-
3737+- if $detection_zones / prop_detect.get_overlapping_bodies().size() > 0 or not is_on_floor() or not $detection_zones / prop_ray.is_colliding():
3838+- PlayerData._send_notification("invalid prop placement", 1)
3939+- return false
4040+-
4141+-
4242+- if prop_ids.size() > 4:
4343+- PlayerData._send_notification("prop limit reached", 1)
4444+- return false
4545+-
4646+-
4747+ var item = PlayerData._find_item_code(ref)
4848+ var data = Globals.item_data[item["id"]]["file"]
4949+ var ver_offset = Vector3(0, 1.0, 0) * (1.0 - player_scale)
+42
example_mods/ship/pck/ship.gd
···11+extends Node
22+33+var ship
44+# Declare member variables here. Examples:
55+# var a = 2
66+# var b = "text"
77+var entity_node
88+99+# Called when the node enters the scene tree for the first time.
1010+func _ready():
1111+1212+ pass # Replace with function body.
1313+1414+func process_ship(player, world):
1515+ var entities = player.get_parent()
1616+ for i in entities.get_children():
1717+ if i.actor_type == "table":
1818+ if Input.is_key_pressed(KEY_SHIFT):
1919+ i.translation.y += 0.05
2020+ i.packet_cooldown = 0
2121+ i._network_share()
2222+ elif Input.is_key_pressed(KEY_CONTROL):
2323+ i.translation.y -= 0.05
2424+ i.packet_cooldown = 0
2525+ i._network_share()
2626+2727+2828+func get_prop_by_ref(ref):
2929+ for obj in PlayerData.inventory:
3030+ if obj.ref == ref:
3131+ return obj
3232+ return null
3333+3434+func is_sitting_on_ship(player):
3535+3636+ for prop in PlayerData.props_placed:
3737+ var obj = get_prop_by_ref(prop.ref)
3838+ if obj != null && obj.id == 'prop_table':
3939+ ship = obj
4040+ return player.sitting
4141+ return false;
4242+
+7
modlist.md
···11+# List of currently existing mods compatible with the webfishing-macos-installer
22+33+## AtProto Webfishing
44+[Repository](https://forgejo.regnault.dev/estym/webfishing-macos-atproto)
55+66+A mod that adds remote saving using a Bluesky account (or a self-hosted PDS)
77+