Skip to content

Instantly share code, notes, and snippets.

@SplenectomY
SplenectomY / ObjExporter.cs
Last active March 28, 2024 16:38
A modification to the UnityObjExporter at https://github.com/dsapandora/UnityObjExporter
using UnityEngine;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System;
using Object = UnityEngine.Object;
using Debug = UnityEngine.Debug;
using System.Threading.Tasks;
using UnityEngine.Events;
@SplenectomY
SplenectomY / flipCard.js
Created April 9, 2020 18:01
Flips card in roll20
// By: Christopher Buchholz
// with heavy copying from, I mean use of as a Pattern, TokenMod
var ChangeTokenImg = ChangeTokenImg || (function() {
'use strict';
var version = '0.1.32',
lastUpdate = 1509192678,
observers = {
tokenChange: []
@SplenectomY
SplenectomY / SplY_PathBlocker.js
Last active December 22, 2018 17:36
Blocks tokens from going out "windows" on a Roll20 map, but allows them to see through it!
// This script will block tokens from going through "windows",
// or other transparent obstacles but allow sight through them.
// Will work for any paths drawn, even freehand and circles.
// (Circle/oval detection accuracy is reduced to save on processing time,
// because it's WAY harder to determine the intersect of an elipsoid vs.
// a line rather than line segments vs. a line. For better accuracy on curves,
// draw it freehand. Excessive use of this might cause slow performance)
// Default color for detecting the window path is yellow (#ffff00)
// You may change this color in the config below
@SplenectomY
SplenectomY / SplY_AutoTeleporter.js
Last active December 29, 2018 05:01
Performance and functionality improvements for a popular Roll20 script
/* ************ Splen's Easy Doors and Stairs *****************
* AUTOTELEPORTING: This feature allows you to place a token on
one square (for example stairs) and it will auto move a token
to the linked location and back again should you choose.
* Linked locations need to be tokens placed on the GMLayer.
* Naming conventions:
* ex: Two way doors: XXXXXXX02A, XXXXXXXX02B
In this example, "2" refers to the amount of stops.
This number must always match the total amount of
@SplenectomY
SplenectomY / STC-Safe Auto LCD Script.cs
Last active December 14, 2018 18:36
Server-performance friendly version of the AutoLCD Script for Space Engineers by McMaster
//Make this number larger to slow the script down and prevent overheats.
public const int SlownessLevel = 2;
// Use this tag to identify LCDs managed by this script
// Name filtering rules can be used here so you can use even G:Group or T:[My LCD]
public string LCD_TAG = "T:[LCD]";
// How many lines to scroll per step
public const int SCROLL_LINES_PER_STEP = 1;
@SplenectomY
SplenectomY / profitable_routes.cs
Last active August 13, 2018 00:41
Space Engineers programming block script for calculating profitable trade routes, indirectly implements Frontier Economy mod and a handy LCD Network script
//For use with the Frontier Economy mod
//
//You'll need a grid that collects the prices of all the shops on the server. I recommend
//Network LCDs for this job. One shop per LCD is ideal. Doesn't matter if the prices don't all fit
//on screen. You should hide these ugly things out of sight anyway.
//
//On each screen, put [PRICES] in the name. Should then look like [Economy] [PRICES]
//
//Create an LCD with [Routes] in the name. That's it! This script will do the rest.
//It's a bit heavy on calculations so consider putting it on a timer block. See line 15.
@SplenectomY
SplenectomY / SplenectomY_getAbilities.js
Last active November 21, 2017 17:55
Creates abilities for each character based on the repeating_action sections of the 5th Edition OGL character sheet
// SET CONFIG FIRST, THEN CHANGE "RUN" TO TRUE
// Create a button to roll HP for a selected NPC token. Requires TokenMod
var doHP = false,
// If you're done with all the config, set this to true and save the script.
// Be careful and make sure you're 100 percent ready. This script is going
// to make macro buttons for EVERY CHARACTER YOU HAVE. It will take a moment.
// These actions are not easily undone. Consider copying your campaign
// to test it first.
var SplenectomY = SplenectomY || {};
SplenectomY.planets = SplenectomY.planets || {};
//////////////////////////////////////////////////
//HERES THE CONFIG. SAVE AND RESTART UPON CHANGING.
SplenectomY.planets.clockwise = false;
//////////////////////////////////////////////////
//////////////////////////////////////////////////
@SplenectomY
SplenectomY / planetaryRotation.js
Last active October 31, 2017 18:14
A nice script for rotating planets (according to the Spelljammer campaign guide) in Roll20.
var SplenectomY = SplenectomY || {};
SplenectomY.planets = SplenectomY.planets || {};
//////////////////////////////////////////////////
//HERES THE CONFIG. SAVE AND RESTART UPON CHANGING.
SplenectomY.planets.clockwise = false;
//////////////////////////////////////////////////
//////////////////////////////////////////////////
@SplenectomY
SplenectomY / GIM.js
Last active November 4, 2017 02:36
Graphic Inventory Manager - Multidimensional token GUI for Roll20.net
state.SplenectomY = state.SplenectomY || {};
state.SplenectomY.inventory = state.SplenectomY.inventory || {};
state.SplenectomY.inventory.pageID = state.SplenectomY.inventory.pageID || {};
state.SplenectomY.players = state.SplenectomY.players || {};
state.SplenectomY.inventory.currentCaller = state.SplenectomY.inventory.currentCaller || {};
state.SplenectomY.inventory.currentCallerid = state.SplenectomY.inventory.currentCallerid || {};