/tg/ Station 13 - Modules - TypesVar Details - Proc Details

stock_market

Vars

active_eventsA list of all currently active stock market events.
materials_pricesAssociated list of materials and their prices at the given time.
materials_quantityAssociated list of materials alongside their available quantity. This is used to determine how much of a material is available to buy, and how much buying and selling affects the price.
materials_trend_lifeAssociated list of materials alongside the life of its current trend. After its life is up, it will change to a new trend.
materials_trendsAssociated list of materials alongside their market trends. 1 is up, 0 is stable, -1 is down.
news_stringHTML string that is used to display the market events to the player.

Procs

adjust_material_priceAdjust the price of a material(either through buying or selling) ensuring it stays within limits
adjust_material_quantityAdjust the amount of material(either through buying or selling) ensuring it stays within limits
handle_market_eventMarket events are a way to spice up the market and make it more interesting. Randomly one will occur to a random material, and it will change the price of that material more drastically, or reset it to a stable price. Events are also broadcast to the newscaster as a fun little fluff piece. Good way to tell some lore as well, or just make a joke.
handle_trends_and_priceHandles shifts in the cost of materials, and in what direction the material is most likely to move.

Var Details

active_events

A list of all currently active stock market events.

materials_prices

Associated list of materials and their prices at the given time.

materials_quantity

Associated list of materials alongside their available quantity. This is used to determine how much of a material is available to buy, and how much buying and selling affects the price.

materials_trend_life

Associated list of materials alongside the life of its current trend. After its life is up, it will change to a new trend.

Associated list of materials alongside their market trends. 1 is up, 0 is stable, -1 is down.

news_string

HTML string that is used to display the market events to the player.

Proc Details

adjust_material_price

Adjust the price of a material(either through buying or selling) ensuring it stays within limits

adjust_material_quantity

Adjust the amount of material(either through buying or selling) ensuring it stays within limits

handle_market_event

Market events are a way to spice up the market and make it more interesting. Randomly one will occur to a random material, and it will change the price of that material more drastically, or reset it to a stable price. Events are also broadcast to the newscaster as a fun little fluff piece. Good way to tell some lore as well, or just make a joke.

Handles shifts in the cost of materials, and in what direction the material is most likely to move.