Skip to content

Instantly share code, notes, and snippets.

@dogboydog
dogboydog / WorldScripting.js
Last active January 22, 2024 16:28
Testing world scripting functionality for Tiled (map editor)
/*
* Testing world scripting functionality
*/
var WorldScripting = {};
WorldScripting.scriptAction = tiled.registerAction("WorldScripting", function (action) {
var state = {
worlds: tiled.worlds,
}
@dogboydog
dogboydog / AddProjectProperties.js
Created June 5, 2023 23:43
example tiled scripts related to the addition of custom properties to Tiled Projects https://github.com/mapeditor/tiled/pull/3667
var AddProjectProperties = {};
AddProjectProperties.action = tiled.registerAction("ProjectCustomProperties", function (action) {
tiled.project.setProperty('newString', 'hello world');
tiled.project.setFloatProperty('newRatio', 0.7);
tiled.project.setColorProperty('newColor', "#aabbaa");
});
AddProjectProperties.action.text = "Add Project Properties";
@dogboydog
dogboydog / unity_ys_csv_to_godot.py
Created July 17, 2022 19:27
given a directory with YarnSpinner-Unity csv files, convert to godot localization .csv format (python 3)
import csv
import pathlib
import os
import re
def fix_locale_code(code):
# https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html
return code.replace("-", "_")
@dogboydog
dogboydog / convert.py
Last active April 6, 2024 08:04
Convert Nimbus Notes HTML to Markdown for Joplin
# -------------------------------------------------------------------------
# Nimbus note HTML export to markdown converter
# Extract all zip files containing 'note.html' and convert to markdown
#
# Setup:
# 1) install python 3 for your OS
# 2) install pandoc https://github.com/jgm/pandoc/releases/tag/2.11.4
# on Windows, the .msi will automatically add pandoc to your $PATH
# otherwise add it to your $PATH.
# 3) save this script in the directory where your HTML exports were