Shop (Sell) (Show Shop Sell)
Category: Character/Party
An event content that opens a shop screen where the player can sell owned Items and equipment. The counterpart to Shop (Buy) (Show Shop Buy); provides UI in a single package for all "sell" scenes: town general stores, pawn shops, exchange counters, etc.
Difference from Buy: items means "price override," not "filter"
In Shop (Buy) (Show Shop Buy), items is the lineup list (only items listed here can be bought), but in this event content, items is a price override table. Leaving it empty makes all sellable owned items candidates, and only items listed in items apply special pricing.
Linked with Buy via Shop ID
Specifying the same Shop ID for this event content and Shop (Buy) (Show Shop Buy) makes sold items flow into the purchase list of the same store (buyback possible). With a different Shop ID or empty Shop ID, sold items vanish.
Property Structure
We explain this event content in four layers: "common header," "filter," "price override array," and "price array."
Common header
| Item | Input format | Description |
|---|---|---|
| Title | Text | Title at the top of the shop window |
| apply_to | Split button | Source of sales (Party / Character); auto-set when adding content |
| Target | Select | How to specify the selling character when apply_to=Character |
| Member Index | Select | When Target=Selected Member |
| Character Key | Text or Select | When Target=Character ID |
| Shop ID | Text | Store identifier (sold items flow in with the same ID as Buy) |
Filter
| Item | Input format | Description |
|---|---|---|
| Filter Kind | Select | All / Items only / Attaches only |
| Filter Types | Checkbox group | Multi-select itemtype or attachtype |
Price override list (Items)
| Item | Input format | Description |
|---|---|---|
| Kind | Select | Item / Attach (equipment, passive) |
| Item Key | Select | Choose from target item definitions |
Price list (Prices)
| Item | Input format | Description |
|---|---|---|
| Price Param | Select | Key in parameter.json to add (e.g., GOLD) |
| Price Value | Formula | Fixed value or Formula |
| Use Current Value | Checkbox | ON = add to current value / OFF = add to 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: Pawn Shop, Buyback Counter, Collector
apply_to
Specifies the source of sales in two choices. This determines both "which storage to sell from" and "where to add the proceeds."
| Option | Behavior |
|---|---|
| Party | Sell from party-shared storage, proceeds added to party Parameters |
| Character | Sell from the selected character's individual storage, proceeds added to that character |
"Seller = Receiver" principle
The storage destination and the proceeds receiver are always on the same side. If selling for the party, proceeds go into party gold; if selling individually for a character, proceeds go into that character's gold.
apply_to sell scope (important difference)
| apply_to | Sell targets |
|---|---|
| Party | party.item + pool (unequipped) Attaches with owner=PARTY |
| Character | character[unique].data.item + data.attach (includes equipped; auto unattached on sale) |
Character's equipped Attaches are not in Party sell scope
In Party sell, Attaches currently equipped by a character do not appear in the list. If you want to sell equipped items, use Character sell or unequip first and then use Party sell.
Target (only when apply_to=Character)
Same two choices as Shop (Buy) (Show Shop Buy) (Selected Member / Character ID).
Member Index / Character Key
Same spec as Shop (Buy) (Show Shop Buy) (0-based index, {var} variable reference allowed).
Shop ID
Key that identifies the store. Specifying the same shop_id as Shop (Buy) (Show Shop Buy) makes sold items flow into the purchase list of the same store.
- Empty: Sold items vanish (do not flow into shop_stock)
- Non-empty: Per sale,
shop_stock[<shop_id><kind_prefix><item_key>]is incremented by 1
Enable buyback by linking with Buy
Setting up Shop (Buy) (Show Shop Buy) with the same shop_id creates a store where the player can later buy back what they sold. A kind design that prevents "regretting the sale."
Filter Kind
Narrows the kinds of goods displayed in the shop. Always applied; the player cannot change it.
| Option | Behavior |
|---|---|
| All | Display both Items and Attaches |
| Item Only | Display only item.json entries |
| Attach Only | Display only attach.json entries |
Filter Types
Multi-specify more granular filtering with itemtype or attachtype keys.
- When Filter Kind=Item Only: multi-select from itemtype keys
- When Filter Kind=Attach Only: multi-select from attachtype keys
- When Filter Kind=All: can select from both typesets
- Empty (nothing selected): All types are targets
Implementing specialty shops
Combining Filter Kind + Filter Types enables specialty shops like "weapons only," "healing items only," "armor only."
Price override list (Items)
The items array in this event content differs significantly in role from Buy.
- Not a filter: Only items listed here are not the only ones sellable
- Price override table: Only items listed here ignore the master sell price (sell_prices) and are sold with this event content's prices
- Behavior for unspecified items: Sold normally with the master sell_prices (the sell price set on the item definition side)
- Items whose master sell_prices is empty cannot be sold (not displayed in the shop)
Kind
| Option | Behavior |
|---|---|
| Item | Item from item.json |
| Attach | Item from attach.json |
Item Key
Select the target item.
Price list (Prices)
Specify the sale proceeds for each price-override target.
Price Param
Select the Parameter to be added as proceeds (usually GOLD).
Price Value
Specify the proceeds amount as a fixed value or Formula.
- Fixed value: Integers like
100,500 - Formula:
MEMS_AVG.LEVEL.MAX * 10, etc.
Use Current Value
- ON (default): Added to current value (normal behavior)
- OFF: Added to max value (special use)
Empty price list inherits the master
Saving a target Item with Prices empty means no price is defined on this event content side, so the master sell_prices value is used as-is. The pattern "specific items only have special pricing, others follow the master" is easy to write.
Entering any value in the price list completely replaces the master
Entering at least one entry in Prices completely ignores the master sell_prices, and only this event content's prices are effective. Special settings like "proceeds in experience in addition to GOLD" are also possible.
Runtime Behavior
When this event content runs, the following processing is performed:
1. Resolve apply_to and target character
Same as Shop (Buy) (Show Shop Buy), when apply_to=Character, specify the target character.
2. Pause all HUD processing
Before opening the shop screen, pause processing of screen effects, images, text, choices, buttons, and function buttons.
3. Collect sell targets
List up sellable items based on apply_to:
- Party:
party.item+ pool Attaches with owner=PARTY - Character:
character.item+character.attach(includes equipped)
Then narrow down via Filter Kind + Filter Types and keep only items that can be sold via master sell_prices (or this event content's Prices).
4. Display the shop screen
Display the title, list of sellable items, and the price of each.
5. Sell processing
When the player confirms a sale:
- Remove the target item from the owning storage
- If Character sell + currently equipped, auto unattach
- Add Price Param × Price Value proceeds to the apply_to side
- If shop_id is specified, increment
shop_stock[<shop_id><kind_prefix><item_key>]by 1 (flow into Buy)
6. Shop end
When the player closes the shop, all HUD processing resumes and the flow advances to the next event content.
Typical Flows
Flow 1: Town general store (buys everything)
Buy everything from the party storage:
- Show Text ← "What would you like to sell?"
- Shop (Sell) (this event content)
- Title: Buyback Counter
- apply_to: Party
- Shop ID:
town_a_sell - Filter Kind: All
- Price override: None (all sold at master sell_prices)
Flow 2: Weapon specialty shop
Attach only, weapon type only:
- Shop (Sell) (this event content)
- Title: Weapon Buyback
- Filter Kind: Attach Only
- Filter Types: Select
weapon
Flow 3: General store linked with Buy
Set up Buy and Sell with the same shop_id:
- Add Choice × 3 (Buy / Sell / Leave)
- Show Selection Window
- Conditional Branch ← Judge selection result
- Shop (Buy) (Show Shop Buy) (when "Buy", Shop ID:
town_a_shop) - Shop (Sell) (this event content) (when "Sell", Shop ID:
town_a_shop) ← Same shop_id
This allows the player to buy back what they sold at the same store.
Flow 4: Special high-value buyback (rare items only at special price)
Most items at the master value, specific items only at special pricing:
- Shop (Sell) (this event content)
- Price override:
- Legendary Sword (Attach), Price: GOLD 10000 (overrides master value)
- Legendary Shield (Attach), Price: GOLD 8000
- (Others all at master values)
- Price override:
Flow 5: Character-individual sell
Sell items equipped by a specific character:
- Shop (Sell) (this event content)
- apply_to: Character
- Target: Selected Member (1st)
- Filter: All
- (1st member's equipped Attaches are also sellable, auto unattach)
Flow 6: Dynamic pricing (economic event)
Buyback amount based on party average level:
- Shop (Sell) (this event content)
- Price override:
- Rare equipment (Attach), Price:
MEMS_AVG.LEVEL.MAX * 50GOLD
- Rare equipment (Attach), Price:
- Price override:
Flow 7: Sell-only shop without Buy
Make sold items completely vanish with empty shop_id:
- Shop (Sell) (this event content)
- Shop ID: Empty (sold items vanish)
- (Expression for a rare-item collector, etc.)
Flow 8: Exchange counter with multiple proceeds
Store that pays both GOLD and special currency:
- Shop (Sell) (this event content)
- Price override:
- Quest item, Price:
- GOLD:
500 - SP (shop points):
10
- GOLD:
- Quest item, Price:
- Price override:
Typical Combinations
For the complete picture, see Combination Patterns.
Buy + Sell set (general store)
Provide both "buy" and "sell":
- Add Choice × 3
- Show Selection Window
- Conditional Branch
- Shop (Buy) (Show Shop Buy) ← Same shop_id
- Shop (Sell) (this event content) ← Same shop_id
Specialty buyback shop
Buys only specific types:
- Shop (Sell) (this event content) (Filter Kind + Filter Types)
Special high-value buyback event
Special pricing only for specific items:
- Shop (Sell) (this event content) (specify only specific items in price override)
Sell-linked quest
Trigger an event by selling a specific item:
- Shop (Sell) (this event content)
- Conditional Branch ← Judge variable (requires separate recording)
Related Event Contents
| Related event content | Use |
|---|---|
| Shop (Buy) (Show Shop Buy) | Buy shop (shares stock via the same shop_id) |
| Assign Variable | Manage flags based on sell results |
| Change Parameter | When manually adding proceeds |
| Conditional Branch | Branching after sell |
Related Pages
| Page | Related content |
|---|---|
| Item Tab (Editor) | item.json definition (includes sell_prices) |
| Attach Tab (Editor) | attach.json definition (includes sell_prices) |
| Type Tab (Editor) | itemtype / attachtype definitions |
| Parameter Tab (Editor) | parameter.json definition for GOLD, etc. |
| Formula Reference | Formulas for dynamic pricing |
| Event Content List | List of all event contents |
Notes
items array is "price override," not "filter"
While the items of Shop (Buy) (Show Shop Buy) is the lineup list (only items listed here are sold), the items of this event content is a price override table. Even if left empty, all sellable owned items are displayed as candidates. If you want to filter, use Filter Kind / Filter Types.
Items with empty master sell_prices cannot be sold
Items whose sell_prices on the item definition side (item.json / attach.json) is empty cannot be sold even with this event content (not displayed in the shop). To make them "sellable," first set sell_prices in the item definition, or specify Prices in this event content's price override.
Empty Prices inherits the master sell_prices
Saving an item registered in the price override list with Prices empty means no price is defined on this event content side, so the master sell_prices value is used as-is. There is currently no use case for "all at master values but want to do some meta processing by writing here" (reserved for future extension).
Any entry in Prices completely ignores the master
Entering at least one entry in Prices ignores the master sell_prices, and only this event content's Prices are effective. Additions like "add EXP in addition to the master GOLD price" are not possible. If you want to inherit the master values and add on, write everything in this event content's Prices.
Empty Shop ID makes sold items vanish
Setting Shop ID to empty makes sold items completely vanish rather than flow into the internal shop_stock. Can be used for stores that do not need buyback (rare-item collectors, etc.), but linking with Shop (Buy) (Show Shop Buy) is lost.
Party sell does not target character-equipped items
With apply_to=Party, only party.item and pool (unequipped) Attaches can be sold. Attaches equipped by a character do not appear in the list. If you want to sell equipped items, use apply_to=Character or unequip in advance.
Character sell targets equipped items too, auto unattach
With apply_to=Character, the character's data.item + data.attach can be sold. Equipped Attaches are included in targets and are automatically unattached on sale.
Changing Filter Kind clears Filter Types
Changing Filter Kind resets the Filter Types selection. The previous selection has no meaning because the corresponding typeset changes.
No purchase-unique save variable
The Save Unique Variable in Shop (Buy) (Show Shop Buy) is not in this event content. Since sold items vanish, there is no need for unique reference.
Formula is evaluated at sell time
The Price Value formula is evaluated at the moment the player presses the sell button. Even if the game state changes during shop display, the price is based on the value at sell execution.
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).
