Evolution


Evolution

The Evolution feature allows items to be upgraded from Item A to Item B through an evolution process. This process requires specific requirements to be met before the evolution can take place.

Evolution GUI

How Evolution Works

When you place a required item into the item slot, the items that it can evolve into will appear.Each GUI can support multiple possible evolutions for a single item.

Permission

Each station has its own permission requirement in order to be used. Of course, you can customize or change the permission to suit your needs.

settings:
  permission: nwmmoupgrade.evolution.sword

Features

1. Material Item

If enabled, this means the operation of the station will require the specified materials in order to function as intended. You can define one or more material items, and the station will only execute if the player provides the required materials.

materials:
  enabled: false
  items:
    - type: MATERIAL
      id: STEEL_INGOT
      amount: 5
      slot: 30
      #match-item-type: SWORD #filter option
      #match-tier-type: RARE #filter option

Note:

  • type is the type of the MMOItem.

  • id is the ID of the MMOItem.

  • amount is the quantity of the material required.

  • slot is the GUI slot where the material must be placed.

Options

These are additional conditions that enhance material requirements:

  • match-item-type: The material will only be accepted if the item placed in the item slot has the matching type specified here.

  • match-item-tier: The material will only be accepted if the item placed in the item slot has the matching tier specified here.


2. Chance Item

If enabled and used in conjunction with chance-based mechanics, the Chance Item provides an additional success rate boost on top of the existing base chance. This item acts as a support to increase the overall likelihood of success during actions such as upgrading

chance-item:
  enabled: false
  items:
    - type: MATERIAL
      id: RARE_DIAMOND
      amount: 5
      slot: 32
      chance: 50
      #match-item-type: SWORD #filter option
      #match-tier-type: RARE #filter option
    - type: MATERIAL
      id: SILVER_INGOT
      amount: 1
      slot: 32
      chance: 50
      #match-item-type: ARMOR #filter option
      #match-tier-type: RARE #filter option

Note:

  • type is the type of the MMOItem.

  • id is the ID of the MMOItem.

  • amount is the quantity of the material required.

  • slot is the GUI slot where the material must be placed.

  • chance This sets the success chance for the Chance Item

Options

These are additional conditions that enhance material requirements:

  • match-item-type: The material will only be accepted if the item placed in the item slot has the matching type specified here.

  • match-item-tier: The material will only be accepted if the item placed in the item slot has the matching tier specified here.


3. Material Formula

The Material Formula feature provides a highly flexible way to dynamically calculate the cost and material requirements for item.

Material Increase

When this feature is enabled (enabled: true), the quantity of material items required for an gem add socket will increase as the item's level rises. This ensures that higher-level upgrades demand a greater investment from players, providing a more balanced progression.

The increase is determined by a custom formula you define, giving you precise control over the scaling.

In Short:

  • Level Up = Material Requirements.

Formula Configuration

The core of this feature lies in the formula field, where you can define a mathematical expression.

  • Basic: you can use the basic default chance calculation or create your own custom formula to control how the chance is calculated.

  • Custom Placeholders: The formula supports specific placeholders that will be replaced with dynamic values during calculation.

material-formula:
  enabled: true
  formula: "1"

4. Cost Upgrade

This feature allows you to use Vault (Money) for each Upgrade addition. And it also supports using custom placeholders from the system itself.

cost:
    enabled: false #Cost
    amount: 5000
cost:
    enabled: true # Enable/disable cost system
    amount: "{gem_add_item_custom_advance_cost_item}" # cost amount

5. Default Chance

This feature allows you to set the success chance of this station yourself, in cases where Tier is not enabled.

options:
    ....
    default-chance: 0

6. Tiers

This feature allows you to set the success chance based on the tiers of the item placed in the item slot. If the item's tier matches the specified tiers, the chance will be applied accordingly. If none of the tier conditions are met, the chance will be taken from the no-tier-chance setting.

options:
    ....
    tiers:
      enabled: false
      no-tier-chance: 10
      tier-list:
        - tier: COMMON
          chance: 2
        - tier: RARE
          chance: 15

7. Applies To

You can specify more than one MMOItem type that this configuration applies to.

applies-to:
  - SWORD
  - PICKAXE

8. Evolution Tree

The Evolution feature works by defining MMOItems IDs inside the evolution-tree. If you want an item to evolve into multiple items in a specific order, you can structure it as a tree.

For example, you can define: 1 → 2 → 3 → x This means the item will evolve step-by-step from ID 1 to 2 to 3, and finally to x.

1. Required-Items

Required Item are the results that players receive when the process is successfully completed.

2. Evolve To

This defines the item that will be received after a successful evolution. The format is: MMOITEM;<type>;<id> For example: MMOITEM;WEAPON;FIRE_SWORD

Here is a table of condition types and their formats:

Type

Format

Example

Description

MMOItems

MMOITEM;<type>;<id>;<amount>

MMOITEM;MATERIAL;RARE_DIAMOND;10

Requires a specific MMOItem and amount

Vanilla

VANILLA;<material>;<amount>

VANILLA;STONE;15

Requires a specific vanilla item and amount

Placeholder

PLACEHOLDER;<placeholder>;<syntax>;<result>

PLACEHOLDER;%luckperms_groups%;==;default

Checks placeholder value matches result

Vault

vault;<amount>

vault;123

Requires the player to have a certain amount of money

Level

LEVEL;<amount>

LEVEL;123

Requires the player to have a certain level

These conditions give you a flexible way to control when a player is allowed to process items.

Here's an explanation in simple English of how to use <syntax> in:

PLACEHOLDER;<placeholder>;<syntax>;<result>

This condition checks the value of a placeholder using a comparison operator (<syntax>) and compares it with a result.

Available <syntax> Options:

<syntax>

Meaning

Example

Description

== (EQUALS)

Equals

%player_level% == 10

True if the placeholder equals 10

!= (NOT_EQUALS)

Not equals

%player_level% != 5

True if not equal to 5

> (GREATER_THAN)

Greater than

%player_level% > 20

True if greater than 20

< (LESS_THAN)

Less than

%player_level% < 15

True if less than 15

>= (GREATER_OR_EQUAL)

Greater than or equal

%player_level% >= 30

True if 30 or more

<= (LESS_OR_EQUAL)

Less than or equal

%player_level% <= 50

True if 50 or less

has_value (HAS_VALUE)

Check if has any value

%some_placeholder% has_value

True if the placeholder is not empty or null

Example Usages:

- "PLACEHOLDER;%player_level%;>=;30"
- "PLACEHOLDER;%luckperms_group%;==;vip"
- "PLACEHOLDER;%player_health%;<;10"
- "PLACEHOLDER;%some_placeholder%;has_value"

Example Evolution Tree:

evolution-tree:
    WARDEN_SWORD:
      tree:
        1:
          evolve-to: MMOITEM;SWORD;RUNE_SWORD
          required-items:
            - "MMOITEM;MATERIAL;RARE_DIAMOND;10"
            - "LEVEL;5;display- <green> Level 5"
            # - "PLACEHOLDER;%vault_eco_balance%;>;5000"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [20,21,12,3,4]
            result:
              slot: 5
        2:
          evolve-to: MMOITEM;SWORD;WARDEN_SWORD
          required-items:
            #- "MMOITEM;MATERIAL;RARE_DIAMOND;10"
            #- "MMOITEM;MATERIAL;STEEL_INGOT;5"
            #- "MMOITEM;MATERIAL;SILVER_INGOT;15"
            - "vanilla;stone;15"
            #- "PLACEHOLDER;%money%;5000"
            #- "vault;5000"
          display:
            path:
              name: "&a&lAdd Socket" #Button name
              lore: #Add your messages here.
                - "&7Click to add a Gem slot"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [20,21,12,3,4,6,7]
            result:
              slot: 8
        3:
          evolve-to: MMOITEM;SWORD;WARDEN_SWORD
          required-items:
            - "MMOITEM;MATERIAL;RARE_DIAMOND;10"
            - "VANILLA;STONE;15"
            - "PLACEHOLDER;%money%;5000"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [ 20,21,22,23]
            result:
              slot: 24
        4:
          evolve-to: MMOITEM;SWORD;AQUA_SWORD
          required-items:
            - "VANILLA;STONE;15"
            - "PLACEHOLDER;%money%;5000"
            - "LEVEL;5000"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [ 20,21,30,39,40 ]
            result:
              slot: 41
        5:
          evolve-to: MMOITEM;SWORD;KATANA
          required-items:
            - "MMOITEM;ARMOR;AQUA_DRAGON_SET_CHESTPLATE;1"
            # - "VANILLA;STONE;15"
            - "PLACEHOLDER;%money%;5000"
            - "LEVEL;5000"
            - "VAULT;5000"
            # - "MMOITEM;MATERIAL;STEEL_INGOT;5"
            # - "MMOITEM;MATERIAL;SILVER_INGOT;15"
            # - "VANILLA;STONE;15"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [ 20,21,30,39,40,42,43 ]
            required-item:
              slot: [ 0,1,2,3 ]
              vault-item:
                material: GOLD_INGOT
                name: "Cost: {cost}"
                cmd: 100
              placeholder-item:
                material: GOLD_INGOT
                name: "Placeholder "
                cmd: 100
              level-item:
                material: GOLD_INGOT
                name: "Level "
                cmd: 100
            result:
              slot: 44

3. Display

Display is used to define where the item should appear on the GUI for required-items, including the specific slots. It also supports showing display items for types like Placeholder, Level, and Vault.

....
display:
  path:
    name: "&a"
    lore:
      - "&7"
    material: LIME_STAINED_GLASS_PANE
    cmd: 1
    slot: [ 20,21,30,39,40,42,43 ]
  required-item:
    slot: [ 0,1,2,3 ]
    vault-item:
      material: GOLD_INGOT
      name: "Cost: {cost}"
      cmd: 100
    placeholder-item:
      material: GOLD_INGOT
      name: "Placeholder "
      cmd: 100
    level-item:
      material: GOLD_INGOT
      name: "Level "
      cmd: 100
  result:
    slot: 44

9. Merge

This is an additional feature for Evolution. When an evolution is successful, you can choose to merge the stats from the original item into the evolved item. This allows important stats to carry over into the new item after evolution.

options:
  ....
  merge:
    enabled: true
    whitelist-stats:
      enabled: true
      #stats: []
      stats:
        - ENCHANTS
        # - GEM_COLOR
        # - GEM_SOCKETS
        # - UPGRADE
        # - ATTACK_DAMAGE
        # - ATTACK_SPEED

Example Full Config

##########################################################################
#
#                         nwMMOUpgrade - Evolution
#      Created By Discord NN#7999 (Newworld Server)
#
#      Supports RGB and standard color codes.
#      1.RGB = &#ffffff
#      2.Standard = &f
#      3. MiniMessage = <red>
#      4. Legacy Hex = &x
#      https://www.birdflop.com/resources/rgb/
#
##########################################################################

#Contact&Support: https://discord.gg/gwXcr7c6Gq

#MMOItems Type
applies-to:
  - SWORD

# Sound settings
#https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
sounds:
  confirm-success: ENTITY_EXPERIENCE_ORB_PICKUP
  confirm-fail: BLOCK_ANVIL_DESTROY
  confirm-no-item: BLOCK_NOTE_BLOCK_PLING

#GUI customization
gui:
  #GUI title, should support images normally.
  title: "&#FCFF00M&#FCFF12e&#FCFF24n&#FCFF36u&#FCFE48: &#FCFE6CE&#FDFE7Fv&#FDFE91o&#FDFEA3l&#FDFEB5u&#FDFDC7t&#FDFDD9i&#FDFDEBo&#FDFDFDn"
  rows: 6 #GUI slots
  display-slots:
    item:
      material: LIME_STAINED_GLASS_PANE
      name: "<color:#00FF4F>Place the item to upgrade<color:#57E342>"
      lore:
        - "&7Drag and drop your item here"
      cmd: 1
    material:
      material: YELLOW_STAINED_GLASS_PANE
      name: "<color:#E7FF00>Place the materials<color:#F2FF08>"
      lore:
        - "&7Drag and drop the required materials here"
      cmd: 1
    chance:
      material: PINK_STAINED_GLASS_PANE
      name: "<color:#FF00F8>Place a chance-enhancing stone (if any)<color:#E68DFF>"
      lore:
        - "&7Drag and drop the chance-enhancing stone here"
      cmd: 1
  slots:
    #Slot for the item you want to add Gem slots to.
    item: 19
    confirm:
      material: BRICK
      name: "&a&lConfirm" #Button name
      lore: #Add your messages here.
        - "&7Click to add a Evolution"
        - ""
        - "&fCost: &a{cost}"
        - "&aRequirements"
        - "{requirements}"
      slot:
        - 48-50
      #Supports custom model data.
      cmd: 2600
    filter:
      name: "&f" #Name
      material: BLACK_STAINED_GLASS_PANE
      cmd: 1

  evolution-tree:
    WARDEN_SWORD:
      tree:
        1:
          evolve-to: MMOITEM;SWORD;RUNE_SWORD
          required-items:
            - "MMOITEM;MATERIAL;RARE_DIAMOND;10"
            - "LEVEL;5;display- <green> Level 5"
            # - "PLACEHOLDER;%vault_eco_balance%;>;5000"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [20,21,12,3,4]
            result:
              slot: 5
        2:
          evolve-to: MMOITEM;SWORD;WARDEN_SWORD
          required-items:
            #- "MMOITEM;MATERIAL;RARE_DIAMOND;10"
            #- "MMOITEM;MATERIAL;STEEL_INGOT;5"
            #- "MMOITEM;MATERIAL;SILVER_INGOT;15"
            - "vanilla;stone;15"
            #- "PLACEHOLDER;%money%;5000"
            #- "vault;5000"
          display:
            path:
              name: "&a&lAdd Socket" #Button name
              lore: #Add your messages here.
                - "&7Click to add a Gem slot"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [20,21,12,3,4,6,7]
            result:
              slot: 8
        3:
          evolve-to: MMOITEM;SWORD;WARDEN_SWORD
          required-items:
            - "MMOITEM;MATERIAL;RARE_DIAMOND;10"
            - "VANILLA;STONE;15"
            - "PLACEHOLDER;%money%;5000"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [ 20,21,22,23]
            result:
              slot: 24
        4:
          evolve-to: MMOITEM;SWORD;AQUA_SWORD
          required-items:
            - "VANILLA;STONE;15"
            - "PLACEHOLDER;%money%;5000"
            - "LEVEL;5000"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [ 20,21,30,39,40 ]
            result:
              slot: 41
        5:
          evolve-to: MMOITEM;SWORD;KATANA
          required-items:
            - "MMOITEM;ARMOR;AQUA_DRAGON_SET_CHESTPLATE;1"
            # - "VANILLA;STONE;15"
            - "PLACEHOLDER;%money%;5000"
            - "LEVEL;5000"
            - "VAULT;5000"
            # - "MMOITEM;MATERIAL;STEEL_INGOT;5"
            # - "MMOITEM;MATERIAL;SILVER_INGOT;15"
            # - "VANILLA;STONE;15"
          display:
            path:
              name: "&a"
              lore:
                - "&7"
              material: LIME_STAINED_GLASS_PANE
              cmd: 1
              slot: [ 20,21,30,39,40,42,43 ]
            required-item:
              slot: [ 0,1,2,3 ]
              required-items:
                vault-item:
                material: GOLD_INGOT
                name: "Cost: {cost}"
                cmd: 100
              placeholder-item:
                material: GOLD_INGOT
                name: "Placeholder "
                cmd: 100
              level-item:
                material: GOLD_INGOT
                name: "Level "
                cmd: 100
            result:
              slot: 44

materials:
  enabled: false
  items:
    - type: MATERIAL
      id: STEEL_INGOT
      amount: 5
      slot: 30
      match-item-type: SWORD #filter option
      #match-tier-type: RARE #filter option
    - type: MATERIAL
      id: FIRE_ESSENCE
      amount: 5
      slot: 30
      match-item-type: ARMOR #filter option

chance-item:
  enabled: false
  items:
    - type: MATERIAL
      id: RARE_DIAMOND
      amount: 5
      slot: 32
      chance: 50
      match-item-type: SWORD #filter option
      # match-tier-type: RARE #filter option
    - type: MATERIAL
      id: SILVER_INGOT
      amount: 1
      slot: 32
      chance: 50
      match-item-type: ARMOR #filter option
      # match-tier-type: RARE #filter option

settings:
  permission: nwmmoupgrade.evolution.default
  cost:
    enabled: false #Cost
    amount: 5000
  options:
    material-formula:
      enabled: false
      formula: 1
    default-chance: 100
    merge:
      enabled: false
      whitelist-stats:
        enabled: false #whitelist
        #stats: []
        stats:
          - ENCHANTS
          # - GEM_COLOR
          # - GEM_SOCKETS
          # - UPGRADE
          # - ATTACK_DAMAGE
          # - ATTACK_SPEED

Last updated