> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/data/questworld/questworldreward.md).

# QuestWorldReward.txt

Rewards granted on World Quest completion. Up to 5 reward rows per quest, each scoped by `RequireIndex`, `RequireGroup`, and `RequireState`. A quest that should grant both XP and zen needs two rows (one per type).

## File Location

```
Data/QuestWorld/QuestWorldReward.txt
```

Loaded once at GameServer startup. Changes require a restart.

## Format

Same row shape as [QuestWorldObjective.txt](/docs/data/questworld/questworldobjective.md). Terminated by `end`.

```
//Number Type Index Quantity Level Option1 Option2 Option3 NewOption RequireIndex RequireGroup RequireState DW DK FE MG DL SU RF
```

## Columns

| Column                                           | Effect                                                                                                                                                                                            |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Number`                                         | Reward slot within the quest (`0`-`4`). Used by the client to display rewards in order                                                                                                            |
| `Type`                                           | Reward kind. `1` = Experience, `2` = Money (zen), `4` = Item, `8` = Timed effect buff, `16` = Gens contribution. These are distinct values, not a bitmask - one reward row equals one reward type |
| `Index`                                          | For `Type=4` the item index; for `Type=8` the effect ID; unused for experience, money, and contribution                                                                                           |
| `Quantity`                                       | Amount. Experience base value (multiplied by `AddQuestExperienceRate` before granting), zen amount, item stack count, effect duration in seconds, or Gens contribution points                     |
| `Level`                                          | Item +level (used only for `Type=4`)                                                                                                                                                              |
| `Option1/2/3` / `NewOption`                      | Item option values written onto the reward item (used only for `Type=4`)                                                                                                                          |
| `RequireIndex` / `RequireGroup` / `RequireState` | Which quest grants this reward and in which state                                                                                                                                                 |
| `DW` ... `RF`                                    | Per-class grant flags. Same scale as [QuestWorld.txt](/docs/data/questworld.md): `0` hidden, `1` 1st class only, `2` 1st and Change-Up                                                            |

## Important Behavior

* Experience is multiplied by the `AddQuestExperienceRate` entry for the player's account level before being granted.
* Experience is suppressed while the player is under a Seal of Sustenance effect.
* Experience grant stops at the server's quest-XP level cap (`MaxLevelUpQuest` in Common.dat); past that point the row is silently skipped.
* Money overflow (`MAX_MONEY`) is clamped to the cap rather than dropping the reward.
* Item rewards create `Quantity` copies of the configured item, one at a time, through the standard quest drop path; inventory-full handling is the standard path.
* Every matching row runs on turn-in, including multiple item rows and mixed types.

## Cross-File Dependencies

| Attribute                        | Related in                                                                    |
| -------------------------------- | ----------------------------------------------------------------------------- |
| `RequireIndex` + `RequireGroup`  | [QuestWorld.txt](/docs/data/questworld.md)                                    |
| `Index` for Type 4 (item)        | [Item.xml](/docs/data/item/item.md)                                           |
| `Index` for Type 8 (effect buff) | TODO: verify effect ID enum reference                                         |
| `Type=16` Gens contribution      | [Common.dat Gens System](/docs/gameserver/common-dat.md#gens-system-settings) |
| XP multiplier                    | [Common.dat](/docs/gameserver/common-dat.md) `AddQuestExperienceRate_AL0-3`   |

## Common Issues

* **Player completes quest but gets nothing** - no reward row matches the player's class column, or all rows' `RequireState` does not match the state the quest is in at turn-in
* **Missing second reward** - experience and zen are separate `Type` values; each needs its own row
* **XP reward looks smaller than configured** - `Quantity` is multiplied by `AddQuestExperienceRate` for the player's account level; base value may differ from granted value
* **Item reward not granted** - inventory full; the engine follows the same drop path as any other quest item
* **Effect buff does not apply** - `Type=8` expects a valid effect ID in `Index` and duration in seconds in `Quantity`
