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

trade_hub

Essentially a container for merchants.

Vars

auto_populate_merchant_listsIf TRUE, and if the initial or post roundstart merchant lists are empty, they will be populated by the relevent procs.
extra_initial_merchant_typesMerchant types which can potentially be chosen to be added randomly on init, after initial_merchant_types, up to a specified number.
initial_merchant_ratioDetermines the target ratio of initial to post-roundstart merchants. 0.5 results in half of each, 1 gives all initials, and 0 gives no initals.
initial_merchant_typesMerchant types which will, in the order defined, be added to the merchant list on init, if space permits.
max_merchantsMax cap for how many merchants should occupy this hub. This is more of a soft cap, since admin verbs don't respect this limit.
merchant_attraction_multiplierModifies how likely it is for a merchant to show up, based on how empty the merchant list is.
merchant_types_in_useList of types currently in use, used to avoid duplicate merchants existing concurrently.
merchantsInstances of merchants currently present at this trade hub.
nameThe name of this particular hub, shown in UIs to players.
post_roundstart_merchant_typesMerchant types which could show up randomly as the round goes on, if space permits.
post_roundstart_rare_merchant_typesMerchant types which rarely show up randomly as the round goes on, based on rare_merchant_chance, if space permits.
rare_merchant_chanceThe chance that a 'rare' temporary merchant can be chosen instead of one of the regular ones.

Procs

add_merchantAdds a merchant to the trade hub.
attract_merchantsCalled once a minute after the round starts, to slowly fill the trade hub with (by default) temporary merchants, up to max_merchants.
generate_initial_merchantsPlaces the starting merchants onto the trade hub, prioritizing those in the initial_merchant_types list, then padding out the rest with randomly selected ones afterwards, up to the limit given by get_initial_merchant_count().
get_initial_merchant_countReturns the target number of merchants this trade hub should have when initialized. This exists to allow overriding it elsewhere for special behavior, such as randomizing the number.
is_accessible_fromDetermines if a trade hub is considered accessible, which is required for the crew to be able to interact with it and the merchants there.
populate_merchant_typesFills out various lists that will be looked at later to determine what merchants can exist at this trade hub. This can be disabled with auto_populate_merchant_lists, in order to allow someone to manually define specific types in order to fit a certain theme, e.g. it might be weird for a mining-focused trade hub to have a bakery.
remove_merchantRemoves a merchant from the trade hub.

Var Details

auto_populate_merchant_lists

If TRUE, and if the initial or post roundstart merchant lists are empty, they will be populated by the relevent procs.

extra_initial_merchant_types

Merchant types which can potentially be chosen to be added randomly on init, after initial_merchant_types, up to a specified number.

initial_merchant_ratio

Determines the target ratio of initial to post-roundstart merchants. 0.5 results in half of each, 1 gives all initials, and 0 gives no initals.

initial_merchant_types

Merchant types which will, in the order defined, be added to the merchant list on init, if space permits.

max_merchants

Max cap for how many merchants should occupy this hub. This is more of a soft cap, since admin verbs don't respect this limit.

merchant_attraction_multiplier

Modifies how likely it is for a merchant to show up, based on how empty the merchant list is.

merchant_types_in_use

List of types currently in use, used to avoid duplicate merchants existing concurrently.

merchants

Instances of merchants currently present at this trade hub.

name

The name of this particular hub, shown in UIs to players.

post_roundstart_merchant_types

Merchant types which could show up randomly as the round goes on, if space permits.

post_roundstart_rare_merchant_types

Merchant types which rarely show up randomly as the round goes on, based on rare_merchant_chance, if space permits.

rare_merchant_chance

The chance that a 'rare' temporary merchant can be chosen instead of one of the regular ones.

Proc Details

add_merchant

Adds a merchant to the trade hub.

attract_merchants

Called once a minute after the round starts, to slowly fill the trade hub with (by default) temporary merchants, up to max_merchants.

generate_initial_merchants

Places the starting merchants onto the trade hub, prioritizing those in the initial_merchant_types list, then padding out the rest with randomly selected ones afterwards, up to the limit given by get_initial_merchant_count().

get_initial_merchant_count

Returns the target number of merchants this trade hub should have when initialized. This exists to allow overriding it elsewhere for special behavior, such as randomizing the number.

is_accessible_from

Determines if a trade hub is considered accessible, which is required for the crew to be able to interact with it and the merchants there.

populate_merchant_types

Fills out various lists that will be looked at later to determine what merchants can exist at this trade hub. This can be disabled with auto_populate_merchant_lists, in order to allow someone to manually define specific types in order to fit a certain theme, e.g. it might be weird for a mining-focused trade hub to have a bakery.

remove_merchant

Removes a merchant from the trade hub.