Takaro module library

Takaro Modules

Takaro is a game server management platform for running, automating, and moderating multiplayer communities. These modules install into Takaro to add server automation, Discord workflows, economy systems, and moderation tools.

StockMarket

by Limon
for 7 Days to Die
Run a 7 Days to Die stock market economy through Takaro. StockMarket lets players trade virtual stocks with in-game currency while admins configure sectors, volatility, scheduled updates, and market events.
Use this module to:
  • Let players buy and sell stocks from chat commands.
  • Show market summaries, stock details, and player portfolios.
  • Update prices on a schedule with configurable volatility.
  • Trigger admin market events that move sectors or individual stocks.
  • Create an economy activity that gives players a reason to check back.
Good fit for 7 Days to Die communities that want economy gameplay, trading systems, long-term currency sinks, and market events managed through Takaro.

Module details

Stock Market: A Dynamic Virtual Trading System


🎥 SETUP TUTORIAL
► Watch the Complete Guide
Learn how to set up and use the Stock Market module

Create an immersive economic experience with this comprehensive stock market module that lets players invest, trade, and react to market events.
Market Features:
Market Summary
  • Multiple Economic Sectors: Configure various industry sectors (Resource Extraction, Manufacturing, Defense, etc.) each with their own market dynamics.
  • Realistic Stock Behavior: Stocks have configurable volatility, sector-based pricing, and react differently to market events.
  • Dynamic Market Events: Random or admin-triggered events like "Horde Night Approaching" or "Societal Collapse Setback" impact different sectors in realistic ways.
Market Events
Trading System:
  • Buy & Sell Shares: Players can purchase stocks and sell them later for profit or loss.
  • Transaction Fees: Configurable fee percentage on all trades creates a realistic market economy.
  • VIP Benefits: Special permissions for designated "Stock Brokers" who receive fee discounts.
Buy Stock Example
Players can track price changes and sell at the right moment to maximize profits or minimize losses.
Sell Stock Example
Player Portfolio:
  • Portfolio Tracking: Players can view their holdings, average purchase prices, and current profit/loss.
  • Transaction History: System tracks all buy/sell transactions for each player.
  • Summary Statistics: See overall portfolio performance and value across all holdings.
Portfolio View
Market Information:
  • Detailed Stock Info: Players can research specific stocks, including risk levels and sector trends.
  • Industry Filters: View stocks by specific sectors to better understand market segments.
  • Market Alerts: Server-wide notifications for significant price changes keep players engaged.
Market Alerts
Configuration Options:
  • Sectors & Stocks: Define your own market sectors and individual stocks with customizable starting prices and volatility.
  • Market Events: Create unique events with specific sector impacts to drive market dynamics.
  • Transaction Settings: Configure fee percentages, VIP discounts, and alert thresholds.
  • Event Frequency: Control how often random market events occur and how long they last.
Configuration
Sectors
Commands:
  • /markets [industry] - View all stocks or filter by industry
  • /stockinfo [ticker] - Get detailed information about a specific stock
  • /buystock <ticker> <amount> - Purchase shares of a stock
  • /sellstock <ticker> <amount> - Sell shares from your portfolio
  • /stockportfolio - View your current holdings and performance
  • /triggerevent [event] - Admin command to trigger specific market events
Who says the apocalypse can't have a thriving economy? Now players can stress about both zombie hordes AND their Duke's Casino Tokens dropping 40% after a market event! As one trader put it: "I used to check my 401K daily, and now I check my AMMO stock before every Blood Moon. Some habits die harder than zombies."
communityTakaro v0.0.29
(2 versions available)

Components Overview

1
config
6
commands
0
hooks
2
Cron Jobs
0
functions
4
permissions

New Module: StockMarket

NEW
August 6, 2025
Updated to version latest. Added 6 commands: buystock, triggerevent, sellstock, markets, stockinfo, stockportfolio. Added 2 scheduled tasks: updatestockprices, marketnews. New permissions: STOCK_MARKET_USE, STOCK_MARKET_TRADE, STOCK_MARKET_BROKER, STOCK_MARKET_TRIGGER_EVENT. New configuration options: sectors, stocks, marketEvents, eventFrequency, defaultEventDuration, transactionFee, vipDiscount, priceAlertThreshold, marketNewsChannelId.

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (9)

sectorsarray
Wasteland Economic Sectors

Define economic sectors relevant to survival in Navezgane

Default:Array of 5 items
id:"Very High Risk"
name:"Very High Risk"
id:"High Risk"
name:"High Risk"
... and 3 more items
stocksarray
Wasteland Stocks

List of stocks representing Navezgane entities and resources

Default:Array of 29 items
id:"NMC"
name:"Navezgane Mining Co."
sector:"High Risk"
... and 2 more properties
id:"NIOM"
name:"Navezgane Iron Ore Mining Co."
sector:"High Risk"
... and 2 more properties
... and 27 more items
marketEventsarray
Wasteland Events

Events impacting the Navezgane economy

Default:Array of 12 items
id:"HORDE_INCOMING"
name:"Horde Night Approaching"
description:"Increased Zed activity signals..."
... and 1 more properties
id:"STABLE_ECONOMY"
name:"Period of Stability"
description:"A rare period of peace has set..."
... and 1 more properties
... and 10 more items
eventFrequencynumber
Event Frequency

Average number of update cycles between market events (0 to disable). Depends on mod's update frequency (e.g., per in-game hour?).

Default: 8
Constraints: min: 1
defaultEventDurationnumber
Default Event Duration

Default number of update cycles an event lasts.

Default: 3
Constraints: min: 1, max: 96
transactionFeenumber
Transaction Fee (Dukes Tax)

Percentage fee charged on all buy/sell transactions (5 = 5%)

Default: 3
Constraints: min: 0, max: 25
vipDiscountnumber
Trader's Favor Discount

Percentage discount on transaction fees for players with 'STOCK_MARKET_BROKER' permission (50 = 50%)

Default: 50
Constraints: min: 0, max: 100
priceAlertThresholdnumber
Price Alert Threshold

Percentage change that triggers a market alert (15 = 15%)

Default: 15
Constraints: min: 5, max: 50
marketNewsChannelIdstring
Discord Channel ID (for Market News)

The ID of the Discord channel where market news messages should be posted. Leave empty to disable.

Default:

UI Schema

No configuration properties defined. This module uses default settings.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Commands (6)

These commands can be executed by players in-game. Each command has a trigger word, optional arguments, and executes JavaScript code on the server.

buystock

/buystockTrigger Command

Description

Buy shares of a stock

Arguments (2)

stock
stringPosition 0
Help: The stock ticker symbol
Default: ""
amount
numberPosition 1
Help: Number of shares to buy
Default: ""

Function Implementation

buystock Function

JAVASCRIPT

Usage Example

Player types: /buystock <stock> <amount>

triggerevent

/triggereventTrigger Command

Description

Shows all available market events when run without parameters. Use with an event name (e.g., /triggerevent TECH_BOOM) to trigger a specific market event.

Arguments (1)

EventName
stringPosition 0
Help: Event name to trigger a specific market event
Default: "all"

Function Implementation

triggerevent Function

JAVASCRIPT

Usage Example

Player types: /triggerevent <EventName>

sellstock

/sellstockTrigger Command

Description

Sell shares of a stock

Arguments (2)

stock
stringPosition 0
Help: The stock ticker symbol
Default: ""
amount
numberPosition 1
Help: Number of shares to sell
Default: ""

Function Implementation

sellstock Function

JAVASCRIPT

Usage Example

Player types: /sellstock <stock> <amount>

markets

/marketsTrigger Command

Description

View stock market prices and activity. Use '/markets ALL' to see all industries, or specify an industry name (e.g., '/markets TECH') to see stocks in that industry only.

Arguments (1)

Industry
stringPosition 0
Help: View stock market prices and activity. Use '/markets ALL' to see all industries, or specify an industry name (e.g., '/markets TECH') to see stocks in that industry only.
Default: "all"

Function Implementation

markets Function

JAVASCRIPT

Usage Example

Player types: /markets <Industry>

stockinfo

/stockinfoTrigger Command

Description

Shows all available stocks in the market. Use with a ticker symbol (e.g., /stockinfo ticker) to see detailed information about a specific stock.

Arguments (1)

ticker
stringPosition 0
Help: stock ticker or ALL to get detailed information about a specific stock
Default: "all"

Function Implementation

stockinfo Function

JAVASCRIPT

Usage Example

Player types: /stockinfo <ticker>

stockportfolio

/stockportfolioTrigger Command

Description

No help text available

Function Implementation

stockportfolio Function

JAVASCRIPT

Usage Example

Player types: /stockportfolio

About Module Commands

Commands allow players to interact with your module through chat. Each command has a trigger word that players type (prefixed with /), optional arguments for parameters, and a JavaScript function that executes when the command is used. Arguments are automatically validated and passed to the function.

Scheduled Jobs (2)

These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.

updatestockprices

0 */1 * * *Schedule

Description

When he cronjob runs

Schedule Details

Cron Expression
0 */1 * * *
Human-Readable Schedule

At minute 0 of every 1 hours on every day of the month in every month on every day of the week

Function Implementation

updatestockprices Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

marketnews

1 */1 * * *Schedule

Description

gives you market news

Schedule Details

Cron Expression
1 */1 * * *
Human-Readable Schedule

At minute 1 of every 1 hours on every day of the month in every month on every day of the week

Function Implementation

marketnews Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

About Scheduled Jobs

Cron jobs allow your module to execute code automatically on a schedule. Each job has a cron expression that defines when it runs, and a JavaScript function that executes at those times. Jobs run server-side and can perform maintenance tasks, send notifications, or update game state automatically.

Permissions (4)

These permissions control who can access different features of this module. Administrators can assign these permissions to roles, allowing fine-grained access control.

General Permissions

4 permissions

Stock Broker

STOCK_MARKET_BROKERPermission Key
Description

VIP status that reduces transaction fees

Permission Details
Full Key:STOCK_MARKET_BROKER
Can Have Count:No
Category:General

Trade Stocks

STOCK_MARKET_TRADEPermission Key
Description

Allows the player to buy and sell stocks

Permission Details
Full Key:STOCK_MARKET_TRADE
Can Have Count:No
Category:General

Trigger Market Events

STOCK_MARKET_TRIGGER_EVENTPermission Key
Description

Allows admins to manually trigger market events

Permission Details
Full Key:STOCK_MARKET_TRIGGER_EVENT
Can Have Count:No
Category:General

Use Stock Market

STOCK_MARKET_USEPermission Key
Description

Allows the player to view market prices and their portfolio

Permission Details
Full Key:STOCK_MARKET_USE
Can Have Count:No
Category:General

About Module Permissions

Permissions control access to module features and functionality. Each permission has a unique key for identification, a friendly name for display, and a description explaining what it allows. Some permissions are countable, meaning they can have numeric values or limits assigned. Administrators assign these permissions to user roles to control who can use different module features.