Skip to content

Instantly share code, notes, and snippets.

@EliteMasterEric
EliteMasterEric / CollapsibleDialog.hx
Created October 21, 2022 06:03
A dialog which can collapse with a button, in HaxeUI.
// package;
import haxe.ui.containers.dialogs.Dialog;
class CollapsibleDialog extends Dialog
{
public var dialogMinMaxButton:haxe.ui.components.Image;
var _minimized:Bool = false;
@EliteMasterEric
EliteMasterEric / CarCrashMenu.hxc
Created July 31, 2022 23:34
Throw this into a mod folder when the next FNF update comes out.
import flixel.FlxG;
import flixel.system.FlxSound;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import funkin.modding.module.Module;
import funkin.Paths;
import funkin.TitleState;
class CarCrashMenu extends Module
{
@EliteMasterEric
EliteMasterEric / replaceColor.frag
Created July 19, 2022 00:25
Fragment shader (built for Flixel) which replaces a specific color with another.
// A vec4 represents the red, green, blue, alpha of a pixel with values from [0.0, 1.0].
const vec4 MAGENTA = vec4(1.0, 0.0, 1.0, 1.0);
const vec4 GREEN = vec4(0.0, 1.0, 0.0, 1.0);
vec4 doWhatever() {
// This function just returns green, but you could add more complex logic here.
return GREEN;
}
void main() {
@EliteMasterEric
EliteMasterEric / CustomState.hxc
Created July 16, 2022 18:56
A script that defines the behavior for a custom scripted FlxState.
import flixel.FlxSprite;
import flixel.FlxG;
import funkin.Paths;
import funkin.MainMenuState;
import funkin.MusicBeatState;
import flixel.tweens.FlxTween;
import flixel.system.FlxSound;
class CustomState extends MusicBeatState
{
@EliteMasterEric
EliteMasterEric / DetectScreenRecorders.hx
Last active April 23, 2023 20:07
Haxe code to detect screen recording software.
/**
* A list of process names for several popular screen recording programs.
* Add more if you think of any.
*/
static final SCREEN_RECORDERS:Array<String> = [
"obs32.exe", "obs64.exe", "obs.exe",
"xsplit.core.exe", "livehime.exe", "pandatool.exe",
"yymixer.exe", "douyutool.exe", "huomaotool.exe"
];
@EliteMasterEric
EliteMasterEric / FNFEngines.md
Last active February 18, 2026 22:31
Friday Night Funkin' Game Engine Comparison

List of Friday Night Funkin' Engines:

The base game. Like vanilla ice cream, some people find it bland while, for others, it's their personal favorite. Only version available on Newgrounds (re-uploads of FNF or even mods aren't allowed). The Newgrounds web-only edition (no source code available) includes spritemap animations for cutscenes (the Tricky Mod uses pre-rendered videos), custom keybinds, and note splashes.

One of the original modded engines, developed for the Full Ass Tricky Mod, and later separately maintained. Focused on high-level play, featuring a reworked input system, improved player stats like a results screen hitgraph, and custom keybinds. The most common engine to use in mods (even if it isn't the simplest to mod).

@EliteMasterEric
EliteMasterEric / perfect2.java
Created April 14, 2018 15:18
Battle Cats Seed Calculator
public class perfect2 {
// ===== CHANGE THIS DATA BASED ON YOUR CURRENT GATCHA
// Number of different Uber-Super-Rares in this set.
public static final int UBER_COUNT = 61;
// Number of different Super-Rares in this set, 16 normally 23 limited.
public static final int SUPER_COUNT = 23;
// Number of different Rares in this set, usually 23.
public static final int RARE_COUNT = 23;
@EliteMasterEric
EliteMasterEric / RubyAnimalFarm.rb
Created November 17, 2017 14:57
First version, basic program
#---------------------------------------------------------
#
# Script Name: RubyAnimalFarm.rb
# Version: 1.0
# Author: Eric Myllyoja
# Date: November 2017
#
# Description: This Ruby program uses animals to demonstrate
# concepts of object oriented programming
#
@EliteMasterEric
EliteMasterEric / flair_statistics.py
Created November 16, 2017 23:25
Excerpt of moderator bot detailing how to retrieve flair statistics
for subreddit_name in config["flair_statistics_subreddits"]:
log.info("Retrieving flair statistics for subreddit: " + subreddit_name)
# Get the list of users and what flair they've selected.
# reddit is an instance of praw.Reddit.
reddit_flair_actual_list = reddit.subreddit(subreddit_name).flair(limit=None)
reddit_flair_possible_list = reddit.subreddit(subreddit_name).flair.link_templates
# Create variables in preparation for counting usage for each flair in a loop.
reddit_flair_current_choices = {}
reddit_flair_total_users = 0;
@EliteMasterEric
EliteMasterEric / meta.json
Last active March 16, 2017 01:43
Forge Update Checker For M.E.T.A.
{
"homepage": "https://minecraft.curseforge.com/projects/m-e-t-a",
"promos": {
"1.11.2-latest": "1.1.3",
"1.11.2-recommended": "1.1.3",
"1.10.2-latest": "1.1.3",
"1.10.2-recommended": "1.1.3",
},
"1.11.2": {
"1.1.3": "Minor crash fix to resolve a config crash.",