Skip to content

Commit

Permalink
Merge pull request #47 from Exanthiax/master
Browse files Browse the repository at this point in the history
more wiki updates
  • Loading branch information
WillFP authored Feb 19, 2024
2 parents d9254c4 + 881d750 commit dd811a3
Show file tree
Hide file tree
Showing 21 changed files with 270 additions and 221 deletions.
2 changes: 1 addition & 1 deletion docs/all-plugins/custom-entity-ai/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ A goal consists of a key, a priority, and some arguments (options) - for example
speed: 0.6
canBeScared: false
```
Priorities are calculated in descending order, so 0 is the top priority, et cetera.
Priorities are calculated in descending order, so 0 is the top priority, etc.
All items use item lookup strings, as do all entities, so you can use custom items and entities in your goals.
8 changes: 4 additions & 4 deletions docs/all-plugins/the-item-lookup-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ This looks completely meaningless, but it's actually really simple. A crafting r
## Keys Explained
In each string is the key for an item. A key looks one of three ways:
- A vanilla minecraft material: (eg `golden_apple`)
- An item from another plugin: (eg `ecoitems:packmaster_tear`)
- An exact item NBT tag: (eg `{id:"stone",Count:3,tag:{Name:"your name"}}`)
- A vanilla minecraft material: (e.g. `golden_apple`)
- An item from another plugin: (e.g. `ecoitems:packmaster_tear`)
- An exact item NBT tag: (e.g. `{id:"stone",Count:3,tag:{Name:"your name"}}`)

You may also have noticed the `?` in some of the items. This means 'try to use the first item, but if it doesn't exist, use the second item' You can chain these together, but they're actually only useful for me to provide integrations in default configs without breaking things for people who don't use all my plugins together.

Expand All @@ -41,7 +41,7 @@ When using exact item NBT, you can't use `?`. `||`, or other modifiers.
Items can have modifiers applied to them in the key. For example, lets say you're configuring the GUI for EcoSkills. You want it to be a player head with a texture, but you're not sure how to do that, because it looks like you have to just specify a material. Actually, in all of my plugins, wherever it asks for a material, it's actually doing a lookup. You can specify any of the following modifiers to it:
- **Enchantments:** You specify an enchantment by adding `<enchantment>:<level>` to the key, and you can chain these together
- **Skull Texture:** If the material is a player head, you can specify the texture with `texture:<base64>`. A list of skulls and textures can be found [here](https://minecraft-heads.com/).
- **Player Head:** If the material is a player head, you can specify a player using `head:<name>`. You can also use placeholders, eg: `head:%player%`
- **Player Head:** If the material is a player head, you can specify a player using `head:<name>`. You can also use placeholders, e.g. `head:%player%`
- **Reforge:** If you have reforges installed, you can specify the reforge by adding `reforge:<id>` to the key.
- **Name:** You can specify the display name of an item with `name:<name>`. You can have multiple words by surrounding the name with quotes: `name:"Long Name"`
- **Item Flags:** You can specify flags for the item to have, by dropping in any of [these values](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html) (not case sensitive)
Expand Down
2 changes: 1 addition & 1 deletion docs/boosters/how-to-make-a-custom-booster.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ gui:
**messages:** The messages that are broadcast when a booster activates/deactivates. You can use %player% as a placeholder.
**gui:** Config for how the booster looks in gui: the item, the lore, the name, et cetera.
**gui:** Config for how the booster looks in gui: the item, the lore, the name, etc..
### Effects + Conditions
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/ecocrates/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "EcoCrates"

## What sets EcoCrates apart from other crate plugins?

EcoCrates is designed to get rid of the pain in making crates. No more dealing with terribly made in-game editors, a lack of custom item / custom enchant support, poor performance, and all the other issues that you usually get with other crate plugins. Instead, EcoCrates gives you a fast, polished platform to make as many crates as you want - and, crucially, it's designed to make you money. It gives you a plethora of ways to rig your crates any way you want - give certain ranks chance multipliers for certain rewards, have fake display chances that affect animations to hone in on the near-miss effect, use placeholders to calculate chances, and more. It also gives you sounds, animations, fireworks, broadcasts, messages, and all the rest of it in order to maximize the dopamine from opening crates and get your players opening as many as they can. That's not to say it's all about profit, it's great for gameplay systems as players can pay money to open crates rather than using keys (if you want), add rerolls to stop people feeling hard done by, make vote crates, et cetera - it's a complete variable-reward system.
EcoCrates is designed to get rid of the pain in making crates. No more dealing with terribly made in-game editors, a lack of custom item / custom enchant support, poor performance, and all the other issues that you usually get with other crate plugins. Instead, EcoCrates gives you a fast, polished platform to make as many crates as you want - and, crucially, it's designed to make you money. It gives you a plethora of ways to rig your crates any way you want - give certain ranks chance multipliers for certain rewards, have fake display chances that affect animations to hone in on the near-miss effect, use placeholders to calculate chances, and more. It also gives you sounds, animations, fireworks, broadcasts, messages, and all the rest of it in order to maximize the dopamine from opening crates and get your players opening as many as they can. That's not to say it's all about profit, it's great for gameplay systems as players can pay money to open crates rather than using keys (if you want), add rerolls to stop people feeling hard done by, make vote crates, etc. - it's a complete variable-reward system.

## Check out our partners! (Click to visit)

Expand Down
2 changes: 1 addition & 1 deletion docs/ecojobs/how-to-make-a-custom-job.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ icon: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dX
**level-xp-requirements:** The XP requirements for each level
**xp-gain-methods:** The way the job can be levelled. Each ID is a trigger - triggers give values such as damage dealt (with attack triggers), distance moved (with the move trigger), et cetera. Other triggers with no obvious value give an output of 1.
**xp-gain-methods:** The way the job can be levelled. Each ID is a trigger - triggers give values such as damage dealt (with attack triggers), distance moved (with the move trigger), etc.. Other triggers with no obvious value give an output of 1.
**level-placeholders:** Custom placeholders for messages / lore
Expand Down
2 changes: 1 addition & 1 deletion docs/ecopets/how-to-make-a-custom-pet.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ spawn-egg:

**level-xp-requirements:** The XP requirements for each level

**xp-gain-methods:** The way the pet can be levelled. Each ID is a trigger - triggers give values such as damage dealt (with attack triggers), distance moved (with the move trigger), et cetera. Other triggers with no obvious value give an output of 1.
**xp-gain-methods:** The way the pet can be levelled. Each ID is a trigger - triggers give values such as damage dealt (with attack triggers), distance moved (with the move trigger), etc. Other triggers with no obvious value give an output of 1.

**level-placeholders:** Custom placeholders for messages / lore

Expand Down
11 changes: 11 additions & 0 deletions docs/ecoquests/placeholderapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ sidebar_position: 4
| `%ecoquests_quest_<quest>_task_<task>_xp%` | The XP the player has for the task |
| `%ecoquests_quest_<quest>_task_<task>_description%` | The description of the task |
| `%ecoquests_quest_<quest>_task_<task>_completed%` | If the player has completed the task (true / false) |

### Task-Amount Placeholders
These placeholders are dependent on the amount of tasks in the quest, they return the info on the active tasks.

| Placeholder | Description |
|---------------------------------------------------------------------------|-----------------------------------------------------------------------|
| `%ecoquests_quest_<quest>_task_<task_number[0-9]>_required_xp%` | The XP required to complete the [numbered] active task |
| `%ecoquests_quest_<quest>_task_<task_number[0-9]>_xp%` | The XP the player has for the [numbered] active task |
| `%ecoquests_quest_<quest>_task_<task_number[0-9]>_completed%` | If the player has completed the [numbered] active task (true / false) |
| `%ecoquests_quest_<quest>_task_<task_number[0-9]>_description%` | The description of the [numbered] active task |
| `%ecoquests_quest_<quest>_task_<task_number[0-9]>_completed_description%` | The description (including completion) of the [numbered] active task |
2 changes: 1 addition & 1 deletion docs/ecoshop/how-to-make-an-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Let's break down each section:
to use a unique ID for every item in all of your shops.

`item`: This is the actual item we're selling. It supports custom items, enchantments,
custom names, amounts, reforges, et cetera - read
custom names, amounts, reforges, etc. - read
more [here](https://plugins.auxilor.io/all-plugins/the-item-lookup-system)

`buy`: If you want to make your item purchasable, this is where you specify the buy price.
Expand Down
2 changes: 1 addition & 1 deletion docs/effects/all-effects/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "All Effects",
"position": 3
"position": 4
}
2 changes: 1 addition & 1 deletion docs/effects/all-filters/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "All Filters",
"position": 5
"position": 6
}
2 changes: 1 addition & 1 deletion docs/effects/all-mutators/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "All Mutators",
"position": 4
"position": 6
}
2 changes: 1 addition & 1 deletion docs/effects/all-triggers.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "All Triggers"
sidebar_position: 6
sidebar_position: 7
---

Triggered effects require a trigger, permanent effects do not support triggers and instead always apply when the effect
Expand Down
161 changes: 161 additions & 0 deletions docs/effects/configuring-a-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
---
title: Configuring an Effect Chain
sidebar_position: 2
---
## Effect Chains
### What is an Effect Chain?
Effect chains are groups of effects that can be executed together. This is very useful if you want to create a
chance-based effect with several components: chance is calculated independently on each trigger, so without chains,
particles and messages could send when the effects don't activate, and vice-versa.

Effects in chains run isolated, so applying a mutator to one effect in the chain will apply it only to that effect -
however, you can specify a mutator to the parent effect which will be applied to all
effects in the chain. The same works for delays, e.g. if an effect in a chain has a delay of 2, it won't hold up other
effects down the chain.

Effect chains are also useful to re-use more complex logic, via custom arguments that you can specify.
These work like regular placeholders, and you reference them in your chains with `%<id>%`, for example `%size%` if you
had a size argument.

## Reusable Chains

One of the ways to create chains is in "chains.yml" in "/plugins/libreforge". This is great if you want to use chains more than once.

Chains created here are universally accessible. You can use them in Enchants, Skills, Jobs or any other effect holders.


You don't need to specify triggers in your chain, these are handled by the `run_chain` effect (see below).

### The Basic Layout
```yaml
chains:
- id: <chain id>
effects:
- <effect 1>
- <effect 2>
- <effect 3>
```
### Chain Config Example
```yaml
- id: mining_effect
effects:
- id: play_sound
args:
sound: BLOCK_AMETHYST_CLUSTER_BREAK
pitch: 0.7
volume: 10
- id: spawn_particle
args:
particle: soul
amount: 10
mutators:
- id: translate_location
args:
add_x: 0.5
add_y: 0.5
add_z: 0.5
```
You can add or remove as many chains as you want. Then, if you want to call a chain, use the `run_chain` effect, like
this:

### Calling Your Chain
```yaml
id: run_chain
args:
chain: mining_effect # The ID of the chain
chance: 50 * (%player_health% / 20) # Example to demonstrate placeholders in config
cooldown: 2
triggers:
- mine_block
filters:
blocks:
- diamond_ore
- emerald_ore
- ancient_debris
```

Custom arguments can be specified like this:

```yaml
id: run_chain
args:
chain: <chain id>
chain_args:
strength: %player_y% * 100 # You can put anything you want, doesn't only have to be numbers - you can use strings too!
... add whichever arguments you use in your chain
```

## Inline Chains

If you don't want to re-use chains, or if you prefer having them specified directly under the effect, you can specify
effects inline instead.

### The Basic Layout
```yaml
effects:
- <effect 1>
- <effect 2>
- <effect 3>
triggers:
- mine_block
args:
every: 3 # You can use Optional Args here: https://plugins.auxilor.io/effects/configuring-an-effect#optional-arguments
```

### Example Inline Chain
```yaml
effects:
- triggers:
- mine_block
filters:
blocks:
- diamond_ore
- emerald_ore
- ancient_debris
effects:
- id: play_sound
args:
sound: BLOCK_AMETHYST_CLUSTER_BREAK
pitch: 0.7
volume: 10
- id: spawn_particle
args:
particle: soul
amount: 10
mutators:
- id: translate_location
args:
add_x: 0.5
add_y: 0.5
add_z: 0.5
```

Inline chains also support custom arguments, just like regular chains.

## Run Types
Effect chains also support several run types:

- **normal**: All effects in the chain will be ran, sequentially, one after another
- **cycle**: Only one effect will be ran, and it cycles through each effect each time the chain is triggered
- **random**: Only one effect will be ran, chosen at random each time the chain is triggered

To specify the run type, add the `run-type` argument into config:

```yml
effects:
- triggers:
- alt_click
effects:
- <effect 1>
- <effect 2>
- <effect 3>
args:
run-type: random
chance: 30
... filters, mutators, etc
```

This is an alternative way of configuring your effects; you don't specify a top-level effect ID, instead you specify a
list of effects to be called. This can be thought of as being more trigger-centric; multiple triggers to multiple
effects straight away, no worrying about the underlying chain.
2 changes: 1 addition & 1 deletion docs/effects/configuring-a-condition.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Configuring a Condition"
sidebar_position: 2
sidebar_position: 3
---

Like effects, mutators, and entity goals, conditions consist of an ID and arguments.
Expand Down
Loading

0 comments on commit dd811a3

Please sign in to comment.