Compare commits

..
Author SHA1 Message Date
CrafterPika
6345e3373f
update spfn api to new domain 2026-08-08 08:37:46 +02:00
CrafterPika
f46a4e8283
a little bit of cleanup 2026-07-03 01:38:36 +02:00
d40ad03bad fix my stupidity part 2 2026-06-28 00:27:55 +02:00
867a1df9bf fix my stupidity 2026-06-28 00:27:11 +02:00
CrafterPika
7358c34063
warn user of potential save file wipe 2026-06-27 21:21:29 +02:00
CrafterPika
100de2a71b
add support for editing headgear, clothes and shoes, seperate into it's own tab 2026-06-27 19:46:06 +02:00
CrafterPika
2d900b0cae
allways set currently selected weapon as default in ui 2026-06-27 18:38:56 +02:00
CrafterPika
0c56eb8b89
fix wayland and allow save editing of equipped weapon 2026-06-27 08:36:30 +02:00
d44aebe7f8 add svg 2026-05-30 09:22:59 +02:00
10 changed files with 25872 additions and 9 deletions

28
Func.cs
View file

@ -50,7 +50,7 @@ namespace Func {
return "0";
}
} else {
HttpResponseMessage response = await client.GetAsync($"https://account.spfn.net/v1/api/admin/mapped_ids?input_type=pid&output_type=user_id&input={pid}");
HttpResponseMessage response = await client.GetAsync($"https://account.spbr.net/v1/api/admin/mapped_ids?input_type=pid&output_type=user_id&input={pid}");
if (response.IsSuccessStatusCode) {
string content = await response.Content.ReadAsStringAsync();
XDocument doc = XDocument.Parse(content);
@ -200,5 +200,31 @@ namespace Func {
return "Game not fully loaded yet...";
}
}
public static string EquippedGear(string slot) {
try {
var p_SaveDataMgr = Program.readUInt32((uint)(Program.readUInt32(SaveEditor.SAVEDATAMGR_ROOT_PTR) + 0xC));
switch (slot.ToLower()) {
case "headgear":
return $"{Program.readUInt32((uint)(p_SaveDataMgr + 0x188))}";
case "clothes":
return $"{Program.readUInt32((uint)(p_SaveDataMgr + 0x180))}";
case "shoes":
return $"{Program.readUInt32((uint)(p_SaveDataMgr + 0x184))}";
case "weapon":
return $"{Program.readUInt32((uint)(p_SaveDataMgr + 0x18C))}";
default:
return "";
}
} catch {
return "Game not fully loaded yet...";
}
}
}
}

View file

@ -72,9 +72,9 @@ namespace ModMenu {
public static bool IsWayland() {
string runtimeDir = Environment.GetEnvironmentVariable("XDG_RUNTIME_DIR");
if (string.IsNullOrEmpty(runtimeDir)) return false;
if (string.IsNullOrEmpty(runtimeDir) || !Directory.Exists(runtimeDir)) return false;
return File.Exists(Path.Combine(runtimeDir, "wayland-0"));
return Directory.EnumerateFiles(runtimeDir, "wayland-*").Any();
}
[STAThread]
@ -188,7 +188,7 @@ namespace ModMenu {
Console.WriteLine($"Found target process: {targetProcess.ProcessName} (PID: {pid})");
if (cbase != 0) {
Console.WriteLine("SplatTool v3.2.0 by CrafterPika");
Console.WriteLine("SplatTool v3.2.1 by CrafterPika");
Console.WriteLine("Special Thanks: Winterberry, Javi.ig and Tombuntu, KittenTM.");
cbaseCorrected = (Program.cbase + 0xE000000) - 0x10000000;

View file

@ -153,6 +153,30 @@ namespace ModMenu {
Program.writeUInt32((uint)(p_save_start + 0xA5B4), amount);
}
public static void ChangeEquippedGear(uint id, string slot) {
var p_save_start = Program.readUInt32((uint)(Program.readUInt32(SAVEDATAMGR_ROOT_PTR) + 0xC));
switch (slot.ToLower()) {
case "headgear":
Program.writeUInt32((uint)(p_save_start + 0x188), id);
return;
case "clothes":
Program.writeUInt32((uint)(p_save_start + 0x180), id);
return;
case "shoes":
Program.writeUInt32((uint)(p_save_start + 0x184), id);
return;
case "weapon":
Program.writeUInt32((uint)(p_save_start + 0x18C), id);
return;
default:
return;
}
}
private static T ByteArrayToStructure<T>(byte[] bytes) where T : struct {
GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
try {

View file

@ -1 +1 @@
3.2.0
3.2.1

View file

@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.2.0</string>
<string>3.2.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>

25536
assets/SplatTool.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -22,6 +22,10 @@ namespace ModMenu {
public static uint Level;
public static uint Cash;
public static uint SeaSnails;
public static uint HeadgearID;
public static uint ClothesID;
public static uint ShoesID;
public static uint WeaponSetID;
public static SessionData session = new SessionData();
static WorkThread sessiondIdThread = new WorkThread(() => {
Codes.forceSessiondId(sessionId);
@ -45,12 +49,25 @@ namespace ModMenu {
Thread.Sleep(5000);
SplatTelemetry.SendTelemetry();
});
static WorkThread HeadgearChangeThread = new WorkThread(() => {
SaveEditor.ChangeEquippedGear(HeadgearID, "headgear");
});
static WorkThread ClothesChangeThread = new WorkThread(() => {
SaveEditor.ChangeEquippedGear(ClothesID, "clothes");
});
static WorkThread ShoesChangeThread = new WorkThread(() => {
SaveEditor.ChangeEquippedGear(ShoesID, "shoes");
});
static WorkThread WeaponChangeThread = new WorkThread(() => {
SaveEditor.ChangeEquippedGear(WeaponSetID, "weapon");
});
public static string RunCode(ModMenuRequest data) {
if (data?.action == null) return "0";
switch (data.action) {
case "cbase":
return $"Cemu Base: 0x{Program.cbase:X} (0x{Program.cbaseCorrected:X})<br><br>Total Wins: {Codes.TotalWins()}<br>Total Losses: {Codes.TotalLoss()}<br><br>Thread Status:<br>- Write Gear: {WriteGear.Status.ToString()}<br>- Telemetry: {TelemetryThread.Status.ToString()}<br>- Change Gender: {ChangeGender.Status.ToString()}<br>- Change Level: {ChangeLevel.Status.ToString()}<br>- Change Cash: {ChangeCash.Status.ToString()}<br>- Change Sea Snails: {ChangeSeaSnails.Status.ToString()}";
return $"Cemu Base: 0x{Program.cbase:X} (0x{Program.cbaseCorrected:X})<br><br>Total Wins: {Codes.TotalWins()}<br>Total Losses: {Codes.TotalLoss()}<br>Equipped Headgear: {Codes.EquippedGear("headgear")}<br>Equipped Clothes: {Codes.EquippedGear("clothes")}<br>Equipped Shoes: {Codes.EquippedGear("shoes")}<br>Equipped Weapon: {Codes.EquippedGear("weapon")}<br><br>Thread Status:<br>- Write Gear: {WriteGear.Status.ToString()}<br>- Telemetry: {TelemetryThread.Status.ToString()}<br>- Change Gender: {ChangeGender.Status.ToString()}<br>- Change Level: {ChangeLevel.Status.ToString()}<br>- Change Cash: {ChangeCash.Status.ToString()}<br>- Change Sea Snails: {ChangeSeaSnails.Status.ToString()}<br>- Change Headgear: {HeadgearChangeThread.Status.ToString()}<br>- Change Clothes: {ClothesChangeThread.Status.ToString()}<br>- Change Shoes: {ShoesChangeThread.Status.ToString()}<br>- Change Weapon: {WeaponChangeThread.Status.ToString()}";
case "sessiondata":
return Codes.GetSessionData();
@ -130,6 +147,49 @@ namespace ModMenu {
HandleThread(TelemetryThread);
return "1";
case "HeadgearChange":
HeadgearID = UInt32.Parse(data.settings[0]);
HandleThread(HeadgearChangeThread);
return "1";
case "HeadgearChangeApply":
HeadgearID = UInt32.Parse(data.settings[0]);
return "1";
case "ClothesChange":
ClothesID = UInt32.Parse(data.settings[0]);
HandleThread(ClothesChangeThread);
return "1";
case "ClothesChangeApply":
ClothesID = UInt32.Parse(data.settings[0]);
return "1";
case "ShoesChange":
ShoesID = UInt32.Parse(data.settings[0]);
HandleThread(ShoesChangeThread);
return "1";
case "ShoesChangeApply":
ShoesID = UInt32.Parse(data.settings[0]);
return "1";
case "WepChange":
WeaponSetID = UInt32.Parse(data.settings[0]);
HandleThread(WeaponChangeThread);
return "1";
case "WepChangeApply":
WeaponSetID = UInt32.Parse(data.settings[0]);
return "1";
case "AllEquipment":
string headgearID = Codes.EquippedGear("headgear");
string clothesID = Codes.EquippedGear("clothes");
string shoesID = Codes.EquippedGear("shoes");
string weaponId = Codes.EquippedGear("weapon");
return $"{{\"EquippedHeadgearId\": \"{headgearID}\", \"EquippedClothesId\": \"{clothesID}\", \"EquippedShoesId\": \"{shoesID}\", \"EquippedWepId\": \"{weaponId}\"}}";
default:
return "Not Found";
}

View file

@ -355,5 +355,98 @@
"109": "Ink Resistance Up",
"110": "Stealth Jump",
"111": "S_Abillity_Locked"
},
"WeaponSetIds": {
"1000": "Sploosh-o-matic",
"1001": "Neo Sploosh-o-matic",
"1002": "Sploosh-o-matic 7",
"1010": "Splattershot Jr.",
"1011": "Custom Splattershot Jr.",
"1020": "Splash-o-matic",
"1021": "Neo Splash-o-matic",
"1030": "Aerospray MG",
"1031": "Aerospray RG",
"1032": "Aerospray PG",
"1040": "Splattershot",
"1041": "Tentatek Splattershot",
"1042": "Wasabi Splattershot",
"1045": "Hero Shot Replica",
"1046": "Octoshot Replica",
"1050": ".52 Gal",
"1051": ".52 Gal Deco",
"1060": "N-ZAP '85",
"1061": "N-ZAP '89",
"1062": "N-ZAP '83",
"1070": "Splattershot Pro",
"1071": "Forge Splattershot Pro",
"1072": "Berry Splattershot Pro",
"1080": ".96 Gal",
"1081": ".96 Gal Deco",
"1090": "Dual Squelcher",
"1091": "Custom Dual Squelcher",
"1100": "Jet Squelcher",
"1101": "Custom Jet Squelcher",
"1110": "Luna Blaster",
"1111": "Luna Blaster Neo",
"1120": "Blaster",
"1121": "Custom Blaster",
"1130": "Range Blaster",
"1131": "Custom Range Blaster",
"1132": "Grim Range Blaster",
"1140": "Rapid Blaster",
"1141": "Rapid Blaster Deco",
"1150": "Rapid Blaster Pro",
"1151": "Rapid Blaster Pro Deco",
"1160": "L-3 Nozzlenose",
"1161": "L-3 Nozzlenose D",
"1170": "H-3 Nozzlenose",
"1171": "H-3 Nozzlenose D",
"1172": "Cherry H-3 Nozzlenose",
"2000": "Carbon Roller",
"2001": "Carbon Roller Deco",
"2010": "Splat Roller",
"2011": "Krak-On Splat Roller",
"2012": "CoroCoro Splat Roller",
"2015": "Hero Roller Replica",
"2020": "Dynamo Roller",
"2021": "Gold Dynamo Roller",
"2022": "Tempered Dynamo Roller",
"2030": "Inkbrush",
"2031": "Inkbrush Nouveau",
"2032": "Permanent Inkbrush",
"2040": "Octobrush",
"2041": "Octobrush Nouveau",
"3000": "Slosher",
"3001": "Slosher Deco",
"3002": "Soda Slosher",
"3010": "Tri-Slosher",
"3011": "Tri-Slosher Nouveau",
"3020": "Sloshing Machine",
"3021": "Sloshing Machine Neo",
"4000": "Classic Squiffer",
"4001": "New Squiffer",
"4002": "Fresh Squiffer",
"4010": "Splat Charger",
"4011": "Kelp Splat Charger",
"4012": "Bento Splat Charger",
"4015": "Hero Charger Replica",
"4020": "Splatterscope",
"4021": "Kelp Splatterscope",
"4022": "Bento Splatterscope",
"4030": "E-liter 3K",
"4031": "Custom E-liter 3K",
"4040": "E-liter 3K Scope",
"4041": "Custom E-liter 3K Scope",
"4050": "Bamboozler 14 Mk I",
"4051": "Bamboozler 14 Mk II",
"4052": "Bamboozler 14 Mk III",
"5000": "Mini Splatling",
"5001": "Zink Mini Splatling",
"5002": "Refurbished Mini Splatling",
"5010": "Heavy Splatling",
"5011": "Heavy Splatling Deco",
"5012": "Heavy Splatling Remix",
"5020": "Hydra Splatling",
"5021": "Custom Hydra Splatling"
}
}

View file

@ -14,6 +14,7 @@
<div class="tab-menu">
<button class="tab-link active" onclick="openTab(event, 'Tab1')">Player & Lobby</button>
<button class="tab-link" onclick="openTab(event, 'Tab8')">Save Editor</button>
<button class="tab-link" onclick="openTab(event, 'Tab9')">Equipment</button>
<button class="tab-link" onclick="openTab(event, 'Tab4')">Utilities</button>
<button class="tab-link" onclick="openTab(event, 'Tab5')">PID Grabber</button>
<button class="tab-link" onclick="openTab(event, 'Tab6')">Stats</button>
@ -121,6 +122,55 @@
</div>
</div>
<div id="Tab9" class="tab-content">
<div class="profile-card">
<div class="input-row">
<div class="label-stack">
<span class="input-label">Change Headgear:</span>
<span class="input-note">Changes Equipped Headgear.</span>
</div>
<div class="input-group">
<select id="headgear-sets" class="dropdown" style="flex: 1;"></select>
<button class="action-btn" onclick="changeHeadgear()">Toggle Thread</button>
<button class="action-btn" onclick="changeHeadgearApply()">Apply</button>
</div>
</div>
<div class="input-row">
<div class="label-stack">
<span class="input-label">Change Clothes:</span>
<span class="input-note">Changes Equipped Clothes.</span>
</div>
<div class="input-group">
<select id="clothes-sets" class="dropdown" style="flex: 1;"></select>
<button class="action-btn" onclick="changeClothes()">Toggle Thread</button>
<button class="action-btn" onclick="changeClothesApply()">Apply</button>
</div>
</div>
<div class="input-row">
<div class="label-stack">
<span class="input-label">Change Shoes:</span>
<span class="input-note">Changes Equipped Shoes.</span>
</div>
<div class="input-group">
<select id="shoes-sets" class="dropdown" style="flex: 1;"></select>
<button class="action-btn" onclick="changeShoes()">Toggle Thread</button>
<button class="action-btn" onclick="changeShoesApply()">Apply</button>
</div>
</div>
<div class="input-row">
<div class="label-stack">
<span class="input-label">Change Weapon:</span>
<span class="input-note">Changes Equipped Weapon.</span>
</div>
<div class="input-group">
<select id="weapon-sets" class="dropdown" style="flex: 1;"></select>
<button class="action-btn" onclick="changeWeapon()">Toggle Thread</button>
<button class="action-btn" onclick="changeWeaponApply()">Apply</button>
</div>
</div>
</div>
</div>
<div id="Tab4" class="tab-content">
<div class="profile-card">
<div class="input-row">
@ -177,7 +227,7 @@
<div id="Tab7" class="tab-content">
<div class="profile-card">
<h3 style="margin-top: 0;">SplatTool v3.2.0</h3>
<h3 style="margin-top: 0;">SplatTool v3.2.1</h3>
<div>Written by CrafterPika</div>
<div>Special Thanks: Winterberry, Javi.ig, Tombuntu, KittenTM, apoplexy</div>
</div>

View file

@ -73,6 +73,54 @@ function populateAbilities() {
});
}
function populateEquipment() {
const weapons = document.getElementById("weapon-sets");
const headgear = document.getElementById("headgear-sets");
const clothes = document.getElementById("clothes-sets");
const shoes = document.getElementById("shoes-sets");
weapons.innerHTML = '';
for (const [val, name] of Object.entries(gearData.WeaponSetIds)) {
const opt = document.createElement('option');
opt.value = val;
opt.textContent = name;
weapons.appendChild(opt);
}
headgear.innerHTML = '';
for (const [val, name] of Object.entries(gearData.headgear)) {
const opt = document.createElement('option');
opt.value = val;
opt.textContent = name;
headgear.appendChild(opt);
}
clothes.innerHTML = '';
for (const [val, name] of Object.entries(gearData.clothes)) {
const opt = document.createElement('option');
opt.value = val;
opt.textContent = name;
clothes.appendChild(opt);
}
shoes.innerHTML = '';
for (const [val, name] of Object.entries(gearData.shoes)) {
const opt = document.createElement('option');
opt.value = val;
opt.textContent = name;
shoes.appendChild(opt);
}
sendToCSharp("AllEquipment");
}
function warnUser() {
if (!sessionStorage.getItem("warnShown")) {
alert("DO NOT USE ANY OF THESE BEFORE THE TITLE SCREEN LOADED OR YOU WILL WIPE YOUR SAVE FILE YOU HAVE BEEN WARNED!!!");
sessionStorage.setItem('warnShown', 'true');
}
}
window.external.receiveMessage(message => {
// console.log(message)
if (message.startsWith("Cemu Base:")) {
@ -85,7 +133,20 @@ window.external.receiveMessage(message => {
try {
const data = JSON.parse(message);
//console.log("Parsed Data:", data);
console.log("Parsed Data:", data);
if (data.EquippedWepId !== undefined) {
const weapons = document.getElementById("weapon-sets");
const headgear = document.getElementById("headgear-sets");
const clothes = document.getElementById("clothes-sets");
const shoes = document.getElementById("shoes-sets");
weapons.value = data.EquippedWepId;
headgear.value = data.EquippedHeadgearId;
clothes.value = data.EquippedClothesId;
shoes.value = data.EquippedShoesId;
return;
}
const container = document.getElementById("pid-display");
if (data.Players) {
@ -212,6 +273,11 @@ function openTab(evt, tabName) {
if (tabName === 'Tab6') {
keepStatsUpdated = true;
updateStatsPage();
} else if (tabName == 'Tab8') {
warnUser()
} else if (tabName == 'Tab9') {
warnUser()
populateEquipment()
} else {
keepStatsUpdated = false;
}
@ -227,3 +293,11 @@ function SeaSnails() { sendToCSharp("ChangeSeaSnails", [document.getElementById(
function execute(cheat) { sendToCSharp(cheat); }
function fetchCemuBase() { sendToCSharp("cbase"); }
function fetchPids() { sendToCSharp("sessiondata"); }
function changeHeadgear() { sendToCSharp("HeadgearChange", [document.getElementById("headgear-sets").value]); }
function changeHeadgearApply() { sendToCSharp("HeadgearChangeApply", [document.getElementById("headgear-sets").value]); }
function changeClothes() { sendToCSharp("ClothesChange", [document.getElementById("clothes-sets").value]); }
function changeClothesApply() { sendToCSharp("ClothesChangeApply", [document.getElementById("clothes-sets").value]); }
function changeShoes() { sendToCSharp("ShoesChange", [document.getElementById("shoes-sets").value]); }
function changeShoesApply() { sendToCSharp("ShoesChangeApply", [document.getElementById("shoes-sets").value]); }
function changeWeapon() { sendToCSharp("WepChange", [document.getElementById("weapon-sets").value]); }
function changeWeaponApply() { sendToCSharp("WepChangeApply", [document.getElementById("weapon-sets").value]); }