Skip to content

Commit

Permalink
EcoMobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Exanthiax committed Mar 18, 2024
1 parent dc61171 commit 1cff1cd
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 82 deletions.
122 changes: 105 additions & 17 deletions docs/ecomobs/how-to-make-a-custom-mob.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,19 @@ title: "How to make a custom mob"
sidebar_position: 2
---

## Default configs
The default configs can be found here:

[GitHub](https://github.com/Auxilor/EcoMobs/blob/master/eco-core/core-plugin/src/main/resources/mobs/)
## Default config
The default configs can be found [here](https://github.com/Auxilor/EcoMobs/tree/master/eco-core/core-plugin/src/main/resources/mobs).
You can find additional user-created configs on [lrcdb](https://lrcdb.auxilor.io/).

## How to add mobs
Mobs are each config files placed in the `/mobs/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out!
Each mob is its own config file, placed in the `/mobs/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out!

The ID of the mob is the file name. This is what you use in commands, effects, the [Entity Lookup System](https://plugins.auxilor.io/all-plugins/the-entity-lookup-system) and in the [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system).
ID's must be lowercase letters, numbers, and underscores only.

## Example Mob Config

```yaml
# The ID of the mob is the name of the .yml file,
# for example steel_golem.yml has the ID of steel_golem
# You can place mobs anywhere in this folder,
# including in subfolders if you want to organize your mob configs
# _example.yml is not loaded.

# A base mob and modifiers
# View an explanation for this system here: https://plugins.auxilor.io/all-plugins/the-entity-lookup-system
mob: zombie attack-damage:90 movement-speed:1.5 follow-range:16 health:1200
Expand All @@ -31,6 +27,9 @@ category: common
# %health%, %max_health%, %health_percent%, %time% (formats as minutes:seconds, eg 1:56)
display-name: "&cNecrotic Soldier &7| &c%health%♥ &7| &e%time%"

# The lifespan of the mob, in seconds. Set to -1 to disable.
lifespan: 120

# If the mob you're using supports equipment, you can specify the items in each slot.
# Remove any slots that you don't want to put equipment in.
equipment:
Expand Down Expand Up @@ -107,9 +106,6 @@ effects:
# Effects ran when the mob is killed by the player
kill: [ ]

# The lifespan of the mob, in seconds. Set to -1 to disable.
lifespan: 120

defence:
# If the mob can get into boats, minecarts, etc.
can-mount: true
Expand Down Expand Up @@ -193,15 +189,107 @@ spawn:
- iron_block
- netherite_block
- iron_block

- air
- ecoitems:boss_core ? nether_star
- air

- iron_block
- netherite_block
- iron_block
```
### Custom AI goals
Check how to configure custom entity AI here:
## Understanding all the sections
**mob:** The base mob and modifiers, read here for more info: [Entity Lookup System](https://plugins.auxilor.io/all-plugins/the-entity-lookup-system).
**category:** The ID of the mob category, see [How to make Mob Categories](https://plugins.auxilor.io/ecomobs/how-to-make-mob-categories).
**display-name:** The name shown in game.
**lifespan:** How long the mob should live, in seconds (-1 to disable/infinite).
**equipment:** The equipment that your mob will hold/hear. Use the [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system) here.
**integrations:** Options for supported external plugins - LevelledMobs, ModelEngine and LibsDisguises.
### Custom AI
**clear:** If Custom AI should override vanilla mob AI (True/False)
**target-goals:** How the mob decides who/what to attack, read here for more info: [Custom AI](https://plugins.auxilor.io/all-plugins/custom-entity-ai).
**entity-goals:** How the mob behaves, read here for more info: [Custom AI](https://plugins.auxilor.io/all-plugins/custom-entity-ai).
### Effects & Conditions
You can configure effects, conditions, filters, and mutators in this section to run when specific actions happen, such as when the mob spawns, dies, takes damage and more.
Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring-an-effect) to understand how to configure this section correctly.
For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info.
### Defence
**can-mount:** If the mob can get into boats and minecarts (True/False).
**damage-modifiers:** A list of damage causes that the mob multiplies damage by, eg:
```yaml
damage-modifiers:
hot_floor: 2
```
This means the mob will take double damage from standing on magma blocks.
A list of damage causes can be found here: [Damage Causes](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html).
### Drops
**experience:** The amount of experience to drop.
#### Items
**chance:** The chance of the drop
**items:** The list of items to drop. Use the [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system) here.
### Boss-Bar
**enabled:** If the mob has a boss bar.
**color:** The color of the boss-bar (blue, green, pink, purple, red, white, yellow).
**style:** The visual style of the boss-bar (progress, notched_20, notched_12, notched_10, notched_6).
**radius:** The distance from the mob where the boss bar is visible.
### Spawn
#### Totem
**enabled:** If spawn totems are enabled.
**top/middle/bottom:** The block in it's location. Use the [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system) here.
**conditions:** Conditions for the totem to work, read here for more info: [Configuring a Condition](https://plugins.auxilor.io/effects/configuring-a-condition).
#### Egg
**enabled:** If spawn eggs are enabled.
**conditions:** Conditions for the spawn egg to work, read here for more info: [Configuring a Condition](https://plugins.auxilor.io/effects/configuring-a-condition).
**item:** The base item, read here for more: [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system).
**display-name:** The item name in-game.
**lore:** The item lore shown in-game. Set to `lore: []` to remove all lore lines.

**craftable:** If the item should be craftable (true/false).

## Internal Placeholders

[Custom Entity AI](https://plugins.auxilor.io/all-plugins/custom-entity-ai)
| Placeholder | Value |
| ------------------ | --------------------------------------------------------- |
| `%health%` | The current health of the mob. |
| `%max_health%` | The max health of the mob. |
| `%health_percent%` | The percentage of health the mob has. |
| `%time%` | The time left before the mob despawns (`minutes:seconds`) |
87 changes: 87 additions & 0 deletions docs/ecomobs/how-to-make-mob-categories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: "Mob Categories"
sidebar_position: 3
---

## What are categories?

In EcoMobs, each mob belongs to a category, which control things like spawning behavior.

For example, you might have a category for common mobs, one for rare mobs, one for nether bosses, etc.

## How to add categories
Each category is its own config file, placed in the `/categories/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out!

The ID of the category is the file name. This is what you use when [creating a mob](https://plugins.auxilor.io/ecomobs/how-to-make-a-custom-mob).
ID's must be lowercase letters, numbers, and underscores only.

## Example Category Config

```yaml
# If the mob is persistent, then it will not despawn naturally.
persistent: false

spawning:
# Available methods:

# replace
# Uses the vanilla spawning system to spawn the mob, by replacing
# the vanilla mob with the custom mob when it spawns.

# custom
# Uses the EcoMobs spawning system.

# none
# Disables natural spawning

type: custom

# Options for replace spawning
replace:
# The vanilla mobs to replace
replace:
- zombie
- skeleton

# Options for custom spawning
custom:
# Spawn types (choose from land, water)
spawn-types:
- land

# Conditions that the location must match in order for the mob to spawn
# Read here: https://plugins.auxilor.io/effects/configuring-a-condition
conditions: [ ]

# The chance for the mob to spawn if a valid spawn point is found (as a percentage)
chance: 1.5
```
## Understanding all the sections
**persistent:** If the mob should **not** despawn (True/False).
### Spawning
| Type | Behavior |
| ------- | --------------------------------------------------------------------------------------- |
| replace | Uses the vanilla spawning system by replacing the vanilla mob. (supports `chance:` arg) |
| custom | Uses the EcoMobs spawning system. |
| none | Disables natural spawning. |
**type:** The spawning method

#### Replace
The vanilla mobs to replace, supports `chance` args:
```yaml
replace:
replace:
- zombie
- skeleton
chance: 100
```
#### Custom

**spawn-types:** Where to spawn (land/water).

**conditions:** Conditions to be met for the mob to spawn, read here for more info: [Configuring a Condition](https://plugins.auxilor.io/effects/configuring-a-condition).

**chance:** The chance of the mob spawning once conditions are met.
65 changes: 0 additions & 65 deletions docs/ecomobs/mob-categories.md

This file was deleted.

0 comments on commit 1cff1cd

Please sign in to comment.