This document outlines a vision for my addons. It's meant to make addons that are easy to use, maintain and extend.
Addons should have a readme file containing:
- a short description
- a screenshot
#!/usr/bin/env python | |
""" | |
Script to help create new modding projects. | |
Execute this inside the template folder and | |
fill in the form. | |
""" | |
import os |
#!/bin/env python3 | |
import os | |
import subprocess | |
def replace_in_file(path, replacements): | |
with open(path, "r") as original: | |
content = original.read() | |
for to_replace in replacements: | |
content = content.replace(to_replace, replacements[to_replace]) | |
with open(path, "w") as modified: |
extends Node | |
# this script is attached to the main scene | |
var server_api := MultiplayerAPI.new() | |
var client_api := MultiplayerAPI.new() | |
# The actual main scene of the game. It is instanced in the script. | |
export var game_scene : PackedScene |
This is an explaination of my project layout for Godot games and other projects. Each folder is visualised in a code block and explained below. Names written in cursive are arbitrary and can be changed.
static func _join_duplicates(mesh : Mesh) -> Dictionary: | |
var data_tool := MeshDataTool.new() | |
if not data_tool.create_from_surface(_deindex(mesh), 0) == OK: | |
return {} | |
var old_vertex_ids := {} | |
var ordered_vertices := [] | |
for vertex_id in data_tool.get_vertex_count(): | |
var vertex := data_tool.get_vertex(vertex_id) | |
old_vertex_ids[vertex] = vertex_id |
extends Node | |
# registered as an autload on both | |
# the dedicated server and on the player | |
var MY_IP | |
var MY_PORT | |
var is_player | |
const DEDICATED_SERVER_PORT = 1234 |