Cheating

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 stored as Decimal===
How to refer to variable 	Represents 	Can be larger than Infinity (or smaller than 1/Infinity) in normal gameplay
.antimatter 	The amount of antimatter you currently have. 	yes
.tickSpeedCost 	The current price of the tickspeed upgrade. 	yes
.tickspeed 	The length, in ms, of each "tick" (lowered by tickspeed upgrades). 	yes
[TIER_NAMES[<dimension number>]+"Cost"] 	The current price of a single Dimension. 	yes
[TIER_NAMES[<dimension number>]+"Amount"] 	The amount of the Dimension you currently have. 	yes (except for 8th Dimension)
[TIER_NAMES[<dimension number>]+"Pow"] 	The power multiplier to the Dimension that comes from the multiplier from 10 dimensions, Soft Resets, and Dimensional Sacrifice (but not things basing off of Dimensional Sacrifice).	yes
.sacrificed 	The amount of First Dimensions sacrificed using Dimensional Sacrifice. 	yes
.infinityPoints 	The amount of infinity points you currently have. 	yes
.totalAntimatter 	The total amount of antimatter you've made. This appears in statistics. 	yes
.costMultipliers[<dimension number>-1] 	The amount the cost of the dimension multiplies by every 10. 	yes
.tickspeedMultiplier 	The amount the cost of the tickspeed upgrade multiplies by every 10. 	yes
.chall3Pow 	If in challenge 3, the First Dimension power is multiplied by this amount. 	TBC
.matter 	In certain challenges, matter is a variable that increases over time. Its effect varies by the challenge. 	yes(There is also a hidden Achievement for reaching infinite Matter)
.chall11Pow 	In challenge 8, this becomes the multiplier the Eighth Dimension gains from sacrifice. 	TBC
.infMult 	The multiplier to Infinity Points from the x2 IP Infinity Upgrade and the two achievements that give x4 IP. 	yes
.infMultCost 	The price of the x2 IP Infinity Upgrade. 	yes
.infinityPower 	The amount of Infinity Power you currently have. 	yes
.postC3Reward 	The total current multiplier from the reward of Infinity Challenge 3. 	yes
.eternityPoints 	The amount of Eternity Points you have. 	yes
.epmult 	The multiplier to Eternity Points that comes from the x5 EP gain upgrade. 	yes
.epmultCost 	The price of the x5 EP gain upgrade. This will adjust to the value it should be with your epmult after a purchase. 	yes
["infinityDimension"+<infinity dimension number>].cost 	The price of the next upgrade of the Infinity Dimension. 	yes
["infinityDimension"+<infinity dimension number>].amount	The amount of the Infinity Dimension you currently have. 	yes
["infinityDimension"+<infinity dimension number>].power 	The multiplier to the power of the Infinity Dimension that comes from buying it. 	yes
.timeShards 	The amount of time shards you currently have. 	yes
.tickThreshold 	The amount of time shards you need to gain another tickspeed upgrade from time shards. 	yes
["timeDimension"+<time dimension number>].cost 	The cost of the next upgrade of the Time Dimension. This will adjust to the value it should be with the amount of times it has been bought after a purchase. 	yes
["timeDimension"+<time dimension number>].amount 	The amount of the Time Dimension you currently have. 	yes (except for 8th Time Dimension)
["timeDimension"+<time dimension number>].power 	The square root of the multiplier to the power of the Time Dimension that comes from buying it. 	yes
.replicanti.amount 	The amount of replicanti you currently have. 	yes
.replicanti.chanceCost 	The price of the replicate chance upgrade. 	yes
.replicanti.intervalCost 	The price of the replicate interval upgrade. 	yes
.replicanti.galCost 	The price of the max replicanti galaxy upgrade. 	yes
.timestudy.amcost 	The price of the next Antimatter Time Theorem. 	yes
.timestudy.ipcost 	The price of the next Infinity Point Time Theorem. 	yes
.timestudy.epcost 	The price of the next Eternity Point Time Theorem. 	yes
.eternityChallGoal 	The amount of Infinity Points you need to end your current Eternity Challenge. 	yes
.autoIP 	The greatest amount of IP/min gained in a completely automatic run. This is used for a secret way to generate IP. 	yes
.eternityBuyer.limit 	The amount of EP the eternity autobuyer will wait for to eternity. 	yes
.dilation.tachyonParticles 	The amount of tachyon particles you currently have. This is used for all purposes other than the one in totalTachyonParticles. 	yes
.dilation.dilatedTime 	The amount of dilated time you currently have. 	yes
.dilation.totalTachyonParticles 	The amount of tachyon particles you currently have. This is subtracted from the amount of tachyon particles you will gain in the formula. 	yes
.dilation.nextThreshold 	The amount of dilated time needed to get the next galaxy. 	yes
.reality.realityMachines 	The amount of reality machines you currently have. 	yes
.infinities 	The amount of infinities you currently have 	yes
.eternities 	The amount of eternities you currently have. 	yes
==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).
How to refer to variable 	Represents 	NG+++-related remarks
[TIER_NAMES[<dimension number>]+"Bought"] 	The amount of the dimension bought (not generated) in this run. 	
.totalTimePlayed 	The total time from first loading the game to now. 	
.bestInfinityTime 	The amount of time spent in your fastest infinity. 	
.thisInfinityTime 	The amount of time spent in your current infinity. 	
.resets 	The amount of soft resets you've made. (Dimensional Shifts/Boosts) 	
.galaxies 	The amount of antimatter galaxies you have. 	
.tickDecrease 	This doesn't actually do anything. 	
.achPow 	The multiplier gained from achievement rows. This resets on game load and achievement gain. 	
.lastUpdate 	The last time a tick occurred, in milliseconds (ms) since January 1st, 1970. 	
.autobuyers[<autobuyer IDThe 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.
>].bulk	The bulk buy of the autobuyer. 	
.autobuyers[<autobuyer ID>].cost 	The price of the next upgrade of the autobuyer. 	
.autobuyers[<autobuyer ID>].interval 	The delay of the autobuyer between purchases, in milliseconds (ms). 	
.autobuyers[<autobuyer ID>].priority 	The assigned priority of the autobuyer. For the autobuyers that aren't the main 9, there are special things the variable is used for. [needs specifying] 	
.autobuyers[<autobuyer ID>].target 	It is recommended that you don't change this.
For the main 9 autobuyers, if it is above 9 they will buy 10/max and otherwise buy singles. For the 8 dimension autobuyers, they will buy the dimension number of minus 10 of the target if above 10 or just the target if below.
For the others, there are special things the variable is used for. [may be inaccurate] [needs specifying]	
.autobuyers[<autobuyer ID>].ticks 	How long it's been since the autobuyer last triggered. 	
.autobuyers[<autobuyer ID>].tier 	This variable is essentially the same as target except it stays 1-9. If modified the autobuyer will probably break. 	
.chall2Pow 	If in challenge 2, the multiplier of all normal dimensions is multiplied by this amount. 	
.partInfinityPoint 	Generated from the passiveGen Infinity Upgrade. When it reaches 10, gain an Infinity Point. 	
.partInfinitied 	Generated from the infinitiedGeneration Infinity Upgrade. When it reaches 5, gain an infinitied stat. 	
.challengeTimes[<challenge number>-1] 	Your best time on the challenge. Note that the challenge number is the internal challenge ID. 	
.infChallengeTimes[<infinity challenge number>-1] 	Your best time on the infinity challenge. 	
.lastTenRuns[<number of infinities ago>-1][0] 	The time spent on the infinity. 	
.lastTenRuns[<number of infinities ago>-1][1] 	The amount of IP gained from the infinity. 	
.lastTenEternities[<number of eternities ago>-1][0] 	The time spent on the eternity. 	
.lastTenEternities[<number of eternities ago>-1][1] 	The amount of IP gained from the eternity. 	
.tickSpeedMultDecrease 	The amount the tickspeed cost multiplier gets multiplied by on every purchase above Infinity. 	
.tickSpeedMultDecreaseCost 	The cost of the tickspeed cost multiplier increase upgrade. 	
.dimensionMultDecrease 	The amount a dimension's cost multiplier gets multiplied by on every 10 above Infinity. 	
.dimensionMultDecreaseCost 	The cost of the dimension cost multiplier increase upgrade. 	
.overXGalaxies 	The "Galaxies required to always Dimboost" field on the soft reset autobuyer. 	
.version 	The version of the game. Changing this variable is not recommended.
When the game updates, sometimes a variable needs to be changed from an old value to a new one, but it will only do this on the first time the game is loaded after the update. Lowering the version will run you through all of these again and increasing it will skip future adjustments.	
.spreadingCancer 	The total amount of galaxies bought in Cancer (Emojis) notation, used for the achievements Spreading Cancer and Cancer = Spread, and for a news ticker at around 4,000 galaxies bought with Cancer (Emojis) notation.	
.postChallUnlocked 	The amount of infinity challenges you've unlocked. 	
.postC4Tier 	The latest bought dimension number. In Infinity Challenge 4, this number is used to determine which dimension should have full production. 	
.thisEternity 	The amount of time spent in your current eternity. 	
.bestEternity 	The amount of time spent in your fastest eternity. 	
["infinityDimension"+<infinity dimension number>].bought 	Doesn't actually do anything. This variable is always equal to 0. 	
["infinityDimension"+<infinity dimension number>].baseAmount	The amount of the infinity dimension you start with on infinity. 	
.totalTickGained 	The amount of free tickspeed upgrades gained from time shards. 	
["timeDimension"+<time dimension number>].bought 	The amount of times you've bought the time dimension. This is used in determining the price of the next. 	
.offlineProd 	The multiplier to your best IP/min in the last 10 infinities that you gain passively per minute. 	
.offlineProdCost 	The cost of the upgrade that increases offlineProd. 	
.challengeTarget 	The goal of the challenge you're currently in. 	
.replicanti.chance 	The chance each replicanti has to replicate. (Not a percent, doesn't do anything past 1) 	
.replicanti.interval 	How often replicanti replicate, in ms. 	
.replicanti.gal 	The maximum replicanti galaxies you can make. 	
.replicanti.galaxies 	The amount of replicanti galaxies you currently have. 	
.timestudy.theorem 	The amount of Time Theorems you currently have, 	
.eternityChalls["eterc"+<eternity challenge number>] 	How many times the eternity challenge has been run (undefined if 0). 	
.eternityChallUnlocked 	Which eternity challenge you have available to run. (0 if none) 	
.etercreq 	Which eternity challenge you have available to run. (0 if none) 	
.autoTime 	The fastest infinity you've made in a fully automatic run. Used in conjunction with autoIP. 	
.eterc8ids 	The amount of Infinity Dimensions you can still buy in Eternity Challenge 8. 	
.eterc8repl 	The amount of Replicanti upgrades you can still buy in Eternity Challenge 8. 	
.dilation.freeGalaxies 	The amount of free galaxies gained from dilated time. 	
.dilation.rebuyables[<upgrade number>] 	The amount of times you've bought the particular rebuyable upgrade. 	
.why 	The amount of times you've bought a single tickspeed upgrade. Used for the Should we tell them about buy max... secret achievement. 	
.options.updateRate 	The speed the game's ticks go, in ms. 	
.options.chart.updateRate 	The speed of the chart's updates, in ms. 	
.options.chart.duration 	The seconds of history that will be recorded in the chart. 	
.options.chart.warning 	Something to do with the lag notification warning, but may not actually do anything. 	
=== Booleans===
These have two values - either true or false.
How to refer to variable 	Is true if...
.break 	Infinity is broken. Note that the Break Infinity Upgrades, and toggle for break itself, will not be visible unless you have the normal requirement.
.infDimensionsUnlocked[<infinity dimension number>-1]	If you've unlocked the infinity dimension or not. Behavior may be buggy if one is unlocked and previous ones aren't.
.infDimBuyers[<infinity dimension number>-1] 	The autobuyer for the infinity dimension is enabled.
.replicanti.unl 	Replicanti have been unlocked (1e140 IP purchase).
.replicanti.auto[0] 	The autobuyer for the replicanti chance upgrade is enabled.
.replicanti.auto[1] 	The autobuyer for the replicanti interval upgrade is enabled.
.replicanti.auto[2] 	The autobuyer for the replicanti max galaxy upgrade is enabled.
.infMultBuyer 	The autobuyer for the x2 IP mult is enabled.
.respec 	The "respec on next eternity" is enabled.
.eternityBuyer.isOn 	The eternity autobuyer is enabled.
.dimlife 	No first to seventh dimensions have been bought in the current eternity. This is used in the 8 nobody got time for that achievement.
.dead 	No second to eighth dimensions have been bought in the current eternity. This is used in the You're already dead achievement.
.dilation.active 	Time is dilated.
.options.newsHidden 	The news ticker is hidden.
.options.scientific 	Doesn't do anything.
.options.challConf 	The challenge confirmation is enabled.
.options.retryChallenge 	"Automatically retry challenges" is enabled.
.options.bulkOn 	The autobuyer's bulk buy are enabled.
.options.cloud 	You can save to the cloud.
.options.hotkeys 	Hotkeys are enabled.
.options.eternityconfirm 	The eternity confirmation is enabled.
.options.commas 	Commas are on exponents.
.options.animations.floatingText 	Floating text appears on purchase of 10 dimensions.
.options.animations.bigCrunch 	The animation when you big crunch is enabled.
.options.animations.eternity 	Possibly something to do with the animations on eternity, if it is enabled or there is one.
.options.animations.tachyonParticles 	Tachyon particles appear on the dilation tab.
===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 [].
How to refer to variable	Represents 	Stored in format...
.achievementBits 	Your achievements. (Also, .secretAchievementBits represents your secret achievements.)	stored as a list with one number from 0 to 255 for every row of achievements (17 for normal, 4 for secret.) Convert a number to binary, and the 1s represent the achievements you have gotten. TBD whether a special case is made when achievements are under reality timer.
.infinityUpgrades 	Your infinity upgrades. 	The ID found on the Infinity Upgrades page.
.challenges 	The (non-eternity) challenges you've completed. 	Normal challenges are challenge<internal challenge ID>. Infinity Challenges are postc<challenge number>.
.newsArray 	Which news you've seen before. 	Each news ticker message has a unique 4 or less character ID. (will be included when page gets made)
.eternityUpgrades 	Your eternity upgrades. 	Numbered from 1 to 6, in order from cheapest to most expensive.
.timestudy.studies 	Your time studies that reset on respec. 	The numerical ID shown when holding shift. (Studies without an ID are not on this list.)
.dilation.studies 	Your time studies that don't reset on respec. 	Numbered from 1 to 5, in the order they're purchased in.
.dilation.upgrades 	Your non-repeatable upgrades bought from dilated time. 	The ID found on the Time Dilation page.
===Strings ===
Some variables are stored as text.
How to refer to variable	Represents 	Proper format
.currentEternityChall 	The eternity challenge you're currently in. 	eterc<eternity challenge number> If not in a challenge, this is blank.
.autoCrunchMode 	The mode of the crunch autobuyer, unlocked at 5 eternities. 	amount - amount
time - time
relative - X times last crunch
.options.notation 	The notation you're currently in. 	The name that appears on the Notation: setting.
.options.theme 	The theme you're currently in. 	For non-secret themes, the name that appears on the Current theme: setting.
For secret themes, S<theme ID>.
.options.secretThemeKey 	The name of the secret theme you were last in. Doesn't do anything except show up on the Current theme: setting.	Exactly as is needed to import to get the theme.
note: non-player variables still need to be included
====Reality-related values (stored under player.reality unless otherwise specified)====
How to refer to variable	Represents 	Proper format
.realityMachines 	 	Decimal
.perkPoints 	 	Normal Javascript number
.perks 	 	Set of numbers. Each perk is represented with a number
.glyphs 	All glyphs owned 	a huge list (you probably shouldn't edit it directly)
.glyphs.active 	All glyphs equipped 	an ordered list of glyphs
.glyphs.active[x] 	The glyph equipped at the xth slot, slots are numbered from 0 	a glyph. all of its properties are listed below: 
{
    "id": <Normal Javascript number, unrelated to gameplay>,
    "idx": <Normal Javascript number, also unrelated to gameplay>,
    "type": <the type of glyph, basic glyphs can be "power", "infinity", "replication", "time", "dilation", string>,
    "strength": <the strength of the glyph. =rarity \times 2.5 + 1, normal Javascript number>
    "level": <level of the glyph, normal Javascript number>
    "rawLevel": <level of the glyph before caps and such(?), normal Javascript number>,
    "effects": <effects of the glyph, equal to the sum of all IDs of all effects, normal Javascript number>,
}
.glyphs.inventory 	All glyphs not equipped 	same as .glyphs.active
.seed 	RNG the game uses to generate your glyph options on Reality. Changing this will only change the glyph rarity 	Javascript signed 32bit integer
.initialSeed 	RNG the game uses to generate your glyph options on Reality. Changing this will only change the glyph rarity and effects	Javascript signed 32bit integer
.upgReqs 	Whether the requirements for the one-time Reality upgrades are met. 	Javascript integer, from 0 to 67,108,800.
Expressed in binary, bits 6 (value 64) to 25 (value 33,554,432) represents the one-time Reality upgrades, from bottom to top, right to left, and most significant bit to least.
It is unknown what bits 0 to 5 represent.
.upgradeBits 	Whether the one-time Reality upgrades are bought. 	same as above
==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.
How to call function 	Effect 	Used in 	Return
setTheme(name) 	Sets the theme of the game to the one called [name].
Sets the display on the Current theme: option.
Awards the Shhh... it's a secret achievement if [name] is 2 or less characters long.	When you press the theme button.
When an import is a valid secret theme.	
showTab(name) 	Show the tab named [name]. 	When you switch tabs. 	
updateMoney() 	Updates your current antimatter and matter displays to the correct value.	gameLoop() 	
updateCoinPerSec() 	Updates your antimatter per second display to the correct value. 	gameLoop() 	
updateWorstChallengeTime()	Updates your worst challenge time to the correct value. 	updateChallengeTimes() 	
sacrificeConf() 	Toggles player.options.sacrificeConfirmation. 	Unused. 	
updateDimensions() 	Sets the intended display of dimensions. (name, multiplier, amount, etc)
Sets the amount of visible rows on the normal dimensions tab in accordance to canBuyDimension().
Updates the labels for the soft reset and antimatter galaxy to the correct value.
Updates the label for the tickspeed upgrade (the reduction in speed) to the correct value, if canBuyTickSpeed().
Updates the fastest and current infinity times in statistics.
Updates both infinity point counters.
Updates the infinitied count, total antimatter, dimboost/galaxy count, and total time played in statistics.
Updates the eternity count and current/best eternity times in statistics.
Updates the text on all of the infinity and eternity upgrades.
Updates the dilation button (to dilate or stop, and the amount of antimatter needed to get TP).	gameLoop()
On page load.
On hard reset.	
updateCosts() 	Updates the normal dimension's buy and until 10 buttons to have the correct price.
Updates tickspeed's buy and buy max buttons.
Updates the buy buttons on infinity and time dimensions.	On hard reset.
On notation change.
autoBuyerTick()
On page load.	
floatText(id,text,offset) 	Displays floating text if the animation option is enabled. 	On purchase of 10 normal dimensions.	
updateChallenges() 	Updates challenge buttons to say "start, "completed", or "running".
Unlocks infinity challenges if you have the antimatter.
If an error is gotten, tries again.	On import.
On hard reset.
On crunch.
eternity()
exitChallenge()
startChallenge()
gameLoop()
updateChallenges()	
respecTimeStudies() 	Respecs all time studies, and gives back Time Theorems. 	On a respec in-game. 	
===Return===
These functions don't do anything except calculate a value when called.
How to call function 	Return 	Used in
getInfinitied() 	Infinitied plus banked infinities, minimum 0. 	Everything that uses infinities except things that expect a certain amount or less.
getGalaxyCostScalingStart()	The amount of galaxies it takes before polynomial scaling begins. 	getGalaxyRequirement()
getGalaxyRequirement() 	How many dimensions you need for your next antimatter galaxy. 	updateDimensions()
Whenever it's needed to check if you can afford a galaxy.
getETA(cost) 	Attempts to calculate how long it would take to afford a purchase.	Unused.
ETACalc(t) 	Is used for getETA. 	getETA()
isEterChall(e) 	Checks if an element is for eternity challenges. 	updateChallenges()
 	 	
 	 	
 	 	
 	 	
===Dev===
These functions exist as extra unused parts of the game, often used for testing.
How to call function 	Effect 	Extra
dev.giveAllAchievements()	Awards every achievement (without duplicates). 	
dev.doubleEverything() 	Doubles every numerical (including Decimal) value in the player less than three layers deep. 	In the Antimatter Dimensions Discord, someone made a joke about doubling every value in the game.
dev.spin3d() 	Plays an animation where the game screen flips in 360 degrees. 	
dev.cancerize() 	Sets the theme to Cancer and the notation to Emojis. The theme and notation buttons say SO and BEAUTIFUL respectively.	On April Fools 2018, this effect occurred randomly if players waited long enough.
dev.fixSave() 	Attempts to fix your savefile by changing instances of NaN to 10. Then loads the save. 	
dev.implode() 	Plays an animation, which is used for the Big Crunch animation. 	
dev.updateCosts() 	Sets the Time Dimension costs to what they should be. 	
dev.testTDCosts() 	Sets the Time Dimension costs to what they should be. 	This one also updates timeDimStartCosts to what it should be. In testing, the time dimensions had different pricing resulting in testers getting bad results when it was changed without their prices having changed.
==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.