Skip to content

Instantly share code, notes, and snippets.

@Qubus0
Qubus0 / godot_userdata_paths.md
Last active May 30, 2024 17:59
default file paths for userdata and common files

Files

Logs are all stored in the /logs folder.
The most recent one does not have a time stamp (named godot.log or godot if the extension is hidden)

Saves are named ### If they do not appear here, disable steam cloud saves and make sure you are in online mode. They will appear shortly after.

Settings are named ### Deleting the file can resolve some issues (or moving it to another folder as backup)

@Qubus0
Qubus0 / SteamSoftware.js
Created February 1, 2024 22:02
Zotero Web Translator for Steam Games (store.steampowered.com). No fancy checks for pages, so only use on app pages.
{
"translatorID": "92c1c200-6cca-4dd0-8d61-573a50a60f16",
"label": "Steam Software",
"creator": "Ste",
"target": "store\\.steampowered\\.com\\/app",
"minVersion": "5.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
@Qubus0
Qubus0 / GodotPluginDevelopment.md
Last active January 14, 2024 20:55
How to make plugin development in Godot easier

Plugin Development

Basics

Creating a new plugin is best done through the ProjectSettings under Plugins > Create (top right)

Messing up the editor nodes happens quite a lot. When it does, you can use the Reload Current Project button from the top menu > Project. If it happens often, you can also set a shortcut for it. Useful in combination with that is the EditorSetting (not project) to re-open all scenes which were previously open. You can find it under this path interface/scene_tabs/restore_scenes_on_load

@Qubus0
Qubus0 / inspector_full_property_path.gd
Created March 4, 2023 21:30
Godot Plugins: Get the full property path from the Inspector panel including nested resource inspectors (4.x)
@tool
extends EditorPlugin
var last_path := []
func _process(delta: float) -> void:
# Optimally just do this on button press or connected to a signal
var new_path := get_inspector_full_selected_path()
@Qubus0
Qubus0 / file_system_icons.md
Last active March 5, 2023 03:14
Godot Plugins: Changing icons and other parts of the FileSystemDock

How to change icons, their color, and other parts in the FileSystemDock

The easiest way to go about this is to switch the underlying icon which represents the file type.

tool
extends EditorPlugin

func _enter_tree() -> void:
 var base_theme := get_editor_interface().get_base_control().theme
@Qubus0
Qubus0 / context_actions.md
Last active September 8, 2023 12:40
Godot Plugins: adding context actions to the file system dock (3.5)

Adding context actions to the file system dock in a plugin

Note: This mini tutorial is for Godot 3.5. There are some changes that need to be made for Godot 4, check them out in this other gist

Since there is no built-in method to add context actions, we have to make our own.

To start, we need to get the file system dock. This can be done in the EditorPlugin. If we need it in any other script, we can just pass it to them.

tool
@Qubus0
Qubus0 / autobrace.gd
Last active February 26, 2023 14:13
Godot automatic brace completion for TextEdit (3.5)
extends TextEdit
var last_text: String
var last_selection: TextSelection
var autobrace_pairs := {
"(": ")",
"{": "}",
"[": "]",
'"': '"',
"'": "'",
@Qubus0
Qubus0 / godot_tabbed_dock.md
Last active February 26, 2023 21:42
Godot Plugins: Good looking tabbed dock (3.5)

Making a tabbed EditorPlugin dock in Godot (3.5.x)

...seems simple enough:

Make a dock scene, load it, add it, done. Like any other dock, right?

extends EditorPlugin

var dock: Control

func _enter_tree():
@Qubus0
Qubus0 / mod-list.json
Last active April 3, 2023 00:06
A list of current dome keeper mods
[
{
"title": "Legacy Mod loader",
"description": "Loader to use mods. Read the README file included in the download.",
"authors":
[
"Hello World"
],
"tags":
[