> For the complete documentation index, see [llms.txt](https://pro-hytale-mods.gitbook.io/pro-hytale-mods-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pro-hytale-mods.gitbook.io/pro-hytale-mods-docs/server-administrators/rpgleveling-integration.md).

# RPGLeveling Integration

## RPGLeveling x PartyPro Integration

PartyPro integrates with RPGLeveling to display player levels in the party HUD and enable XP sharing among party members.

### Features

#### Level Display in HUD

When RPGLeveling is installed, player levels are automatically shown next to names in the party HUD.

The format is configurable in `config.json`:

```json
{
  "rpgLevelingIntegration": true,
  "rpgLevelingFormat": "Lv.%d"
}
```

Format examples:

* `"Lv.%d"` → "Lv.42"
* `"[%d]"` → "\[42]"
* `"Level %d"` → "Level 42"

#### XP Sharing

Party members can share XP from mob kills. When enabled, XP is distributed among online party members within range.

### Configuration

XP sharing is configured in the main `config.json`:

```json
{
  "rpgLevelingIntegrationEnabled": true,
  "rpgLevelingFormat": "Lv.{level}",
  "xpSharingEnabled": true,
  "xpSharingMultiplier": 1.0,
  "xpSharingMaxDistance": -1,
  "xpSharingKillerGetsFullXP": false
}
```

#### Settings

| Setting                     | Type    | Default | Description                                            |
| --------------------------- | ------- | ------- | ------------------------------------------------------ |
| `xpSharingEnabled`          | boolean | true    | Enable/disable XP sharing globally                     |
| `xpSharingMultiplier`       | double  | 1.0     | XP multiplier for party members (1.0 = 100%)           |
| `xpSharingMaxDistance`      | double  | -1      | Max distance in blocks for XP sharing (-1 = unlimited) |
| `xpSharingKillerGetsFullXP` | boolean | false   | If true, killer gets 100% XP + others get multiplier%  |

#### XP Distribution Modes

**Mode 1: Split XP** (`killerGetsFullXP: false`)

* Total XP is split evenly among all eligible party members
* Each member gets: `(baseXP × groupMultiplier) / memberCount`

**Mode 2: Bonus XP** (`killerGetsFullXP: true`)

* Killer gets full XP (100%)
* Other party members get: `baseXP × groupMultiplier`

#### Distance Restriction

Set `maxShareDistance` to limit XP sharing range:

* `-1` = No distance limit (default)
* `50` = Only members within 50 blocks receive XP
* `100` = Only members within 100 blocks receive XP

Members in different worlds never receive shared XP.

### In-Game Usage

#### Enabling XP Sharing

1. Open the party menu (`/p`)
2. Go to the "RPGLeveling" tab (only visible when RPGLeveling is installed)
3. Toggle "Share XP with Party"

**Note:** Only the party leader can enable/disable XP sharing.

#### Notifications

When XP is shared, party members receive a notification showing how much XP they received.

### Technical Details

#### Soft Dependency

PartyPro uses reflection to integrate with RPGLeveling. If RPGLeveling is not installed, the integration features are simply disabled - no errors or crashes.

#### Level Caching

Player levels are cached and refreshed every 2 seconds to avoid performance issues. This means level-ups may take up to 2 seconds to appear in the HUD.

#### Thread Safety

Level data is read from the EntityStore on the WorldThread to ensure thread safety. The cached values are used for HUD display.

### Troubleshooting

#### Levels not showing

1. Check that `rpgLevelingIntegration` is `true` in config.json
2. Verify RPGLeveling is installed and working
3. Restart the server after installing both mods

#### XP not being shared

1. Ensure XP sharing is enabled in the party menu (leader must enable it)
2. Check that party members are online
3. If using distance restriction, verify members are within range
4. Check server logs for any error messages

### Version Compatibility

| PartyPro | RPGLeveling   | Status                       |
| -------- | ------------- | ---------------------------- |
| 0.8.72+  | 0.2.0-beta-5+ | ✅ Full Support (recommended) |
| 0.8.60+  | 0.2.0-beta-4  | ✅ Supported                  |
| 0.8.60+  | 0.1.9+        | ⚠️ Legacy (limited features) |

#### Beta-5+ Features

* More accurate level data via `getPlayerLevelInfo(PlayerRef, Store)`
* Monster level API support
* Entity kill context for XP events (killed entity UUID and level)
* Listener management (check if registered, get listener count)


---

# 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, and the optional `goal` query parameter:

```
GET https://pro-hytale-mods.gitbook.io/pro-hytale-mods-docs/server-administrators/rpgleveling-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
