IMM_SEDIT

Keywords: IMM_SEDIT, WIZ_SEDIT, SEDIT

Category: Admin

=== STAFF MANUAL === Usage: sedit <shop vid> Description: Interactive editor for shops. Opens the target shop VID in a menu-driven session where every field on the shop record -- keeper NPC, buy/sell rates, the nine fallback message strings, no-trade filter, shop flags, room list, product inventory, and accepted item-type list -- can be edited from a single screen. Edits are held in a scratch copy until you quit the editor; only then are they written back to the live shop_index and the owning zone marked dirty for resave. Main Menu: 0 Keeper -- NPC prototype VID for the shopkeeper. The display shows both the VID and the mob's short description. 1 Sell rate -- multiplier applied when the shop sells an item to a player. 2 Buy rate -- multiplier applied when the shop buys an item from a player. 3 Keeper no item -- string shown when the shop does not stock the item a player asked about. 4 Player no item -- shown when the player does not have the item they are trying to sell. 5 Keeper no cash -- shown when the keeper cannot afford to buy the player's item. 6 Player no cash -- shown when the player cannot afford to buy the item. 7 Keeper no buy -- shown when the keeper refuses to buy a particular item. 8 Buy success -- shown on a successful purchase. 9 Sell success -- shown on a successful sale. A No Trade With -- submenu for toggling the per-class or per-race trade filters. B Shop Flags -- submenu for the shop behavior bitset. R Rooms Menu -- add/delete the rooms the shop operates from, with compact/long listing modes. P Products Menu -- add/delete the item prototypes the shop stocks for sale. T Accept Types Menu -- set which item types the shop will accept when buying from players, with optional keyword filters. I Rolled Stock Menu -- turn this shop's product list into a rarity-rolled, restocking shelf. The menu line reads "off (static wares)" until it is enabled. D Delete Shop -- remove the shop entirely. Prompts for confirmation. If the shop has not been saved yet, reports "This shop hasn't been saved yet, nothing to delete." instead. Q Quit -- prompts to save if anything was modified. Submenus: Rooms ........ A add, D delete, C compact display, L long display, Q return. Products ..... A add by object VID, D delete, Q return. Accept types . A add item type with optional keyword filter, D delete, Q return. Rolled Stock (I): With 1 Enabled ticked, the Products list stops being an infinite-stock sale list and becomes the roll pool this vendor draws a finite shelf from. Every restock clears the unsold rolled shelf and rolls a fresh one, each item with its own rarity, affixes and scaled price. 1 Enabled ....... [X] / [ ] toggle. 2 Stock mode .... Toggles between Random count and One of each product. Random rolls a shelf size from 4 and fills it by picking products at random, with replacement. One-of-each stocks one item per distinct product -- a VID listed twice still yields one -- and the menu then shows how many products will actually stock. 3 Restock every . Interval in seconds. Default 3600 (one hour), floored at 60. 4 Stock size .... Min then max items per restock. Reads (unused -- one of each) and is ignored entirely when 2 is one-of-each. 5-9 Rarity weights Raw weight per rarity -- Common, Uncommon, Rare, Epic, Legendary -- each shown with its normalised share. Weights that are all zero roll everything Common. Applies in both modes. Q Return The menu warns up front about the two ways a rolled shop silently stocks nothing: an empty product list, and products that cost 0. Only ITEM_MISSION items carry a price at all, and a zero-priced item is hidden by list and destroyed on purchase, so the restocker skips it and logs a SYSERR naming the prototype. In one-of-each mode a cost-0 product is a guaranteed missing item rather than a merely unlucky one, which is why that mode also prints the count that will really stock. Use SHOPRESTOCK to force a shelf roll without waiting out the timer. SHOPRESTOCK's helpfile has the full restock rules. Saving: On Q with changes, the editor prompts "Do you wish to save this shop?". Accepting commits the scratch copy into the live shop index and queues the owning zone for resave. The save is logged to the staff wiznet as: OLC: <name> edits shop <vid> Deletes go through a separate confirmation and only apply to shops that already exist on disk. Restrictions: - Requires the Shops staff permission. - Editing a shop in a zone you do not own or have builder access to is blocked by the usual OLC permission check. - Numeric fields (1, 2) enforce numeric input; a non-numeric response returns "Field must be numerical, try again :". - Two staff cannot have the same shop open at once; the second sedit attempt reports which staff member has it locked. Notes: - The keeper prototype must resolve to an NPC mob VID for the shop to function in play; the editor does not reject a bogus keeper at entry time, but the shop will refuse to operate without one in-game. - Shop data is stored alongside the zone rather than as its own file; zone-wide OLC operations (save, copyover, etc.) pick up shop changes automatically. - Rolled stock is the exception. The I menu's settings cannot go in the positional .shp format, so they are written to lib/etc/shopstock on save and read back at boot. That file is rewritten in full every time any shop is saved, and an entry naming a shop that no longer exists is logged and skipped at boot. Related Helpfiles: SHOPS, WIZ_SHOPRESTOCK, WIZ_AFFIXEDIT === END MANUAL ===