BuyMenuData
Overview
Section titled “Overview”BuyMenuData.xml defines rotating shop menus: probability-weighted item pools with inline pricing, purchase limits, and configurable reset behavior. This is a self-contained 4-level deep schema used for event and rotating NPC shops.
Version Support
Section titled “Version Support”| Version | Status |
|---|---|
| v92 | Full |
| v90 | - |
| v86 | - |
DSL Support
Section titled “DSL Support”Entity: buyMenuDatas
Operations: create, update, delete, upsert
Structure
Section titled “Structure”BuyMenuData (root)└── BuyMenu (id, stringId, desc, resetType, resetTime?) └── Menu (id, desc, probability, needMedalItemId?) └── ItemList (stringed) └── Item (itemTemplateId, buyPrice, count?, limitType?, limitCount?)BuyMenu (root element)
Section titled “BuyMenu (root element)”| Attribute | Type | Since | Required | Description |
|---|---|---|---|---|
id | int | v92 | Yes | Unique buy menu identifier (primary key) |
stringId | int | v92 | Yes | String table ID for menu name |
desc | string | v92 | Yes | Internal description |
resetType | ResetType | v92 | Yes | Reset behavior for the shop |
resetTime | int | v92 | No | Reset hour (0-23), used when resetType is day |
Menu (rotating menu pool)
Section titled “Menu (rotating menu pool)”| Attribute | Type | Since | Required | Description |
|---|---|---|---|---|
id | int | v92 | Yes | Menu pool identifier |
desc | string | v92 | Yes | Internal description |
probability | decimal | v92 | Yes | Selection weight (0.0 to 1.0) |
needMedalItemId | int | v92 | No | Required medal/token item ID to access this pool |
ItemList (item group)
Section titled “ItemList (item group)”| Attribute | Type | Since | Required | Description |
|---|---|---|---|---|
stringed | int | v92 | Yes | String table ID for the item list tab (used as key) |
Item (purchasable entry)
Section titled “Item (purchasable entry)”| Attribute | Type | Since | Required | Description |
|---|---|---|---|---|
itemTemplateId | int | v92 | Yes | Item template ID |
buyPrice | int | v92 | Yes | Purchase price (in medal/token currency) |
count | int | v92 | No | Stack size per purchase |
limitType | string | v92 | No | Purchase limit scope (e.g. account) |
limitCount | int | v92 | No | Maximum purchases allowed per limit scope |
Enum Types
Section titled “Enum Types”ResetType
Section titled “ResetType”| Value | Since | Description |
|---|---|---|
none | v92 | Never resets |
day | v92 | Daily reset at resetTime hour |
instanceNpc | v92 | Resets per NPC instance (on despawn) |
Regional Variants
Section titled “Regional Variants”BuyMenuData uses _EU and _NA as separate suffixes (not _NAEU).
| Suffix | Region |
|---|---|
_CN | China |
_EU | Europe |
_JP | Japan |
_KR | Korea |
_NA | North America |
_RUS | Russia |
_THA | Thailand |
_TW | Taiwan |
DSL Examples
Section titled “DSL Examples”Create
Section titled “Create”spec: version: "1.0"
buyMenuDatas: create: - id: 99001 stringId: 990010 desc: "Event rotating shop" resetType: day resetTime: 6 menus: - id: 1 desc: "Weapon pool" probability: 0.5 needMedalItemId: 45001 itemLists: - stringed: 990011 items: - itemTemplateId: 100001 buyPrice: 10 count: 1 limitType: account limitCount: 5 - itemTemplateId: 100002 buyPrice: 20 - id: 2 desc: "Armor pool" probability: 0.5 itemLists: - stringed: 990012 items: - itemTemplateId: 200001 buyPrice: 15Update
Section titled “Update”spec: version: "1.0"
buyMenuDatas: update: - id: 1001 changes: resetType: instanceNpc resetTime: 0Deep nested update
Section titled “Deep nested update”Updates replace child collections wholesale. To update items within a menu, provide the full menu hierarchy:
spec: version: "1.0"
buyMenuDatas: update: - id: 1001 changes: menus: - id: 1 desc: "Updated weapon pool" probability: 0.7 itemLists: - stringed: 990011 items: - itemTemplateId: 100001 buyPrice: 15 count: 2 limitType: account limitCount: 10Delete
Section titled “Delete”spec: version: "1.0"
buyMenuDatas: delete: - 99001Upsert
Section titled “Upsert”spec: version: "1.0"
buyMenuDatas: upsert: - id: 99001 stringId: 990010 desc: "Event rotating shop" resetType: none menus: - id: 1 desc: "Single pool" probability: 1.0 itemLists: - stringed: 990011 items: - itemTemplateId: 100001 buyPrice: 10XML Structure
Section titled “XML Structure”<BuyMenuData> <BuyMenu id="99001" stringId="990010" desc="Event rotating shop" resetType="day" resetTime="6"> <Menu id="1" desc="Weapon pool" probability="0.5" needMedalItemId="45001"> <ItemList stringed="990011"> <Item itemTemplateId="100001" buyPrice="10" count="1" limitType="account" limitCount="5"/> <Item itemTemplateId="100002" buyPrice="20"/> </ItemList> </Menu> <Menu id="2" desc="Armor pool" probability="0.5"> <ItemList stringed="990012"> <Item itemTemplateId="200001" buyPrice="15"/> </ItemList> </Menu> </BuyMenu></BuyMenuData>- BuyMenuData is a self-contained schema. Unlike the BuyMenuList + BuyList pair (which cross-reference each other), BuyMenuData defines menus, item lists, and items all inline.
ItemListhas noidattribute. Thestringedvalue serves as the key within its parentMenu.- Each
Menusupports up to 4ItemListchildren. probabilityvalues across siblingMenuelements within aBuyMenushould sum to 1.0.- Child collections (menus, item lists, items) use clear-and-replace semantics on update. Provide the full collection to replace existing children.