I have no idea how you figure this stuff out, but thank you. I uploaded another mod with that loop suggestion to force them to be holographic all the time. Appreciate it, made sure to credit you in my mods where you helped me out.
![Uber Geek :ugeek:](./images/smilies/icon_e_ugeek.gif)
I have no idea how you figure this stuff out, but thank you. I uploaded another mod with that loop suggestion to force them to be holographic all the time. Appreciate it, made sure to credit you in my mods where you helped me out.
All good, you're doing the real work out there making this actually useful for folks! Definitely give yourself the real credit here
I've been out for a bit, I'll take a whack at this to see if it's possible.now we just need to figure out how to change already gotten spirits to holo, or a way to make egg spirits holo as they come out, and we're good to go.
So this is what I figured out. If you want to change every spirit you have (both in your medallion and in your barn) shiny, you can run the following loop
Code: Select all
for (let i of runtime$jscomp$1._instancesByUid.values()) {
if (i._objectType._jsPropName == "spiritsJSON") {
console.log(i._objectType._jsPropName, i._sdkInst._data);
for (let spirit of i._sdkInst._data.spirits) {
spirit.isShiny = 1;
}
break;
}
}
Code: Select all
for (let i of runtime$jscomp$1._instancesByUid.values()) {
if (i._objectType._jsPropName == "spiritsJSON") {
console.log(i._objectType._jsPropName, i._sdkInst._data);
i._sdkInst._data.spirits[0].isShiny = 1;
break;
}
}
works a perfect treat! I'll explore more and poke around when I can. If you see anything you feel should be looked at though, by all means have a little fun experimenting. I 'think' I know whats needed for egg fields. like items, it has a spot for data on whats 'in' the egg. Long as that's set, it can force the egg to be specifically anything.leegao wrote: ↑Tue Oct 17, 2023 3:10 amCode: Select all
for (let i of runtime$jscomp$1._instancesByUid.values()) { if (i._objectType._jsPropName == "spiritsJSON") { console.log(i._objectType._jsPropName, i._sdkInst._data); for (let spirit of i._sdkInst._data.spirits) { spirit.isShiny = 1; } break; } }
Code: Select all
for (let i of runtime$jscomp$1._instancesByUid.values()) { if (i._objectType._jsPropName == "spiritsJSON") { console.log(i._objectType._jsPropName, i._sdkInst._data); i._sdkInst._data.spirits[0].isShiny = 1; break; } }
I did extract the file with nw.js but the package inside the folder only got couple of text and nothing else regarding info around the game mechanics and stuff, i only want to know info about how plants work and harvest time and all that could you upload the file or tell me what i did wrong?leegao wrote: ↑Wed Oct 04, 2023 9:40 pmHey folks,
I've been playing around with trying to RE this game a bit deeper. It turns out that it's pretty easy to do. It looks like the game was packaged up using NW.js. This means that there's a package.nw file in the game directory (a zip file, if you `file` it). Now according to [Link], you can actually extract this file into a folder also named `package.nw`, and the game will happily take it and continue to run out of that folder.
Now, `package.nw` contains all of the code/configuration for this game, which is then rendered through Chrome/NW as a WebGL game. Just going through this directory should help you figure out how to change item stats or trace through the code. However, if you're willing to use the Chrome devtools, you can actually change the game to start in debug mode, and give you a Chrome dev console to play around with the game internals.
To do this, change package.nw/package.json's chromium-args and remove the --disable-devtools argument. After this, launch the game, and press F12 to open the dev console.
It looks like this game is produced using the Construct 3 engine (I see a c3runtime.js), and the core game logic is obfuscated/minified in that file. There's some generic handlers in main.js, and there are a lot of json configs in the Data/ directory.
If you're still around, the developer has lovingly patched all of my cheaty mods. Intentionally or not, I'm not sure. But I can no longer find the place to paste javascript loops from before in your older posts.
Code: Select all
a=>{const b=a._GetNode(0),c=a._GetNode(1),d=a._GetNode(2),e=a._GetNode(3);return()=>and(and(Math.round(b.ExpInstVar()*(c.ExpObject()/(d.ExpObject()-16))),"/"),e.ExpInstVar())}
Code: Select all
if (i._objectType._jsPropName == "shopStockJSON") {
// console.log(i._objectType._jsPropName, i._sdkInst._data);
for (let profession in i._sdkInst._data) {
if (i._sdkInst._data.hasOwnProperty(profession)) {
if (profession == "Tavern") {
let eggs = ["eggFire", "eggWater", "eggIce", "eggElectric", "eggEarth", "eggPoison", "eggPsychic", "eggDark"];
for (let egg of eggs) {
i._sdkInst._data[profession][egg] = {
Quantity: 10,
Price: 1
};
}
}
for (let key in i._sdkInst._data[profession]) {
if (key === "randomCraftingRecipe") {
if (i._sdkInst._data[profession][key].Quantity == 1) { i._sdkInst._data[profession][key].Quantity = 99999; }
}
if (typeof i._sdkInst._data[profession][key] === 'object') {
if (i._sdkInst._data[profession][key].Price !== 1) { i._sdkInst._data[profession][key].Price = 1; }
}
}
}
}
//break;
} // fin shopStockJSON
Code: Select all
if (i._objectType._jsPropName == "inventoryArray" && i._sdkInst._arr && i._sdkInst._arr.length > 0) {
for (let j = 0; j <= 38; j++) {
if ( i._sdkInst._arr[j][1][0].includes("egg") && !/[a-zA-Z]/.test(i._sdkInst._arr[j][2][0]) ) {
let RandomSpirits;
if (i._sdkInst._arr[j][1][0] === "eggEarth") { RandomSpirits = ["Ankylo", "Brickhouse", "Coolslime", "Dusty", "Fluffox", "Gemlin", "Hopstraw", "Longlog", "Mumbleweed", "Oaken", "Pappus", "Punchypot", "Womr"]; }
if (i._sdkInst._arr[j][1][0] === "eggPoison") { RandomSpirits = ["Baebaeu", "Claudio", "Dropple", "Fishbo", "Flote", "Octopup", "Sandcrashle", "Snorcko", "Starsee", "Torble"]; }
if (i._sdkInst._arr[j][1][0] === "eggWater") { RandomSpirits = ["Birdbrain", "Emoshroom", "Marsha", "Radlad", "Ribbite", "Snaplant", "Taddle", "Trunkle"]; }
if (i._sdkInst._arr[j][1][0] === "eggElectric") { RandomSpirits = ["Armbot", "Bulbot", "Burgloon", "Capacibee", "Cumulo", "Sparky"]; }
if (i._sdkInst._arr[j][1][0] === "eggFire") { RandomSpirits = ["Bonefire", "Carkey", "Flamane", "Flambit", "Lucerna", "Prikli", "Sheemp", "Sinjin"]; }
if (i._sdkInst._arr[j][1][0] === "eggIce") { RandomSpirits = ["Bandicle", "Bonguin", "Sorbaton"]; }
if (i._sdkInst._arr[j][1][0] === "eggPsychic") { RandomSpirits = ["Beardini", "Lookachoo", "Loonylid", "Magicat", "Minoot", "Mystislime", "Posho", "Rablit", "Taro"]; }
if (i._sdkInst._arr[j][1][0] === "eggDark") { RandomSpirits = ["Arkeya", "Catsket", "Darkoffee", "Evileye", "Karyote", "Puppox", "Wolfbane"]; }
if (RandomSpirits) {
let randomIndex = Math.floor(Math.random() * RandomSpirits.length);
let randomSpirit = RandomSpirits[randomIndex];
// console.log("inventory test", randomSpirit);
// console.log(i._objectType._jsPropName, i._sdkInst._arr);
i._sdkInst._arr[j][2][0] = randomSpirit;
}
}
}
} // fin inventoryArray
Code: Select all
if (i._objectType._jsPropName == "spiritsJSON") {
// console.log(i._objectType._jsPropName, i._sdkInst._data);
if (i._sdkInst._data.spirits[0].Level < 54) {
for (let spirit of i._sdkInst._data.spirits) {
spirit.Level = 55;
spirit.Vitality = 25;
spirit.CurVitality = 25;
spirit.Power = 25;
spirit.CurPower = 25;
spirit.Speed = 25;
spirit.CurSpeed = 25;
spirit.Armor = 25;
spirit.MaxArmor = 25;
spirit.CurArmor = 25;
spirit.HP = 334;
spirit.CurHP = 334;
spirit.Vulnerabilities = "";
spirit.XP = 174999.06199998225;
spirit.CardUpgradePoints = 0;
spirit.StatUpgradePoints = 0;
}
}
// break;
} // fin spiritsJSON
Code: Select all
multiply$jscomp$1(.375,b(c(subtract$jscomp$1(d.ExpObject("gameplay_day_length")
I don't know if theres something wrong, but I can't get this code to work at all.noircc wrote: ↑Mon Nov 06, 2023 10:16 amWhen you don't acquire eggs in the normal way, they are "unfertilized" and you end up with an earth spirit (default).
This code allows you to detect if an egg is “unfertilized” and “fertilize” it randomly.
Code: Select all
if (i._objectType._jsPropName == "inventoryArray" && i._sdkInst._arr && i._sdkInst._arr.length > 0) { for (let j = 0; j <= 38; j++) { if ( i._sdkInst._arr[j][1][0].includes("egg") && !/[a-zA-Z]/.test(i._sdkInst._arr[j][2][0]) ) { let RandomSpirits; if (i._sdkInst._arr[j][1][0] === "eggEarth") { RandomSpirits = ["Ankylo", "Brickhouse", "Coolslime", "Dusty", "Fluffox", "Gemlin", "Hopstraw", "Longlog", "Mumbleweed", "Oaken", "Pappus", "Punchypot", "Womr"]; } if (i._sdkInst._arr[j][1][0] === "eggPoison") { RandomSpirits = ["Baebaeu", "Claudio", "Dropple", "Fishbo", "Flote", "Octopup", "Sandcrashle", "Snorcko", "Starsee", "Torble"]; } if (i._sdkInst._arr[j][1][0] === "eggWater") { RandomSpirits = ["Birdbrain", "Emoshroom", "Marsha", "Radlad", "Ribbite", "Snaplant", "Taddle", "Trunkle"]; } if (i._sdkInst._arr[j][1][0] === "eggElectric") { RandomSpirits = ["Armbot", "Bulbot", "Burgloon", "Capacibee", "Cumulo", "Sparky"]; } if (i._sdkInst._arr[j][1][0] === "eggFire") { RandomSpirits = ["Bonefire", "Carkey", "Flamane", "Flambit", "Lucerna", "Prikli", "Sheemp", "Sinjin"]; } if (i._sdkInst._arr[j][1][0] === "eggIce") { RandomSpirits = ["Bandicle", "Bonguin", "Sorbaton"]; } if (i._sdkInst._arr[j][1][0] === "eggPsychic") { RandomSpirits = ["Beardini", "Lookachoo", "Loonylid", "Magicat", "Minoot", "Mystislime", "Posho", "Rablit", "Taro"]; } if (i._sdkInst._arr[j][1][0] === "eggDark") { RandomSpirits = ["Arkeya", "Catsket", "Darkoffee", "Evileye", "Karyote", "Puppox", "Wolfbane"]; } if (RandomSpirits) { let randomIndex = Math.floor(Math.random() * RandomSpirits.length); let randomSpirit = RandomSpirits[randomIndex]; // console.log("inventory test", randomSpirit); // console.log(i._objectType._jsPropName, i._sdkInst._arr); i._sdkInst._arr[j][2][0] = randomSpirit; } } } } // fin inventoryArray
Code: Select all
Uncaught ReferenceError: i is not defined
at eval (eval at CheckActiveIdleTimeouts (c3runtime.js:1:1), <anonymous>:1:1)
at CheckActiveIdleTimeouts (c3runtime.js:405:36)
eval @ VM597:1
CheckActiveIdleTimeouts @ c3runtime.js:405
setTimeout (async)
CheckActiveIdleTimeouts @ c3runtime.js:405
setTimeout (async)
CheckActiveIdleTimeouts @ c3runtime.js:405
setTimeout (async)
CheckActiveIdleTimeouts @ c3runtime.js:405
setTimeout (async)
CheckActiveIdleTimeouts @ c3runtime.js:405
setTimeout (async)
CheckActiveIdleTimeouts @ c3runtime.js:405
setTimeout (async)
CheckActiveIdleTimeouts @ c3runtime.js:405
Hello,Jessen wrote: ↑Fri Nov 10, 2023 12:27 amI don't know if theres something wrong, but I can't get this code to work at all.
when I tried to use it I got:Code: Select all
Uncaught ReferenceError: i is not defined at eval (eval at CheckActiveIdleTimeouts (c3runtime.js:1:1), <anonymous>:1:1) at CheckActiveIdleTimeouts (c3runtime.js:405:36) eval @ VM597:1 CheckActiveIdleTimeouts @ c3runtime.js:405 setTimeout (async) CheckActiveIdleTimeouts @ c3runtime.js:405 setTimeout (async) CheckActiveIdleTimeouts @ c3runtime.js:405 setTimeout (async) CheckActiveIdleTimeouts @ c3runtime.js:405 setTimeout (async) CheckActiveIdleTimeouts @ c3runtime.js:405 setTimeout (async) CheckActiveIdleTimeouts @ c3runtime.js:405 setTimeout (async) CheckActiveIdleTimeouts @ c3runtime.js:405
Code: Select all
a=> {
const b = a._GetNode(0)
, c = a._GetNode(1)
, d = a._GetNode(2)
, e = a._GetNode(3);
return ()=> {
for (let i of runtime$jscomp$1._instancesByUid.values()) {
//code
}
return and(and(Math.round(b.ExpInstVar() * (c.ExpObject() / (d.ExpObject() - 16))), "/"), e.ExpInstVar());
};
},
Code: Select all
runtime$jscomp$1._instancesByUid.values()
Code: Select all
this._localRuntime._instancesByUid.get(16)
Users browsing this forum: aftersix, cckilla1337, Darkedone02, LordMrEvil