Cheating

In Ordinal Markup, players are able to change their progress in the game at will, if having a general understanding of the hidden values inside the game. **Cheating** in Ordinal Markup involves manipulating these values that are stored in different ways, such as a variable with its data stored into your Local Storage, or an encoded save file containing these secrets.

**DISCLAIMER: Cheating in any way is not recommended in most regards, unless you are either attempting to replicate a bug or test and debug the game.**

*Additionally, in order to start cheating in Ordinal Markup, you should have an understanding of JavaScript (JS).*

## General Information

### `game`

The `game` variable in Ordinal Markup's source code is a globally accessible object variable that holds and handles the player's data.

The useful properties of the `game` variable are as follows, listed in alphabetical order:

## How to Start Cheating

There are a few different provided ways one can use to start cheating. These include using the Console or Base-64 Decoding and Encoding a save file.

### The Console

The Console is a tool that is embedded in Google Chrome. It is accessed by **inspect elementing** (`F12` / `CTRL+SHIFT+I` / (`Right Click`, then click *Inspect Element*)), then clicking on the *Console* tab. The Console can take in JavaScript code and perform it, and is mainly used for cheating, modding, testing or debugging.

From there, you can input some simple statements to change some property values of the `game` variable, and you can actually notice the changes caused as soon as you submit the statement.

A basic JS statement to change your current Factor Boosts to 1 million would look like this snippet:

```
game.factorBoosts=1e6

```

Another important concept to mention is handling ExpantaNum Object values. To do this, one must utilise this strategy:

* Replace that ExpantaNum with a new ExpantaNum. Eg. To change your current Incrementy (which is stored as an ExpantaNum) to a "number" value of e1.000e10 (which is not possible with regular Floats), type in this JS snippet:

```
game.incrementy=new ExpantaNum('ee10')

```

There are actually many different notations to pass in, but this is the simplest way.

### Base-64 Decoding and Encoding your Save File

*If one chooses to cheat in this way, they should have a general understanding of JavaScript Object Notation (JSON).*
By exporting your save in the **Options** tab, your clipboard will contain a Base-64 encoded save file. In reality, the save data is a JSON string is encoded in Base-64. By decoding your file via. a Base-64 decoder, the JSON string is then revealed. This JSON string is a snapshot of the `game` variable from the time you exported the save to your clipboard.

From there, you can change the values that you want, but make sure to keep the JSON string valid for the game to automatically parse the JSON string into an Object.

Once you have changed the JSON string to your heart's content, make sure to pass in that string into a Base-64 Encoder to allow the string to be parsed by the game. Then in the game, go to the **Options** tab and import your new, artificial save.

## Trivia

* Ordinal Markup was created using HTML, CSS and JS, and is what makes cheating via. the Console possible, as the Console handles JS.