stock_market
Vars | |
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 it's current trend. After it's life is up, it will change to a new trend. |
materials_trends | 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. |
Procs | |
handle_market_event | We want to scale our trend so that if we're closer to our minimum or maximum price, we're more likely to trend the other way. 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. |
handle_trends_and_price | Handles shifts in the cost of materials, and in what direction the material is most likely to move. |
Var Details
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 it's current trend. After it's life is up, it will change to a new trend.
materials_trends
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
handle_market_event
We want to scale our trend so that if we're closer to our minimum or maximum price, we're more likely to trend the other way. 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.
handle_trends_and_price
Handles shifts in the cost of materials, and in what direction the material is most likely to move.