Skip to content

Sample Custom Rules

UltimaOath edited this page Oct 11, 2021 · 24 revisions
This page was last updated for LevelledMobs 3.2.0 b528

Sample Custom Rules

Below are examples of different custom rules which you can apply to your own file for different unique effects! These are just the skeletons, so feel free to modify them to your liking. Almost anything is possible if you can imagine it!


Custom Ender Dragon Levelling

  - enabled: false
    name: 'CR - Ender Dragon Fight'
    use-preset: normal_difficulty
    conditions:
      worlds:
        allowed-list: ['world_the_end']
      entities:
        allowed-list: ['ENDER_DRAGON']
    apply-settings:
      minLevel: 25
      multipliers:
        custom-mob-level:
          ENDER_DRAGON:
            max-health: 3.0
            attack-damage: 1.0

Once enabled, utilizing the preset normal_diffculty, limiting the rule to both the world_the_end and the ENDER_DRAGON itself. This tells the Ender Dragon to use a minLevel: 25, which when using the normal_difficulty, is considered the maxLevel: as well. Then we apply custom multipliers specifically for the ENDER_DRAGON, adjusting it's max-health: and attack-damage:, while still utilizing the default multipliers set in the normal_difficulty preset, along with any potential tiered coloring required.


Boss-Bar Style Nametag using Health Indicators

  - enabled: false
    name: 'CR - Boss Bar'
    use-preset: allowed_worlds, nametag_using_indicator
    apply-settings:
      health-indicator:
        scale: 2
        max: 10
      nametag: '%health-indicator%'

Once enabled, this will alter the nametag: of an entity to display only the health-indicator: style. This custom rule uses the presets to specify both the allowed_worlds and collect the coloring and indicator details from nametag_using_indicator. This rule will work with any difficulty setting, however it does assume that you are using the normal_difficulty when setting the scale:. Using LM's default difficulty settings, it would be recommended to use a scale: 1 for easy_difficulty and scale: 4 for hard_difficulty.


Deny Levelling in Specific Biomes

  - enabled: false
    name: 'CR - NoLevel Biomes'
    conditions:
      worlds:
        allowed-list: ['world_nether']
      biomes:
        allowed-list: ['NETHER_WASTES']
    apply-settings:
      maxLevel: 0

Once enabled, this custom rule will prevent entities from levelling when located within the world: world_nether, and the biome: NETHER_WASTES. A simple and easy to implement rule!


Customized Entity Name Based On Level

  - enabled: false
    name: 'CR - Level Dependent Zombie Custom Names'
    use-presets: allowed_worlds
    apply-settings:
      entity-name-override:
        1-5:
          ZOMBIE: ['Teething %displayname%']
        6-10:
          ZOMBIE: ['Scratching %displayname%']
        11-20:
          ZOMBIE: ['Biting %displayname%']
        21-25:
          ZOMBIE: ['Hunting %displayname%']
        BABY_ZOMBIE: ['Baby Undead']

Once enabled, this custom rules uses a special feature of the entity-name-override: which allows you to specify the level range which a custom name would apply. This scale presumes you are using the normal_difficulty preset, but all can be adjusted! You can also add conditions, such as biome limitations, which would allow you to further customize!


Nerfed Spawner Cube Entities

  - enabled: false
    name: 'CR - Nerfed Spawner Cubes'
    priority: 1
    use-preset: allowed_worlds
    conditions:
      allowed-spawn-reasons:
        allowed-list: ['SPAWNER']
    apply-settings:
      entity-name-override:
        all_entities: 'Spawned %displayname%'
      multipliers:
        max-health: 0.0 # For Farming

Once enabled, this custom rules will level entities that are generated from Spawner Cubes the same as any other on the server, except for their health not changing (their damage will still increase!). This also adds the Spawned prefix to their names, making them easier to locate.


NBT-API | Startled Creepers!

  - enabled: false
#   This rule requires the soft-dependency NBT-API to function!
#   Make sure you have it installed prior to enabling this rule!
    name: 'CR - NBT - 20% Startled Creepers, Short Fuse'
    use-preset: allowed_worlds
    conditions:
      chance: 0.2
      entities:
        allowed-list: ['CREEPER']
    apply-settings:
      nbt-data: '{Fuse:2,Attributes:[{Name:"generic.follow_range",Base:1f}]}'
      entity-name-override:
        CREEPER: ['Startled %displayname%']

This custom rule requires the soft-dependency NBT-API to function! Once enabled, this rule will apply nbt-data: to the CREEPER entity. This applies at a chance: 0.2, or 20%. It will also change the Creeper's name to Startled Creeper, distinguishing them from normal CREEPER'S. The nbt-data: listed will adjust the CREEPER'S fuse duration to half a second, and make it so that they can not see the player until they are within about two blocks from them. This is where the concept of a 'startled' creeper came about!

Clone this wiki locally