MossMerchant.dat

Moss Merchant event: schedules the wandering gamble NPC and defines the items players can gamble on. Each listed item has per-option table indices and a gamble weight.

File Location#

Data/Event/MossMerchant.dat

Loaded once at GameServer startup. Gated by Event.dat MossMerchantEvent. Changes require a restart.

Sections#

Section 0 - Schedule#

0
//Year   Month   Day   DoW   Hour   Minute   Second
*        *       *     *     2      0        0
...
end

Each row is one spawn time. Wildcard * means "any". Event.dat MossMerchantEventTime controls how long Moss stays per spawn (in seconds).

Section 1 - Gamble Item Pool#

1
//Index   Group   Option0 Option1 Option2 Option3 Option4 Option5 Option6   GambleRate   Comment
5         0       9 9 9 9 9 9 9                                              1633         //Blade
...
end

Each row is one item Moss offers to gamble on. When a player gambles within a Group, one row with that group is drawn by GambleRate weight, then its Option0-6 indices are used to roll the final item attributes.

ColumnEffect
IndexItem index from Item.xml
GroupItem group (weapon class, armor slot, etc.) - must match the gamble slot the player requested
Option0Rate-table index passed to Option0 (base item level roll)
Option1Rate-table index for skill option; cleared if the item has no skill
Option2Rate-table index for Luck roll
Option3Rate-table index for additional option (+4/+8/+12 etc.)
Option4Rate-table index for excellent option roll
Option5Rate-table index for set (Ancient) option roll
Option6Rate-table index for socket slot roll
GambleRateSelection weight for this row within its Group. Higher = more likely to be drawn
CommentInline //Name - ignored at load, kept for editor readability

Option column values index into ItemOptionRate.xml rate tables, not option levels directly.

Cross-File Dependencies#

ValueRelated in
Enable flagEvent.dat MossMerchantEvent
Spawn durationEvent.dat MossMerchantEventTime
IndexItem.xml
Option0-6ItemOptionRate.xml
Item slot behaviorLuckyItem.xml when gamble results produce Luck options

Moss Merchant NPC itself is spawned in code on map Elbeland at a fixed coordinate and is not defined in any XML shop file.

Common Issues#

  • Moss never appears - MossMerchantEvent = 0 in Event.dat, or all section 0 rows have past times for the day
  • Gamble never selects an item - GambleRate sums to zero for the requested Group, or no rows match that Group
  • Rolled item has no options - Option0-6 values point to missing rows in ItemOptionRate.xml
  • Moss spawns but leaves instantly - MossMerchantEventTime in Event.dat too low

Last updated April 21, 2026