Skip to content

Understanding the Default Config

UltimaOath edited this page Dec 19, 2023 · 2 revisions
This page was last updated for LevelledMobs 3.14.0 b811

Understanding the default rules.yml configuration file

LevelledMobs' rules.yml file allows you to craft truly modular Custom Rules which either modify or extend the Default Rule that are applied to any and all EntityTypes. The rules file is broken into three major sections: Presets, Default Rule, and Custom Rules; though the main features come from establishing the default rule by which all entities under the established default conditions will be levelled, then by adding exceptions to the default rule in the form of custom rules, where you can establish a set of conditions which would apply changes to the default rule under those conditions. We created the presets section so that any frequently referenced conditions or settings can be quickly added to either the default or custom rule(s) to help reduce the size of the file, though you do not have to reference or include the preset section at all so long as you have manually written in your conditions and settings.

A detailed description of how LevelledMobs rules file works fundamentally can be found here.


The Default Rule

The default-rule: of the rules.yml file establishes the rules under which most entities will or will not be levelled. This provides LevelledMobs a baseline from which to work when setting entity stats and levels. Under the default configuration, we make liberal use of the presets: section to establish most of the default conditions:. Those presets include default_worlds, weighted_random_Levelling, average_challenge, and nametag_using_numbers. If you reference the presets: of the same name, you will see that those presets include various conditions:, strategies:, and apply-settings:. Since they're referenced in the default-rule:, each of those presets: are essentially copied into the default-rule:. If the same configuration option is set under the same default rule, then only the last one listed will be obeyed. For the default-rule:, the bare-minimum you need to tell LevelledMobs would be: what world(s) do you want LevelledMobs to apply in, what strategy you want to use to level the entities, and how strong you want those entities to be. Secondary settings include things like applying a nametag to the entity to display its altered stats and figures. Generally speaking, you want your default-rule: to be as open as you would desire for your server. This section is meant to limit from the beginning the changes that LevelledMobs makes, from removing it entirely from a specific world to establishing the core-strategy to use overall. Don't worry, any changes you need to make can be made via a custom rule.


The Custom Rules

The custom-rules: of the rules.yml file establishes any exceptions to the default rule. Under the default configuration, we use several distinct custom rules which provide player-tested, developer-experimented, exceptions which we find benefit the overall and average server experience. Each of these rules can be disabled, edited, or removed entirely based on your servers' needs. Below we will explain each of the default custom rules so that you can both learn how to read and craft your own custom-rules: system as well as understand why we made certain decisions by default.


Level Entities Without Stat Changes

  - enabled: true
    name: 'No Stat Change for Specific Entities'
    use-preset: vanilla_challenge, nametag_no_level
    conditions:
      entities:
        allowed-groups: [ 'all_passive_mobs' ]
        allowed-list: [ 'BABY_', 'WANDERING_TRADER', 'VILLAGER', 'ZOMBIE_VILLAGER', 'BAT' ]

This custom rule connects to the presets vanilla_challenge and nametag_no_level, which establishes that the stats/multipliers of entities will not be adjusted as well as will provide a nametag which removes the displayed level (as vanilla_challenge set the maxLevel: 1). This rule applies to all passive mobs (like cows, chickens, etc.), all 'baby' mobs (baby zombies, baby piglins, etc.), and a handful of individual entities. Prior to 3.14, we would choose to simply not level these entities; now we take the group and provide them a level without stat changes, granting them a nametag and having them feel similar to all other properly Levelled mob.


Custom Nether and End Levelling

  - enabled: true
    name: 'Custom Nether Levelling'
    conditions:
      worlds: 'world_nether'
    strategies:
      y-coordinate:
        start: 100
        end: 40
        period: 0
        
  - enabled: true
    name: 'Custom End Levelling'
    conditions:
      worlds: 'world_the_end'
    strategies:
      distance-from-spawn:
        increase-level-distance: 200
        start-distance: 1000
        spawn-location:
          x: 0
          z: 0

These custom rules establish a unique levelling strategy for each the Nether and End. The Nether utilizes the Y-Coordinate levelling strategy, as the world is typically a top to bottom world; it is setup to make higher level mobs exist closer to the lava floor, while the lowest level would be at the highest spots far away from danger. The End utilizes the Distance from Spawn, establishing (0,0) as the center-point which corresponds with the central main Ender Dragon island and not allowing the levels to start to increment until a thousand blocks away which is where the smaller islands typically start to form.


Custom Entity Attributes

  - enabled: true
    name: 'Custom Entity Attributes'
    apply-settings:
      multipliers:
        custom-mob-level:
          ENDERMAN:
            max-health: 0.5
            movement-speed: 0.0
          ENDERMITE:
            max-health: 0.5
            movement-speed: 0.0
          SILVERFISH:
            max-health: 0.5
            movement-speed: 0.0
          CREEPER:
            movement-speed: 0.05

By default, any entity levelled under the default-rule: will use the multipliers established there to determine the degree to which stats are altered. We have learned over several years that some exceptions to these stats should be made for the average server. Each of these can be changed, or removed entirely, based on your needs. This custom rule uses a sub-section of the multipliers: apply-settings: called custom-mob-level:, which allows you to establish changes to the default multipliers for specific entities.


Custom Entity and Boss Specific Settings

  - enabled: true
    name: 'Custom Entity Specific Levelling'
    use-preset: basic_challenge
    conditions:
      entities: ['ZOMBIFIED_PIGLIN', 'SHULKER', 'VEX', 'RAVAGER', 'PHANTOM', 'PILLAGER']
    strategies:
      weighted-random: true
    apply-settings:
      maxLevel: 5
        
  - enabled: true
    name: 'Custom Boss Entity Specific Levelling'
    use-preset: basic_challenge, nametag_no_level
    conditions:
      entities: ['ENDER_DRAGON', 'ELDER_GUARDIAN', 'WITHER', 'WARDEN']
    strategies:
      weighted-random: true
    apply-settings:
      maxLevel: 5

Both of these custom rules establish the same concept: all of the entities listed will be capped at maxLevel: 5 (which is 1/5th the default max level), and will use the basic_challenge multipliers instead of the default average_challenge. This is to makes these particular entities fair to the average player due to their abilities or already naturally high health and damage output, while still offering a challenge. Prior to LM 3.14, these entities were included in a general 'do not level' custom rule; removing a significant chunk of hostile entities from receiving levels due to their challenges. For the boss entities, we have also included a modified nametag which does not display the level to the player. This provides a more 'boss' like nametag while still offering variance, information, and challenge to the player.


Adding Custom Drop Equipment to Mobs

  - enabled: true
    name: 'Armor and Weapons CustomDrop Table'
    conditions:
      entities: ['ZOMBIE', 'HUSK', 'PIGLIN', 'ZOMBIFIED_PIGLIN']
    apply-settings:
      use-droptable-id: armor_and_weapons

As part of your customdrops.yml, as of LM 3.13+, there is a sample drop-table: called armor_and_weapons which includes a set of iron armors and weapons with very low defaults for drop and equip chances. This rule will allow entities a chance to be packing some defense and offense to use against players, as well as helps demonstrate the drop table system. We also provide tens of thousands of lines worth of sample drop tables here.


Custom Levelling for Spawner Cubes

  - enabled: true
    name: 'Spawner Cube Entities'
    use-preset: basic_challenge
    conditions:
      allowed-spawn-reasons: ['SPAWNER']
    strategies:
      weighted-random: true
    apply-settings:
      maxLevel: 5
      multipliers:
        max-health: 0.0 #For Farms
      entity-name-override:
        all_entities: 'Spawner %displayname%'

Prior to LM 3.14, we would not allow Spawner Cube entities to receive a level by default. This was done to protect player farms and to prevent abuse of custom drops. Now we provide for Spawner Cubes via their own custom rule, which establishes a simple levelling strategy, caps the level of the mobs, sets their max-health multiplier to zero (to prevent an increase in health while allowing things like damage and movement speed; this prevents farms from breaking which utilize vanilla health to build their farms), and finally we adjust the %displayname% of these entities by adding the prefix Spawner to their names so that it is clear they're different than the standard levelled version of the same mob.

Clone this wiki locally