Skip to content

Instantly share code, notes, and snippets.

@KatieFrogs
KatieFrogs / mcstacker-fixes.meta.js
Created February 9, 2023 01:14
MCStacker Fixes userscript
View mcstacker-fixes.meta.js
// ==UserScript==
// @name MCStacker Fixes
// @namespace mcstacker-fixes
// @author Katie Frogs
// @description Adds a few small features to the MCStacker website and changes its look
// @match https://mcstacker.net/
// @grant none
// @version 2023.2.9
// ==/UserScript==
View taikoweb-adminhelper.meta.js
// ==UserScript==
// @name Taiko Web Admin Helper
// @namespace taikoweb-adminhelper
// @version 2023.1.8
// @author Katie Frogs
// @description Drag and drop tja files on the Admin New song page to automatically fill the values
// @match http://localhost/admin/songs/new
// @grant none
// ==/UserScript==
View TJA-format.mediawiki

TJA is a file format created for Taiko simulators to have playable charts. It contains the metadata and the notation for all of the song's difficulty levels. "WAVE:" in the file points to an external audio file that should be in the same directory as the TJA.

This page covers TJA support in taiko-web, but may apply to other simulators as well.

Specification

TJA file is a plain text file that can be encoded as either UTF-8 with BOM or as Shift-JIS. The extension is ".tja". The container format for the audio file does not matter as long as it is supported in the simulator. If the TJA file is hosted on taiko-web, the filename should be "main.tja" for the TJA file and "main.ogg" for the audio file.

Comments can be inserted at any point by starting them with //, comment will continue until the end of that line.

@KatieFrogs
KatieFrogs / scorestorage-convert.js
Created December 6, 2021 22:28
taiko-web score string decoder and encoder
View scorestorage-convert.js
function scoreDecoder(scoreString){
var difficulty = ["oni", "ura", "hard", "normal", "easy"]
var scoreKeys = ["points", "good", "ok", "bad", "maxCombo", "drumroll"]
var crownValue = ["", "silver", "gold"]
var songAdded = false
var output = {title: null}
if(typeof scoreString === "string" && scoreString){
var diffArray = scoreString.split(";")
for(var i in difficulty){
if(diffArray[i]){
@KatieFrogs
KatieFrogs / vgmstream-web.py
Last active October 18, 2021 11:21
Python script that opens files in vgmstream-web
View vgmstream-web.py
#!/usr/bin/env python3
import os
import sys
import http.server
import urllib
import shutil
import posixpath
from functools import partial
from http import HTTPStatus
@KatieFrogs
KatieFrogs / drpextract.py
Created July 29, 2021 22:14
.drp file extractor
View drpextract.py
#!/usr/bin/env python3
import os
import zlib
import struct
def extractFile(inputFile):
if type(inputFile) is str:
file = open(inputFile, "rb")
else:
@KatieFrogs
KatieFrogs / nutextract.py
Last active July 29, 2021 23:01
.nut texture extractor and encoder, based on Smash Forge code
View nutextract.py
#!/usr/bin/env python3
import os
import struct
class Dds:
class DdsFormat:
Rgba = 0
Dxt1 = 1
Dxt3 = 2
View taikodb_hash.py
import os
import sys
import hashlib
import base64
import sqlite3
def md5(md5hash, filename):
with open(filename, "rb") as file:
for chunk in iter(lambda: file.read(64 * 1024), b""):
md5hash.update(chunk)
View songtitle.txt
!!!カオスタイム!!!
en !!!Chaos Time!!!
-EDY- エレクトリカルダンシングヨガー
en -EDY- Electrical Dancing Yoga
365日の紙飛行機
en 365 Nichi No Kami-Hikouki
残酷な天使のテーゼ