# Custom Rod

Custom rods allow you to introduce fully configurable fishing rods with unique behavior and gameplay advantages. Each rod is defined through its own configuration file and can have any number of modifiers attached to it.

### Creating Rod

1. Go to the `/lfish menu` and click the `Custom Rod`.
2. Put the rod in the `Add` button to create a new custom rod config.  All rod files are stored in `server/plugins/LiteFish/fishing_rods`.

<div align="left"><figure><img src="/files/CTvNZnCvtXPiFkLdbvmn" alt="" width="375"><figcaption></figcaption></figure></div>

3. You can set modifications for this rod, or link it to the modification config using the `LINK` button.

### Bait / Rune Slots

Custom fishing rods can define how many **bait** or **rune** slots they provide. These slots determine how many items of each type can be inserted into the rod.

#### How It Works

* When a rod is created or given to a player (via menu or command), it automatically receives an additional lore line indicating an empty slot.\
  Example:

  ```
  lang.slot_empty: "<#555555><bait slot>"
  ```
* The rod can hold as many runes or baits as defined in its configuration.
* When inserting or removing a slot item, the system looks for the exact `lang.slot_empty` string inside the item lore and replaces or updates it accordingly.

<div align="left"><figure><img src="/files/7edWGkngKsdrMiZQTUVa" alt="" width="375"><figcaption></figcaption></figure></div>

### :warning: Item Identification and the `compare` System :warning:

It is important for the plugin to reliably identify custom fishing rods.\
However, rods may change over time — for example:

* bait/rune insertion modifies the lore,
* durability decreases during use,
* additional NBT data may appear from other plugins,
* players may intentionally edit lore with external tools.

To avoid misidentification and ensure stability, each custom rod configuration can specify which fields should be used for comparison.

#### The `compare` Field [LiteItem](/paw-studio-docs/overview/liteitem.md#understanding-compare)

You can define which item attribute(s) the plugin should use to recognize the rod.\
Any attributes **not** listed in `compare` will be ignored during identification.

#### Example

```json
"item": {
  "material": "FISHING_ROD",
  "display_name": "§cCustom Rod",
  "lore": [
    "§7A custom fishing rod.",
    "§7Holds two bait slots."
  ],
  "compare": "display_name"
}
```

#### What This Means

* When **giving** the rod (via menu or command), it will be created with the specified material, name, and lore.
* When the plugin later tries to **identify** this rod in the player’s inventory, it will compare **only the `display_name`**.
* Any other changes — lore edits, added NBT tags, different damage value, placeholder updates, bait/rune data — **will be ignored**.

As long as the rod keeps the same `display_name`, the plugin will always treat it as the configured custom rod.


---

# Agent Instructions: 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://paw-studio.gitbook.io/paw-studio-docs/litefish/custom-rod.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.
