Skip to content

Shop (Buy) (Show Shop Buy) ​

Category: Character/Party

An event content that opens a shop screen where the player can purchase Items and equipment. Provides UI in a single package for all "buy" scenes: town general stores and armories, quest-reward exchange counters, special trading posts, etc.

Multiple goods in one event content

This event content holds an internal lineup list, so one event content can sell multiple Items / equipment. Each item can be configured individually for stock mode, cost (consumed Parameters), auto-equip, etc. — a flexible design.

Independent stock per store (shop_id)

By identifying stores with Shop ID (shop_id), the same Item can have independent stock per store (e.g., a potion with separate stock managed between the general store in town A and the general store in town B).

Property Structure ​

Because this event content has a complex structure, we explain it in three layers: "common header," "lineup array," and "cost array."

Common header ​

ItemInput formatDescription
TitleTextTitle at the top of the shop window
apply_toSplit buttonStorage destination for purchases (Party / Character); auto-set when adding content
TargetSelectHow to specify the purchaser when apply_to=Character (Selected Member / Character ID)
Member IndexSelectWhen Target=Selected Member; 0-based party index
Character KeyText or SelectWhen Target=Character ID; directly specify character.id ({var} variable reference allowed)
Save Unique VariableSelectVariable to save the unique identifier of the purchased item
Shop IDTextStore identifier (manages stock independently from other stores)

Lineup list (Items) ​

Settings per item:

ItemInput formatDescription
KindSelectItem / Attach (equipment, passive)
Item KeySelectChoose from Item/Attach definitions
CountNumberQuantity gained per purchase
Stock ModeSelectUnlimited / Managed
Initial StockNumberWhen Managed; stock on first visit
Auto AttachCheckboxWhen Attach + Character; equip simultaneously with purchase
On Attach FailSelectBehavior on equip failure when Auto Attach (Deny / SkipToPool)

Cost list (Costs) ​

Resources consumed per item (multiple can be specified):

ItemInput formatDescription
Cost ParamSelectKey in parameter.json to consume (e.g., GOLD)
Cost ValueFormulaFixed value or Formula (e.g., 10 / {counter_1} * 5)
Use Current ValueCheckboxON = consume from current value / OFF = consume from max value

Property Details ​

Title ​

Title displayed at the top of the shop window.

  • Translation-ready: If multi-language support is set up in the Translation Tab, the text of this property is also treated as a translation key

Examples: Armory, General Store, Legendary Equipment Workshop

apply_to ​

Specifies the storage destination for purchases in two choices.

OptionBehavior
PartyStore in party-shared storage, consume from party Parameters (gold, etc.)
CharacterStore in the selected character's individual storage, consume from the same character's Parameters

"Payer = Receiver" principle

The storage destination and the consumption source are always on the same side. If buying for the party, consumption is from party gold; if buying individually for a character, consumption is from that character's individual gold.

apply_to is auto-selected when adding content

Choosing one of the two buttons "Shop (buy for Party)" / "Shop (buy for Character)" in the editor's Add Content screen auto-sets apply_to. After placement, the apply_to UI is hidden on the editor.

Target (only when apply_to=Character) ​

Specifies how to choose the purchasing character.

OptionBehavior
Selected MemberSpecify by index within the party
Character IDDirectly specify character.id

Member Index (when Target=Selected Member) ​

Select a 0-based index within the party.

  • "1st" to "nth"
  • Out-of-range index (less than party size) → Skip this event content (silent)

Character Key (when Target=Character ID) ​

Directly specify the character.json key (character.id).

  • Direct input: Enter character.id like MINATO
  • Variable reference: Specify in the form {var_name} to resolve the variable value as character.id
  • Can also be selected via OptionButton

Variable reference for reusing "the NPC we talked to earlier"

By saving character.id as a string via Assign Variable, you can dynamically change the shop target character.

Save Unique Variable ​

Saves the unique identifier of the most recently purchased item into a variable.

  • Variable selection from the dropdown (define in advance in the Variable tab)
  • After purchase, can be referenced in subsequent Assign Variable or Conditional Branch
  • Nothing is saved if left empty

Useful for processing immediately after purchase

By saving the purchase unique to a variable, you can implement purchase-linked behavior like "show the name of the item just after purchase," "trigger a special event after buying," etc.

Shop ID ​

Key that identifies the store. Show Shop Buy / Show Shop Sell with the same shop_id share stock.

  • Examples: village_1_shop_1, capital_arms_shop
  • If left empty, treated as shared stock across all shops
  • Items sold at Shop Sell are dynamically added to the Shop Buy list of the same shop_id

Realize independent stock per store

Even for the same "potion," setting different shop_ids for the general store in town A and the one in town B keeps their stock managed independently.

Lineup list (Items) ​

Array where you can register multiple goods for sale.

Kind ​

OptionBehavior
ItemItems in item.json (consumables, etc.)
AttachItems in attach.json (weapons, armor, passive skills, etc.)

Item Key ​

Select from the keys in item.json or attach.json depending on Kind.

  • Supports real-time cross-tab reference updates (2026-09-09)
  • Deleted entries are displayed with an Error icon

Count ​

Specifies the quantity gained per purchase.

  • Default: 1
  • Example: Setting 3 gives you 3 at a time (bulk purchase)

Stock Mode ​

OptionBehavior
UnlimitedCan be purchased any number of times (stock does not decrease)
ManagedDecreases from initial stock; sold out at zero

Initial Stock (when Managed) ​

  • Default: 0
  • Stock set on first visit
  • Second visit onward retains the remaining stock from the previous visit (independent per shop_id)

Auto Attach (only when Kind=Attach + apply_to=Character) ​

Specifies whether to equip to the character simultaneously with purchase.

  • ON: Purchase → Automatically equipped on the target character
  • OFF: Purchase → Goes into the character's pool (unequipped Attach)

On Attach Fail (when Auto Attach is ON) ​

Behavior when equipping is not possible (attachable=false, insufficient req_param, etc.).

OptionBehavior
DenyPurchase itself fails (no resource consumption, no acquisition)
SkipToPoolPurchase succeeds but goes into pool instead of being equipped

PASSIVE Attach is fixed to Deny

Attaches with type=PASSIVE (passive skills) cannot be equipped from the equipment screen, so going into the pool means they can never be equipped and will rot forever. To prevent this, PASSIVE Attach is fixed to On Attach Fail=Deny (even if SkipToPool is selected, Deny behavior is used).

Cost list (Costs) ​

Array of consumed resources tied to each item. Multiple can be specified, and all costs are consumed simultaneously.

Cost Param ​

Specify the key in parameter.json.

  • Examples: GOLD (gold), SP (shop points), EXP (experience)
  • Supports real-time cross-tab reference updates

Cost Value ​

Specify the amount to consume as a fixed value or Formula.

  • Fixed value: Integers directly like 100, 500
  • Formula: {counter_1} * 10, USER.LEVEL.MAX * 50, etc.
  • The formula is evaluated at purchase time (dynamic pricing possible)

Use Current Value ​

  • ON (default): Consumed from current value (normal behavior)
  • OFF: Consumed from max value (special use, e.g., permanent max HP reduction)

Dynamic pricing via Formula

You can implement mechanisms like "the higher {quest_phase}, the cheaper" or "price rises every {counter_1} purchases" to change prices based on progress or purchase count.

Runtime Behavior ​

When this event content runs, the following processing is performed:

1. Resolve apply_to and target character ​

When apply_to=Character, specify the target character from Target / Member Index / Character Key.

  • Resolution success: Open the shop screen
  • Resolution failure (no matching character in party, etc.): Output a warning log and advance to the next event content doing nothing

2. Pause all HUD processing ​

Before opening the shop screen, pause processing of screen effects, images, text, choices, buttons, and function buttons.

3. Merge dynamic lineup ​

If shop_id is specified, internally read from shop_stock and merge into the lineup list:

  • Items that were sold via Shop Sell and flowed into the same shop_id
  • Remaining count that was consumed in Managed stock mode

4. Display the shop screen ​

Display the title, lineup, and each item's price / stock. The player can:

  • Buy: Select an item, pay the cost, and obtain it
  • Cancel: Close the shop and advance to the next event content

5. Purchase processing ​

When the player confirms a purchase:

  1. Check costs (all Cost Param × Cost Value); fail if insufficient
  2. Consume costs
  3. Add Item/Attach to storage
  4. In Managed stock mode, decrease remaining stock
  5. If Save Unique Variable is specified, save purchase unique to the variable
  6. If Auto Attach is set, perform equip processing (per On Attach Fail)

6. Shop end ​

When the player closes the shop:

  1. Resume all HUD processing
  2. Advance to the next event content

Typical Flows ​

Flow 1: Town general store ​

Buy potions with party gold:

  1. Show Text ← "Welcome!"
  2. Shop (Buy) (this event content)
    • Title: General Store
    • apply_to: Party
    • Shop ID: town_a_item_shop
    • Lineup:
      • Potion × 1, Unlimited, Cost 50 GOLD
      • High Potion × 1, Unlimited, Cost 200 GOLD
      • Elixir × 1, Managed (Initial Stock 3), Cost 1000 GOLD
  3. Show Text ← "Come again!"

Flow 2: Character-individual equipment store ​

Buy weapons with character-individual gold + auto-equip:

  1. Shop (Buy) (this event content)
    • Title: Armory
    • apply_to: Character
    • Target: Selected Member (1st)
    • Shop ID: capital_arms_shop
    • Lineup:
      • Steel Sword (Attach, Auto Attach ON, On Attach Fail: Deny), Cost 500 GOLD
      • Steel Shield (Attach, Auto Attach ON, On Attach Fail: SkipToPool), Cost 300 GOLD

Flow 3: Dynamic pricing (Formula) ​

Price based on party average level:

  1. Shop (Buy) (this event content)
    • Lineup:
      • Rare equipment (Attach), Cost MEMS_AVG.LEVEL.MAX * 100 GOLD

Flow 4: Purchase-linked event ​

Trigger a special event right after purchase:

  1. Shop (Buy) (this event content)
    • Save Unique Variable: last_bought_unique
  2. Conditional Branch (Formula {last_bought_unique} != "") ← Only when a purchase occurred
  3. Show Text ← "Thank you for your purchase!"
  4. End If

Flow 5: Multi-currency shop ​

Purchase with gold + special currency (shop points):

  1. Shop (Buy) (this event content)
    • Lineup:
      • Special equipment, Cost:
        • GOLD: 500
        • SP: 10

Flow 6: Linked with Shop Sell (store where sold items can be bought) ​

Items that the user sold can be bought at the same shop:

  1. Shop (Buy) (this event content) (Shop ID: town_a_shop)
  2. (In another event)
  3. Shop (Sell) (Show Shop Sell) (same Shop ID)

Flow 7: Quest-reward exchange counter ​

Exchange with special materials instead of GOLD:

  1. Shop (Buy) (this event content)
    • Title: Material Exchange
    • Lineup:
      • Legendary equipment (Attach), Cost:
        • Rare material: 10
        • Quest point: 100

Flow 8: Stock-limited shop ​

Rare items with limited quantity:

  1. Shop (Buy) (this event content)
    • Lineup:
      • Legendary Ring (Attach), Managed (Initial Stock 1), Cost 10000 GOLD
      • Rare consumable, Managed (Initial Stock 5), Cost 1000 GOLD

Once bought, stock decreases, and after sold out, you cannot buy even on revisit.

Typical Combinations ​

For the complete picture, see Combination Patterns.

Town general store ​

Standard pattern:

  1. Show Text (greeting)
  2. Shop (Buy) (this event content)
  3. Show Text (thanks)

Buy + Sell set ​

Provide both "buy" and "sell" UIs:

  1. Add Choice × 3 (Buy / Sell / Leave)
  2. Show Selection Window
  3. Conditional Branch (judge selection result)
  4. Shop (Buy) (this event content) (when "Buy")
  5. Shop (Sell) (Show Shop Sell) (when "Sell")

Purchase-linked event ​

Save purchase unique and branch:

  1. Shop (Buy) (this event content) (specify save variable)
  2. Conditional Branch (purchase unique matches specific value?)
  3. (Special processing)
Related event contentUse
Shop (Sell) (Show Shop Sell)Sell shop (shares stock via the same shop_id)
Add ItemDirectly grant an item to the party/character within an event content (no purchase)
Change ParameterIndividually increase/decrease GOLD, etc.
Assign VariableDefine the purchase-unique save variable
Conditional BranchPurchase-linked conditional branches
PageRelated content
Item Tab (Editor)item.json definition
Attach Tab (Editor)attach.json definition
Parameter Tab (Editor)parameter.json definition for GOLD, etc.
Variable Tab (Editor)Define the purchase-unique save variable
Formula ReferenceFormulas for dynamic pricing
Event Content ListList of all event contents

Notes ​

apply_to is decided when adding content ​

The storage destination (Party/Character) is decided by the two-split button at the time of Add Content in the editor, and cannot be changed afterwards on the placed event content. To use a different storage destination, place a separate event content.

Shops are distinguished by Shop ID ​

Even the same item has independent stock if the shop_id differs. Make shop_id unique when defining a different store. An empty specification is treated as common across all shops.

Specifying the same shop_id as Shop (Sell) (Show Shop Sell) adds sold items to the purchase list. To avoid this, use a different shop_id.

PASSIVE Attach fixes On Attach Fail=Deny ​

Attaches with type=PASSIVE cannot be equipped from the equipment screen, so once they enter the pool they can never be equipped. Even if you specify SkipToPool, Deny behavior is used automatically.

Managed stock is independent per shop_id ​

Stock in Managed stock mode is managed separately per shop_id. Running this event content multiple times for the same shop_id keeps the stock state.

Formula is evaluated at purchase time ​

The Cost Value formula is evaluated at the moment the player presses the purchase button. Even if the game state changes during shop display, the price is based on the value at purchase execution.

All multiple costs are consumed ​

If multiple Costs are specified for one item, all costs are consumed simultaneously (e.g., gold 100 + material 1). If even one is insufficient, purchase is denied.

Silent on character resolution failure ​

When apply_to=Character and the target character cannot be identified, the shop does not open and silently advances to the next event content (warning log).

Works even without a save unique variable ​

Even without specifying Save Unique Variable, the shop still functions (just the unique is not saved to a variable). If no post-processing is needed after purchase, leaving it empty is fine.

Other HUDs are paused during the shop ​

While the shop is displayed, all HUD processing (images, text, choices, buttons, etc.) is paused. Closing the shop automatically resumes them.