Economy & Industry System – Space Trucker
Space Trucker is not just a “pick up here, deliver there” script.
It features a living economy that simulates supply and demand across the server.
The Production Cycle
The server runs an economic cycle every 60 seconds.
During each cycle, several actions happen inside every industry:
The industry checks if it has the required input items to operate
(example: a Refinery requires Crude Oil).
These required items are defined in the WANTED list of the industry configuration.
If the required inputs are available:
The final product is generated in the FORSALE list
(example: Fuel).
Operating Cost
If the industry is owned by a player, it consumes money from the company balance to operate
($500 per cycle by default).
Note:
When selling items manually back to the system (without a mission), the script applies a 5% fee.
You receive 95% of the value, defined by:
config.ItemBackRate = 0.95
🔹 Stock Management
Produced items are stored in the industry’s local stock
(space_trucker_industry_stock).
Mission Generation (Supply & Demand)
Missions are not random.
They are generated directly from the needs of the economy.
🚚 Logistics (Import Missions)
If a System-owned industry (not purchased by a player) runs out of a critical input, the script automatically creates a Logistics Order.
Example:
The Power Plant runs out of Coal.
The system generates a public mission:
“Deliver 50x Coal from the Mine to the Power Plant”
Players can accept these jobs at the Logistics Hub to earn money and reputation.
🚛 Transport (Export Missions)
When an industry accumulates too much FORSALE stock, the system generates transport missions.
These missions move products from industries to local businesses (shops, gas stations, etc.).
🛡️ Safety Mechanism (NPC Logistics)
To prevent the economy from stalling when few players are online, the system uses invisible NPC drivers.
If a logistics order remains open for too long
(default: 30–60 minutes),
An NPC automatically completes the delivery.
This ensures:
Industries keep producing
The economy stays alive even during low-population hours
Managing an Industry (Player-Owned)
Players can purchase industries. When they do:
Every item sold or used in missions from that industry generates direct profit for the owner’s company balance.
The owner must ensure the company has enough money to pay production costs
($500 per cycle by default).
If the company balance reaches zero, production stops.
Owners can pay to increase the Investment Level of the industry.
Each level increases production per cycle.
Formula:
Adding New Items & Production Chains
To create a new production chain
(example: Wheat Farm → Bakery → Bread):
1️⃣ Define the Items
Add the items in shared/config.lua under:
2️⃣ Create or Edit Industries
Inside shared/industries/:
Farm
Add Wheat to the FORSALE table
Bakery
Add Wheat to the WANTED table
Add Bread to the FORSALE table
3️⃣ Restart the Script
After restarting:
The system automatically starts calculating production
Missions are generated dynamically based on the new items and industries
No additional scripting required.