Skip to content

Shoppool

Add a medal to a medal shop's pool by Medal id or one coming from a flagvar, remove all medals from a specific shop's pool using a store id or one coming from a flagvar or remove all medals from all shop pools.

Syntax

(1) (Removes all medals from all medal shops's pools)

|shoppool,reset|

(2)

|shoppool,reset,storeid|

(3)

|shoppool,storeid,medalid|

Parameters

reset

This parameters indicates to use syntax (1) or (2). Any other value will be interpreted as using syntax (3).

storeid: int | varint

The medal shop store id or a flagvar containing it to add a Medal to or to remove all Medal. The resolved value must be a valid medal shop id (0 for Merab's, 1 for Shades's) or an exception will be thrown. The string form must contain var and have an int portion be a valid flagvar or an exception will be thrown.

medalid: int | varint

The Medal is to add to the shop pool or a flagvar containing it. The resolved value must be a valid Medal id or an exception will be thrown. The string form must contain var and have an int portion be a valid flagvar or an exception will be thrown.

Remarks

This manages the shop pools which is saved at line 5 on the Save File, it does not deal with the available pools (which is line 4 on the Save File). This means that it will not immediately cause changes to the displayed Medals until the available pool is updated. Removing a Medal from a medal shop from both lists after purchasing it can be done with removebadgeshop.

This command is only used for testing purposes in the TestRoom.

A different way to add a medal to both the shop pool and the available shop pool

Interestingly, this command accidentally allows a use case where it is possible to add a Medal to a shop pool, but also have the available pool take into account this change. It is done by processing this command in syntax (3) and later on, process a rerollshops which will have the secondary effect of regenerating the available pool using the updated shop pool. This allows to add a Medal to shop and have it immediately available using SetText. Alternatively, it is possible to simply change area which will automatically do the same task.

This was not intended to be possible because this command was only meant as a testing command, not something used in game and rerollshops wasn't implemented in the 1.0.0 release of the game, but was added later as a way to shuffle the existing pools that would already have been updated. The game never intended to use SetText to add a Medal to a shop because it uses events to do so.