From 4f9171c171986873ca0dc1e2396e90021c6962fd Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 24 Dec 2025 18:19:58 -0500 Subject: [PATCH 01/45] begin new addon... fun --- wiki/addons/research-tree/meta.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 wiki/addons/research-tree/meta.yml diff --git a/wiki/addons/research-tree/meta.yml b/wiki/addons/research-tree/meta.yml new file mode 100644 index 00000000..a6de62e7 --- /dev/null +++ b/wiki/addons/research-tree/meta.yml @@ -0,0 +1,4 @@ +author: "F07631B3" +addon: "third-party" +download-curseforge: "research-tree" +download-modrinth: "research-tree" From f95c9f0aa842c485a08d4005052fec23fa905d0f Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 24 Dec 2025 23:29:25 +0000 Subject: [PATCH 02/45] perhaps made the main page more intresting in text... --- wiki/addons/research-tree/en.yml | 1 + wiki/addons/research-tree/page.kubedoc | 1 + 2 files changed, 2 insertions(+) create mode 100644 wiki/addons/research-tree/en.yml create mode 100644 wiki/addons/research-tree/page.kubedoc diff --git a/wiki/addons/research-tree/en.yml b/wiki/addons/research-tree/en.yml new file mode 100644 index 00000000..40676f55 --- /dev/null +++ b/wiki/addons/research-tree/en.yml @@ -0,0 +1 @@ +title: "Research Tree" \ No newline at end of file diff --git a/wiki/addons/research-tree/page.kubedoc b/wiki/addons/research-tree/page.kubedoc new file mode 100644 index 00000000..d26c41a9 --- /dev/null +++ b/wiki/addons/research-tree/page.kubedoc @@ -0,0 +1 @@ +Research Tree adds an entire system for a data-driven researching system. \ No newline at end of file From 05194b75dfe3e498b86127f7ac0b530528443e82 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Thu, 25 Dec 2025 02:53:56 +0000 Subject: [PATCH 03/45] Lot more work. Need to continue on it --- wiki/addons/research-tree/helpers/en.yml | 2 + .../addons/research-tree/helpers/page.kubedoc | 99 +++++++++++++++++++ .../research-tree/research-categories/en.yml | 2 + .../research-categories/page.kubedoc | 4 + .../research-tree/research-nodes/en.yml | 2 + .../research-tree/research-nodes/page.kubedoc | 53 ++++++++++ 6 files changed, 162 insertions(+) create mode 100644 wiki/addons/research-tree/helpers/en.yml create mode 100644 wiki/addons/research-tree/helpers/page.kubedoc create mode 100644 wiki/addons/research-tree/research-categories/en.yml create mode 100644 wiki/addons/research-tree/research-categories/page.kubedoc create mode 100644 wiki/addons/research-tree/research-nodes/en.yml create mode 100644 wiki/addons/research-tree/research-nodes/page.kubedoc diff --git a/wiki/addons/research-tree/helpers/en.yml b/wiki/addons/research-tree/helpers/en.yml new file mode 100644 index 00000000..ebc2f502 --- /dev/null +++ b/wiki/addons/research-tree/helpers/en.yml @@ -0,0 +1,2 @@ +title: "Requirements, Rewards, and more" +description: "Documentation describing stuff for research nodes and more" \ No newline at end of file diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc new file mode 100644 index 00000000..0b6ab3b2 --- /dev/null +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -0,0 +1,99 @@ +# Requirements +Requirements are used for research nodes where certain things need to be met before researching can actually beign. + +>>> info +These listed methods will all be under `Requirements`. +`ItemRequirement`s are also **not** bound to the limit of 99 item count (as what an `ItemStack` would have. You could have 500 and it'll still work) +<<< + +## Items +- $$.item(item: Item, amount: int) +Creates an `ItemRequirement` requiring an item with the required amount. + +- $$.item(item: TagKey, amount: int) +Creates an `ItemRequirement` allowing any item tag (eg. `#c:ingots/lead`), with the required amount + +## Fluids +- $$.fluid(fluid: Fluid, amount: int) +Creates a `FluidRequirement` allowing any fluid (eg. `minecraft:water`), with the required amount (in mB) + +- $$.fluid(fluid: TagKey, amount: int) +Creates a `FluidRequirement` allowing any fluid tag (eg. `kubejs:deadly_liquid`), with the required amount (in mB) + +## Energy +- $$.energy(amount: int) +Creates an `EnergyRequirement` with the required amount of energy (FE) + +## Advancement +- $$.advancement(advancement: ResourceLocation) +Creates an `AdvancementRequirement` requiring the player to have the advancement before proceeding + +- $$.advancement(advancements: ResourceLocation[]) +Creates an `AdvancementRequirement` requiring the player to have the given advancements before proceeding + +## Dimension +>>> info +When research has begun, the player must visit the dimension in order for it to be counted as fulfilled +<<< + +- $$.dimension(dimension: RegistryKey) +Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end`) + +- $$.dimension(dimensions: RegistryKey[]) +Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end` and `minecraft:the_nether`) + +## Time +- $$.time(ticks: int) +Creates a `TimeRequirement` requiring the player to wait a certain amount of time + +# Rewards +>>> info +These listed methods will all be under `Rewards`. +<<< + +## Items +- $$.item(item: Item, amount: int) +Creates an `ItemReward` granting the player the item(s) + +- $$.item(stack: ItemStack) +Creates an `ItemReward` from a given `ItemStack` + +## Command Execution +>>> info +This will execute a command with permission level `2`, and it will be like the player ran it ignoring player permission level. +To target the player, you can do `@s` or `@p` for the player who has been rewarded. +Commands are not required to have a `/` at the start (eg. `/kill @p` will do the same as `kill @p`) +<<< + +- $$.command(command: String) +Executes a command as the player (eg `title @p title {"text":"Research Complete!","color":"gold"}`) + +- $$.command(command: String, diplayName: Component) +Executes a command as the player. Display name will show up instead of the command (eg: you can do `kill @s` and have the display name as `Text.of("200 diamond blocks!!")`) + +## Experience Points +- $$.xp(amount: int) +Grants the player an amount of xp points (**NOT** levels) + +- $$.xpLevels(amount: int) +Grants the player an amount of xp levels + +## Attribute Modification +>>> warn +Any attributes changed to the player (eg max health) are **permanent** changes. +The modifier id must also be unique. +<<< +- $$.attribute(attribute: ResourceLocation, modifierId: ResourceLocation | String, amount: double, operation: AttributeModifier.Operation?) +Modifies the player's attributes to one via the reward. If the `operation` argument is not present, it will default to `AttributeModifier.Operation.ADD_VALUE`. + +## Loot Tables +- $$.lootTable(lootTableId: ResourceLocation) +Grants the player a loot table that is rolled. + +## Mob Effects +- $$.effect(effectInstance: MobEffectInstance) +Gives the player an effect. To make `MobEffectInstance`, see `MobEffectUtil` + +## Recipe Unlocking +- $$.unlockRecipes(recipes: ResourceLocation[]) +Unlocks the given recipes to the player \ No newline at end of file diff --git a/wiki/addons/research-tree/research-categories/en.yml b/wiki/addons/research-tree/research-categories/en.yml new file mode 100644 index 00000000..bc4f5183 --- /dev/null +++ b/wiki/addons/research-tree/research-categories/en.yml @@ -0,0 +1,2 @@ +title: "Research Categories" +description: "Guide on how to add and modify existing Categories." \ No newline at end of file diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc new file mode 100644 index 00000000..68f0a79f --- /dev/null +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -0,0 +1,4 @@ +All the following scripts go into {st-s} + +# Creating Research Categories +Everything will go under the `ResearchTree.category` event diff --git a/wiki/addons/research-tree/research-nodes/en.yml b/wiki/addons/research-tree/research-nodes/en.yml new file mode 100644 index 00000000..342dd112 --- /dev/null +++ b/wiki/addons/research-tree/research-nodes/en.yml @@ -0,0 +1,2 @@ +title: "Research Nodes" +description: "Add, remove, or modify research nodes" \ No newline at end of file diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc new file mode 100644 index 00000000..e7cd8d94 --- /dev/null +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -0,0 +1,53 @@ +All the following scripts go into {st-s} + +# Creating Research Nodes +Everything will go under the `ResearchTree.research` event + +- $$create(id: String) +>>> info +Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]` +<<< + +## Methods + +- $$.icon(icon: Item) +The icon is just an item to point render. (eg, `minecraft:dirt` would render dirt for example) + +- $$.pos(x: int, y: int) +There is also `position` that does the exact same thing + +- $$.title(title: Component) +Overrides the default name (the id of the node formatted) to a custom one. Use `Text#of` for the argument + +- $$.description(description: Component) +Creates a description for the research node + +- $$.prerequisite(prerequisite: ResourceLocation) +This can be attached multipule times to make other research nodes required to unlock this node. +To get the research node id, enable advanced tooltips via `F3+H` + +- $$.requires(requirement: ResearchRequirement) +See (link the `helpers#Requirements` here) for possible requirements. + +- $$.reward(reward: ResearchReward) +See (link the `helpers#Rewards` here) for possible rewards. + +- $$.category(category: ResourceLocation) +Links the node to a category + +- $$.hidden() +Hides the research from being viewed + +- $$.ticksPerPercent(ticksPerPercent: int) +For every `1%` of research, the player must wait the ticks set in `ticksPerPercent` for `1%` of progression. + +| Method | Type | Defaults To | +| `icon` | ==REQUIRED== | - | +| `pos` | ==REQUIRED== | - | +| `title` | ==OPTIONAL== | Defaults to formatted id | +| `description` | ==OPTIONAL== | No description is provided | +| `prerequisite` | ==OPTIONAL== | When none provided, does not rely on other nodes to be unlocked | +| `requires` | ==OPTIONAL== | When none provided, researching begins immedentally | +| `reward` | ==OPTIONAL== | When none provided, no rewards are granted | +| `category` | ==OPTIONAL== | Defaults to the uncategorized section | +| `ticksPerPercent` | ==OPTIONAL== | Defaults to `100` ticks per `1%` (`10000` total ticks) | \ No newline at end of file From 6587bb1d0ead73fbc365ef110163cc774e88deae Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Thu, 25 Dec 2025 03:03:19 +0000 Subject: [PATCH 04/45] oh kube wiki parser --- wiki/addons/research-tree/helpers/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index 0b6ab3b2..c8c67f7b 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -83,7 +83,7 @@ Grants the player an amount of xp levels Any attributes changed to the player (eg max health) are **permanent** changes. The modifier id must also be unique. <<< -- $$.attribute(attribute: ResourceLocation, modifierId: ResourceLocation | String, amount: double, operation: AttributeModifier.Operation?) +- $$.attribute(attribute: ResourceLocation, modifierId: ResourceLocation, amount: double, operation: AttributeModifier.Operation?) Modifies the player's attributes to one via the reward. If the `operation` argument is not present, it will default to `AttributeModifier.Operation.ADD_VALUE`. ## Loot Tables From 7d59ef661705b7cb7393b6a9b5d841173b87e274 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Sat, 27 Dec 2025 03:03:32 +0000 Subject: [PATCH 05/45] Added more stuff for the research node event --- .vscode/settings.json | 5 +++++ wiki/addons/research-tree/research-nodes/page.kubedoc | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..b242572e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index e7cd8d94..4adb8d7f 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -3,7 +3,16 @@ All the following scripts go into {st-s} # Creating Research Nodes Everything will go under the `ResearchTree.research` event -- $$create(id: String) +- $$exists(id: ResourceLocation) +Return `true` or `false` depending if a research node exists or not. + +- $$remove(id: ResourceLocation) +Removes a research node (eg. `some_other_mod:epic_researchable`) + +- $$modify(id: ResourceLocation) +Modifies a research node (eg. `another_mod:super_cool_researchable`). For methods, see below + +- $$create(id: ResourceLocation) >>> info Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]` <<< From ccb8e93e1b27eb1f1e1055209d3a4de40b6f702a Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Sat, 27 Dec 2025 03:06:12 +0000 Subject: [PATCH 06/45] clairify --- wiki/addons/research-tree/research-nodes/page.kubedoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index 4adb8d7f..41a9d2d3 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -50,9 +50,9 @@ Hides the research from being viewed - $$.ticksPerPercent(ticksPerPercent: int) For every `1%` of research, the player must wait the ticks set in `ticksPerPercent` for `1%` of progression. -| Method | Type | Defaults To | -| `icon` | ==REQUIRED== | - | -| `pos` | ==REQUIRED== | - | +| Method | Type | Notes | +| `icon` | ==REQUIRED== | Not required for research node modification | +| `pos` | ==REQUIRED== | Not required for research node modification | | `title` | ==OPTIONAL== | Defaults to formatted id | | `description` | ==OPTIONAL== | No description is provided | | `prerequisite` | ==OPTIONAL== | When none provided, does not rely on other nodes to be unlocked | From 64b4b272d6d518f4b0c146174be1d3132439d85f Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Sat, 27 Dec 2025 03:09:57 +0000 Subject: [PATCH 07/45] bleh --- wiki/addons/research-tree/research-nodes/page.kubedoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index 41a9d2d3..8cbf77fc 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -14,7 +14,8 @@ Modifies a research node (eg. `another_mod:super_cool_researchable`). For method - $$create(id: ResourceLocation) >>> info -Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]` +Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]`. +For example, `create('my_research_node')` will get constructed as `kubejs:my_research_node`. <<< ## Methods From cd5961fa7f204ff508faca7bc57e645b5201d2a7 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Sat, 27 Dec 2025 03:31:26 +0000 Subject: [PATCH 08/45] Category modifications and creation page --- .../research-categories/page.kubedoc | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc index 68f0a79f..37109c32 100644 --- a/wiki/addons/research-tree/research-categories/page.kubedoc +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -2,3 +2,53 @@ All the following scripts go into {st-s} # Creating Research Categories Everything will go under the `ResearchTree.category` event + +- $$exists(id: ResourceLocation) +Return `true` or `false` depending if a research category exists or not. + +- $$modify(id: ResourceLocation) +Modifies a research category. For methods, see below. **There are extra methods for modifications!** + +- $$create(id: ResourceLocation) +>>> info +Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]`. +For example, `create('super_cool_category')` will get constructed as `kubejs:super_cool_category`. +<<< + +## Methods +- $$.name(name: Component) +Overrides the default name (the id of the category formatted) to a custom one. Use `Text#of` for the argument. + +- $$.description(description: Component) +Creates a description for the category + +- $$.icon(icon: Item) +Sets the categories icon as an item + +- $$.unlockRequirement(unlockRequirement: ResourceLocation) +Unlocks the category after a research node has been completed + +- $$.addPrerequisite(prerequisite: ResourceLocation) +Requires another category to be unlocked before this category + +- $$.addPrerequisites(prerequisites: ResourceLocation[]) +Same thing as above, but as a list (adds it to the current ones) + +- $$.sortOrder(order: int) +Display order. Defaults to `0` + +| Method | Type | Notes | +| `name` | ==OPTIONAL== | Defaults to formatted id | +| `description` | ==OPTIONAL== | Category will have no description | +| `icon` | ==OPTIONAL== | Category will have no icon | +| `unlockRequirement` | ==OPTIONAL== | Will be unlocked. If it is locked, no research in this category can be started | +| `addPrerequisite`/`addPrerequisites` | ==OPTIONAL== | Will not rely on other categories to be unlocked first | +| `sortOrder` | ==OPTIONAL== | Defaults to `0`. Sort order is used to sort the categories | + +The following is for category modification - methods above are also included with modifications: +## Methods +- $$.removeUnlockRequirement() +Removes the requirement for another research node to be completed + +- $$.removePrerequisites(category: ResourceLocation) +Removes the requirement for another category to be unlocked \ No newline at end of file From 7b7172d8ad938a66e58932587c4ae4a1ffd92946 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Sat, 27 Dec 2025 03:33:34 +0000 Subject: [PATCH 09/45] wiki parser, please --- wiki/addons/research-tree/helpers/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index c8c67f7b..329b902e 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -83,7 +83,7 @@ Grants the player an amount of xp levels Any attributes changed to the player (eg max health) are **permanent** changes. The modifier id must also be unique. <<< -- $$.attribute(attribute: ResourceLocation, modifierId: ResourceLocation, amount: double, operation: AttributeModifier.Operation?) +- $$.attribute(attribute: ResourceLocation, modifierId: ResourceLocation, amount: double, operation: AttributeModifierOperation?) Modifies the player's attributes to one via the reward. If the `operation` argument is not present, it will default to `AttributeModifier.Operation.ADD_VALUE`. ## Loot Tables From 0c3f437dc0c609886c20dad53fd4842f08ea6690 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Sat, 27 Dec 2025 03:38:07 +0000 Subject: [PATCH 10/45] Oh, change it to Text --- wiki/addons/research-tree/helpers/page.kubedoc | 2 +- wiki/addons/research-tree/research-categories/page.kubedoc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index 329b902e..1f8065bd 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -68,7 +68,7 @@ Commands are not required to have a `/` at the start (eg. `/kill @p` will do the - $$.command(command: String) Executes a command as the player (eg `title @p title {"text":"Research Complete!","color":"gold"}`) -- $$.command(command: String, diplayName: Component) +- $$.command(command: String, diplayName: Text) Executes a command as the player. Display name will show up instead of the command (eg: you can do `kill @s` and have the display name as `Text.of("200 diamond blocks!!")`) ## Experience Points diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc index 37109c32..834136dd 100644 --- a/wiki/addons/research-tree/research-categories/page.kubedoc +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -16,10 +16,10 @@ For example, `create('super_cool_category')` will get constructed as `kubejs:sup <<< ## Methods -- $$.name(name: Component) -Overrides the default name (the id of the category formatted) to a custom one. Use `Text#of` for the argument. +- $$.name(name: Text) +Overrides the default name (the id of the category formatted) to a custom one. -- $$.description(description: Component) +- $$.description(description: Text) Creates a description for the category - $$.icon(icon: Item) From dc2bb5f3aa50f27f9d2c58e9b1ee1067b637ffe9 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Sat, 27 Dec 2025 03:38:47 +0000 Subject: [PATCH 11/45] forgot this page --- wiki/addons/research-tree/research-nodes/page.kubedoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index 8cbf77fc..b4b72f8f 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -26,10 +26,10 @@ The icon is just an item to point render. (eg, `minecraft:dirt` would render dir - $$.pos(x: int, y: int) There is also `position` that does the exact same thing -- $$.title(title: Component) +- $$.title(title: Text) Overrides the default name (the id of the node formatted) to a custom one. Use `Text#of` for the argument -- $$.description(description: Component) +- $$.description(description: Text) Creates a description for the research node - $$.prerequisite(prerequisite: ResourceLocation) From 4bc525543ea6bc502e96c33fe0bba23b69a1e08c Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Thu, 1 Jan 2026 17:21:26 +0000 Subject: [PATCH 12/45] Server scripts, not startup --- wiki/addons/research-tree/research-categories/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc index 834136dd..845e6654 100644 --- a/wiki/addons/research-tree/research-categories/page.kubedoc +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -1,4 +1,4 @@ -All the following scripts go into {st-s} +All the following scripts go into {se-s} # Creating Research Categories Everything will go under the `ResearchTree.category` event From fda676fae4216c97a30ff6f94fa8b8756acab086 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Thu, 1 Jan 2026 17:22:33 +0000 Subject: [PATCH 13/45] forgot this one --- wiki/addons/research-tree/research-nodes/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index b4b72f8f..bf1aa697 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -1,4 +1,4 @@ -All the following scripts go into {st-s} +All the following scripts go into {se-s} # Creating Research Nodes Everything will go under the `ResearchTree.research` event From abc113548be4870736be7d9d6d41a02c60e8db6c Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Thu, 1 Jan 2026 17:59:08 +0000 Subject: [PATCH 14/45] Add .custom to the rewards and requirements --- wiki/addons/research-tree/helpers/page.kubedoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index 1f8065bd..f1186de9 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -96,4 +96,8 @@ Gives the player an effect. To make `MobEffectInstance`, see `MobEffectUtil` ## Recipe Unlocking - $$.unlockRecipes(recipes: ResourceLocation[]) -Unlocks the given recipes to the player \ No newline at end of file +Unlocks the given recipes to the player + +## Custom Rewards +- $$.custom(kubeReward: ResourceLocation) +Allows you to define a reward created with KubeJS \ No newline at end of file From 8399cd526460a898931830a30be1a7f3a74cf24f Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Thu, 1 Jan 2026 18:13:21 +0000 Subject: [PATCH 15/45] Registration of custom rewards. commit to see how it looks so far --- .../addons/research-tree/helpers/page.kubedoc | 6 +++- .../research-tree/rar-registration/en.yml | 2 ++ .../rar-registration/page.kubedoc | 31 +++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 wiki/addons/research-tree/rar-registration/en.yml create mode 100644 wiki/addons/research-tree/rar-registration/page.kubedoc diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index f1186de9..c930dd67 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -46,6 +46,10 @@ Creates a `DimensionRequirement` requiring the player to visit the dimension (eg - $$.time(ticks: int) Creates a `TimeRequirement` requiring the player to wait a certain amount of time +## Custom Requirements +- $$.custom(kubeRequirement: ResourceLocation) +Allows you to use a requirement created with KubeJS + # Rewards >>> info These listed methods will all be under `Rewards`. @@ -100,4 +104,4 @@ Unlocks the given recipes to the player ## Custom Rewards - $$.custom(kubeReward: ResourceLocation) -Allows you to define a reward created with KubeJS \ No newline at end of file +Allows you to use a reward created with KubeJS \ No newline at end of file diff --git a/wiki/addons/research-tree/rar-registration/en.yml b/wiki/addons/research-tree/rar-registration/en.yml new file mode 100644 index 00000000..d72b6c73 --- /dev/null +++ b/wiki/addons/research-tree/rar-registration/en.yml @@ -0,0 +1,2 @@ +title: "Registering Custom Requirements and Rewards" +description: "How to create custom research requirements and rewards" \ No newline at end of file diff --git a/wiki/addons/research-tree/rar-registration/page.kubedoc b/wiki/addons/research-tree/rar-registration/page.kubedoc new file mode 100644 index 00000000..208fa74c --- /dev/null +++ b/wiki/addons/research-tree/rar-registration/page.kubedoc @@ -0,0 +1,31 @@ +A Guide on how to register custom requirements and rewards +All the following code goes into {st-s} + +# Custom Requirements +```js +StartupEvents.registry("researchtree:requirement_types", event => { + //TODO write this section +}) +``` + + +# Custom Rewards +```js +StartupEvents.registry("researchtree:reward_types", event => { + // This is the reward type. This will be kubejs:my_reward + // This is important for defining rewards on research nodes + event.create("my_reward") + + // This is OPTIONAL. You should have this because you're making a custom reward... + // This gives you both the player and the level + .grant((player, level) => { + // Here you can do anything that involves the player and level + }) + + // Display text is OPTIONAL + // By default, the lang key would be "reward.kubejs." + // So this example would be "reward.kubejs.my_reward" + // You can define a lang key, or this method + .displayText(Text.of("My epic reward")) +}) +``` \ No newline at end of file From 4a3a858333e9ff0e71857efb4b7d694f41add5c7 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 2 Jan 2026 00:57:54 +0000 Subject: [PATCH 16/45] one more thing to this --- wiki/addons/research-tree/rar-registration/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/rar-registration/page.kubedoc b/wiki/addons/research-tree/rar-registration/page.kubedoc index 208fa74c..fafcfda7 100644 --- a/wiki/addons/research-tree/rar-registration/page.kubedoc +++ b/wiki/addons/research-tree/rar-registration/page.kubedoc @@ -13,7 +13,7 @@ StartupEvents.registry("researchtree:requirement_types", event => { ```js StartupEvents.registry("researchtree:reward_types", event => { // This is the reward type. This will be kubejs:my_reward - // This is important for defining rewards on research nodes + // This is important for defining rewards on research nodes (and category dependencies) event.create("my_reward") // This is OPTIONAL. You should have this because you're making a custom reward... From 8eb96e0b5fc4af217491923169658c8557156c12 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 2 Jan 2026 01:15:17 +0000 Subject: [PATCH 17/45] I think this is the final part of the wiki --- .../rar-registration/page.kubedoc | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/wiki/addons/research-tree/rar-registration/page.kubedoc b/wiki/addons/research-tree/rar-registration/page.kubedoc index fafcfda7..50c23c17 100644 --- a/wiki/addons/research-tree/rar-registration/page.kubedoc +++ b/wiki/addons/research-tree/rar-registration/page.kubedoc @@ -4,7 +4,35 @@ All the following code goes into {st-s} # Custom Requirements ```js StartupEvents.registry("researchtree:requirement_types", event => { - //TODO write this section + // This is the requirement type. This will be kubejs:my_requirement + // This is important for defining requirements on research nodes. + event.create("my_requirement") + + // This determines if the requirement is currently met + // Should return true or false + .isMet(player => { + // Example: check if player has a specific item in inventory + return player.inventory.contains('minecraft:diamond') + }) + + // Returns a progress value between 0.0 and 1.0 + // Used to show partial completion in the UI + .progress(player => { + // Example: check diamond count (max 64) + let count = 0 + player.inventory.getAllItems().forEach(stack => { + if (stack.id == 'minecraft:diamond') { + count += stack.count + } + }) + return count / 64.0 + }) + + // Display text is OPTIONAL + // By default, the lang key would be "requirement.kubejs." + // So this example would be "requirement.researchtree.my_requirement" + // You can define a lang key, or use this method + .displayText(Text.of("Must have diamonds")) }) ``` @@ -23,7 +51,7 @@ StartupEvents.registry("researchtree:reward_types", event => { }) // Display text is OPTIONAL - // By default, the lang key would be "reward.kubejs." + // By default, the lang key would be "reward.kubejs." // So this example would be "reward.kubejs.my_reward" // You can define a lang key, or this method .displayText(Text.of("My epic reward")) From 2990b279d2ca97772b1396055e14fb53501ba040 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 2 Jan 2026 01:16:17 +0000 Subject: [PATCH 18/45] Note to self: don't copy paste from source code, and proof read --- wiki/addons/research-tree/rar-registration/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/rar-registration/page.kubedoc b/wiki/addons/research-tree/rar-registration/page.kubedoc index 50c23c17..49ef48a2 100644 --- a/wiki/addons/research-tree/rar-registration/page.kubedoc +++ b/wiki/addons/research-tree/rar-registration/page.kubedoc @@ -30,7 +30,7 @@ StartupEvents.registry("researchtree:requirement_types", event => { // Display text is OPTIONAL // By default, the lang key would be "requirement.kubejs." - // So this example would be "requirement.researchtree.my_requirement" + // So this example would be "requirement.kubejs.my_requirement" // You can define a lang key, or use this method .displayText(Text.of("Must have diamonds")) }) From a1b5f33124398dea8a1cdb31925aaff5051d9db2 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 2 Jan 2026 01:23:07 +0000 Subject: [PATCH 19/45] oopsies --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b242572e..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "githubPullRequests.ignoredPullRequestBranches": [ - "main" - ] -} \ No newline at end of file From feb03883304222a23990c188113d53c61078e5bc Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 2 Jan 2026 02:19:09 +0000 Subject: [PATCH 20/45] beans --- .vscode/settings.json | 5 +++++ wiki/addons/research-tree/rar-registration/page.kubedoc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..b242572e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file diff --git a/wiki/addons/research-tree/rar-registration/page.kubedoc b/wiki/addons/research-tree/rar-registration/page.kubedoc index 49ef48a2..7c135706 100644 --- a/wiki/addons/research-tree/rar-registration/page.kubedoc +++ b/wiki/addons/research-tree/rar-registration/page.kubedoc @@ -20,7 +20,7 @@ StartupEvents.registry("researchtree:requirement_types", event => { .progress(player => { // Example: check diamond count (max 64) let count = 0 - player.inventory.getAllItems().forEach(stack => { + player.inventory.allItems.forEach(stack => { if (stack.id == 'minecraft:diamond') { count += stack.count } From d181c43ca84a38c9928f79e3498166522004971a Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 2 Jan 2026 02:21:13 +0000 Subject: [PATCH 21/45] aaaa --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b242572e..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "githubPullRequests.ignoredPullRequestBranches": [ - "main" - ] -} \ No newline at end of file From 97b310b0c17d2a86f84ebca360351007f617b9c5 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 2 Jan 2026 03:19:08 +0000 Subject: [PATCH 22/45] some event handeling. Need to get more in --- wiki/addons/research-tree/events/en.yml | 2 ++ wiki/addons/research-tree/events/page.kubedoc | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 wiki/addons/research-tree/events/en.yml create mode 100644 wiki/addons/research-tree/events/page.kubedoc diff --git a/wiki/addons/research-tree/events/en.yml b/wiki/addons/research-tree/events/en.yml new file mode 100644 index 00000000..9673a0e4 --- /dev/null +++ b/wiki/addons/research-tree/events/en.yml @@ -0,0 +1,2 @@ +title: "ResearchTree Events" +description: "Events you can hook onto and do things with" \ No newline at end of file diff --git a/wiki/addons/research-tree/events/page.kubedoc b/wiki/addons/research-tree/events/page.kubedoc new file mode 100644 index 00000000..45743813 --- /dev/null +++ b/wiki/addons/research-tree/events/page.kubedoc @@ -0,0 +1,34 @@ +All the following code goes into {se-s} + +# Research Events +## Research Started +```js +// The first argument (where "namespace:node_id" is) is required. +// This will get ran when that research node has started +ResearchTree.researchStarted("namespace:node_id", event => { + // This gets the player that has started this research + event.getPlayer() + + // This gets the level where the player is located + event.getLevel() + + // Gets the research node that has been started + event.node() +}) +``` + +## Research Started +```js +// The first argument (where "namespace:node_id" is) is required. +// This will get ran when that research node has completed +ResearchTree.researchCompleted("namespace:node_id", event => { + // This gets the player that has completed this research + event.getPlayer() + + // This gets the level where the player is located + event.getLevel() + + // Gets the research node that has been completed + event.node() +}) +``` \ No newline at end of file From 18b17ffd37b31596a32ac071e9bd677f159f3af3 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:56:53 -0500 Subject: [PATCH 23/45] Clarify the hidden method --- wiki/addons/research-tree/research-nodes/page.kubedoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index bf1aa697..45b74900 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -46,7 +46,7 @@ See (link the `helpers#Rewards` here) for possible rewards. Links the node to a category - $$.hidden() -Hides the research from being viewed +Hides the node until the parent is completed. The rest of the branch will also show up. - $$.ticksPerPercent(ticksPerPercent: int) For every `1%` of research, the player must wait the ticks set in `ticksPerPercent` for `1%` of progression. @@ -60,4 +60,4 @@ For every `1%` of research, the player must wait the ticks set in `ticksPerPerce | `requires` | ==OPTIONAL== | When none provided, researching begins immedentally | | `reward` | ==OPTIONAL== | When none provided, no rewards are granted | | `category` | ==OPTIONAL== | Defaults to the uncategorized section | -| `ticksPerPercent` | ==OPTIONAL== | Defaults to `100` ticks per `1%` (`10000` total ticks) | \ No newline at end of file +| `ticksPerPercent` | ==OPTIONAL== | Defaults to `100` ticks per `1%` (`10000` total ticks) | From cf87481ad2684593355934a8a69fb97388f2e2bf Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:57:59 -0500 Subject: [PATCH 24/45] grammarly told me so --- .../research-tree/research-nodes/page.kubedoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index 45b74900..6d310cd9 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -7,33 +7,33 @@ Everything will go under the `ResearchTree.research` event Return `true` or `false` depending if a research node exists or not. - $$remove(id: ResourceLocation) -Removes a research node (eg. `some_other_mod:epic_researchable`) +Removes a research node (eg, `some_other_mod:epic_researchable`) - $$modify(id: ResourceLocation) -Modifies a research node (eg. `another_mod:super_cool_researchable`). For methods, see below +Modifies a research node (eg, `another_mod:super_cool_researchable`). For methods, see below - $$create(id: ResourceLocation) >>> info -Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]`. +Internally, this constructs a `ResourceLocation` that gets set to `kubejs:[the id you chose]`. For example, `create('my_research_node')` will get constructed as `kubejs:my_research_node`. <<< ## Methods - $$.icon(icon: Item) -The icon is just an item to point render. (eg, `minecraft:dirt` would render dirt for example) +The icon is just an item to point rto ender. (eg, `minecraft:dirt` would render dirt, for example) - $$.pos(x: int, y: int) -There is also `position` that does the exact same thing +There is also `position` that does the same thing - $$.title(title: Text) -Overrides the default name (the id of the node formatted) to a custom one. Use `Text#of` for the argument +Overrides the default name (the node's id formatted) with a custom one. Use `Text#of` for the argument - $$.description(description: Text) Creates a description for the research node - $$.prerequisite(prerequisite: ResourceLocation) -This can be attached multipule times to make other research nodes required to unlock this node. +This can be attached multiple times to make other research nodes required to unlock this node. To get the research node id, enable advanced tooltips via `F3+H` - $$.requires(requirement: ResearchRequirement) From 5d493bb9f32d7fa8441618049fcac3d9c207971b Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:59:05 -0500 Subject: [PATCH 25/45] aaaaaaaaaaaaaa Corrected the description of the icon method for clarity. --- wiki/addons/research-tree/research-nodes/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index 6d310cd9..d53d2af9 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -21,7 +21,7 @@ For example, `create('my_research_node')` will get constructed as `kubejs:my_res ## Methods - $$.icon(icon: Item) -The icon is just an item to point rto ender. (eg, `minecraft:dirt` would render dirt, for example) +The icon that will be rendered for the node. (eg, `minecraft:dirt` would render dirt, for example) - $$.pos(x: int, y: int) There is also `position` that does the same thing From 53ad351a93d4b9b887cd18ff3e885bfebeb2c057 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Mon, 26 Jan 2026 20:59:41 -0500 Subject: [PATCH 26/45] I hate this Updated description for the icon method in the research node. --- wiki/addons/research-tree/research-nodes/page.kubedoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index d53d2af9..df9733ef 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -21,7 +21,7 @@ For example, `create('my_research_node')` will get constructed as `kubejs:my_res ## Methods - $$.icon(icon: Item) -The icon that will be rendered for the node. (eg, `minecraft:dirt` would render dirt, for example) +The item icon that will be rendered for the node. (eg, `minecraft:dirt` would render dirt, for example) - $$.pos(x: int, y: int) There is also `position` that does the same thing From e901304d80b7a3e9fc6efe6cec72a3ad50ec105a Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 6 Feb 2026 09:00:59 -0500 Subject: [PATCH 27/45] KubeJS player stage support --- wiki/addons/research-tree/helpers/page.kubedoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index c930dd67..36ccd347 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -46,6 +46,10 @@ Creates a `DimensionRequirement` requiring the player to visit the dimension (eg - $$.time(ticks: int) Creates a `TimeRequirement` requiring the player to wait a certain amount of time +## Stage Requirement +- $$.requireStage(stage: String) +Creates `PlayerStageRequirement` requiring the player to have a stage unlocked/added. (Note: This only works with KubeJS stages). + ## Custom Requirements - $$.custom(kubeRequirement: ResourceLocation) Allows you to use a requirement created with KubeJS @@ -102,6 +106,10 @@ Gives the player an effect. To make `MobEffectInstance`, see `MobEffectUtil` - $$.unlockRecipes(recipes: ResourceLocation[]) Unlocks the given recipes to the player +## Stage Unlocking +- $$.grantStage(stage: String) +Creates a `PlayerUnlockStageReward` which grants the player a stage. (Note: This only works with KubeJS stages). + ## Custom Rewards - $$.custom(kubeReward: ResourceLocation) -Allows you to use a reward created with KubeJS \ No newline at end of file +Allows you to use a reward created with KubeJS From 13520447c6b982667c278eb15b1d2557101b4203 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Thu, 12 Feb 2026 09:01:20 -0500 Subject: [PATCH 28/45] New thing and info at the top --- .../addons/research-tree/helpers/page.kubedoc | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index 36ccd347..9600b594 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -1,9 +1,13 @@ +>>> info +For a more detailed list of everything listed, visit the [Research Tree General Knowledge](https://github.com/wolfieboy09/ResearchTree/wiki/General-Knowledge) page. +<<< + # Requirements -Requirements are used for research nodes where certain things need to be met before researching can actually beign. +Requirements are used for research nodes where certain things need to be met before researching can actually begin. >>> info These listed methods will all be under `Requirements`. -`ItemRequirement`s are also **not** bound to the limit of 99 item count (as what an `ItemStack` would have. You could have 500 and it'll still work) +`ItemRequirement`s are also **not** bound to the limit of 99 item count (as what an `ItemStack` would have. You could have 500 and it'll still work.) <<< ## Items @@ -33,15 +37,25 @@ Creates an `AdvancementRequirement` requiring the player to have the given advan ## Dimension >>> info -When research has begun, the player must visit the dimension in order for it to be counted as fulfilled +When research has begun, the player must visit the dimension for it to be counted as fulfilled <<< - $$.dimension(dimension: RegistryKey) Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end`) -- $$.dimension(dimensions: RegistryKey[]) +- $$.dimensions(dimensions: RegistryKey[]) Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end` and `minecraft:the_nether`) +## Timed Dimension +This is the same thing as `Dimension`, but with the number of ticks the player has been in each dimension. + +- $$.dimension(dimension: RegistryKey, int duration) +Now, with a second parameter, the amount of time the player has to be in each dimension. Creates a `TimedDimensionRequirement`. + +- $$.dimensions(dimensions: RegistryKey[], int duration). +Creates a `TimedDimensionRequirement` with a list of dimensions. + + ## Time - $$.time(ticks: int) Creates a `TimeRequirement` requiring the player to wait a certain amount of time From 620d05167df63996464cb8c46f6b4f866516596a Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:39:25 -0500 Subject: [PATCH 29/45] regex replace 1 --- .../addons/research-tree/helpers/page.kubedoc | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index 9600b594..13ff3d16 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -11,28 +11,28 @@ These listed methods will all be under `Requirements`. <<< ## Items -- $$.item(item: Item, amount: int) +`[java].item(item: Item, amount: int)` Creates an `ItemRequirement` requiring an item with the required amount. -- $$.item(item: TagKey, amount: int) +`[java].item(item: TagKey, amount: int)` Creates an `ItemRequirement` allowing any item tag (eg. `#c:ingots/lead`), with the required amount ## Fluids -- $$.fluid(fluid: Fluid, amount: int) +`[java].fluid(fluid: Fluid, amount: int)` Creates a `FluidRequirement` allowing any fluid (eg. `minecraft:water`), with the required amount (in mB) -- $$.fluid(fluid: TagKey, amount: int) +`[java].fluid(fluid: TagKey, amount: int)` Creates a `FluidRequirement` allowing any fluid tag (eg. `kubejs:deadly_liquid`), with the required amount (in mB) ## Energy -- $$.energy(amount: int) +`[java].energy(amount: int)` Creates an `EnergyRequirement` with the required amount of energy (FE) ## Advancement -- $$.advancement(advancement: ResourceLocation) +`[java].advancement(advancement: ResourceLocation)` Creates an `AdvancementRequirement` requiring the player to have the advancement before proceeding -- $$.advancement(advancements: ResourceLocation[]) +`[java].advancement(advancements: ResourceLocation[])` Creates an `AdvancementRequirement` requiring the player to have the given advancements before proceeding ## Dimension @@ -40,32 +40,32 @@ Creates an `AdvancementRequirement` requiring the player to have the given advan When research has begun, the player must visit the dimension for it to be counted as fulfilled <<< -- $$.dimension(dimension: RegistryKey) +`[java].dimension(dimension: RegistryKey)` Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end`) -- $$.dimensions(dimensions: RegistryKey[]) +`[java].dimensions(dimensions: RegistryKey[])` Creates a `DimensionRequirement` requiring the player to visit the dimension (eg. `minecraft:the_end` and `minecraft:the_nether`) ## Timed Dimension This is the same thing as `Dimension`, but with the number of ticks the player has been in each dimension. -- $$.dimension(dimension: RegistryKey, int duration) +`[java].dimension(dimension: RegistryKey, int duration)` Now, with a second parameter, the amount of time the player has to be in each dimension. Creates a `TimedDimensionRequirement`. -- $$.dimensions(dimensions: RegistryKey[], int duration). +`[java].dimensions(dimensions: RegistryKey[], int duration). ` Creates a `TimedDimensionRequirement` with a list of dimensions. ## Time -- $$.time(ticks: int) +`[java].time(ticks: int)` Creates a `TimeRequirement` requiring the player to wait a certain amount of time ## Stage Requirement -- $$.requireStage(stage: String) +`[java].requireStage(stage: String)` Creates `PlayerStageRequirement` requiring the player to have a stage unlocked/added. (Note: This only works with KubeJS stages). ## Custom Requirements -- $$.custom(kubeRequirement: ResourceLocation) +`[java].custom(kubeRequirement: ResourceLocation)` Allows you to use a requirement created with KubeJS # Rewards @@ -74,10 +74,10 @@ These listed methods will all be under `Rewards`. <<< ## Items -- $$.item(item: Item, amount: int) +`[java].item(item: Item, amount: int)` Creates an `ItemReward` granting the player the item(s) -- $$.item(stack: ItemStack) +`[java].item(stack: ItemStack)` Creates an `ItemReward` from a given `ItemStack` ## Command Execution @@ -87,17 +87,17 @@ To target the player, you can do `@s` or `@p` for the player who has been reward Commands are not required to have a `/` at the start (eg. `/kill @p` will do the same as `kill @p`) <<< -- $$.command(command: String) +`[java].command(command: String)` Executes a command as the player (eg `title @p title {"text":"Research Complete!","color":"gold"}`) -- $$.command(command: String, diplayName: Text) +`[java].command(command: String, diplayName: Text)` Executes a command as the player. Display name will show up instead of the command (eg: you can do `kill @s` and have the display name as `Text.of("200 diamond blocks!!")`) ## Experience Points -- $$.xp(amount: int) +`[java].xp(amount: int)` Grants the player an amount of xp points (**NOT** levels) -- $$.xpLevels(amount: int) +`[java].xpLevels(amount: int)` Grants the player an amount of xp levels ## Attribute Modification @@ -105,25 +105,29 @@ Grants the player an amount of xp levels Any attributes changed to the player (eg max health) are **permanent** changes. The modifier id must also be unique. <<< -- $$.attribute(attribute: ResourceLocation, modifierId: ResourceLocation, amount: double, operation: AttributeModifierOperation?) +`[java].attribute(attribute: ResourceLocation, modifierId: ResourceLocation, amount: double, operation: AttributeModifierOperation?)` Modifies the player's attributes to one via the reward. If the `operation` argument is not present, it will default to `AttributeModifier.Operation.ADD_VALUE`. ## Loot Tables -- $$.lootTable(lootTableId: ResourceLocation) +`[java].lootTable(lootTableId: ResourceLocation)` Grants the player a loot table that is rolled. ## Mob Effects -- $$.effect(effectInstance: MobEffectInstance) +`[java].effect(effectInstance: MobEffectInstance)` Gives the player an effect. To make `MobEffectInstance`, see `MobEffectUtil` ## Recipe Unlocking -- $$.unlockRecipes(recipes: ResourceLocation[]) +`[java].unlockRecipes(recipes: ResourceLocation[])` Unlocks the given recipes to the player ## Stage Unlocking -- $$.grantStage(stage: String) +`[java].grantStage(stage: String)` Creates a `PlayerUnlockStageReward` which grants the player a stage. (Note: This only works with KubeJS stages). ## Custom Rewards -- $$.custom(kubeReward: ResourceLocation) +`[java].custom(kubeReward: ResourceLocation)` Allows you to use a reward created with KubeJS + + + +=== Code Execution Successful === From ca646222ec88d166656681f7ff3c5ada3b027df5 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:40:18 -0500 Subject: [PATCH 30/45] regexify 2 --- .../research-categories/page.kubedoc | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc index 845e6654..635e261d 100644 --- a/wiki/addons/research-tree/research-categories/page.kubedoc +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -3,38 +3,38 @@ All the following scripts go into {se-s} # Creating Research Categories Everything will go under the `ResearchTree.category` event -- $$exists(id: ResourceLocation) +`[java]exists(id: ResourceLocation)` Return `true` or `false` depending if a research category exists or not. -- $$modify(id: ResourceLocation) +`[java]modify(id: ResourceLocation)` Modifies a research category. For methods, see below. **There are extra methods for modifications!** -- $$create(id: ResourceLocation) +`[java]create(id: ResourceLocation)` >>> info Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]`. For example, `create('super_cool_category')` will get constructed as `kubejs:super_cool_category`. <<< ## Methods -- $$.name(name: Text) +`[java].name(name: Text)` Overrides the default name (the id of the category formatted) to a custom one. -- $$.description(description: Text) +`[java].description(description: Text)` Creates a description for the category -- $$.icon(icon: Item) +`[java].icon(icon: Item)` Sets the categories icon as an item -- $$.unlockRequirement(unlockRequirement: ResourceLocation) +`[java].unlockRequirement(unlockRequirement: ResourceLocation)` Unlocks the category after a research node has been completed -- $$.addPrerequisite(prerequisite: ResourceLocation) +`[java].addPrerequisite(prerequisite: ResourceLocation)` Requires another category to be unlocked before this category -- $$.addPrerequisites(prerequisites: ResourceLocation[]) +`[java].addPrerequisites(prerequisites: ResourceLocation[])` Same thing as above, but as a list (adds it to the current ones) -- $$.sortOrder(order: int) +`[java].sortOrder(order: int)` Display order. Defaults to `0` | Method | Type | Notes | @@ -47,8 +47,11 @@ Display order. Defaults to `0` The following is for category modification - methods above are also included with modifications: ## Methods -- $$.removeUnlockRequirement() +`[java].removeUnlockRequirement()` Removes the requirement for another research node to be completed -- $$.removePrerequisites(category: ResourceLocation) -Removes the requirement for another category to be unlocked \ No newline at end of file +`[java].removePrerequisites(category: ResourceLocation)` +Removes the requirement for another category to be unlocked + + +=== Code Execution Successful === From 6ffaee5e465d080db71c8a93b8fc236af8a81113 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:41:44 -0500 Subject: [PATCH 31/45] regexify 3 --- .../research-tree/research-nodes/page.kubedoc | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index df9733ef..d7b6a1d5 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -3,16 +3,16 @@ All the following scripts go into {se-s} # Creating Research Nodes Everything will go under the `ResearchTree.research` event -- $$exists(id: ResourceLocation) +`[java]exists(id: ResourceLocation)` Return `true` or `false` depending if a research node exists or not. -- $$remove(id: ResourceLocation) +`[java]remove(id: ResourceLocation)` Removes a research node (eg, `some_other_mod:epic_researchable`) -- $$modify(id: ResourceLocation) +`[java]modify(id: ResourceLocation)` Modifies a research node (eg, `another_mod:super_cool_researchable`). For methods, see below -- $$create(id: ResourceLocation) +`[java]create(id: ResourceLocation)` >>> info Internally, this constructs a `ResourceLocation` that gets set to `kubejs:[the id you chose]`. For example, `create('my_research_node')` will get constructed as `kubejs:my_research_node`. @@ -20,35 +20,35 @@ For example, `create('my_research_node')` will get constructed as `kubejs:my_res ## Methods -- $$.icon(icon: Item) +`[java].icon(icon: Item)` The item icon that will be rendered for the node. (eg, `minecraft:dirt` would render dirt, for example) -- $$.pos(x: int, y: int) +`[java].pos(x: int, y: int)` There is also `position` that does the same thing -- $$.title(title: Text) +`[java].title(title: Text)` Overrides the default name (the node's id formatted) with a custom one. Use `Text#of` for the argument -- $$.description(description: Text) +`[java].description(description: Text)` Creates a description for the research node -- $$.prerequisite(prerequisite: ResourceLocation) +`[java].prerequisite(prerequisite: ResourceLocation)` This can be attached multiple times to make other research nodes required to unlock this node. To get the research node id, enable advanced tooltips via `F3+H` -- $$.requires(requirement: ResearchRequirement) +`[java].requires(requirement: ResearchRequirement)` See (link the `helpers#Requirements` here) for possible requirements. -- $$.reward(reward: ResearchReward) +`[java].reward(reward: ResearchReward)` See (link the `helpers#Rewards` here) for possible rewards. -- $$.category(category: ResourceLocation) +`[java].category(category: ResourceLocation)` Links the node to a category -- $$.hidden() +`[java].hidden()` Hides the node until the parent is completed. The rest of the branch will also show up. -- $$.ticksPerPercent(ticksPerPercent: int) +`[java].ticksPerPercent(ticksPerPercent: int)` For every `1%` of research, the player must wait the ticks set in `ticksPerPercent` for `1%` of progression. | Method | Type | Notes | From 197e554e1cb2cac9e52643419943a3d0f452a038 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:42:11 -0500 Subject: [PATCH 32/45] Used an online python runner and copied this line on accident --- wiki/addons/research-tree/research-categories/page.kubedoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc index 635e261d..2577c016 100644 --- a/wiki/addons/research-tree/research-categories/page.kubedoc +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -52,6 +52,3 @@ Removes the requirement for another research node to be completed `[java].removePrerequisites(category: ResourceLocation)` Removes the requirement for another category to be unlocked - - -=== Code Execution Successful === From e3f643245ff2f910efcf643b9b79308c4b9220d4 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:42:38 -0500 Subject: [PATCH 33/45] Used an online python runner and copied this line on accident x2 --- wiki/addons/research-tree/helpers/page.kubedoc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index 13ff3d16..7dbd5f56 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -127,7 +127,3 @@ Creates a `PlayerUnlockStageReward` which grants the player a stage. (Note: This ## Custom Rewards `[java].custom(kubeReward: ResourceLocation)` Allows you to use a reward created with KubeJS - - - -=== Code Execution Successful === From a52bb41183c7e2e2ec9d8efdd80d1bfb23fbbfc6 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:15:44 -0500 Subject: [PATCH 34/45] Create meta.yml --- wiki/addons/research-tree/events/meta.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 wiki/addons/research-tree/events/meta.yml diff --git a/wiki/addons/research-tree/events/meta.yml b/wiki/addons/research-tree/events/meta.yml new file mode 100644 index 00000000..a3c243a7 --- /dev/null +++ b/wiki/addons/research-tree/events/meta.yml @@ -0,0 +1 @@ +script: server From b02bd0d29f18ddc49893be6b7566d6cb06164a31 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:15:56 -0500 Subject: [PATCH 35/45] Update page.kubedoc --- wiki/addons/research-tree/events/page.kubedoc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wiki/addons/research-tree/events/page.kubedoc b/wiki/addons/research-tree/events/page.kubedoc index 45743813..658266c9 100644 --- a/wiki/addons/research-tree/events/page.kubedoc +++ b/wiki/addons/research-tree/events/page.kubedoc @@ -1,5 +1,3 @@ -All the following code goes into {se-s} - # Research Events ## Research Started ```js @@ -31,4 +29,4 @@ ResearchTree.researchCompleted("namespace:node_id", event => { // Gets the research node that has been completed event.node() }) -``` \ No newline at end of file +``` From a24d2f16c35cd1599909a74d110ec13cabdce50b Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:26:04 -0500 Subject: [PATCH 36/45] update --- wiki/addons/research-tree/rar-registration/page.kubedoc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wiki/addons/research-tree/rar-registration/page.kubedoc b/wiki/addons/research-tree/rar-registration/page.kubedoc index 7c135706..771e99fb 100644 --- a/wiki/addons/research-tree/rar-registration/page.kubedoc +++ b/wiki/addons/research-tree/rar-registration/page.kubedoc @@ -1,6 +1,3 @@ -A Guide on how to register custom requirements and rewards -All the following code goes into {st-s} - # Custom Requirements ```js StartupEvents.registry("researchtree:requirement_types", event => { @@ -56,4 +53,4 @@ StartupEvents.registry("researchtree:reward_types", event => { // You can define a lang key, or this method .displayText(Text.of("My epic reward")) }) -``` \ No newline at end of file +``` From 77e762d0fdded0f97817d2823aeaf9ea466124e5 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:26:08 -0500 Subject: [PATCH 37/45] Create meta.yml --- wiki/addons/research-tree/rar-registration/meta.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 wiki/addons/research-tree/rar-registration/meta.yml diff --git a/wiki/addons/research-tree/rar-registration/meta.yml b/wiki/addons/research-tree/rar-registration/meta.yml new file mode 100644 index 00000000..e1ff8534 --- /dev/null +++ b/wiki/addons/research-tree/rar-registration/meta.yml @@ -0,0 +1 @@ +script: startup From d615d52831ea42d116d8564b2ac6c6bc64e05fe8 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:10:19 -0500 Subject: [PATCH 38/45] Create meta.yml --- wiki/addons/research-tree/research-categories/meta.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 wiki/addons/research-tree/research-categories/meta.yml diff --git a/wiki/addons/research-tree/research-categories/meta.yml b/wiki/addons/research-tree/research-categories/meta.yml new file mode 100644 index 00000000..a3c243a7 --- /dev/null +++ b/wiki/addons/research-tree/research-categories/meta.yml @@ -0,0 +1 @@ +script: server From 3b0356b6fcc3adfc3504a64825b1ad2b0c14d85b Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:10:42 -0500 Subject: [PATCH 39/45] Update page.kubedoc --- wiki/addons/research-tree/research-categories/page.kubedoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc index 2577c016..9afa9b42 100644 --- a/wiki/addons/research-tree/research-categories/page.kubedoc +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -1,5 +1,3 @@ -All the following scripts go into {se-s} - # Creating Research Categories Everything will go under the `ResearchTree.category` event From b8ba1544c9e3e641e0908c547c5a2fd6c7773f01 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:11:54 -0500 Subject: [PATCH 40/45] go away copilot, PLEASE --- wiki/addons/research-tree/research-nodes/meta.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 wiki/addons/research-tree/research-nodes/meta.yml diff --git a/wiki/addons/research-tree/research-nodes/meta.yml b/wiki/addons/research-tree/research-nodes/meta.yml new file mode 100644 index 00000000..a3c243a7 --- /dev/null +++ b/wiki/addons/research-tree/research-nodes/meta.yml @@ -0,0 +1 @@ +script: server From 8fccbfa811657f9f071bd473501530741435b8a8 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:12:07 -0500 Subject: [PATCH 41/45] final --- wiki/addons/research-tree/research-nodes/page.kubedoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/wiki/addons/research-tree/research-nodes/page.kubedoc b/wiki/addons/research-tree/research-nodes/page.kubedoc index d7b6a1d5..7b314f66 100644 --- a/wiki/addons/research-tree/research-nodes/page.kubedoc +++ b/wiki/addons/research-tree/research-nodes/page.kubedoc @@ -1,5 +1,3 @@ -All the following scripts go into {se-s} - # Creating Research Nodes Everything will go under the `ResearchTree.research` event From 50583002b0bb8088d6ddf4bb860b084a6f824d67 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 13 Mar 2026 20:31:11 -0400 Subject: [PATCH 42/45] thing 1 --- wiki/addons/research-tree/events/page.kubedoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wiki/addons/research-tree/events/page.kubedoc b/wiki/addons/research-tree/events/page.kubedoc index 658266c9..81ff6211 100644 --- a/wiki/addons/research-tree/events/page.kubedoc +++ b/wiki/addons/research-tree/events/page.kubedoc @@ -1,10 +1,10 @@ # Research Events ## Research Started ```js -// The first argument (where "namespace:node_id" is) is required. -// This will get ran when that research node has started -ResearchTree.researchStarted("namespace:node_id", event => { - // This gets the player that has started this research +// The first argument (where 'namespace:node_id' is) is required. +// This will get run when that research node has started +ResearchTree.researchStarted('namespace:node_id', event => { + // This gets the player who has started this research event.getPlayer() // This gets the level where the player is located @@ -17,10 +17,10 @@ ResearchTree.researchStarted("namespace:node_id", event => { ## Research Started ```js -// The first argument (where "namespace:node_id" is) is required. -// This will get ran when that research node has completed -ResearchTree.researchCompleted("namespace:node_id", event => { - // This gets the player that has completed this research +// The first argument (where 'namespace:node_id' is) is required. +// This will get run when that research node has completed +ResearchTree.researchCompleted('namespace:node_id', event => { + // This gets the player who has completed this research event.getPlayer() // This gets the level where the player is located From 4c3c3814652d44d6bb86ecf87a75ecbbcbbc0bff Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 13 Mar 2026 20:32:34 -0400 Subject: [PATCH 43/45] thing 2 --- wiki/addons/research-tree/helpers/page.kubedoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/addons/research-tree/helpers/page.kubedoc b/wiki/addons/research-tree/helpers/page.kubedoc index 7dbd5f56..a8f4efd7 100644 --- a/wiki/addons/research-tree/helpers/page.kubedoc +++ b/wiki/addons/research-tree/helpers/page.kubedoc @@ -88,10 +88,10 @@ Commands are not required to have a `/` at the start (eg. `/kill @p` will do the <<< `[java].command(command: String)` -Executes a command as the player (eg `title @p title {"text":"Research Complete!","color":"gold"}`) +Executes a command as the player (eg `title @p title {'text':'Research Complete!','color':'gold'}`) `[java].command(command: String, diplayName: Text)` -Executes a command as the player. Display name will show up instead of the command (eg: you can do `kill @s` and have the display name as `Text.of("200 diamond blocks!!")`) +Executes a command as the player. Display name will show up instead of the command (eg: you can do `kill @s` and have the display name as `Text.of('200 diamond blocks!!')`) ## Experience Points `[java].xp(amount: int)` From 8e9d0f39ce85e16260ab84da3fb005bc72a4cc32 Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 13 Mar 2026 20:33:02 -0400 Subject: [PATCH 44/45] quote 4 --- .../rar-registration/page.kubedoc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wiki/addons/research-tree/rar-registration/page.kubedoc b/wiki/addons/research-tree/rar-registration/page.kubedoc index 771e99fb..577aa816 100644 --- a/wiki/addons/research-tree/rar-registration/page.kubedoc +++ b/wiki/addons/research-tree/rar-registration/page.kubedoc @@ -1,9 +1,9 @@ # Custom Requirements ```js -StartupEvents.registry("researchtree:requirement_types", event => { +StartupEvents.registry('researchtree:requirement_types', event => { // This is the requirement type. This will be kubejs:my_requirement // This is important for defining requirements on research nodes. - event.create("my_requirement") + event.create('my_requirement') // This determines if the requirement is currently met // Should return true or false @@ -26,20 +26,20 @@ StartupEvents.registry("researchtree:requirement_types", event => { }) // Display text is OPTIONAL - // By default, the lang key would be "requirement.kubejs." - // So this example would be "requirement.kubejs.my_requirement" + // By default, the lang key would be 'requirement.kubejs.' + // So this example would be 'requirement.kubejs.my_requirement' // You can define a lang key, or use this method - .displayText(Text.of("Must have diamonds")) + .displayText(Text.of('Must have diamonds')) }) ``` # Custom Rewards ```js -StartupEvents.registry("researchtree:reward_types", event => { +StartupEvents.registry('researchtree:reward_types', event => { // This is the reward type. This will be kubejs:my_reward // This is important for defining rewards on research nodes (and category dependencies) - event.create("my_reward") + event.create('my_reward') // This is OPTIONAL. You should have this because you're making a custom reward... // This gives you both the player and the level @@ -48,9 +48,9 @@ StartupEvents.registry("researchtree:reward_types", event => { }) // Display text is OPTIONAL - // By default, the lang key would be "reward.kubejs." - // So this example would be "reward.kubejs.my_reward" + // By default, the lang key would be 'reward.kubejs.' + // So this example would be 'reward.kubejs.my_reward' // You can define a lang key, or this method - .displayText(Text.of("My epic reward")) + .displayText(Text.of('My epic reward')) }) ``` From c12522b60736384e08eeea00720fc7ccfeca7c0c Mon Sep 17 00:00:00 2001 From: wolfieboy09 <105564186+wolfieboy09@users.noreply.github.com> Date: Fri, 13 Mar 2026 20:33:32 -0400 Subject: [PATCH 45/45] evil " --- wiki/addons/research-tree/research-categories/page.kubedoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/addons/research-tree/research-categories/page.kubedoc b/wiki/addons/research-tree/research-categories/page.kubedoc index 9afa9b42..2abe8daf 100644 --- a/wiki/addons/research-tree/research-categories/page.kubedoc +++ b/wiki/addons/research-tree/research-categories/page.kubedoc @@ -9,7 +9,7 @@ Modifies a research category. For methods, see below. **There are extra methods `[java]create(id: ResourceLocation)` >>> info -Internally, this constructs a `ResourceLocation` that get's set to `kubejs:[the id you chose]`. +Internally, this constructs a `ResourceLocation` that gets set to `kubejs:[the id you chose]`. For example, `create('super_cool_category')` will get constructed as `kubejs:super_cool_category`. <<< @@ -33,7 +33,7 @@ Requires another category to be unlocked before this category Same thing as above, but as a list (adds it to the current ones) `[java].sortOrder(order: int)` -Display order. Defaults to `0` +Display order. Defaults to `0`. | Method | Type | Notes | | `name` | ==OPTIONAL== | Defaults to formatted id |