Made by TheMKeyHolder!
You probably don’t want to touch this. At all! But if you do:
Replace the code with the code of another library, and add
Decimal = OmegaNum (or whatever numlib you use) to the end. You also want to change the formatting if you need numbers this high.
Don’t do this. Why would you do this? If you REALLY want to do this, search for the function Decimal.prototype.<insert function here!> and then edit it. Note that this will break if you do not know what you are doing.
Sadly, this is not possible. JS simply does not have operator overloading, so this won’t work.
This is the thing that makes the lines on the tree display. If you want to edit this, you may want to know how the JS canvas works.
On line 59, change color_id to a CSS color, a CSS gradient, or a pattern. A color is just a “#abcdef”, a CSS color name, or a few other things. For gradients and patterns, the internet has resources for those (this is not a JS tutorial!)
To change the width of the branches, simply set the
width value on line 64 to the amount of pixels wide it should be.
This makes me think that you’re probably not making a tree if you want to do this, but:
On lines 78-81, the x and y coordinates of the start and end are there. You can change how they are calculated, or even set them to a fixed value. If you would like to make the tree drawing different rather than the individual branches, go to drawTree and drawComponentBranches in the file and edit them. There are many things you could be oding with this, so it’s not like I can exactly tell you what to do for this.
This is where the “displays” are calculated. (before being put into temp, of course.)
Do not touch anything outside of these things! Don’t fuck up the width or OOM/s counter please.
NOTE: If you want to change INDIVIDUAL ones, use the built-in feature documented in the docs! (layer-features.md)
Go to the prestigeButtonText function.
This is for if you want to change the defaults. You can set specific values for each type for each if-statement (you can turn this into a switch!) or you can throw in a totally different function to calculate it. It doesn’t really matter. This also is a part of making a custom layer type.
Go to the constructNodeStyle function.
Don’t do this if you only want to change the image or color, or an individual layer style. Instead, use the style or image functions in each layer.
If you want to change the default, you can push things to the “style” array, such as size and things. (you can also edit the CSS for this)
Go to the challengeStyle function.
There is zero reason to do this other than trolling the player. Note that this isn’t actually changing the style, but rather what the player sees the challenge as. It can either be canComplete, done, or locked. You can also for some reason add some other class, but that’s probably not what you were looking for.
Go to the challengeButtonText function.
Once again, this is just for trolling. Just change what the things return.
Go to the achievementStyle function.
Once again, trolling unless you’re trying to edit the size, etc.
Add whatever CSS attributes you want to this using an object and pushing it to the “style” array.
I guess just change each of the four directions in the bar style function or throw logic out and make your own code? I don’t know why you would try doing this anyways.
You can also change the transition duration.
If you are trying to add a custom thing, just go to components.js
If you are trying to change how the WHOLE THING works, go right ahead. There’s nothing stopping you, but I honestly have no idea what you would like to change.
This is where the layer functionality comes from.
Simply go to line 7 (
const defaultGlow = <color>) and change it!
Just change the layerShown function (why are you doing this anyways?)
NOTE: This is more for people who want to make their own TMT “plugins”.
Simply change the updateHotkeys function and manually add some of your own hotkeys through the
Add some new types on lines 37-39 and then add things in updateLayers to account for those. setupLayers should also account for this when setting where the layer goes.
Go into setupLayer and follow the examples in the code, and for each, let’s say achievement, run
layers[layer].achievements[thing].propertyname = propertyvalue
Go into the section of lines 180-193 and add your own default props.
This doesn’t seem like a very necessary thing to do? But anyways, go into addLayer and change the “format” object to what you want using the code you want.
Go into the last lines of layerSupport.js and you will see that these layers actually work like normal ones! You can add upgrades, buyables, clickables, etc. (but why would you do this?). If you want to put things into the options menu or the info itself, head into systemComponents.js.
This is the script that loads in external files. Don’t touch this unless you’re doing something really wacky probably
Simply use the code in the file already inside of the for loop, and change that to the different urls (decided based on localStorage of course)
Just use that code but attach it to an
Where particles are made and loaded!
I don’t see why you would want to change this, but:
Change the getOpacity function to whatever you want! It will return the opacity as a number between 0 and 1.
Go to constructParticleStyle and change the style object that it returns to add or modify attributes.
Where the “system” components are stored. Probably shouldn’t be touched except in rare cases
There really isn’t any other specific things, but if you know Vue you can change how ecah of the components work and look.
You can add options in the option-tab component by adding buttons (and actual functionality of course, check the options.js section).
Simply add HTML to the info-tab component.
This is where all of the “front-end” things happen!
In the updateTemp and setupTemp functions, you can add a special “global” temp value or a special “layer” temp value, by copy-pasting the exitsing code and changing the property and the value.
Put a “return” at the beginning of an updateTemp and make it conditional (or not, if you want all frozen layers???)
This is used in Flame Tree to save computation time
If you, for some reason, do not want an NaN check to occur ever, simply change line 178 in checkDecimalNaN to
This is where all the format code is.
90% of these functions are not to be touched.
Extend the formatTime function and add new units if you wish (basically by copy-pasting and changing stuff.)
Simply edit the format function and make it return whatever you want the final reslt to be.
The place where all of the “shortcuts” are.
If you would like to add your own, simply follow how the previous examples worked. A 3-line function with 1 line of code.
Where all of the options code is.
Add your own function if you would like to make something in this file, otherwise, simply add it to the getStartOptions and reference it elsewhere!
Saving works because of this file.
In the function getStartLayerData, you can add things.
load function, there should be a part about offline progress. You can modify this in whatever way you want in order to get the offline progress that your mod requires.
load function, simply add things to the end of the function (or at some other point if it has to be earlier than setup things)
Edit the themes object and add as many as you would like!
Where each of the Vue components are.
Each component already is a part of tabFormat! Simply add a component and you have a custom thing. The component is supplied with the layer of the tabFormat.
This does require Vue knowledge, however.
Each of these are already a component, so you can just use something like
<buyable layer="p" id="11"></buyable> to display prestige buyable with id 11.
Just add an onclick attribute or the Vue equivalent in order to make it so when you click a challenge or an infobox, it does something.
You probably don’t need to do this (unless you’re editing index.html, but still), but simply add it at the end of the file.
Where a lot of the resetting, etc. code is.
getResetGain & getNextAt can be modified globally as well. Change these to whatever you want them to be.
Modify the softcap function, and change the sqrt to a log, or anything you would like.
Modify the global doReset function and possibly add something at the end.
gameLoop function can be modified easily to have things happen. Just add the code you want to run in, and it will be run.
Multiply, or modify in some way, the diff variable at the beginning of the gameLoop in order to make time run faster.
This is what you want if you have some fast moving layer, just change the 500 in the last line to a 50 or whatever amount of millisecond time you want. You can also manually force a canvas update by setting needCanvasUpdate to true.
Normally not a system file, because not many use the tree customization feature, but still has one thing not known to everyone.
You can modify the tabFormat of the tree-tab at the end and actually add upgrades, etc. or just use a layer proxy.
Utility file. Not meant to be modified, but there is a special thing in there that may be important
The doPopup function does that for you already, and you can put whatever you want in there.
Normally NEVER meant to be modified, as you can now add additional scripts, but there are still some things one may like to do.
OTHER_LAYERS contains layers that have a displayRow that is not a number or “side”. These include the option/changelog/info layers, but you can choose to display all of the “otherside” layers using Vue by adding a section and copying the “side” layer code and using
Sadly, this is not possible (or at least we have not found a way to get Vue to cooperate.) If you found a way to do this, please let us know!
If your question was not on that list and you thought it needed internal editing, ask it in this Modding Help topic.