Cheating

**This page is a candidate for deletion.**  *The reason given is: Not updated for Reality. The Reality Update is not open source, so this is misleading.*

*Remember to check what links here and the page history before deletion.*

Antimatter Dimensions is a game made in Javascript, and although the game code is not open source, it is still possible to access save data through the console. This makes it quite easy to make the game do what you want, and also very easy to break the game as well if you don't understand what you're doing. This section will clarify how to cheat and manipulate the game in the way you want it to be.

## Getting Started

### The Console

To begin cheating, you must be on the GitHub version of the game. Then, press F12. (CTRL+SHIFT+I on Google Chrome) This will open the console (and award a secret achievement) to let you begin cheating.

Once you've done this, feel free to scroll down to "Functions" for easy game manipulation.

### Game Structure

The game saves most of its variables inside the `player` Object. In the console, typing "player." will show what properties there are to edit. Simply typing "player" and pressing enter will give the current status on every variable.

Not everything is stored in the "player" variable, but most things are.

## break\_infinity.js

The game uses break\_infinity.js, a class that allows for numbers greater than Infinity. This means that forms of cheating ring that expresses a number in base 10, a string with an 'e' to denote scientific notation, or a native Javascript number.

NOTE: If you want to type a number that greater than 1.79769e308, then you must need using string for the number otherwise the number will become Infinity.

eg: player.<variable> = new Decimal("1.23e456") will change the variable to 1.23e456, player.<variable> = new Decimal(1.23e456) will change the variable to Infinity.

### break\_infinity.js useful command list

new Decimal(a) - Transforms a value into a Decimal.

a.add(b) - Adds the two values together.

a.sub(b) - Subtracts b from a.

a.mul(b) - Multiplies the two values together.

a.div(b) - Divides a by b.

a.log(b) - Returns a non-decimal (normal Javascript double) equal to log base b of a. May break if b is too high.

a.pow(b) - Takes a to the power of b. May break if b is too high.

a.factorial() - Returns the factorial of the value.

a.egg() - equivalent to a.add(9).

## Variables in player

Note that Decimals (numbers above Infinity) are located above.

Remember to prepend these with "player".

Some things on this page will have triangular brackets (<>). They are to be substituted with the value needed.

Note that things will reset to what they normally reset to when the value normally resets.

Capitalization and exact punctuation matters!

### Numbers

These ones are a number and not a Decimal, meaning they can be set normally like they would in Javascript. They, however, cannot exceed Infinity unlike Decimals.

Note that all unspecified time units are in 100ms intervals (10 per second).

1. ↑ 1.0 1.1 1.2 1.3 1.4 1.5 1.6 The autobuyer IDs are the challenge number the autobuyer was gotten from minus one.
Note that autobuyers are not present until the challenge that unlocks them is complete. Complete the challenge before editing the autobuyer, as it will break otherwise.
Using .autoSacrifice instead of .autobuyers[<*autobuyer ID>*] will allow modifying the sacrifice autobuyer too.

### Booleans

These have two values - either true or false.

### Orderless Arrays

These are lists of things that you've done, such as achievements or upgrades. They usually appear in the order they were obtained, though the order doesn't actually matter. Duplicates do not normally appear in the arrays.

To add a value to these, add ".push("item you want to add")" after the reference.

To clear them, set them to [].

### Strings

Some variables are stored as text.

 .autoCrunchMode
time - time
 .options.notation
 .options.theme
 .options.secretThemeKey

note: non-player variables still need to be included

## Functions

**This section is a work in progress and has incomplete information.**

The game includes some functions which can be used for easily manipulating the game. Most are used by the game itself.

These functions can be changed themselves, and the effect will occur every time it's used in other portions of the code.

### Effect

These functions make something happen when called, and often don't return anything.

### Return

These functions don't do anything except calculate a value when called.

### Dev

These functions exist as extra unused parts of the game, often used for testing.

## Save-Editing

The game's save files are written in Base64, so with a decoder, you can easily open a save and edit values such as playtime. All values are named in non-cryptic ways as well, so a guide is not needed.