Update and rename README.txt to README.md
This commit is contained in:
@@ -0,0 +1,139 @@
|
|||||||
|
# **Skill Engine - A Modular Skill Tree Framework for Forge Mods**
|
||||||
|
|
||||||
|
**Skill Engine** is **not** a standalone progression mod.
|
||||||
|
It does **not** add gameplay, attributes, or abilities by itself.
|
||||||
|
|
||||||
|
Instead, **Skill Engine is a framework** designed to let other mods create their own **highly customizable skill trees**, complete with:
|
||||||
|
|
||||||
|
* Node unlocking
|
||||||
|
* Attribute requirements
|
||||||
|
* Custom icons
|
||||||
|
* Skill point handling
|
||||||
|
* Server synchronization
|
||||||
|
* Requirements & tooltips
|
||||||
|
* Interaction with other progression systems (like Ascend)
|
||||||
|
|
||||||
|
If you're looking for a mod that _adds_ skills, this is **not** it.
|
||||||
|
If you are a developer who wants to **add skill trees to your mod without reinventing everything**, Skill Engine is exactly what you need.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
# **Features**
|
||||||
|
|
||||||
|
### JSON-driven Skill Tree System
|
||||||
|
|
||||||
|
Mods can register their own skill nodes simply by adding JSON files under:
|
||||||
|
|
||||||
|
```
|
||||||
|
data/<yourmodid>/skillnodes/*.json
|
||||||
|
```
|
||||||
|
|
||||||
|
### Automatic Node Rendering
|
||||||
|
|
||||||
|
Nodes are positioned, displayed, zoomed, panned, and drawn automatically in the Skill Tree GUI.
|
||||||
|
|
||||||
|
### Icons Support
|
||||||
|
|
||||||
|
Use **your own textures** or **vanilla item textures** as node icons.
|
||||||
|
|
||||||
|
### Requirements System
|
||||||
|
|
||||||
|
Nodes can specify:
|
||||||
|
|
||||||
|
* Linked nodes
|
||||||
|
* Prerequisite attributes
|
||||||
|
* Skill costs
|
||||||
|
* Custom tags
|
||||||
|
|
||||||
|
The UI automatically displays requirements in tooltips and overlays.
|
||||||
|
|
||||||
|
### Unlock Logic & Sync
|
||||||
|
|
||||||
|
Unlocking is fully handled server-side and synced to the client.
|
||||||
|
|
||||||
|
### Full API Support
|
||||||
|
|
||||||
|
Skill Engine includes a public API class that allows other mods to:
|
||||||
|
|
||||||
|
* Give skill points
|
||||||
|
* Unlock skill nodes
|
||||||
|
* Check unlock state
|
||||||
|
* Access player skill data
|
||||||
|
* Register or reference nodes
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
# **How to Use Skill Engine in Your Mod**
|
||||||
|
|
||||||
|
Skill Engine is designed to be extremely easy to integrate.
|
||||||
|
|
||||||
|
## **1\. Add Skill Engine as a Dependency**
|
||||||
|
|
||||||
|
In your `mods.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[[dependencies.yourmodid]]
|
||||||
|
modId="skillengine"
|
||||||
|
type="required"
|
||||||
|
versionRange="[1.0.0,)"
|
||||||
|
```
|
||||||
|
|
||||||
|
In your Gradle build:
|
||||||
|
|
||||||
|
```gradle
|
||||||
|
implementation fg.deobf("net.fretux.skillengine:SkillEngine:<version>")
|
||||||
|
```
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
# **2\. Create Your Skill Nodes (JSON)**
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"title": "Basic Strength",
|
||||||
|
"description": "You feel your muscles tighten.",
|
||||||
|
"cost": 1,
|
||||||
|
"position": { "x": -150.0, "y": -50.0 },
|
||||||
|
"links": ["skillengine:welcome"],
|
||||||
|
"tags": ["yourmodid:strength_1"],
|
||||||
|
"icons": "minecraft:textures/item/iron_sword.png",
|
||||||
|
"prerequisites": {
|
||||||
|
"strength": 10,
|
||||||
|
"agility": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Place this in:
|
||||||
|
|
||||||
|
```
|
||||||
|
data/yourmodid/skillnodes/basic_strength.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Skill Engine will automatically detect it and add it to the tree.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
# **3\. Use the API in Your Code**
|
||||||
|
|
||||||
|
Skill Engine exposes a simple API:
|
||||||
|
|
||||||
|
```java
|
||||||
|
SkillEngineAPI.unlockNode(player, SkillEngineAPI.rl("yourmodid", "basic_strength"));
|
||||||
|
SkillEngineAPI.addSkillPoints(player, 3);
|
||||||
|
boolean unlocked = SkillEngineAPI.isUnlocked(player, SkillEngineAPI.id("welcome"));
|
||||||
|
```
|
||||||
|
|
||||||
|
You can interact with the system without touching internal classes.
|
||||||
|
|
||||||
|
# **Users: What Does This Mod Do for Me?**
|
||||||
|
|
||||||
|
Skill Engine **does nothing by itself**.
|
||||||
|
It does _not_ add a skill tree or abilities on its own.
|
||||||
|
|
||||||
|
You only need this mod if:
|
||||||
|
|
||||||
|
* A mod you play **depends** on Skill Engine
|
||||||
|
* You want to install addons that create skill trees
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
|
|
||||||
Source installation information for modders
|
|
||||||
-------------------------------------------
|
|
||||||
This code follows the Minecraft Forge installation methodology. It will apply
|
|
||||||
some small patches to the vanilla MCP source code, giving you and it access
|
|
||||||
to some of the data and functions you need to build a successful mod.
|
|
||||||
|
|
||||||
Note also that the patches are built against "un-renamed" MCP source code (aka
|
|
||||||
SRG Names) - this means that you will not be able to read them directly against
|
|
||||||
normal code.
|
|
||||||
|
|
||||||
Setup Process:
|
|
||||||
==============================
|
|
||||||
|
|
||||||
Step 1: Open your command-line and browse to the folder where you extracted the zip file.
|
|
||||||
|
|
||||||
Step 2: You're left with a choice.
|
|
||||||
If you prefer to use Eclipse:
|
|
||||||
1. Run the following command: `./gradlew genEclipseRuns`
|
|
||||||
2. Open Eclipse, Import > Existing Gradle Project > Select Folder
|
|
||||||
or run `gradlew eclipse` to generate the project.
|
|
||||||
|
|
||||||
If you prefer to use IntelliJ:
|
|
||||||
1. Open IDEA, and import project.
|
|
||||||
2. Select your build.gradle file and have it import.
|
|
||||||
3. Run the following command: `./gradlew genIntellijRuns`
|
|
||||||
4. Refresh the Gradle Project in IDEA if required.
|
|
||||||
|
|
||||||
If at any point you are missing libraries in your IDE, or you've run into problems you can
|
|
||||||
run `gradlew --refresh-dependencies` to refresh the local cache. `gradlew clean` to reset everything
|
|
||||||
(this does not affect your code) and then start the process again.
|
|
||||||
|
|
||||||
Mapping Names:
|
|
||||||
=============================
|
|
||||||
By default, the MDK is configured to use the official mapping names from Mojang for methods and fields
|
|
||||||
in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this
|
|
||||||
license, if you do not agree with it you can change your mapping names to other crowdsourced names in your
|
|
||||||
build.gradle. For the latest license text, refer to the mapping file itself, or the reference copy here:
|
|
||||||
https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
|
||||||
|
|
||||||
Additional Resources:
|
|
||||||
=========================
|
|
||||||
Community Documentation: https://docs.minecraftforge.net/en/1.20.1/gettingstarted/
|
|
||||||
LexManos' Install Video: https://youtu.be/8VEdtQLuLO0
|
|
||||||
Forge Forums: https://forums.minecraftforge.net/
|
|
||||||
Forge Discord: https://discord.minecraftforge.net/
|
|
||||||
Reference in New Issue
Block a user