diff --git a/README.md b/README.md index 06da271..7e9f5dd 100644 --- a/README.md +++ b/README.md @@ -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. -[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. \ No newline at end of file diff --git a/changelog.md b/changelog.md index a3a27d0..f4272af 100644 --- a/changelog.md +++ b/changelog.md @@ -1,8 +1,10 @@ # The Modding Tree changelog: +### v2.5.11 - 5/27/21 - 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. - 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 upgrade/buyable layering when they are hovered over. - Fixed devSpeed being applied twice. diff --git a/docs/!general-info.md b/docs/!general-info.md index 762fe4a..30afb72 100644 --- a/docs/!general-info.md +++ b/docs/!general-info.md @@ -1,6 +1,6 @@ # 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. @@ -24,16 +24,19 @@ While reading this documentation, the following key will be used when describing ## Table of Contents + + ### 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). - [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. - [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, 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 diff --git a/docs/trees-and-tree-customization.md b/docs/trees-and-tree-customization.md index 0c3d9be..ec340f0 100644 --- a/docs/trees-and-tree-customization.md +++ b/docs/trees-and-tree-customization.md @@ -6,7 +6,9 @@ This also introduces the "tree" component, which can be used in your layers as w ## layoutInfo 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) - treeLayout: If present, overrides the tree layout and places nodes as you describe instead (explained in the next section). diff --git a/docs/getting-started.md b/docs/tutorials/getting-started.md similarity index 94% rename from docs/getting-started.md rename to docs/tutorials/getting-started.md index e5f2861..3cbd779 100644 --- a/docs/getting-started.md +++ b/docs/tutorials/getting-started.md @@ -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.** -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. diff --git a/docs/making-a-mod.md b/docs/tutorials/making-a-mod.md similarity index 100% rename from docs/making-a-mod.md rename to docs/tutorials/making-a-mod.md diff --git a/docs/updating-tmt.md b/docs/tutorials/updating-tmt.md similarity index 100% rename from docs/updating-tmt.md rename to docs/tutorials/updating-tmt.md diff --git a/js/Demo/demoTree.js b/js/Demo/demoTree.js index ff7b91d..72b00e4 100644 --- a/js/Demo/demoTree.js +++ b/js/Demo/demoTree.js @@ -1,6 +1,8 @@ // treeLayout will override the default tree's layout if used var layoutInfo = { startTab: "c", + startNavTab: "tree-tab", + showTree: true, //treeLayout: "" diff --git a/js/tree.js b/js/tree.js index 2aae72a..4b24f8c 100644 --- a/js/tree.js +++ b/js/tree.js @@ -1,5 +1,6 @@ var layoutInfo = { startTab: "none", + startNavTab: "tree-tab", showTree: true, treeLayout: "" diff --git a/js/utils/save.js b/js/utils/save.js index 7ec1daf..cc3a24b 100644 --- a/js/utils/save.js +++ b/js/utils/save.js @@ -5,7 +5,7 @@ function save() { function startPlayerBase() { return { tab: layoutInfo.startTab, - navTab: (layoutInfo.showTree ? "tree-tab" : "none"), + navTab: (layoutInfo.showTree ? layoutInfo.startNavTab : "none"), time: Date.now(), autosave: true, notify: {},