Marble Marcher Autosplitter tutorial
Guides
/
Marble Marcher Autosplitter tutorial
Updated 5 years ago by Firestix

In this tutorial, I'm going to show you how to set up LiveSplit to use the Autosplitter script I made for Marble Marcher. I'm also show you how to fix the script if it initially doesn't work correctly. This tutorial assumes that you have the latest copy of both Marble Marcher and LiveSplit on your computer already. It also assumes that you’ve completed a full playthrough of the game at least once.

#Downloading the script To get the script, you will need to go to this link: https://www.speedrun.com/marblemarcher/thread/wy3g2/

You'll see the script in a quote box. Copy everything in it and paste it into notepad. Save the file as marblemarcher.asl. You can save it as any name you want as long as it ends with .asl.

#Running the script with LiveSplit Once you've downloaded the script, open LiveSplit. The Autosplitter requires that you have the splits for Marble Marcher loaded. If you don't have them, you can get them by opening those splits from Speedrun.com. or you can make them yourself.

Right click on the timer and click on edit layout. Then click the plus icon. Under Control, click Scriptable Auto Splitter. It will appear on this list. Double click on it to change the settings for it. Under Script Path, click on browse and locate the asl file you created.

To confirm the Autosplitter works, exit the layout editor, open Marble Marcher and press start. The timer should start running and split when you hit the flag. To show the ingame time in LiveSplit, right click on the timer and under Compare Against, click Game Time.

If the autosplitter works for you as is, there’s no need to continue this tutorial. If it still doesn’t work, we will need to fix a few things in the script.

#How to fix the script In order to fix the script, you will need to install a program called Cheat Engine. Cheat Engine is a program that can read memory directly from the RAM. You can also change the values inside memory, but we will not be doing that.

Go to cheatengine.org, download the installer from the downloads page and run it.

Once Cheat Engine is installed, open it. There are a lot options here but we will only be going through a few of them. Open marble marcher and go to the main menu. Then, in cheat engine, click on the flashing button on the top left corner of the window. You’ll see a list of programs that are currently running. Click on the one labeled Marble Marcher and then click Open. This will attach cheat engine to Marble Marcher, which will allow you to read the memory it’s using.

#The values we’re looking for Before we get lost looking at a bunch of hex code, we need to know what values we’re looking for. The autosplitter script uses two different values from Marble Marcher:

##The Game State The first variable represents the games current state. In the asl script, this is the variable gameState. It’s an number between 0-6, and each number represents a different state.

0 means you are at the main menu. You haven’t started a game yet or you quit the current game from any of the previous states.

1 means you are in screen saver mode.

2 means the fractal is generating a new level (this happens immediately after you press play and after you finish a level).

3 happens after the level’s title appears, during this time, the camera transitions to the player’s position, and the game will count down.

4 happens on GO. The player now has control and can move.

5 happens when the player reaches the flag.

6 happens after game state 5 when the level is either Planet Crusher or Fatal Fissures. This just means the game is in the intermission and final cutscene.

The script uses this value to determine when to start, reset, and split the timer.

##The Ingame Timer The second variable represents the Ingame timer. In the asl script, this is the variable timer. It’s a number that represents the number of frames that has passed since the player pressed start. The game uses this number for its own ingame timer that appears at the bottom left hand corner of the screen.

The timer has a few quirks that are going to come up later when we try to search for this value. The first is that when you launch the game, the timer is set to 0. The second is that the timer will never go down, even when you return to the main menu. The timer only returns to 0 when you press play.

#Strategies to find the variables For the gameState, assuming you are still at the title screen, your first scan should be an Exact Value scan for 0. Enter 0 in the value field and make sure the scan type is set to Exact value, then click on First Scan. You’ll see hundreds of thousands of addresses with the value 0, but we will narrow these down.

Next, go to marble marcher and as soon as you click play, IMMEDIATELY pause. Then go back to Cheat Engine and change the value field from 0 to 2. Then click Next Scan.

Go back to marble marcher and wait until you can control the marble. Once you can, pause and scan for exact value 4 in Cheat Engine.

Go back and reach the flag. As soon as you do, pause and scan for exact value 5.

Finally, go back to the main menu. Scan for value 0 again.

If your search hasn’t been narrowed down to exactly one address, repeat the previous steps until you find the value you’re looking for (it’s likely that it’s already found the address before you reach this step). Once you do, double click the address to add it to your cheat table.

For the timer, you will need to scan for an Unknown value. In the game, go to the main menu, click play, then immediately pause. Then in Cheat Engine, click on New Scan and change the scan type to Unknown Initial Value. Once you’ve done that, click First Scan.

Change scan type to unchanged value then click Next Scan 5 to 10 times. We’re doing this because the ingame timer is currently paused, so we need to get rid of all the values that have been changing while the game is paused.

Go back to the game and unpause it for a few seconds. Then pause and change the scan type to Increased Value and click Next Scan (because the timer has gone up). Then switch back to Unchanged Value and click Next Scan a few more times. Repeat this until you can’t narrow down any more values (it will stay at roughly 3000 values or so) and you’ve hit gameState 4 (there’s another variable that’s like timer except it resets every time a new level starts, doing this makes sure that that variable won’t show up in our scan).

When you can’t narrow down any more values, go back to the main menu. In Cheat Engine, scan for UNCHANGED VALUE (the timer has not gone down yet). After that click play and immediately pause. Switch to DECREASED Value and click Next Scan. Repeat the procedure until you’ve found the timer address. Double click the address to add it to your cheat table.

#Finding the pointers What we currently have in the cheat table are addresses for these variables. If we were to close marble marcher now and reopen it with cheat engine, these addresses would give us a different value. Addresses in Marble Marcher are dynamically allocated, which means our values won’t be in the same place every time the game restarts. In order to make sure we find the right value each time, we will need to find what’s called a Pointer address, which points the program to the correct variable. To do that, we need to perform a pointer scan.

Right click on the gameState variable and click “Pointer Scan for this address”. There are a lot of options to scan for pointers but I’ll link an image with the settings I’ve used for my scans. image

Once you have everything configured, click OK. It will prompt you to save the results in a file. Name it gamestate.PTR and click save. Cheat Engine will start scanning for pointers that point to gameState’s current address. Once it’s done, it should show a whole lot of pointers.

To narrow this list down, we will need to close down Marble Marcher. This will render the addresses we have in our table useless, but that’s okay. Delete the addresses in the table for now. Then open Marble Marcher and reattach Cheat Engine. (DO NOT CLOSE YOUR POINTER SCAN, we will come back to it soon)

Repeat the instructions to find the gameState variable (fair warning: you may need to do this several times). Once you do, go back to your pointer scan and under pointer scanner, click Rescan memory. In the text field, type in the new address for your gameState variable and click OK. It will ask you to re-save your results, which you should do.

Repeat this process until you have 100 results or less in your pointer scan. If you’re having trouble getting less results, you can try playing the game for a bit, then rescanning the pointers without restarting the game.

#Pointer Integrity Once you have a manageable amount of pointers, double click on one or more of them to add it to your pointer table. Play marble marcher, making sure you can keep an eye on the pointer addresses you have. If any of them change to an unrecognizable value, remove it from your cheat table. You can also try and close and reopen the game or even move the window of Marble Marcher itself to see if they change.

Once you’ve found a value that’s stable, repeat the entire process for the timer variable. Once you’ve found stable pointer addresses for both, you will need to change the values in the script to the pointer address.

#Editing the Script Starting with the gameState, double click on the pointer address in your cheat table. Select everything in the bottom-most text box (the base address) and copy it. In the asl script, go to the line with gameState (under state(“MarbleMarcher”)). Select everything after the colon and paste what’s in your clipboard.

You’ll need to edit the text so that the script can read the base address. For example, if the base address in Cheat Engine is "MarbleMarcher.exe"+002012D8, you will need to change it to read "MarbleMarcher.exe",0x02012D8. Note the x, the comma and the lack of a plus sign. Once done, add an extra comma so we can add the pointer’s offsets.

image for reference

Go to the next textbox above the base address and copy its contents. Paste it into the script after the comma and add “0x” to the beginning of it, then add another comma to the end. For example, if your next offset is 48 then your entire line should read "MarbleMarcher.exe",0x02012D8,0x48, .

Repeat the process, going up the list of offsets until you’ve reached the final text box, making sure to end the entire line of code with a semi-color (;) instead of a comma. Your new line of code should look something like the following: [quote]int gameState : "MarbleMarcher.exe",0x02012D8,0x48,0x30,0x10,0x38,0x80,0x2D0;[/quote]

Once you’ve finished the gameState variable, do the same thing for the timer variable. When you’ve finished, make sure to save your work! You should test to see if your script works by opening LiveSplit and Marble Marcher. When you press play, the timer should start.

#Conclusion Hopefully this guide was helpful. If you get stuck with anything or you need help, feel free to send me a message.

Game stats
Followers
63
Runs
542
Players
80
Latest threads
Posted 1 year ago
3 replies
Posted 3 years ago
1 reply
Posted 3 years ago
2 replies
Posted 3 years ago
2 replies
Posted 5 years ago
2 replies