1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 09:21:46 +00:00

Moved tutorials, added startNavTab

This commit is contained in:
Harley White 2021-05-27 00:54:58 -04:00
parent c6f0dd9c48
commit 3a7cd62bcc
10 changed files with 17 additions and 7 deletions

View file

@ -2,6 +2,6 @@
An incremental game engine based on The Prestige Tree. It still requires programming knowledge, but it's mostly pretty easy things and copy/pasting. An incremental game engine based on The Prestige Tree. It still requires programming knowledge, but it's mostly pretty easy things and copy/pasting.
[Look here for a tutorial on getting started with modding with TMT](docs/getting-started.md) [Look here for a tutorial on getting started with modding with TMT](docs/tutorials/getting-started.md)
You can look in the [documentation](docs/!general-info.md) for more information on how it all works, or look at the code in layers.js to see what it all looks like. You can look in the [documentation](docs/!general-info.md) for more information on how it all works, or look at the code in layers.js to see what it all looks like.

View file

@ -1,8 +1,10 @@
# The Modding Tree changelog: # The Modding Tree changelog:
### v2.5.11 - 5/27/21
- Finished part 1 of the "making a mod" tutorial. - Finished part 1 of the "making a mod" tutorial.
- The challenge that you are currently in is highlighted, and will not be hidden if "hide completed challenges" is on and it is already completed. - The challenge that you are currently in is highlighted, and will not be hidden if "hide completed challenges" is on and it is already completed.
- Added leftTab, which makes a layer use the left tab instead of the right one (good for trees-within-trees and such) - Added leftTab, which makes a layer use the left tab instead of the right one (good for trees-within-trees and such)
- Added startNavTab, which lets you choose which tab starts out on the left side.
- Fixed the infobox not appearing in default tabFormat. - Fixed the infobox not appearing in default tabFormat.
- Fixed upgrade/buyable layering when they are hovered over. - Fixed upgrade/buyable layering when they are hovered over.
- Fixed devSpeed being applied twice. - Fixed devSpeed being applied twice.

View file

@ -1,6 +1,6 @@
# The-Modding-Tree # The-Modding-Tree
Making a game in The Modding Tree mostly involves defining parameters or functions on objects. If you aren't following the [getting started guide](getting-started.md), you should start by [setting up your basic mod info](main-mod-info.md) in [mod.js](/js/mod.js). It's important to set a mod id to ensure saving works properly. Making a game in The Modding Tree mostly involves defining parameters or functions on objects. If you aren't following the [getting started guide](tutorials/getting-started.md), you should start by [setting up your basic mod info](main-mod-info.md) in [mod.js](/js/mod.js). It's important to set a mod id to ensure saving works properly.
Beyond that, the main way to add content is through creating layers, often in [layers.js](/js/layers.js). You can add new layers by calling `addLayer(layername, layerdata)`. There is an example of a basic layer in [layers.js](/js/layers.js) showing the recommended method. It is just an example and can be freely deleted. You can also use it as a reference or a base for your own layers. Beyond that, the main way to add content is through creating layers, often in [layers.js](/js/layers.js). You can add new layers by calling `addLayer(layername, layerdata)`. There is an example of a basic layer in [layers.js](/js/layers.js) showing the recommended method. It is just an example and can be freely deleted. You can also use it as a reference or a base for your own layers.
@ -24,16 +24,19 @@ While reading this documentation, the following key will be used when describing
## Table of Contents ## Table of Contents
### General ### General
- [Getting Started](getting-started.md): Getting your own copy of the code set up with Github Desktop. - [Getting Started](tutorial/getting-started.md): A guide to getting your own copy of the code set up with Github Desktop.
- [Making a Mod](tutorial/making-a-mod.md): A guide to using TMT to make a basic mod.
- [Main mod info](main-mod-info.md): How to set up general things for your mod in [mod.js](/js/mod.js). - [Main mod info](main-mod-info.md): How to set up general things for your mod in [mod.js](/js/mod.js).
- [Basic layer breakdown](basic-layer-breakdown.md): Breaking down the components of a layer with minimal features. - [Basic layer breakdown](basic-layer-breakdown.md): Breaking down the components of a layer with minimal features.
- [Layer features](layer-features.md): Explanations of all of the different properties that you can give a layer. - [Layer features](layer-features.md): Explanations of all of the different properties that you can give a layer.
- [Custom Tab Layouts](custom-tab-layouts.md): An optional way to give your tabs a different layout. You can even create entirely new components to use. - [Custom Tab Layouts](custom-tab-layouts.md): An optional way to give your tabs a different layout. You can even create entirely new components to use.
- [Custom game layouts](trees-and-tree-customization.md): You can get rid of the tree tab, add buttons and other things to the tree, - [Custom game layouts](trees-and-tree-customization.md): You can get rid of the tree tab, add buttons and other things to the tree,
or even customize the tab's layout like a layer tab. or even customize the tab's layout like a layer tab.
- [Updating TMT](updating-tmt.md): Using Github Desktop to update your mod's version of TMT. - [Updating TMT](tutorials/updating-tmt.md): Using Github Desktop to update your mod's version of TMT.
### Common components ### Common components

View file

@ -6,7 +6,9 @@ This also introduces the "tree" component, which can be used in your layers as w
## layoutInfo ## layoutInfo
The most important part is layoutInfo, containing: The most important part is layoutInfo, containing:
- startTab: The id of the default tab to show on the left at the start. - startTab: The id of the default tab to show on the right at the start.
- startNavTab: The id of the default tab to show on the left at the start.
- showTree: True if the tree tab should be shown at the start of the game. (The other tab will fill the whole page) - showTree: True if the tree tab should be shown at the start of the game. (The other tab will fill the whole page)
- treeLayout: If present, overrides the tree layout and places nodes as you describe instead (explained in the next section). - treeLayout: If present, overrides the tree layout and places nodes as you describe instead (explained in the next section).

View file

@ -45,4 +45,4 @@ The benefits of using Github:
8. You can view your project on line, 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 on line, 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.**
And now, you have successfully used Github! You can look at the [documentation](!general-info.md) to see how The Modding Tree's system works and to make your mod a reality. And now, you have successfully used Github! You can look at the next tutorial on [making a mod](tutorials/making-a-mod.md), or look at the [documentation](!general-info.md) to see how The Modding Tree's system works and to make your mod a reality.

View file

@ -1,6 +1,8 @@
// treeLayout will override the default tree's layout if used // treeLayout will override the default tree's layout if used
var layoutInfo = { var layoutInfo = {
startTab: "c", startTab: "c",
startNavTab: "tree-tab",
showTree: true, showTree: true,
//treeLayout: "" //treeLayout: ""

View file

@ -1,5 +1,6 @@
var layoutInfo = { var layoutInfo = {
startTab: "none", startTab: "none",
startNavTab: "tree-tab",
showTree: true, showTree: true,
treeLayout: "" treeLayout: ""

View file

@ -5,7 +5,7 @@ function save() {
function startPlayerBase() { function startPlayerBase() {
return { return {
tab: layoutInfo.startTab, tab: layoutInfo.startTab,
navTab: (layoutInfo.showTree ? "tree-tab" : "none"), navTab: (layoutInfo.showTree ? layoutInfo.startNavTab : "none"),
time: Date.now(), time: Date.now(),
autosave: true, autosave: true,
notify: {}, notify: {},