QuestReward.txt
Rewards granted while a quest is being advanced. Each row describes one reward action, gated by quest state and per-class availability. Rewards are tied to class progression milestones, not generic item or currency grants.
File Location#
Data/Quest/QuestReward.txt
Loaded once at GameServer startup. Changes require a restart.
Format#
//Number Type Index Quantity Level Option1 Option2 Option3 NewOption RequireIndex RequireState DW DK FE MG DL SU RF
0 1 200 10 0 0 0 0 0 0 1 1 1 1 0 0 1 0
end
Terminated by end.
Columns#
| Column | Type | Effect |
|---|---|---|
Number | int | Reward slot within the quest. Informational - the server does not key behaviour on it |
Type | 0, 1, 2, 4, 8, 16 | Reward kind. See Type values |
Index | int | Identifier echoed back to the client in the reward packet. For Type 1 it is the stat-point reward ID, for Type 2 and 16 the class-change target, for Type 4 and 8 the visual reward index |
Quantity | int | Amount. Used directly by Type 1 (stat points). Other types rely on fixed server logic and ignore this column |
Level | int | Present for consistency with QuestObjective; unused by current reward handlers |
Option1 / Option2 / Option3 / NewOption | int | Present for consistency; unused by current reward handlers |
RequireIndex | int | Quest this reward belongs to |
RequireState | 0-3 | Required quest state for the reward to fire. 0 fires on accept (before transitioning to accepted), 1 fires on turn-in (before transitioning to finished) |
DW ... RF | 0-2 | Per-class gate. 0 = reward skipped for that class, 1 = base class, 2 = first class change or higher |
Type Values#
Each row picks exactly one reward type - the server branches on the Type integer and runs the matching action. These are not bitmask bits; do not OR them together.
| Value | Meaning |
|---|---|
0 | Empty slot. Skipped |
1 | Grant stat points. Quantity is added directly to LevelUpPoint. Not affected by PlusStatPoint in Common.dat |
2 | First class change. Sets the character to class change 1 if they are still at change 0, rebuilds the preview charset, and sends the reward packet. Does not grant stats on its own |
4 | Hero bonus. For Fairy Elf the server grants the Infinity Arrow skill. For any class the server awards (Level - 220) * PlusStatPoint stat points when Level > 220, otherwise zero |
8 | Combo reward. Sends the reward packet to the client so it can show the combo-skill cut-scene. No server-side skill is added; the combo capability is enabled through the normal class-progression path |
16 | Second class change. Sets the character to class change 2 if they are still at change 0 or 1, rebuilds the preview charset, and sends the reward packet. Does not grant stats on its own |
To grant multiple reward actions for the same quest, add multiple rows with the same RequireIndex - one per reward type.
Quest rewards are restricted to these progression actions. For item or currency grants use the QuestWorld system or trigger an EventItemBag.
Reward Firing#
The server runs the reward list when the quest's CurrentState transitions:
- From
0(not accepted) to1(accepted) - rows withRequireState == 0fire - From
1(accepted) to2(finished) - rows withRequireState == 1fire - From
3(cancelled) to1(re-accepted) - rows withRequireState == 3fire
The reward packet carries the character index, the row's Index field, and a type-specific amount (stat points granted, class-change target, or the row's Quantity).
Cross-File Dependencies#
| Attribute | Related in |
|---|---|
RequireIndex | Quest.txt |
| First / second class change targets | DefaultClassInfo.txt |
| Hero bonus stat-point formula | Common.dat PlusStatPoint |
| Quest XP multiplier | Common.dat AddQuestExperienceRate_AL0-3 |
| NPC that drives reward flow | Monster.xml via Quest.txt MonsterClass |
| Infinity Arrow skill (Type 4 for FE) | Skill.txt |
Common Issues#
- Player completes quest but gets nothing - no row matches the player's class, or
RequireStatedoes not match the quest transition - Class change does not fire - Type
2is ignored when the character is already past change 1; Type16is ignored past change 2. VerifyChangeUpbefore the quest runs - Hero bonus grants zero points - the character is at or below level 220; the formula is
(Level - 220) * PlusStatPointand clamps to zero below 221 - Combo skill not unlocked - Type
8only sends the reward visual; the combo skill itself is granted through the class-progression pipeline, not this row - Stat points not the expected amount - Type
1usesQuantitydirectly and ignoresPlusStatPoint; adjustQuantityto match the intended reward