TopMaterialsManager (REDM) - TOP-Scripts/STORE-SCRIPTS GitHub Wiki

Watch the video(https://www.youtube.com/watch?v=siFce0TLTMI)

Overview

The product is a material management system developed in Lua Script, designed to be integrated into REDM Servers requiring automatic resource/prices management.

sell

It offers functionalities to define, buy, sell, and manage the inventory of various materials.

buy

The system includes flexible configurations for prices, quantities, and material categories, and integrates with a database for data persistence.

Key Features

config

Image Path:

Config.Img: Defines the path where the system will look for images. Example: "rsg-inventory/html/images/".

Buying and Selling Prices:

Config.MinSellCost and Config.MaxSellCost: Determine the minimum and maximum selling price of materials to players (in dollars per unit).

Config.MinBuyCost and Config.MaxBuyCost: Establish the minimum and maximum buying price of materials in shops (in dollars per unit).

Inventory Management:

Config.MinimumQntInStock: Defines the minimum stock quantity to prevent prices from increasing beyond the maximum value.

Config.MaxStorage: Storage limit where the material price will be at its lowest and stops buying when this capacity is reached.

Material Distribution and Economy:

Price Adjustment by Usage: More commonly used items will be more expensive, while abundant and less used items will be cheaper.

Player Distribution:

The system distributes players across the various existing materials, avoiding concentration on just one material.

Price Adjustment by Usage: More commonly used items will be more expensive, while abundant and less used items will be cheaper.

Demand Board:

The system checks the demand board to determine market demand and values, adjusting prices accordingly.

demand

Managed Materials:

Config.Materials: List of materials with their names and categories. Example materials include wood, iron, coal, gold, raw_meat, corn, etc., categorized as normal, consumables, or drinks.

Blip Configuration (Map Markers):

Config.Blip: Settings for map display, including the blip name, sprite, and scale.

Stand Locations:

Config.StandsLocations: Defines locations where material shops will be situated, including name, category, location, and coordinates.

Database and Real Economy:

Real Stock and Database: Players are paid for selling materials with real stock count, all stored in a database.

Economy and Inflation Simulation: This script simulates the material economy and inflation. Materials can be sold or acquired at these shops, which adjust the buying and selling price based on the existing stock quantity.

Querys.CreateTable: SQL script to create the top_materials_stock table in the database, including columns for name, selling price, price, amount, info, type, slot, and category.

Framework and Support:

Developed with RSG Framework:

The system is developed using the RSG Framework and is fully open for modifications. Support will be provided as needed.

Target Audience

This system is ideal for game and simulation developers who need a robust and flexible system for resource management and material trading within their virtual environments.

It allows for easy customization and can be adapted to various types of games, from RPGs to economy simulators.

Advantages

Flexibility: Highly customizable configurations to meet different game needs. Ease of Integration: Can be easily integrated with other inventory and trading systems. Scalability: Ability to manage large quantities of materials and different types of resources. Dynamic Price Management: Adjustable buying and selling prices based on stock quantity and demand. Realistic Economy: Simulation of material economy and inflation, adjusting prices based on supply and demand. This summary provides an overview of the capabilities and functionalities of the material management system in Lua Script, highlighting its flexibility, applicability, and advantages for game developers, feel free to reach us in our Discord.