Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 146
    • Issues 146
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Guides
  • (Step 3) Creating Your First Mob

(Step 3) Creating Your First Mob · Changes

Page history
Update (Step 3) Creating Your First Mob authored Apr 01, 2024 by Amy's avatar Amy
Hide whitespace changes
Inline Side-by-side
Showing with 94 additions and 3 deletions
+94 -3
  • Guides/(Step-3)-Creating-Your-First-Mob.md Guides/(Step-3)-Creating-Your-First-Mob.md +94 -3
  • No files found.
Guides/(Step-3)-Creating-Your-First-Mob.md
View page @ e5e81f4b
......@@ -160,9 +160,100 @@ SmashAttack:
Now we will create the items our mob needs for its armor and weapon.
First we will create our sword. We will be giving it a Display and Lore which displays when you hover over the item in your inventory, and we will be giving it enchantments. The DAMAGE_ALL enchantment is the name for Sharpness. We are adding attributes to the sword which give the holder +10 health and 10% extra movement speed.
```yaml
SkeletonKingSword:
Id: DIAMOND_SWORD
Display: '&3Greatsword of the Skeleton King'
Lore:
- '&6A powerful sword used by'
- '&6the King of Skeletons.'
Enchantments:
- DAMAGE_ALL:5
- KNOCKBACK:2
- FIRE_ASPECT:2
Attributes:
MainHand:
Health: 10
MovementSpeed: 0.1
```
Now we will create our crown, much like the sword above we are giving it a Display, Lore, Enchantments and Attributes. We are also adding 2 Hide flags, this will hide the Attributes and Enchants from being displayed in the items lore.
```yaml
KingsCrown:
Id: GOLDEN_HELMET
Display: '&dCrown of the King'
Lore:
- '&6A kingly crowl that grants'
- '&6the wearer unwavering power!'
Enchantments:
- PROTECTION_ENVIRONMENTAL:2
- PROTECTION_PROJECTILE:2
- PROTECTION_FIRE:2
- PROTECTION_EXPLOSIONS:2
Hide:
- ATTRIBUTES
- ENCHANTS
Attributes:
Head:
Health: 10
KnockbackResistance: 10
```
# Drops File
`/plugins/MythicMobs/DropTables/SkeletonKing.yml`
<!---
I am too tired I must sleep zzzzz I will finish tomorrow <3
---!>
\ No newline at end of file
For our drops we are creating 2 drop tables, and making the first one drop the 2nd one. We are using a condition to make sure that items from the 2nd drop table only drop if the mob dies at night.
The format for drops is `<Drop Type> <Amount> <Chance>` so in our first drop table we are dropping 1 of the SkeletonKingItemDrops droptable 100% of the time and dropping a random amount of EXP between 100 and 150. In the SkeletonKingItemDrops we are giving the Crown a 1% Chance of dropping and the Sword a 10% chance of dropping.
We are using MinItems and MaxItems to indicate how many items we want the droptable to drop altogether, it will drop either 1 or 2 drops from the list. This is not the total amount of individual items, since the gold nuggets and diamonds have a range of items, they could drop 64 nuggets and 12 diamonds, which still fits into the MaxItems being 2.
```yaml
SkeletonKingDrops:
Drops:
- SkeletonKingItemDrops 1 1
- experience 100-150 1
SkeletonKingItemDrops:
Conditions:
- night
MinItems: 1
MaxItems: 2
Drops:
- KingsCrown 1 0.01
- SkeletonKingSword 0.1
- GOLD_NUGGET 32-64 1
- DIAMOND 1-12 0.8
```
# Testing
Now you have created all the files needed for our custom mob! The next thing to do is head in-game and use `/mm reload` to load the mob and its items into the server, then spawn it with `/mm m spawn SkeletonKing` and checking it works!
# Random Spawn File
`/plugins/MythicMobs/RandomSpawns/SkeletonKing.yml`
Now that you have your mob, you may want to make it spawn randomly in the world. We can setup a simple RandomSpawns file which will make that happen!
RandomSpawns are fairly easy to use, and you can find the information on creating them on their wiki page.
For this guide we will be making a basic one which spawns our Skeleton King outside at night time. We will be using the REPLACE action which replaces a vanilla mob spawn with our custom mob, and giving it a condition to make it only replace Skeletons.
We are using a chance of `0.005` which will give the spawn a 0.5% chance of replacing a skeleton, every time a skeleton spawns.
Make sure to replace `world` with the name of the world (or a list of worlds seperated by ,) you want the mob to spawn in.
```yaml
RandomSkeletonKing:
Type: SkeletonKing
Worlds: world
Chance: 0.005
Priority: 1
Action: REPLACE
Conditions:
- outside true
- night true
- entitytype{t=SKELETON}
```
\ No newline at end of file
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Guides
Troubleshooting
Mythic Add-ons
Compatible Plugins
API Information
Packs
  • Pins
Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Particles Types
  • Audience
Examples
Useful Tips