> For the complete documentation index, see [llms.txt](https://mythicchanger.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mythicchanger.superiormc.cn/auto-match-and-change/rule-config-example-random-replace.md).

# 📚Rule Config Example - Random Replace

{% hint style="info" %}
This example file will only work for <mark style="color:red;">**PREMIUM**</mark> version of **MythicChanger**.
{% endhint %}

```yaml
weight: 15

match-item:
  material:
    - iron_sword
  has-name: false

fake-changes: 
  replace-item:
    material: iron_sword
    name: '&c???'
    lore:
      - '&fNo one knows what sword'
      - '&fyou will obtain...'

real-changes: 
  replace-random-item:
    1:
      material: iron_sword
      amount: 1
      name: §fSharp §fLong Sword
      lore:
      - §cSword
      - §f
      - §eRequires Lvl 0
      - §f
      - '§3 §7➸ Attack Damage: §f8.1'
      - '§3 §7➸ Attack Speed: §f1.6'
      - §f
      - §c🔥§7 10 Fire Damage
      - §7Much sharper!
      flags:
      - HIDE_ATTRIBUTES
      attributes:
        GENERIC_ATTACK_SPEED:
          name: decoy
          amount: 0.0
          operation: ADD_NUMBER
          slot: any
      rate: 1
    2:
      material: iron_sword
      amount: 1
      name: §fKatana
      lore:
      - §cSword
      - §f
      - '§3 §7➸ Attack Damage: §f7'
      - '§3 §7➸ Attack Speed: §f2'
      - '§3 §7■ Crit Strike Chance: §f+10%'
      - '§3 §7■ Movement Speed: §f+2'
      - §f
      - §7§oA very sharp & light sword
      - §7§oforged by a hundred years
      - §7§oof smithing mastery.
      - §f
      - '§3 §7Tier: §6§lRARE'
      - '§7Durability: 800 / 800'
      flags:
      - HIDE_ATTRIBUTES
      attributes:
        GENERIC_ATTACK_SPEED:
          name: decoy
          amount: 0.0
          operation: ADD_NUMBER
          slot: any
      rate: 1

real-change-actions: []

conditions: []
    
only-in-player-inventory: false
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mythicchanger.superiormc.cn/auto-match-and-change/rule-config-example-random-replace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
