Space Station 13 - Nebula13 - Modules - Types — Var Details - Proc Details

merchant_commodity

This holds information about a particular thing a merchant wants to buy or sell. Generally these will be created in bulk by one or more /decl/merchant_potential_commoditiess held by a merchant instance's potential_[supply|demand] lists, and then placed inside that merchant's active_[supply|demand] lists.

Vars

nameShown to players when they ask what the merchant wants. Filled in automatically based on what's contained inside.
price_varianceA modifier that merchants use to slightly tweak prices on a per-item basis, to introduce a bit of randomness.
quantityLimits how many things a merchant can sell this commodity, or how many they want to buy.
quantity_methodDetermines how merchants should count things players are trying to sell to them. More esoteric commodities like reagents or gases need their own method.
requirementsA list of requirements which must all pass for merchants to agree to buy or sell a particular item from players.
spawn_pathThe type to instantiate when a merchant sells the commodity to a player.

Procs

NewInstantiates a new commodity datum, which can have various criteria that will determine if any given item instance will count towards the instance itself. These conditions can be simple type checks or complex requirements, such as requiring that items be made of a specific material, or have a certain gas or reagent composition.
check_requirementsDetermines if a given input should pass this commodity instance. All requirements must return TRUE for this to return TRUE.

Var Details

name

Shown to players when they ask what the merchant wants. Filled in automatically based on what's contained inside.

price_variance

A modifier that merchants use to slightly tweak prices on a per-item basis, to introduce a bit of randomness.

quantity

Limits how many things a merchant can sell this commodity, or how many they want to buy.

quantity_method

Determines how merchants should count things players are trying to sell to them. More esoteric commodities like reagents or gases need their own method.

requirements

A list of requirements which must all pass for merchants to agree to buy or sell a particular item from players.

spawn_path

The type to instantiate when a merchant sells the commodity to a player.

Proc Details

New

Instantiates a new commodity datum, which can have various criteria that will determine if any given item instance will count towards the instance itself. These conditions can be simple type checks or complex requirements, such as requiring that items be made of a specific material, or have a certain gas or reagent composition.

check_requirements

Determines if a given input should pass this commodity instance. All requirements must return TRUE for this to return TRUE.