From 8cca2323bc53007c75877f53289fcb7e72f22428 Mon Sep 17 00:00:00 2001 From: Exanthiax <107284021+Exanthiax@users.noreply.github.com> Date: Sun, 18 Feb 2024 00:49:06 +0000 Subject: [PATCH 1/5] changed effect basics --- docs/all-plugins/custom-entity-ai/index.md | 2 +- docs/boosters/how-to-make-a-custom-booster.md | 2 +- docs/ecocrates/index.md | 2 +- docs/ecojobs/how-to-make-a-custom-job.md | 2 +- docs/ecopets/how-to-make-a-custom-pet.md | 2 +- docs/ecoshop/how-to-make-an-item.md | 2 +- docs/effects/all-effects/_category_.json | 2 +- docs/effects/all-filters/_category_.json | 2 +- docs/effects/all-mutators/_category_.json | 2 +- docs/effects/all-triggers.md | 2 +- docs/effects/configuring-a-chain.md | 161 +++++++++++++ docs/effects/configuring-a-condition.md | 2 +- docs/effects/configuring-an-effect.md | 214 +++++++++--------- docs/effects/custom-arguments.md | 2 +- docs/effects/custom-placeholders.md | 2 +- docs/effects/item-levels.md | 2 +- docs/effects/item-points/_category_.json | 4 - docs/effects/points.md | 2 +- 18 files changed, 278 insertions(+), 131 deletions(-) create mode 100644 docs/effects/configuring-a-chain.md delete mode 100644 docs/effects/item-points/_category_.json diff --git a/docs/all-plugins/custom-entity-ai/index.md b/docs/all-plugins/custom-entity-ai/index.md index d735bdcde8..52735eb04c 100644 --- a/docs/all-plugins/custom-entity-ai/index.md +++ b/docs/all-plugins/custom-entity-ai/index.md @@ -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. diff --git a/docs/boosters/how-to-make-a-custom-booster.md b/docs/boosters/how-to-make-a-custom-booster.md index 3a30cb1633..bfdb9d09d1 100644 --- a/docs/boosters/how-to-make-a-custom-booster.md +++ b/docs/boosters/how-to-make-a-custom-booster.md @@ -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 diff --git a/docs/ecocrates/index.md b/docs/ecocrates/index.md index fab72cf903..374e5dc91b 100644 --- a/docs/ecocrates/index.md +++ b/docs/ecocrates/index.md @@ -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) diff --git a/docs/ecojobs/how-to-make-a-custom-job.md b/docs/ecojobs/how-to-make-a-custom-job.md index 3eed47b9b3..4d590eae0a 100644 --- a/docs/ecojobs/how-to-make-a-custom-job.md +++ b/docs/ecojobs/how-to-make-a-custom-job.md @@ -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 diff --git a/docs/ecopets/how-to-make-a-custom-pet.md b/docs/ecopets/how-to-make-a-custom-pet.md index 7e710d240c..dd93ba9863 100644 --- a/docs/ecopets/how-to-make-a-custom-pet.md +++ b/docs/ecopets/how-to-make-a-custom-pet.md @@ -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 diff --git a/docs/ecoshop/how-to-make-an-item.md b/docs/ecoshop/how-to-make-an-item.md index 56e1e77749..2ffb4c412d 100644 --- a/docs/ecoshop/how-to-make-an-item.md +++ b/docs/ecoshop/how-to-make-an-item.md @@ -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. diff --git a/docs/effects/all-effects/_category_.json b/docs/effects/all-effects/_category_.json index 313079ee19..cdf51ca962 100644 --- a/docs/effects/all-effects/_category_.json +++ b/docs/effects/all-effects/_category_.json @@ -1,4 +1,4 @@ { "label": "All Effects", - "position": 3 + "position": 4 } diff --git a/docs/effects/all-filters/_category_.json b/docs/effects/all-filters/_category_.json index a3dd672deb..0eb7ed5749 100644 --- a/docs/effects/all-filters/_category_.json +++ b/docs/effects/all-filters/_category_.json @@ -1,4 +1,4 @@ { "label": "All Filters", - "position": 5 + "position": 6 } diff --git a/docs/effects/all-mutators/_category_.json b/docs/effects/all-mutators/_category_.json index 6a98fd19fd..f347461ce6 100644 --- a/docs/effects/all-mutators/_category_.json +++ b/docs/effects/all-mutators/_category_.json @@ -1,4 +1,4 @@ { "label": "All Mutators", - "position": 4 + "position": 6 } diff --git a/docs/effects/all-triggers.md b/docs/effects/all-triggers.md index 3d744d13c2..3884a991b0 100644 --- a/docs/effects/all-triggers.md +++ b/docs/effects/all-triggers.md @@ -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 diff --git a/docs/effects/configuring-a-chain.md b/docs/effects/configuring-a-chain.md new file mode 100644 index 0000000000..c897dc30f4 --- /dev/null +++ b/docs/effects/configuring-a-chain.md @@ -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 `%%`, 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: + effects: + - + - + - +``` +### 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_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: + - + - + - +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: + - + - + - + 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. \ No newline at end of file diff --git a/docs/effects/configuring-a-condition.md b/docs/effects/configuring-a-condition.md index 0bbcc458b4..984f384ce9 100644 --- a/docs/effects/configuring-a-condition.md +++ b/docs/effects/configuring-a-condition.md @@ -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. diff --git a/docs/effects/configuring-an-effect.md b/docs/effects/configuring-an-effect.md index c30e1e9ccb..d5e90e129d 100644 --- a/docs/effects/configuring-an-effect.md +++ b/docs/effects/configuring-an-effect.md @@ -2,95 +2,51 @@ title: Configuring an Effect sidebar_position: 1 --- +## The Basics +First, you need to know of the different types of Effects: Triggered and Permanent. These are configured similarly but there are a few differences. +The main difference is that all Triggered effects require a [trigger](https://plugins.auxilor.io/effects/all-triggers) to activate, Permanent effects are always active if all conditions (optional) are met. ## Example Effect Config - ```yaml -id: spawn_particle -args: - amount: 10 - chance: 25 - particle: soul -triggers: - - mine_block -filters: - blocks: +effects: + - id: spawn_particle + args: + amount: 10 + particle: soul + chance: 25 + triggers: + - mine_block + filters: + blocks: - diamond_ore - - ancient_debris -conditions: [ ] -mutators: - - id: translate_location - args: + - deepslate_diamond_ore + mutators: + - id: translate_location + args: add_x: 0.5 add_y: 0.5 add_z: 0.5 + conditions: + - id: below_y + args: + y: 10 ``` +The example effect: 10% chance to spawn 10 soul particles in the centre of a diamond ore when its mined and the player is below Y level 10. -This is an effect that gives you a 10% chance to spawn 10 soul particles in the middle of a block of diamond ore or -ancient debris when it's mined +## Understanding The Sections -## Placeholders +**id**: The ID of the effect. You can find all the effects under "All Effects" on the sidebar. -**Any numeric value (integer, decimal) can be a mathematical expression involving placeholders!** +**args**: The args for the effect (from the effect page). There are additional optional args that you can put here (see below). -For example, you can specify the chance to be dependent on your y level: as in `chance: 100 - %player_y%` - permanent -effects will evaluate the expression on activation, and triggered effects will evaluate it on each trigger. Make sure -you only use placeholders with numeric values, as you will get weird behaviour otherwise. +**triggers**: The list of [triggers](https://plugins.auxilor.io/effects/all-triggers) that activate this effect. (This does not apply on permanent effects). -There are also extra placeholders passed in that you can use: - -`%trigger_value%`, `%triggervalue%`, `%trigger%`, `%value%`, `%tv%`, `%v%`, and `%t%`: The value passed by the trigger ( -e.g. the amount of damage dealt; see [here](https://plugins.auxilor.io/effects/all-triggers)). - -`%player%`: The player's name - -`%player_uuid%`: The player's UUID - -`%victim_health%`: The victim's health - -`%victim_max_health%`: The victim's max health - -`%distance%`: The distance between the player and the victim - -`%victim_level%`: The victim's level **Requires LevelledMobs** - -If the victim is a player, you can supply any placeholder prefixed with `victim_` (e.g. `%victim_player_y%`) as well. - -`%hits%`: The amount of times the player has hit the victim - -`%text%`, `%string%`, and `%message%`: The message text from the trigger, for example a chat message - -`%location_x%`, `%loc_x%`, and `%x%`: The x-coordinate of the location - -`%location_block_x%`, `%loc_b_x%`, `%block_x%`, and `%bx%`: The block x-coordinate of the location - -`%location_y%`, `%loc_y%`, and `%y%`: The y-coordinate of the location - -`%location_block_y%`, `%loc_b_y%`, `%block_y%`, and `%by%`: The block y-coordinate of the location - -`%location_z%`, `%loc_z%`, and `%z%`: The z-coordinate of the location - -`%location_block_z%`, `%loc_b_z%`, `%block_z%`, and `%bz%`: The block z-coordinate of the location - -`%location_world%`, `%loc_w%`, and `%world%`: The world name of the location - -## The Sections - -**id**: The effect ID. A list of ID's and their corresponding arguments can be -found [here](https://plugins.auxilor.io/effects/all-effects) - -**args**: The arguments. All (triggerable) effects have optional arguments (see below) -git add -**triggers**: The list of triggers that activate this effect. If the effect is permanent (see next page) then this -section is not applicable - -**filters**: The list of filters against arguments created by the trigger, ie mine_block will provide blocks to be -filtered, melee_attack will provide entities to be filtered. +**filters**: The list of filters to be applied on the trigger. (e.g. `blocks` filter on `mine_block` trigger, or `entities` filter on `melee_attack` trigger.) **conditions**: As well as each effect holder (eg Talisman, Reforge, Enchant) having its own conditions, you can specify a list of effect-specific conditions that work in exactly the same way -**mutators**: Mutate the data sent to the effect: you can change parameters such as the victim, the location, et cetera. +**mutators**: Mutate the data sent to the effect: you can change parameters such as the victim, the location, etc.. A mutator, like an effect or condition, consists of an ID and arguments. ## Optional Arguments @@ -101,7 +57,7 @@ The chance of this effect activating, as a percentage. (defaults to 100) ```yaml args: - chance: 50 + chance: 50 ``` #### `cooldown` @@ -110,13 +66,13 @@ The cooldown between effect activations, in seconds. (defaults to 0) ```yaml args: - cooldown: 10 - send_cooldown_message: true # (Optional) If the cooldown message should be sent - cooldown_message: "Custom cooldown message with %seconds% left" # (Optional) a custom cooldown message - cooldown_effects: # (Optional) Effects to run if on cooldown - - id: send_message - args: - message: "You are on cooldown! Try again in &a%seconds%&r seconds." + cooldown: 10 + send_cooldown_message: true # (Optional) If the cooldown message should be sent + cooldown_message: "Custom cooldown message with %seconds% left" # (Optional) a custom cooldown message + cooldown_effects: # (Optional) Effects to run if on cooldown + - id: send_message + args: + message: "You are on cooldown! Try again in &a%seconds%&r seconds." ``` #### `cost` @@ -125,7 +81,7 @@ The cost required to use or activate this effect. **Requires Vault.** (defaults ```yaml args: - cost: 200 + cost: 200 ``` #### `every` @@ -134,7 +90,7 @@ Specify the effect to activate every x times. (defaults to always) ```yaml args: - every: 3 + every: 3 ``` #### `require` @@ -143,7 +99,7 @@ Require an expression to be true for the effect to run. ```yaml args: - require: '%ecobits_crystals% > 4' + require: '%ecobits_crystals% > 4' ``` #### `mana_cost` @@ -151,7 +107,7 @@ The mana cost required to use or activate this effect. **Requires Aurelium Skill ```yaml args: - mana_cost: 10 + mana_cost: 10 ``` #### `_cost` @@ -160,7 +116,7 @@ The magic cost (e.g. mana) required to use or activate this effect. **Requires E ```yaml args: - mana_cost: 10 + mana_cost: 10 ``` #### `delay` @@ -169,7 +125,7 @@ The amount of ticks to wait before executing the effect. (defaults to 0) ```yaml args: - delay: 20 + delay: 20 ``` #### `repeat` @@ -180,12 +136,11 @@ If the effect has any mutators, they will run again for each repeat. This provides new placeholders: `%repeat_times%`, `%repeat_start%`, `%repeat_increment%`, and `%repeat_count%`. ```yaml -args: + args: repeat: - times: 5 # How many times the effect should be repeated - start: -10 # The initial value of the %repeat_count% placeholder - increment: 10 # How much the count should be increased (or decreased) by on each repeat - every: 3 + times: 5 # How many times the effect should be repeated + start: -10 # The initial value of the %repeat_count% placeholder + increment: 10 # How much the count should be increased (or decreased) by on each repeat ``` #### `filters_before_mutation` @@ -195,7 +150,7 @@ to false) ```yaml args: - filters_before_mutation: true + filters_before_mutation: true ``` #### `disable_antigrief_check` @@ -204,18 +159,7 @@ By default, the antigrief plugins on your server are checked. Set this to true t ```yaml args: - disable_antigrief_check: true -``` - -#### `point_cost` - -The point cost required to use or activate this effect, looks like this in config: - -```yaml -args: - point_cost: - cost: 100 * %player_y% - type: g_souls + disable_antigrief_check: true ``` #### `price` @@ -229,10 +173,10 @@ Looks like this in config: ```yaml args: - price: - value: 100 * %player_y% - type: crystals - display: "&b%value% Crystals ❖" + price: + value: 100 * %player_y% + type: crystals + display: "&b%value% Crystals ❖" ``` #### `weight` @@ -243,7 +187,7 @@ Chance is calculated as ` / ` ```yaml args: - weight: 10 + weight: 10 ``` #### `run_order` @@ -255,12 +199,11 @@ for example to make `add_damage` (defaults to `late`) run before `damage_multipl ```yaml args: - run-order: early + run-order: early ``` #### `custom_` - Use a [custom effect argument](https://plugins.auxilor.io/effects/custom-arguments). ```yaml @@ -271,6 +214,53 @@ args: ... etc ``` +## Placeholders + +**Any numeric value (integer, decimal) can be a mathematical expression involving placeholders!** + +For example, you can specify the chance to be dependent on your y level: as in `chance: 100 - %player_y%` - permanent +effects will evaluate the expression on activation, and triggered effects will evaluate it on each trigger. Make sure +you only use placeholders with numeric values, as you will get weird behaviour otherwise. + +There are also extra placeholders passed in that you can use: + +`%trigger_value%`, `%triggervalue%`, `%trigger%`, `%value%`, `%tv%`, `%v%`, and `%t%`: The value passed by the trigger ( +e.g. the amount of damage dealt; see [here](https://plugins.auxilor.io/effects/all-triggers)). + +`%player%`: The player's name + +`%player_uuid%`: The player's UUID + +`%victim_health%`: The victim's health + +`%victim_max_health%`: The victim's max health + +`%distance%`: The distance between the player and the victim + +`%victim_level%`: The victim's level **Requires LevelledMobs** + +If the victim is a player, you can supply any placeholder prefixed with `victim_` (e.g. `%victim_player_y%`) as well. + +`%hits%`: The amount of times the player has hit the victim + +`%text%`, `%string%`, and `%message%`: The message text from the trigger, for example a chat message + +`%location_x%`, `%loc_x%`, and `%x%`: The x-coordinate of the location + +`%location_block_x%`, `%loc_b_x%`, `%block_x%`, and `%bx%`: The block x-coordinate of the location + +`%location_y%`, `%loc_y%`, and `%y%`: The y-coordinate of the location + +`%location_block_y%`, `%loc_b_y%`, `%block_y%`, and `%by%`: The block y-coordinate of the location + +`%location_z%`, `%loc_z%`, and `%z%`: The z-coordinate of the location + +`%location_block_z%`, `%loc_b_z%`, `%block_z%`, and `%bz%`: The block z-coordinate of the location + +`%location_world%`, `%loc_w%`, and `%world%`: The world name of the location + + + ## Effect Chains @@ -376,7 +366,7 @@ list of effects to be called. This can be thought of as being more trigger-centr effects straight away, no worrying about the underlying chain. These work exactly like inline chains (they are inline chains), so everything is still supported; run-type, custom -arguments, et cetera. +arguments, etc.. ## Load Weight diff --git a/docs/effects/custom-arguments.md b/docs/effects/custom-arguments.md index 269c8b95d5..37a7793d1a 100644 --- a/docs/effects/custom-arguments.md +++ b/docs/effects/custom-arguments.md @@ -1,6 +1,6 @@ --- title: "Custom Arguments" -sidebar_position: 10 +sidebar_position: 11 --- You can create custom effect arguments to reuse common logic between diff --git a/docs/effects/custom-placeholders.md b/docs/effects/custom-placeholders.md index 0317d8de95..b0248f822e 100644 --- a/docs/effects/custom-placeholders.md +++ b/docs/effects/custom-placeholders.md @@ -1,6 +1,6 @@ --- title: "Custom Placeholders" -sidebar_position: 9 +sidebar_position: 10 --- You can create custom placeholders to reuse mathematical expressions or to have global diff --git a/docs/effects/item-levels.md b/docs/effects/item-levels.md index 9fd68b901c..dd0c679649 100644 --- a/docs/effects/item-levels.md +++ b/docs/effects/item-levels.md @@ -1,6 +1,6 @@ --- title: "Item Levels" -sidebar_position: 8 +sidebar_position: 9 --- Item Levels work similarly to item points, but instead of being set directly, they're levelled up by gaining XP. diff --git a/docs/effects/item-points/_category_.json b/docs/effects/item-points/_category_.json deleted file mode 100644 index 48a0ef167d..0000000000 --- a/docs/effects/item-points/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Item Points", - "position": 9 -} \ No newline at end of file diff --git a/docs/effects/points.md b/docs/effects/points.md index 412d14c60d..fa692c2c8f 100644 --- a/docs/effects/points.md +++ b/docs/effects/points.md @@ -1,6 +1,6 @@ --- title: "The Points System" -sidebar_position: 7 +sidebar_position: 8 --- Points are similar to currencies, however they exist purely as a way to keep track of something in a player. For From 2f50b673fb8e411c338a3659fb05a584b92d8c75 Mon Sep 17 00:00:00 2001 From: Exanthiax <107284021+Exanthiax@users.noreply.github.com> Date: Sun, 18 Feb 2024 00:51:11 +0000 Subject: [PATCH 2/5] etc --- docs/all-plugins/custom-entity-ai/index.md | 2 +- docs/ecopets/how-to-make-a-custom-pet.md | 2 +- docs/effects/configuring-an-effect.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/all-plugins/custom-entity-ai/index.md b/docs/all-plugins/custom-entity-ai/index.md index 52735eb04c..5ff6deaa8d 100644 --- a/docs/all-plugins/custom-entity-ai/index.md +++ b/docs/all-plugins/custom-entity-ai/index.md @@ -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, etc.. +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. diff --git a/docs/ecopets/how-to-make-a-custom-pet.md b/docs/ecopets/how-to-make-a-custom-pet.md index dd93ba9863..3e19a9fc4a 100644 --- a/docs/ecopets/how-to-make-a-custom-pet.md +++ b/docs/ecopets/how-to-make-a-custom-pet.md @@ -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), etc.. 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 diff --git a/docs/effects/configuring-an-effect.md b/docs/effects/configuring-an-effect.md index d5e90e129d..3bfa39b253 100644 --- a/docs/effects/configuring-an-effect.md +++ b/docs/effects/configuring-an-effect.md @@ -46,7 +46,7 @@ The example effect: 10% chance to spawn 10 soul particles in the centre of a dia **conditions**: As well as each effect holder (eg Talisman, Reforge, Enchant) having its own conditions, you can specify a list of effect-specific conditions that work in exactly the same way -**mutators**: Mutate the data sent to the effect: you can change parameters such as the victim, the location, etc.. +**mutators**: Mutate the data sent to the effect: you can change parameters such as the victim, the location, etc. A mutator, like an effect or condition, consists of an ID and arguments. ## Optional Arguments @@ -366,7 +366,7 @@ list of effects to be called. This can be thought of as being more trigger-centr effects straight away, no worrying about the underlying chain. These work exactly like inline chains (they are inline chains), so everything is still supported; run-type, custom -arguments, etc.. +arguments, etc. ## Load Weight From 888c4a8042d34e40560259f5b14ed2f16fab316c Mon Sep 17 00:00:00 2001 From: Exanthiax <107284021+Exanthiax@users.noreply.github.com> Date: Sun, 18 Feb 2024 01:33:09 +0000 Subject: [PATCH 3/5] added active task placeholders --- docs/ecoquests/placeholderapi.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/ecoquests/placeholderapi.md b/docs/ecoquests/placeholderapi.md index 30a4d30406..dc78ce604f 100644 --- a/docs/ecoquests/placeholderapi.md +++ b/docs/ecoquests/placeholderapi.md @@ -24,3 +24,14 @@ sidebar_position: 4 | `%ecoquests_quest__task__xp%` | The XP the player has for the task | | `%ecoquests_quest__task__description%` | The description of the task | | `%ecoquests_quest__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__task__required_xp%` | The XP required to complete the [numbered] active task | +| `%ecoquests_quest__task__xp%` | The XP the player has for the [numbered] active task | +| `%ecoquests_quest__task__completed%` | If the player has completed the [numbered] active task (true / false) | +| `%ecoquests_quest__task__description%` | The description of the [numbered] active task | +| `%ecoquests_quest__task__completed_description%` | The description (including completion) of the [numbered] active task | \ No newline at end of file From bdbccaaf6c449aec9749d3cc5f6d3f927fa54ac5 Mon Sep 17 00:00:00 2001 From: Exanthiax <107284021+Exanthiax@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:06:10 +0000 Subject: [PATCH 4/5] consistency --- docs/all-plugins/the-item-lookup-system.md | 8 +- ...ke-a-shop.md => how-to-make-a-currency.md} | 0 docs/effects/configuring-an-effect.md | 115 +----------------- 3 files changed, 7 insertions(+), 116 deletions(-) rename docs/ecobits/{how-to-make-a-shop.md => how-to-make-a-currency.md} (100%) diff --git a/docs/all-plugins/the-item-lookup-system.md b/docs/all-plugins/the-item-lookup-system.md index af678e1f77..bcbacd436b 100644 --- a/docs/all-plugins/the-item-lookup-system.md +++ b/docs/all-plugins/the-item-lookup-system.md @@ -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. @@ -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 `:` 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:`. 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:`. You can also use placeholders, eg: `head:%player%` +- **Player Head:** If the material is a player head, you can specify a player using `head:`. You can also use placeholders, e.g. `head:%player%` - **Reforge:** If you have reforges installed, you can specify the reforge by adding `reforge:` to the key. - **Name:** You can specify the display name of an item with `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) diff --git a/docs/ecobits/how-to-make-a-shop.md b/docs/ecobits/how-to-make-a-currency.md similarity index 100% rename from docs/ecobits/how-to-make-a-shop.md rename to docs/ecobits/how-to-make-a-currency.md diff --git a/docs/effects/configuring-an-effect.md b/docs/effects/configuring-an-effect.md index 3bfa39b253..f66036390a 100644 --- a/docs/effects/configuring-an-effect.md +++ b/docs/effects/configuring-an-effect.md @@ -43,7 +43,7 @@ The example effect: 10% chance to spawn 10 soul particles in the centre of a dia **filters**: The list of filters to be applied on the trigger. (e.g. `blocks` filter on `mine_block` trigger, or `entities` filter on `melee_attack` trigger.) -**conditions**: As well as each effect holder (eg Talisman, Reforge, Enchant) having its own conditions, you can specify +**conditions**: As well as each effect holder (e.g. Talisman, Reforge, Enchant) having its own conditions, you can specify a list of effect-specific conditions that work in exactly the same way **mutators**: Mutate the data sent to the effect: you can change parameters such as the victim, the location, etc. @@ -224,8 +224,8 @@ you only use placeholders with numeric values, as you will get weird behaviour o There are also extra placeholders passed in that you can use: -`%trigger_value%`, `%triggervalue%`, `%trigger%`, `%value%`, `%tv%`, `%v%`, and `%t%`: The value passed by the trigger ( -e.g. the amount of damage dealt; see [here](https://plugins.auxilor.io/effects/all-triggers)). +`%trigger_value%`, `%triggervalue%`, `%trigger%`, `%value%`, `%tv%`, `%v%`, and `%t%`: The value passed by the trigger +(e.g. the amount of damage dealt; see [here](https://plugins.auxilor.io/effects/all-triggers)). `%player%`: The player's name @@ -259,115 +259,6 @@ If the victim is a player, you can supply any placeholder prefixed with `victim_ `%location_world%`, `%loc_w%`, and `%world%`: The world name of the location - - - -## Effect Chains - -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. - -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 `%%`, for example `%size%` if you -had a size argument. - -You can create a chain in config, under the 'chains' section - which should look like this: - -```yaml -chains: - - id: - effects: - - - - - - -``` - -**Effects in chains do not need to specify triggers as they are triggered by the run_chain effect** - -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: - -```yaml -id: run_chain -args: - chance: 50 * (%player_health% / 20) # Example to demonstrate placeholders in config - cooldown: 2 - chain: -triggers: - - melee_attack - - bow_attack - - trident_attack -filters: - entities: - - zombie - - creeper charged - - skeleton -``` - -Custom arguments can be specified like this: - -```yaml -id: run_chain -args: - chain: - 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 like this instead: - -```yaml -effects: - - - - - - -triggers: - - mine_block -args: - every: 3 -``` - -Inline chains also support custom arguments, just like regular chains. - -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 also support several run types: - -- **normal**: All effects in the chain will be ran, one after another -- **cycle**: Only one effect will be ran, and it cycles through each effect each time the chain is ran -- **random**: Only one effect will be ran, chosen at random on each execution - -To specify the run type, add the `run-type` argument into config: - -```yml -effects: - - triggers: - - alt_click - effects: - - - - - - - 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. - -These work exactly like inline chains (they are inline chains), so everything is still supported; run-type, custom -arguments, etc. - ## Load Weight All configs are loaded alphabetically by default. However, if you have a config that depends on From 881d750ef01d500fea291d2ec5980ef7f9385e89 Mon Sep 17 00:00:00 2001 From: Exanthiax <107284021+Exanthiax@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:57:35 +0000 Subject: [PATCH 5/5] typo --- docs/effects/configuring-an-effect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/effects/configuring-an-effect.md b/docs/effects/configuring-an-effect.md index f66036390a..1723aa95e3 100644 --- a/docs/effects/configuring-an-effect.md +++ b/docs/effects/configuring-an-effect.md @@ -31,7 +31,7 @@ effects: args: y: 10 ``` -The example effect: 10% chance to spawn 10 soul particles in the centre of a diamond ore when its mined and the player is below Y level 10. +The example effect: 25% chance to spawn 10 soul particles in the centre of a diamond ore when its mined and the player is below Y level 10. ## Understanding The Sections