From 154d7fd099d9bef2a4d041ba0f1b16acd271e5a3 Mon Sep 17 00:00:00 2001 From: iamc24 <42425100+iamc24@users.noreply.github.com> Date: Sun, 27 Jul 2025 16:11:58 -0700 Subject: [PATCH 1/4] Update debugcheatstools.user.js Add underground items and miscellaneous items as tabs; Miscellaneous includes consumables, battle items, eggs, dream orbs, wishing pieces; Move vitamins to miscellaneous --- custom/debugcheatstools.user.js | 161 +++++++++++++++++++++++++++----- 1 file changed, 136 insertions(+), 25 deletions(-) diff --git a/custom/debugcheatstools.user.js b/custom/debugcheatstools.user.js index 6ffab17..59c734a 100644 --- a/custom/debugcheatstools.user.js +++ b/custom/debugcheatstools.user.js @@ -236,6 +236,7 @@ function loadQuestLines() { } function loadEventHandlers() { + // currency for (let i = 0; i < Object.keys(GameConstants.Currency).filter(isNaN).length; i++) { document.getElementById("currency_" + i).addEventListener("click", gainCurrency); @@ -269,13 +270,6 @@ function loadEventHandlers() { }); } - // vitamins - for (let i = 0; i < Object.keys(GameConstants.VitaminType).filter(isNaN).length; i++) { - document.getElementById("vitamins_" + i).addEventListener("click", function () { - player.gainItem(ItemList[this.getAttribute("vitamin")].name, parseInt(document.getElementById('inputAddVitamins').value || 0), true); - }); - } - // heldItems HeldItem.getSortedHeldItems().attack.items.forEach((itm, idx) => { document.getElementById("attackhelditems_" + idx).addEventListener("click", function () { @@ -303,6 +297,49 @@ function loadEventHandlers() { }); }); + // underground items + for (let i = 0; i < Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem').filter(isNaN).length; i++) { + document.getElementById("undergrounditem_" + i).addEventListener("click", function () { + player.gainItem(ItemList[this.getAttribute("item")].name, parseInt(document.getElementById('inputAddUndergroundItems').value || 0), true); + }); + } + + // miscellaneous items + // vitamins + for (let i = 0; i < Object.keys(GameConstants.VitaminType).filter(isNaN).length; i++) { + document.getElementById("vitamins_" + i).addEventListener("click", function () { + player.gainItem(ItemList[this.getAttribute("vitamin")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + }); + } + // consumables + for (let i = 0; i < Object.keys(GameConstants.ConsumableType).filter(isNaN).length; i++) { + document.getElementById("consumableitems_" + i).addEventListener("click", function () { + player.gainItem(ItemList[this.getAttribute("item")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + }); + } + // battle items + for (let i = 0; i < Object.keys(GameConstants.BattleItemType).filter(isNaN).length; i++) { + document.getElementById("battleitems_" + i).addEventListener("click", function () { + player.gainItem(ItemList[this.getAttribute("item")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + }); + } + // dream orbs + for (let i = 0; i < App.game.dreamOrbController.orbs.filter(isNaN).length; i++) { + document.getElementById("orbs_" + i).addEventListener("click", function () { + GameHelper.incrementObservable(App.game.dreamOrbController.orbs[i].amount, parseInt(document.getElementById('inputAddMiscItems').value || 0)); + }); + } + // eggs + for (let i = 0; i < Object.keys(GameConstants.EggItemType).filter(isNaN).length; i++) { + document.getElementById("eggs_" + i).addEventListener("click", function () { + player.gainItem(ItemList[this.getAttribute("egg")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + }); + } + // wishing piece + document.getElementById("wishingpiece").addEventListener("click", function () { + player.gainItem("Wishing_Piece", parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + }); + // pokedex document.getElementById("pokedex").children[1].addEventListener("click", loadPkdx); document.getElementById("pkdxNameFilter").addEventListener("input", filterPkdx); @@ -316,7 +353,6 @@ function loadEventHandlers() { pkElement.children[5].addEventListener("click", gainPkrs); } } - // questline document.getElementById("questlines").children[1].addEventListener("click", loadQuestLines); document.getElementById("questLineFilter").addEventListener("change", filterQuestLine); @@ -353,8 +389,9 @@ function initSaveEditor() { - - + + + @@ -379,14 +416,18 @@ function initSaveEditor() {

On click add evolution items (input)

-
-

On click add vitamins (input)

- -

On click add held items (input)

+
+

On click add underground items (input)

+ +
+
+

On click add held items (input)

+ +

You can break your game, please backup!
Do not complete pokedex from another region if you are not in the region you will not be able to go to the next region!

@@ -528,17 +569,6 @@ function initSaveEditor() { `; } - // vitamins - for (let i = 0; i < Object.keys(GameConstants.VitaminType).filter(isNaN).length; i++) { - const itm = GameConstants.VitaminType[i]; - modalBody.querySelector('#vitamins').innerHTML += ` -
- -
${itm}
-
- `; - } - // heldItems HeldItem.getSortedHeldItems().attack.items.forEach((itm, idx) => { const itmPretty = itm.name.replaceAll('_', ' '); @@ -586,6 +616,87 @@ function initSaveEditor() { `; }); + // underground items + for (let i = 0; i < Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem').filter(isNaN).length; i++) { + const itm = Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem')[i].name; + const itmPretty = itm.replaceAll('_', ' ').toLowerCase().replace(/\b\w/g, function(char) { + return char.toUpperCase(); + }); + const path = itmPretty.slice(-6) == "Fossil" || itmPretty == "Old Amber" ? 'breeding/'+itmPretty : 'items/underground/'+itmPretty; + modalBody.querySelector('#undergroundItems').innerHTML += ` +
+ +
${itmPretty}
+
+ `; + } + + // miscellaneous items + // vitamins + for (let i = 0; i < Object.keys(GameConstants.VitaminType).filter(isNaN).length; i++) { + const itm = GameConstants.VitaminType[i]; + modalBody.querySelector('#miscItems').innerHTML += ` +
+ +
${itm}
+
+ `; + } + // consumables + for (let i = 0; i < Object.keys(GameConstants.ConsumableType).filter(isNaN).length; i++) { + const itm = GameConstants.ConsumableType[i]; + const itmPretty = itm.replaceAll('_', ' '); + modalBody.querySelector('#miscItems').innerHTML += ` +
+ +
${itmPretty}
+
+ `; + } + // battle items + for (let i = 0; i < Object.keys(GameConstants.BattleItemType).filter(isNaN).length; i++) { + const itm = Object.keys(GameConstants.BattleItemType)[i]; + const itmPretty = i > 1 ? itm.replaceAll('_', ' ').toLowerCase().replace(/\b\w/g, function(char) { + return char.toUpperCase(); + }) : itm; + modalBody.querySelector('#miscItems').innerHTML += ` +
+ +
${itmPretty}
+
+ `; + } + // dream orbs + for (let i = 0; i < App.game.dreamOrbController.orbs.filter(isNaN).length; i++) { + const itm = App.game.dreamOrbController.orbs[i].color; + modalBody.querySelector('#miscItems').innerHTML += ` +
+ +
${itm} Orb
+
+ `; + } + // eggs + for (let i = 0; i < Object.keys(GameConstants.EggItemType).filter(isNaN).length; i++) { + const itm = GameConstants.EggItemType[i]; + const itmPretty = itm.replaceAll('_', ' ').toLowerCase().replace(/\b\w/g, function(char) { + return char.toUpperCase(); + }); + modalBody.querySelector('#miscItems').innerHTML += ` +
+ +
${itmPretty}
+
+ `; + } + // wishing piece + modalBody.querySelector('#miscItems').innerHTML += ` +
+ +
Wishing Piece
+
+ `; + // pokedex const pkdxRegFilt = modalBody.querySelector('#pkdxRegionFilter'); for (let i = 0; i <= player.highestRegion(); i++) { From 676312f800ff6c286f3045c1822872e5e512df97 Mon Sep 17 00:00:00 2001 From: iamc24 <42425100+iamc24@users.noreply.github.com> Date: Wed, 30 Jul 2025 16:41:05 -0700 Subject: [PATCH 2/4] Update debugcheatstools.user.js Change berry tab to farm items, move in tab order, add mulch and shovels; --- custom/debugcheatstools.user.js | 104 ++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 33 deletions(-) diff --git a/custom/debugcheatstools.user.js b/custom/debugcheatstools.user.js index 5fd2a32..e9da75f 100644 --- a/custom/debugcheatstools.user.js +++ b/custom/debugcheatstools.user.js @@ -233,7 +233,6 @@ function loadQuestLines() { } function loadEventHandlers() { - // currency for (let i = 0; i < Object.keys(GameConstants.Currency).filter(isNaN).length; i++) { document.getElementById("currency_" + i).addEventListener("click", gainCurrency); @@ -253,13 +252,6 @@ function loadEventHandlers() { }); } - // berries - for (let i = 0; i < Object.keys(BerryType).filter(isNaN).length - 1; i++) { - document.getElementById("berries_" + i).addEventListener("click", function () { - App.game.farming.gainBerry(i, parseInt(document.getElementById('inputAddBerries').value || 0), true); - }); - } - // evolution items for (let i = 0; i < Object.keys(GameConstants.StoneType).filter(isNaN).length - 1; i++) { document.getElementById("evolutionitems_" + i).addEventListener("click", function () { @@ -267,10 +259,10 @@ function loadEventHandlers() { }); } - // heldItems + // held items HeldItem.getSortedHeldItems().attack.items.forEach((itm, idx) => { document.getElementById("attackhelditems_" + idx).addEventListener("click", function () { - HeldItem.getSortedHeldItems().attack.items[idk].gain(parseInt(document.getElementById('inputAddHeldItems').value || 0)); + HeldItem.getSortedHeldItems().attack.items[idx].gain(parseInt(document.getElementById('inputAddHeldItems').value || 0)); }); }); HeldItem.getSortedHeldItems().typeRestricted.items.forEach((itm, idx) => { @@ -294,10 +286,31 @@ function loadEventHandlers() { }); }); + // farm items + // mulch + for (let i = 0; i < Object.keys(MulchType).filter(isNaN).length - 1; i++) { + document.getElementById("mulch_" + i).addEventListener("click", function () { + GameHelper.incrementObservable(App.game.farming.mulchList[i], parseInt(document.getElementById('inputAddFarmItems').value || 0)); + }); + } + // shovels + document.getElementById("berry_shovel").addEventListener("click", function () { + GameHelper.incrementObservable(App.game.farming.shovelAmt, parseInt(document.getElementById('inputAddFarmItems').value || 0)); + }); + document.getElementById("mulch_shovel").addEventListener("click", function () { + GameHelper.incrementObservable(App.game.farming.mulchShovelAmt, parseInt(document.getElementById('inputAddFarmItems').value || 0)); + }); + // berries + for (let i = 0; i < Object.keys(BerryType).filter(isNaN).length - 1; i++) { + document.getElementById("berries_" + i).addEventListener("click", function () { + App.game.farming.gainBerry(i, parseInt(document.getElementById('inputAddFarmItems').value || 0), true); + }); + } + // underground items for (let i = 0; i < Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem').filter(isNaN).length; i++) { document.getElementById("undergrounditem_" + i).addEventListener("click", function () { - player.gainItem(ItemList[this.getAttribute("item")].name, parseInt(document.getElementById('inputAddUndergroundItems').value || 0), true); + player.gainItem(this.getAttribute("item"), parseInt(document.getElementById('inputAddUndergroundItems').value || 0), true); }); } @@ -305,19 +318,19 @@ function loadEventHandlers() { // vitamins for (let i = 0; i < Object.keys(GameConstants.VitaminType).filter(isNaN).length; i++) { document.getElementById("vitamins_" + i).addEventListener("click", function () { - player.gainItem(ItemList[this.getAttribute("vitamin")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + player.gainItem(this.getAttribute("vitamin"), parseInt(document.getElementById('inputAddMiscItems').value || 0), true); }); } // consumables for (let i = 0; i < Object.keys(GameConstants.ConsumableType).filter(isNaN).length; i++) { document.getElementById("consumableitems_" + i).addEventListener("click", function () { - player.gainItem(ItemList[this.getAttribute("item")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + player.gainItem(this.getAttribute("item"), parseInt(document.getElementById('inputAddMiscItems').value || 0), true); }); } // battle items for (let i = 0; i < Object.keys(GameConstants.BattleItemType).filter(isNaN).length; i++) { document.getElementById("battleitems_" + i).addEventListener("click", function () { - player.gainItem(ItemList[this.getAttribute("item")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + player.gainItem(this.getAttribute("item"), parseInt(document.getElementById('inputAddMiscItems').value || 0), true); }); } // dream orbs @@ -329,7 +342,7 @@ function loadEventHandlers() { // eggs for (let i = 0; i < Object.keys(GameConstants.EggItemType).filter(isNaN).length; i++) { document.getElementById("eggs_" + i).addEventListener("click", function () { - player.gainItem(ItemList[this.getAttribute("egg")].name, parseInt(document.getElementById('inputAddMiscItems').value || 0), true); + player.gainItem(this.getAttribute("egg"), parseInt(document.getElementById('inputAddMiscItems').value || 0), true); }); } // wishing piece @@ -388,9 +401,9 @@ function initSaveEditor() { - + @@ -409,10 +422,6 @@ function initSaveEditor() {

On click add pokeballs (input)

-
-

On click add berries (input)

- -

On click add evolution items (input)

@@ -421,6 +430,10 @@ function initSaveEditor() {

On click add held items (input)

+
+

On click add farm items (input)

+ +

On click add underground items (input)

@@ -547,17 +560,6 @@ function initSaveEditor() { `; } - // berries - for (let i = 0; i < Object.keys(BerryType).filter(isNaN).length - 1; i++) { - const itm = BerryType[i]; - modalBody.querySelector('#berries').innerHTML += ` -
- -
${itm}
-
- `; - } - // evolution items for (let i = 0; i < Object.keys(GameConstants.StoneType).filter(isNaN).length - 1; i++) { const itm = GameConstants.StoneType[i]; @@ -565,14 +567,14 @@ function initSaveEditor() { return char.toUpperCase(); }); modalBody.querySelector('#evolutionItems').innerHTML += ` -
+
${itmPretty}
`; } - // heldItems + // held items HeldItem.getSortedHeldItems().attack.items.forEach((itm, idx) => { const itmPretty = itm.name.replaceAll('_', ' '); modalBody.querySelector('#heldItems').innerHTML += ` @@ -619,6 +621,42 @@ function initSaveEditor() { `; }); + // farm items + // mulch + for (let i = 0; i < Object.keys(MulchType).filter(isNaN).length - 1; i++) { + const itm = MulchType[i]; + const itmPretty = itm.replaceAll('_', ' '); + modalBody.querySelector('#farmItems').innerHTML += ` +
+ +
${itmPretty}
+
+ `; + } + // shovels + modalBody.querySelector('#farmItems').innerHTML += ` +
+ +
Berry Shovel
+
+ `; + modalBody.querySelector('#farmItems').innerHTML += ` +
+ +
Mulch Shovel
+
+ `; + // berries + for (let i = 0; i < Object.keys(BerryType).filter(isNaN).length - 1; i++) { + const itm = BerryType[i]; + modalBody.querySelector('#farmItems').innerHTML += ` +
+ +
${itm} Berry
+
+ `; + } + // underground items for (let i = 0; i < Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem').filter(isNaN).length; i++) { const itm = Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem')[i].name; From 566e34ce6ea242cad18ad674b8edc42d3c12ef3e Mon Sep 17 00:00:00 2001 From: iamc24 <42425100+iamc24@users.noreply.github.com> Date: Wed, 30 Jul 2025 16:49:42 -0700 Subject: [PATCH 3/4] Update debugcheatstools.user.js Remove unused custom html attribute that got accidentally re-added; Forgot to add that the previous commit simplified some event handlers and fixed a merge issue to the commit description --- custom/debugcheatstools.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/debugcheatstools.user.js b/custom/debugcheatstools.user.js index e9da75f..3359bdc 100644 --- a/custom/debugcheatstools.user.js +++ b/custom/debugcheatstools.user.js @@ -567,7 +567,7 @@ function initSaveEditor() { return char.toUpperCase(); }); modalBody.querySelector('#evolutionItems').innerHTML += ` -
+
${itmPretty}
From 71f48a3e9278783fce2fac2617621451fe09e94d Mon Sep 17 00:00:00 2001 From: iamc24 <42425100+iamc24@users.noreply.github.com> Date: Wed, 30 Jul 2025 17:26:43 -0700 Subject: [PATCH 4/4] Update debugcheatstools.user.js Add tab for mega stones; Fix some indentation issues; Revert previous commit b/c it actually was used and needed, and I misremembered --- custom/debugcheatstools.user.js | 43 +++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/custom/debugcheatstools.user.js b/custom/debugcheatstools.user.js index 3359bdc..e22fe28 100644 --- a/custom/debugcheatstools.user.js +++ b/custom/debugcheatstools.user.js @@ -350,6 +350,13 @@ function loadEventHandlers() { player.gainItem("Wishing_Piece", parseInt(document.getElementById('inputAddMiscItems').value || 0), true); }); + // mega stones + for(let i = 0; i < Object.keys(GameConstants.MegaStoneType).filter(isNaN).length; i == 4 ? i +=2 : i++) { + document.getElementById("mega_stone_" + i).addEventListener("click", function () { + player.itemList[this.getAttribute("stone")](1); + }); + } + // pokedex document.getElementById("pokedex").children[1].addEventListener("click", loadPkdx); document.getElementById("pkdxNameFilter").addEventListener("input", filterPkdx); @@ -406,6 +413,7 @@ function initSaveEditor() { + @@ -442,6 +450,9 @@ function initSaveEditor() {

On click add held items (input)

+
+

On click add mega stone

+

You can break your game, please backup!
Do not complete pokedex from another region if you are not in the region you will not be able to go to the next region!

@@ -564,10 +575,10 @@ function initSaveEditor() { for (let i = 0; i < Object.keys(GameConstants.StoneType).filter(isNaN).length - 1; i++) { const itm = GameConstants.StoneType[i]; const itmPretty = itm.replaceAll('_', ' ').replace(/\b\w/g, function(char) { - return char.toUpperCase(); - }); + return char.toUpperCase(); + }); modalBody.querySelector('#evolutionItems').innerHTML += ` -
+
${itmPretty}
@@ -661,9 +672,9 @@ function initSaveEditor() { for (let i = 0; i < Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem').filter(isNaN).length; i++) { const itm = Object.values(ItemList).filter(itm => itm.constructor.name === 'TreasureItem')[i].name; const itmPretty = itm.replaceAll('_', ' ').toLowerCase().replace(/\b\w/g, function(char) { - return char.toUpperCase(); - }); - const path = itmPretty.slice(-6) == "Fossil" || itmPretty == "Old Amber" ? 'breeding/'+itmPretty : 'items/underground/'+itmPretty; + return char.toUpperCase(); + }); + const path = itmPretty.slice(-6) == "Fossil" || itmPretty == "Old Amber" ? 'breeding/'+itmPretty : 'items/underground/'+itmPretty; modalBody.querySelector('#undergroundItems').innerHTML += `
@@ -698,8 +709,8 @@ function initSaveEditor() { for (let i = 0; i < Object.keys(GameConstants.BattleItemType).filter(isNaN).length; i++) { const itm = Object.keys(GameConstants.BattleItemType)[i]; const itmPretty = i > 1 ? itm.replaceAll('_', ' ').toLowerCase().replace(/\b\w/g, function(char) { - return char.toUpperCase(); - }) : itm; + return char.toUpperCase(); + }) : itm; modalBody.querySelector('#miscItems').innerHTML += `
@@ -721,8 +732,8 @@ function initSaveEditor() { for (let i = 0; i < Object.keys(GameConstants.EggItemType).filter(isNaN).length; i++) { const itm = GameConstants.EggItemType[i]; const itmPretty = itm.replaceAll('_', ' ').toLowerCase().replace(/\b\w/g, function(char) { - return char.toUpperCase(); - }); + return char.toUpperCase(); + }); modalBody.querySelector('#miscItems').innerHTML += `
@@ -738,6 +749,18 @@ function initSaveEditor() {
`; + // mega stones + for(let i = 0; i < Object.keys(GameConstants.MegaStoneType).filter(isNaN).length; i == 4 ? i +=2 : i++) { + const itm = GameConstants.MegaStoneType[i]; + const itmPretty = itm.replaceAll('_', ' '); + modalBody.querySelector('#megaStones').innerHTML += ` +
+ +
${itmPretty}
+
+ `; + } + // pokedex const pkdxRegFilt = modalBody.querySelector('#pkdxRegionFilter'); for (let i = 0; i <= player.highestRegion(); i++) {