Skip to content

Instantly share code, notes, and snippets.

@UserUnknownFactor
UserUnknownFactor / rpa_unpacker.py
Created March 8, 2024 12:47
Renpy raw .rpyc string extractor and repacker (useful if other tools fail to extract the strings)
#!/usr/bin/env python3
from __future__ import print_function
import sys
import os
import codecs
import errno
import random
try:
import pickle5 as pickle
var commandNames = {
"101":"Show Text",
"102":"Show Choices",
"103":"Input Number",
"104":"Select Item",
"402":"When [**]",
"403":"When Cancel",
"103":"Input Number",
"104":"Select Item",
"105":"Show Scrolling Text",
@UserUnknownFactor
UserUnknownFactor / Photoshop_Duplicate-to-All.js
Created March 8, 2024 12:38
Photoshop JS script to duplicate a group of layers to all files
if( app.documents.length > 0 ){
duplicateToAll();
}
function duplicateToAll(){
docs = app.documents;
curDoc = app.activeDocument;
groupLayerset();
for(var i = 0; i < docs.length; i++){
if(curDoc != docs[i]){
var curLayer;
@UserUnknownFactor
UserUnknownFactor / add_json_debug.cmd
Last active April 3, 2024 12:26
Plugin to better understand JSON loading errors source in RPG Maker MV/MZ games
@echo off
powershell.exe -ExecutionPolicy Bypass -Command "$_=((Get-Content \"%~f0\") -join \"`n\");iex $_.Substring($_.IndexOf(\"goto :\"+\"EOF\")+9)"
del add_json_debug.cmd
@goto :EOF
$pliginsName = ".\www\js\plugins.js"
$pluginsStr =(Get-Content $pliginsName)
if($pluginsStr -like '*DebugJSONLoad*') {
Write-Host "Already patched!"
} else {
@UserUnknownFactor
UserUnknownFactor / add_plugin.cmd
Created March 8, 2024 12:35
Plugin to set custom save directory instead of www/save for RPG Maker MV/MZ games
@echo off
powershell.exe -ExecutionPolicy Bypass -Command "$_=((Get-Content \"%~f0\") -join \"`n\");iex $_.Substring($_.IndexOf(\"goto :\"+\"EOF\")+9)"
del add_plugin.cmd
@goto :EOF
$pliginsName = ".\www\js\plugins.js"
$pluginsStr =(Get-Content $pliginsName)
if($pluginsStr -like '*RoamingSavePath*') {
Write-Host "Already patched!"
} else {
@UserUnknownFactor
UserUnknownFactor / dump_rbr_strings.py
Last active March 30, 2024 15:49
Bakin resource extractor
import os, re, argparse, glob
from unicodedata import category
from filetranslate.service_fn import write_csv_list, read_csv_list, read_csv_dict
from filetranslate.language_fn import tag_hash
# NOTE: This should work for both Bakin RPG Maker and Smile Game Builder files
def write_7bit_encoded_int(stream, value):
result = bytearray()
while True:
@UserUnknownFactor
UserUnknownFactor / dump_unreal_strings.py
Last active December 21, 2023 13:02
Python tool to dump all strings from Unreal .uexp file of unknown format
# coding: utf-8
# Python tool to dump all strings from Unreal .uexp files of unknown format
import argparse, sys, os, glob, re, struct, csv, hashlib, math, zlib
from multiprocessing import Pool
DUMP_ALL_STRINGS = False
DATA_NAMES = list(glob.glob('.\\**\\*.uexp', recursive=True)) + list(glob.glob('.\\**\\*.uasset', recursive=True))
ESCAPE_CHAR = '¶'
DELIMITER_CHAR = '→'
@UserUnknownFactor
UserUnknownFactor / consomeriyo.ttf
Last active January 2, 2024 03:55
Consolas+Meiryo hybrid font for showing Japanese characters in windows console with chcp 65001 (utf-8) encoding.
This file has been truncated, but you can view the full file.
@UserUnknownFactor
UserUnknownFactor / config-dnsquery.xml
Last active May 5, 2023 04:22
Sysmon config to only check DNS requests from a specific source
<Sysmon schemaversion="4.83">
<!--
Sysmon (https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon)
config to only monitor DNS requests from specific processes.
Install it like this:
sysmon -accepteula -i config-dnsquery.xml
or reconfigure, if it's already installed before:
sysmon -c config-dnsquery.xml
To check events run:
mmc eventvwr.msc
@UserUnknownFactor
UserUnknownFactor / revert_kblayout.cmd
Last active January 19, 2023 18:35
Kill that windows language switcher floaty thingy (Windows 10)
@echo off
cd /d "%~dp0"
Title "Reverting input layout popup to Windows 10 default..."
::filedll
set filedll=%windir%\system32\InputSwitch.dll
takeown /F %filedll% /A
icacls %filedll% /grant:r "*S-1-5-32-544":f
icacls %filedll% /setowner "*S-1-5-32-544" /C /L /Q