Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kieran1234567890 patch 4 #83

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion docs/tutorials/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ The benefits of using Github:

7. Finally, at the top middle, click "push origin" to push your changes out onto the online repository.

8. You can view your project online, or share it with others, by going to https://raw.githack.com/[YOUR-GITHUB-USERNAME]/The-Modding-Tree/master/index.html. **You do NOT need to do this to test your mod locally.**
8. You can view your project online, or share it with others, by going to https://raw.githack.com/kieran1234567890/The-Modding-Tree/master/index.html. **You do NOT need to do this to test your mod locally.**

And now, you have successfully used Github! You can look at the next tutorial on [making a mod](making-a-mod.md), or look at the [documentation](/documentation/!general-info.md) to see how The Modding Tree's system works and to make your mod a reality.
23 changes: 15 additions & 8 deletions js/layers.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
addLayer("p", {
name: "prestige", // This is optional, only used in a few places, If absent it just uses the layer id.
symbol: "P", // This appears on the layer's node. Default is the id with the first letter capitalized
addLayer("m", {
name: "mags", // This is optional, only used in a few places, If absent it just uses the layer id.
symbol: "M", // This appears on the layer's node. Default is the id with the first letter capitalized
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
startData() { return {
unlocked: true,
points: new Decimal(0),
}},
color: "#4BDC13",
color: "#808080",
requires: new Decimal(10), // Can be a function that takes requirement increases into account
resource: "prestige points", // Name of prestige currency
baseResource: "points", // Name of resource prestige is based on
resource: "magazines", // Name of prestige currency
baseResource: "bullets", // Name of resource prestige is based on
baseAmount() {return player.points}, // Get the current amount of baseResource
type: "normal", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
exponent: 0.5, // Prestige currency exponent
Expand All @@ -22,7 +22,14 @@ addLayer("p", {
},
row: 0, // Row the layer is in on the tree (0 is the first row)
hotkeys: [
{key: "p", description: "P: Reset for prestige points", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
{key: "m", description: "M: Reset for magazines", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
],
layerShown(){return true}
layerShown(){return true},
upgrades: {
11: {
title: "Reload",
description: "Double your bullet gain.",
cost: new Decimal(1),
},
},
})
18 changes: 9 additions & 9 deletions js/mod.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
let modInfo = {
name: "The ??? Tree",
author: "nobody",
pointsName: "points",
name: "The glock tree",
author: "kieran1234567890",
pointsName: "bullets",
modFiles: ["layers.js", "tree.js"],

discordName: "",
discordLink: "",
initialStartPoints: new Decimal (10), // Used for hard resets and new players
offlineLimit: 1, // In hours
offlineLimit: 0, // In hours
}

// Set your version in num and name
let VERSION = {
num: "0.0",
name: "Literally nothing",
num: "0.3141",
name: "New beginnings",
}

let changelog = `<h1>Changelog:</h1><br>
<h3>v0.0</h3><br>
- Added things.<br>
- Added stuff.`

let winText = `Congratulations! You have reached the end and beaten this game, but for now...`
let winText = `Congratulations! You have reached the end and glock..... , but for now...`

// If you add new functions anywhere inside of a layer, and those functions have an effect when called, add them here.
// (The ones here are examples, all official functions are already taken care of)
Expand All @@ -40,7 +40,7 @@ function canGenPoints(){
function getPointGen() {
if(!canGenPoints())
return new Decimal(0)

if (hasUpgrade('p', 11)) gain = gain.times(2)
let gain = new Decimal(1)
return gain
}
Expand Down Expand Up @@ -75,4 +75,4 @@ function maxTickLength() {
// Use this if you need to undo inflation from an older version. If the version is older than the version that fixed the issue,
// you can cap their current resources with this.
function fixOldSave(oldVersion){
}
}