[REQUEST] Moonstone Island
Re: [PAID REQUEST] Moonstone Island
Small video to see how to find right process in cheat engine and how to edit stamina.
Re: [REQUEST] Moonstone Island
Sadly, this is all been wiped out with today's patch
Re: [REQUEST] Moonstone Island
I tried too, but doesn't work for me anymore. The second scan is blank, before it worked just fine
Nope, it works, I don't know why but now it work again o.o I'm really confused...ahahah
Re: [REQUEST] Moonstone Island
Can someone figure out how to freeze time so that we can take as long as we want on things?
Re: [REQUEST] Moonstone Island
i still can't figure out how to freeze time any help please ?
-
- What is cheating?
- Posts: 4
- Joined: Mon Jan 23, 2023 4:54 pm
- Reputation: 0
Re: [REQUEST] Moonstone Island
I have pretty much got all my cheats to work except figuring out the time and how to keep my companions in a fight...by that i mean...I modify their health to never drop but for some reason it does, they disappear, but still continue to be attacked by the enemy. I can skip my turn but not attack in return. lol. The stamina/energy cheat is pretty much all I need but would be handy to freeze time occasionally. Anyone figure it out?
Re: [REQUEST] Moonstone Island
I debugged the game code here and found out that the time is stored internally in what seems to be a float variable; The formula to convert the internal value into the game time is this:
var time = (10 * Math.floor(internal_value * 10)) % 1440
var hours = Math.floor(time / 60)
var minutes = time % 60
but I'm still not sure how to search for this internal value using this.
var time = (10 * Math.floor(internal_value * 10)) % 1440
var hours = Math.floor(time / 60)
var minutes = time % 60
but I'm still not sure how to search for this internal value using this.
Re: [REQUEST] Moonstone Island
Hey 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.
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.
Re: [REQUEST] Moonstone Island
Yup, that's exactly what I did yesterday to find the time logic; The JS code you get is all from the construct3 engine, the actual game code is all data that is processed by the c3 code. It's all there but it's still kinda annoying trying to find anything useful, at least without some better knowledge of how construct3 works.
Re: [REQUEST] Moonstone Island
any chance we can get anything from the dev console? like how to add stuff or change spirits we have?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.
Re: [REQUEST] Moonstone Island
After another couple hours looking at the dev console, I figured out how the time is stored:
It's one single variable with the number of minutes since 2:10 am on day 1;
So to get the current value of the variable, you do:
years = current year - 1
months = years * 4 + (current month - 1)
days = months * 28 + (current day - 1)
hours = days * 24 + current hour
minutes = hours * 60 + current minute
So if you're on Summer 13 of the first year, at 06:20 it's:
(((0 * 4 + 1) * 28 + 12) * 24 + 6) * 60 + 20 = 57980
then you subtract 130 (from that 2:10 am of day 1) = 57850
if the clock shows 06:20, then the internal value will be between 57850 and 57860;
Wait for the clock to change, add 10 to both values and search again.
It's one single variable with the number of minutes since 2:10 am on day 1;
So to get the current value of the variable, you do:
years = current year - 1
months = years * 4 + (current month - 1)
days = months * 28 + (current day - 1)
hours = days * 24 + current hour
minutes = hours * 60 + current minute
So if you're on Summer 13 of the first year, at 06:20 it's:
(((0 * 4 + 1) * 28 + 12) * 24 + 6) * 60 + 20 = 57980
then you subtract 130 (from that 2:10 am of day 1) = 57850
if the clock shows 06:20, then the internal value will be between 57850 and 57860;
Wait for the clock to change, add 10 to both values and search again.
Re: [REQUEST] Moonstone Island
that is... quite complex, and not sure I managed to do it right. i'm currently looking at year 1, fall, 24th. its a lot harder to figure it out myself I think.hudell wrote: ↑Thu Oct 05, 2023 12:40 amAfter another couple hours looking at the dev console, I figured out how the time is stored:
It's one single variable with the number of minutes since 2:10 am on day 1;
So to get the current value of the variable, you do:
years = current year - 1
months = years * 4 + (current month - 1)
days = months * 28 + (current day - 1)
hours = days * 24 + current hour
minutes = hours * 60 + current minute
So if you're on Summer 13 of the first year, at 06:20 it's:
(((0 * 4 + 1) * 28 + 12) * 24 + 6) * 60 + 20 = 57980
then you subtract 130 (from that 2:10 am of day 1) = 57850
if the clock shows 06:20, then the internal value will be between 57850 and 57860;
Wait for the clock to change, add 10 to both values and search again.
Re: [REQUEST] Moonstone Island
Here's an alternative way of getting slower time:
Follow the instructions from leegao above to get access to the game files, then open the package.nw folder, then the scripts folder inside of it. There will be a file named c3runtime.js
Make a backup copy of this file somewhere else, then open it with notepad;
The code in that file is made auto generated so it's very hard to read anything, but you can press Ctrl+F to search for the following string:
There will be only one match. That .375 is how much the internal variable is increased at a time. If you change it to .1875, days will last twice as long. If you change it to .0375, days will last 10x longer.
Make sure you don't change anything else in that file or the game will not work.
(If you break the game, don't worry, just restore the backup copy of the file or go to steam and use the "verify file integrity" option)
Follow the instructions from leegao above to get access to the game files, then open the package.nw folder, then the scripts folder inside of it. There will be a file named c3runtime.js
Make a backup copy of this file somewhere else, then open it with notepad;
The code in that file is made auto generated so it's very hard to read anything, but you can press Ctrl+F to search for the following string:
Code: Select all
e.ExpObject("slowTime")?.1875:.375
Make sure you don't change anything else in that file or the game will not work.
(If you break the game, don't worry, just restore the backup copy of the file or go to steam and use the "verify file integrity" option)
Re: [REQUEST] Moonstone Island
And to pin your stamina, do the same thing with c3runtime.js
Search for this string (it may have changed in an update)
and replace it with
If you'd rather do this directly in the dev console, then here's what you can do:
1. Open the dev console
2. Go to sources
3. In the Threads tab (on the right side), click on the "Runtime" thread and suspend it's execution (pause button)
4. Go to console, and type in the following code
5. Continue
You could also add/change the first (or nth) item of your inventory with this loop (I haven't actually tested this)
As a tangent, some observations:
1. Construct 3 is a transpiler - games are built using Javascript, which is then transpiled into a stack interpreter DSL, it's why it's kind of hard to RE what this game is doing (that plus the strange matrix json format they use for configurations...)
2. The reason that integer values need to be 2x-ed in cheat engine makes sense - V8 probably uses some sort of tagged integer representation that shifts integers (adds an extra 0 for the LSB) which effectively 2xes the value. For non-integer values (or ones that overflows), V8 will instead sub the value with a pointer and then shift+incr to tag this as a boxed number. Stamina is hard to scan when it's not full because, for whatever reason, the game decides to multiply the stamina by some fraction instead of just -2, as a result, the value is often non-integer. For e.g., when I had 256 stamina, the internal instance of the player stats shows something like 255.9..., and because it's non-integer, it doesn't work with the 2x trick
Trying to reverse engineer the stack interpreter would be fun, but also maddening. I think this + the time hack should be enough for most things.
Search for this string (it may have changed in an update)
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
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()) {
if (i._objectType._jsPropName == "Moon") {
i._instVarValues[15] = i._instVarValues[14]; // 15 = current stamina, 14 = max? stamina
break;
}
}
return and(and(Math.round(b.ExpInstVar() * (c.ExpObject() / (d.ExpObject() - 16))), "/"), e.ExpInstVar());
};
}
1. Open the dev console
2. Go to sources
3. In the Threads tab (on the right side), click on the "Runtime" thread and suspend it's execution (pause button)
4. Go to console, and type in the following code
5. Continue
Code: Select all
for (let i of runtime$jscomp$1._instancesByUid.values()) {
if (i._objectType._jsPropName == "Moon") {
i._instVarValues[15] = i._instVarValues[14]; // 15 = current stamina, 14 = max? stamina
break;
}
}
Code: Select all
for (let i of runtime$jscomp$1._instancesByUid.values()) {
if (i._objectType._jsPropName == "InventoryContainer" && i._instVarValues[0] == 0) { // First item in the inventory
i._instVarValues[1] = "moonstone"; // _instVarValues[1] is the item type
i._instVarValues[2] = 100 // _instVarValues[2] is the item count
break;
}
}
As a tangent, some observations:
1. Construct 3 is a transpiler - games are built using Javascript, which is then transpiled into a stack interpreter DSL, it's why it's kind of hard to RE what this game is doing (that plus the strange matrix json format they use for configurations...)
2. The reason that integer values need to be 2x-ed in cheat engine makes sense - V8 probably uses some sort of tagged integer representation that shifts integers (adds an extra 0 for the LSB) which effectively 2xes the value. For non-integer values (or ones that overflows), V8 will instead sub the value with a pointer and then shift+incr to tag this as a boxed number. Stamina is hard to scan when it's not full because, for whatever reason, the game decides to multiply the stamina by some fraction instead of just -2, as a result, the value is often non-integer. For e.g., when I had 256 stamina, the internal instance of the player stats shows something like 255.9..., and because it's non-integer, it doesn't work with the 2x trick
Trying to reverse engineer the stack interpreter would be fun, but also maddening. I think this + the time hack should be enough for most things.
Who is online
Users browsing this forum: ctl3d32, giurgirares, iamoumyy, lubian, Sadistic.Blessed, tanarg