generated from Turnip-Labs/bta-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now you can make you cold with an IceCreamBucket
- Loading branch information
Showing
22 changed files
with
396 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,94 @@ | ||
#### Better than adventure | ||
This mod uses a modified version of Fabric (Babric) and is designed only for Better than Adventure, a heavily modified version of Minecraft b1.7.3! For more information, join the discord server provided on this projects | ||
|
||
## StanleyLib updated to 1.2.0-7.2pre2 | ||
*A temperature mod and lib* | ||
|
||
### What's this mod? | ||
This mod introduces a library of functions aimed at managing player body temperature, enhancing gameplay through realistic environmental challenges and efficient resource management of thermal clothing and heat sources. | ||
|
||
### Main features: | ||
* Accessible functions for managing player temperature | ||
* New damage types | ||
* Fully configurable | ||
* Classes and methods to monitor player temperature changes | ||
* And more! | ||
|
||
**Gameplay features can be deactivated.** | ||
To deactivate: | ||
##### stanleylib.cfg | ||
```cfg | ||
stanley.activate.temperature_management=false | ||
``` | ||
**You can use only library features.** | ||
# RPG System Documentation | ||
|
||
## Import | ||
##### build.gradle | ||
```gradle | ||
repositories { | ||
maven { url = "https://jitpack.io" } | ||
} | ||
dependencies { | ||
modImplementation "com.github.Garkatron:StanleyLib:${project.stanleylib_version}" | ||
## Skills System | ||
|
||
The **Skills System** is managed by an instance of `SkillTree.java`. Below is a guide to understanding and using the system effectively. | ||
|
||
--- | ||
|
||
### **Creating and Managing Skills** | ||
|
||
Skills can be implemented by extending `FunctionalSkill.java` or implementing the `IFunctionalSkill` interface. These classes provide templates for creating custom skills. | ||
|
||
For example, if you want to create a skill like **Super Strength**, you can extend `FunctionalSkill` and write the logic to enhance the player's strength. | ||
|
||
#### **Timed Skills** | ||
You can use templates like `TimedFunctionalSkill` if your skill requires pre-written cooldown logic. | ||
|
||
--- | ||
|
||
### **Skill Implementation Example** | ||
|
||
Here is a simple implementation of a custom skill: | ||
|
||
```java | ||
public class MySkill extends FunctionalSkill { | ||
public MySkill() { | ||
// Initialization logic (if needed) | ||
} | ||
|
||
@Override | ||
public boolean activate() { | ||
// Logic to activate the skill | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean deactivate() { | ||
// Logic to deactivate the skill | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean canActivate() { | ||
// Conditions for activation | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean canDeactivate() { | ||
// Conditions for deactivation | ||
return false; | ||
} | ||
|
||
/* | ||
* Optional methods: | ||
* - boolean canComplete(); | ||
* - boolean complete(); | ||
* - boolean cancel(); | ||
*/ | ||
} | ||
``` | ||
##### gradle.properties | ||
```gradle | ||
mod_version = release_tag_name | ||
### Creating Skills and Adding Them to a Skill Tree | ||
Here is an example of how to create instances of Skill and manage them using a SkillTree: | ||
|
||
```java | ||
// Define skills with dependencies | ||
Skill skill1 = new Skill("Super Strength", 0, "Increases player strength", false, 0, 0, 0, new int[]{}, new MySkill()); | ||
Skill skill2 = new Skill("Advanced Strength", 1, "Further increases player strength", false, 0, 0, 0, new int[]{0}, new MySkill()); | ||
|
||
// Create a SkillTree instance | ||
SkillTree skillTree = new SkillTree( | ||
skill1, | ||
skill2 | ||
// Add more skills as needed | ||
); | ||
|
||
// Unlocking skills | ||
skillTree.unlockSkill(1); // Fails because Skill 1 depends on Skill 0 | ||
skillTree.unlockSkill(0); // Unlocks Skill 0 | ||
skillTree.unlockSkill(1); // Succeeds because Skill 0 is now unlocked | ||
|
||
// Using skills | ||
skillTree.getSkillById(0).getFunctionalSkill().activate(); | ||
skillTree.getSkillById(0).getFunctionalSkill().deactivate(); | ||
|
||
``` | ||
#### Key Concepts | ||
Skill Dependencies: Skills can have dependencies. In the example above, Skill 1 depends on Skill 0 being unlocked first. | ||
Functional Skills: These encapsulate the logic for what happens when a skill is activated, deactivated, completed, etc. | ||
Skill Tree: A container for managing and unlocking skills, enforcing dependency rules. | ||
|
||
#### Use FunctionalSkill for general-purpose skills and extend it for custom behavior. | ||
Leverage TimedFunctionalSkill if your skill needs cooldown or duration logic. | ||
Ensure skill dependencies are correctly defined using the integer array parameter in the Skill constructor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
org.gradle.jvmargs=-Xmx2G | ||
|
||
# BTA | ||
bta_version=7.2_01 | ||
bta_version=7.3-pre3 | ||
bta_channel=prerelease | ||
|
||
# Loader & Mod Menu | ||
# Check the newest version at https://github.com/Turnip-Labs/fabric-loader/releases | ||
loader_version=0.15.6-babric.6-bta | ||
# Check the newest version at https://github.com/Turnip-Labs/ModMenu/releases/ | ||
mod_menu_version=2.0.6 | ||
# Loader | ||
loader_version=0.15.6-bta.7 | ||
|
||
# HalpLibe | ||
# Check the newest version at https://github.com/Turnip-Labs/bta-halplibe/releases/ | ||
halplibe_version=4.1.3 | ||
# Other Mods | ||
mod_menu_version=3.0.0 | ||
halplibe_version=5.0.0 | ||
|
||
# Mod | ||
mod_version=1.3.3-7.2_01 | ||
mod_version=1.0.0 | ||
mod_group=deus | ||
mod_name=stanleytemperature | ||
mod_name=rpgstuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.