Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Tags
Creators
Details
- English / 2. æ¥æ¬èª
StockMarket wAPI Mod (stock_wapi)
An authentic virtual stock market mod for Minecraft 1.21.1 (NeoForge) where stock prices fluctuate in real-time based on AI-generated economic news and player supply and demand. It features a bi-directional exchange mechanism between the unique currency "KABU" and any items, allowing anyone to easily enjoy trading stocks via sign UIs or commands. All AI processing and data persistence are delegated to AI DataBase wAPI Core, allowing this mod to focus entirely on "stock market logic and game experience."
| Item | Value |
|---|---|
| Mod ID | stock_wapi |
| Display Name | StockMarket wapi mod |
| Versioning | 1.21.1-x.y.z (MC Version-SemVer, independent of core) |
| Requirements | aidbwapi_core required |
| License | Apache License 2.0 |
ð Features & Architecture
1. AI-Driven Price Fluctuation System (Market Engine)
Stock prices are determined during periodic updates by summing the following four factors. The AI does not decide the price directly; it functions as one of the influential factors.
- Internal Random Fluctuation: Natural price movement based on the base volatility set for each ticker.
- Trend Tendency: Based on the initial tendency ("Bullish / Bearish / Neutral") set for each ticker, the trend dynamically changes with a certain probability (8%) during each periodic update, forming waves of prosperity and recession.
- Player Supply & Demand Impact: Aggregates player buy and sell volumes during the update interval and reflects them in the price based on a logarithmic function: $log_{10}(1 + |netDemand|)$. This reflects the actions of market participants in the price while suppressing rapid fluctuations. The timing of demand reflection is at the "periodic update," and prices do not move instantly at the moment of trade.
- AI Market Sentiment Impact: Market trend data is sent to the LLM via
aidbwapi_core, and the "Market Sentiment Score (-N to +N)" returned by the AI is normalized and converted into price impact.
Price Safety Mechanisms
- Stock prices are managed as integers. The fluctuation range per update is clamped to a maximum of ±10% (configurable via config).
- Each ticker has a minimum price (
minPrice) and a maximum price (maxPrice), and the price is always restricted within this range. - Rebound Mechanism: Near the minimum price, downward pressure is weakened and upward correction is strengthened to prevent the price from approaching zero. Bankruptcy or delisting does not occur.
Adaptive Demand Scaling (Adaptive Demand Scaling)
The total transaction volume of the server for the past 5 days (default: 120 updates) is saved as a moving average, which is used to automatically normalize the supply and demand impact. Even if the number of players or transaction scale changes, an appropriate balance is maintained without manual config adjustments.
2. AI News Generation (Market News)
During periodic updates, market trend data (fluctuation summaries for each ticker, world settings, etc.) is sent to aidbwapi_core, and the AI generates economic news text and market sentiment scores.
- During periodic updates, news is broadcast to all players on the server in the format
[StockWapi]via chat. If AI generation fails, fallback news ("Failed to retrieve AI market news due to a communication error. The market is moving solely based on technical factors.") is broadcast instead, and the market price update itself proceeds normally. - Latest news and past news history (up to 30 entries, with timestamps, newest first) can be viewed via
/stockwapi news. - News history is kept indefinitely (stored in GlobalDB).
Behavior on AI Failure
If an AI request fails (e.g., all models unavailable), the stock price is calculated using only other factors with zero AI impact (sentiment=0). Fallback news is broadcast to all players.
For Admins: Troubleshooting AI Errors
/dbwapi ai errorsâ Check recent error history (HTTP status codes/causes)./dbwapi model listâ View status of all models (Enabled/Disabled, Penalty points)./dbwapi model enable <KeyName>.<ModelName>â Restore models automatically disabled due to authentication errors, etc./dbwapi model reset <KeyName>.<ModelName>â Reset penalties and cooldowns.
3. AI Company Description Auto-Generation (Company Description)
When an admin adds a ticker, the ticker name is sent to aidbwapi_core, and the AI automatically generates a company description and saves it to the DB. This process is executed only at the time of registration.
If AI generation fails, a fallback description ("Company description is currently unavailable.") is automatically saved to the DB.
Players can view company descriptions via the /stockwapi info <ticker> command or signs.
To manually correct or replace a company description, directly edit the companyDesc_XXX key in the DB file (stock_wapi_GlobalDatabase.json).
Setting an existing company description to an empty string ("") and restarting the server will trigger the AI to automatically regenerate a new description.
4. Unique Currency "KABU" and Item Exchange (Currency & Exchange)
This mod does not depend on external economy mods and uses its own currency, "KABU".
- Currency Name: KABU (Integer only, initial balance 0).
- Balance & Transaction Limits: The maximum balance per player and the limit for a single transaction (including stock trades and item exchanges) is 2 billion KABU (2,000,000,000) (to prevent integer overflow and economic collapse).
- Players can exchange any items (including vanilla and items from any mod) bi-directionally with KABU. Exchanges can be performed via Sign UI or commands.
- Multiple items can be registered with different rates (e.g., Diamond = 100 KABU, Gold Ingot = 10 KABU). Registration of exchange targets is done via admin command (
/stockwapi admin setrate), and rate information is saved inconfig/stock_wapi-exchange.json.
Item Exchange Safety Mechanisms
- Pre-Inventory Scan: To prevent partial consumption errors due to vanilla specifications, the player's entire inventory is scanned before the exchange process to check if the total amount possessed meets the required amount.
- Limit Overrun Block: If an exchange would cause the balance to exceed the limit (2 billion KABU), the process is completely blocked without consuming items.
5. Insider Trading Prevention & Market Integrity (Market Integrity)
To make trading before news disclosure structurally impossible, the update process is executed in the following strict order:
Lock Trading â Update Prices â Save News â Broadcast â Update Signs â Unlock Trading
If a trade is attempted during the lock, the player is notified that trading is currently blocked.
6. Commission System (Commission)
- Commissions can be collected during buying and selling. Percentages can be set individually for buys and sells. Default is 0%.
- Commission revenue can either "disappear (default)" or go to a "server-wide administrative account (configurable)". The admin account is not linked to any specific player UUID.
- View the balance of the admin account with
/stockwapi admin balance.
7. Sign Interface (Sign Interface)
By linking functions to sign blocks placed by an administrator, players can buy, sell, exchange, and view news with just a right-click.
- Signs can only be placed by administrators (
/stockwapi admin sign <type> [<arg1>] [<arg2>]). - Signs are automatically updated when stock prices update. Trading can be done directly from signs (executed instantly on right-click).
- Signs cannot be destroyed by anyone other than an administrator (if an OP destroys one, it is automatically unlinked).
Sign Types (7 total)
| Type | Example Command | Sign Display | Right-Click Action |
|---|---|---|---|
price |
sign price RDM |
Ticker + Price | Display ticker details in chat |
list |
sign list |
Market Header | Display all tickers + prices in chat |
buy |
sign buy RDM 5 |
Ticker + Qty + Price | Instantly buy the specified quantity |
sell |
sign sell RDM 5 |
Ticker + Qty + Price | Instantly sell the specified quantity |
exchange |
sign exchange diamond 10 |
Item + Qty + KABU | Instant Item â KABU exchange |
buyitem |
sign buyitem diamond 10 |
Item + Qty + KABU | Instant KABU â Item purchase |
news |
sign news |
News Header | Display the latest news in chat |
Unlinking: /stockwapi admin unsign (execute while looking at the sign)
ð» Requirements & Setup
- Minecraft: 1.21.1
- Mod Loader: NeoForge 21.1.219 or later
- Java: Java 21 or higher
- Required Dependency:
aidbwapi_core(AI Communication & Database Foundation) - Side: Required on both Server and Client
Installation:
- Ensure
aidbwapi_coreis set up (AI provider registered and model configured). - Place this mod (
stock_wapi-x.x.x.jar) into themodsfolder of your server or client and launch. - Upon first launch, three demo preset tickers (RDM, END, OAK) will be automatically generated.
ð Usage
Server Administrator: Initial Setup
Step 1: Preparing aidbwapi_core
Setup of aidbwapi_core is mandatory for this mod to function. Follow these steps:
1-1. Register AI Provider
Register connection information for your AI service (OpenAI-compatible API) as a "KeyName."
/dbwapi keyname add <KeyName> <API_Endpoint_URL> <API_Key>
â ïž Security Warning: Due to Minecraft's specifications, the full command you type in chat (the plain text API key) will be recorded in the server's
logs/latest.log. For security, it is strongly recommended to editconfig/aidbwapi_core-keynames.jsondirectly with a text editor and then run/dbwapi reloadin-game.
1-2. Register Model
Add the AI model you wish to use to the registered provider.
/dbwapi model add <KeyName>.<ModelName> <DailyLimit> <MinuteLimit>
If limits are omitted or set to -1, they are registered as unlimited. Registering multiple providers/models allows the system to automatically switch if one fails (failover).
1-3. Verify Operation
/dbwapi ai test
If you receive a response from the AI, the setup is complete. If an error occurs, check the details with /dbwapi ai errors.
Step 2: First Launch & Auto Setup
After placing this mod in the mods folder and starting the server, the following will happen:
- Three demo preset tickers (RDM, END, OAK) will be defined in
config/stock_wapi-stocks.json. - AI company descriptions for each ticker will be asynchronously generated and saved.
- The periodic market update scheduler will start (Default: every 1 hour).
Step 3: Register Item Exchange Rates
Set up exchange rates so players can obtain KABU.
/stockwapi admin setrate diamond 100
/stockwapi admin setrate gold_ingot 10
This enables exchanges like "1 Diamond = 100 KABU" and "1 Gold Ingot = 10 KABU."
Step 4: Placing Signs (Optional)
Set up Sign UIs so players can interact with a right-click. Place a sign and execute the following commands while looking at it:
/stockwapi admin sign price RDM â Displays RDM price
/stockwapi admin sign buy RDM 5 â Buys 5 shares of RDM
/stockwapi admin sign sell RDM 5 â Sells 5 shares of RDM
/stockwapi admin sign exchange diamond 10 â Exchange 10 Diamonds for KABU
/stockwapi admin sign buyitem diamond 1 â Purchase 1 Diamond with KABU
/stockwapi admin sign list â Displays all tickers
/stockwapi admin sign news â Displays latest news
Step 5: Adding/Customizing Tickers (Optional)
To add a custom ticker:
/stockwapi admin add ABC "Alpha Beta Corp" 50000
The ticker definition will be appended to config/stock_wapi-stocks.json. To fine-tune volatility, trend, or market type, edit this JSON file directly while the server is stopped.
Player: Basic Gameplay
1. Obtaining KABU
First, obtain KABU via item exchange.
/stockwapi exchange diamond 10
(If the admin has set up signs, you can exchange instantly by right-clicking.)
2. Researching Tickers
/stockwapi list â View current prices for all tickers
/stockwapi info RDM â View detailed info for RDM
/stockwapi news â View the latest AI-generated economic news
3. Trading Stocks
/stockwapi buy RDM 10 â Buy 10 shares of RDM
/stockwapi sell RDM 5 â Sell 5 shares of RDM
Upon trade completion, detailed information (ticker, quantity, unit price, total, commission, payment/receipt, shares owned, average cost) is displayed in chat.
4. Checking Assets
/stockwapi myinfo â View balance, holdings, and P&L
5. Converting KABU Back to Items
If you make a profit, you can spend KABU to purchase items (like Diamonds).
/stockwapi buyitem diamond 1 â Pay KABU to obtain 1 Diamond
Operation Tips
- Market Pause: Use
/stockwapi admin pauseduring maintenance to stop all trading and periodic updates. Resume with/stockwapi admin resume. - Removing Tickers: Use
/stockwapi admin remove ABC <Your_UUID>to remove a ticker. If there are holders, their shares will be forcibly liquidated at the current price. Your UUID is required to prevent accidental deletion. - Using Commissions: To suppress speculative large-scale trading, set
buyFeePercent/sellFeePercentin the TOML config. SetfeeToAdminAccount = trueto pool commissions in the admin account.
âïž Configuration & Directory Structure
-
config/stock_wapi-common.toml: Basic settings for the entire mod.[general]Section:commandPermissionLevel: Required OP level for admin commands (Default:2).debugLogging: Enable debug logs (Default:false). Usually not needed.
[market]Section:updatesPerDay: Number of market updates per day (Default:24, every 1 hour real-time).maxPriceChangePercent: Max fluctuation per update (Default:10, ±10%).tradingPausedOnUpdate: Pause trading during update processing (Default:true). Iffalse, the insider trading lock mechanism is disabled.
[trading]Section:buyFeePercent/sellFeePercent: Commission rates for buying and selling (Default:0).feeToAdminAccount: Whether to pool commissions in the admin account (Default:false, disappear).allowShortSelling: Flag for short selling (Config exists, but currently unimplemented; setting to true has no effect).minTradeUnit: Minimum trading unit (Default:1).maxTradeAmount: Maximum trading amount per trade (Default:-1, unlimited).maxHoldingPerPlayer: Maximum holdings per ticker per player (Default:-1, unlimited).
[ai]Section:sentimentScoreRange: Range of AI sentiment score (Default:100, -100 to +100).newsLanguage: Language for AI-generated news (Default:ja).worldSetting: Text describing the world setting passed to the AI (Default:"A fictional stock market in the Minecraft world").
-
config/stock_wapi-stocks.json: Definition file for all ticker parameters (stored as an array). Definitions are auto-appended with default values when using theaddcommand. To fine-tune parameters other than initial price (volatility, trend, rebound strength, market type, etc.), edit this file while the server is stopped.{ "ticker": "RDM", "name": "Redstone Dynamics Mining", "initialPrice": 15000, "volatility": 0.03, "stability": 0.9, "trend": "neutral", "marketType": "stable", "minPrice": 1000, "maxPrice": 100000, "reboundStrength": 0.1, "tradeImpactFactor": 0.4, "aiImpactFactor": 0.05, "description": "" } -
config/stock_wapi-exchange.json: Saved file for item exchange rates. Stores rate info registered via admin command (/stockwapi admin setrate). -
[World Save Root]/aidbwapi_core/stock_wapi/: Storage for operational data (usesaidbwapi_corecategory DB).global.json: Current prices, price history (full), news history, sentiment values, demand aggregate data, update counters, volume moving average history, etc.players/<UUID>.json: Per-player KABU balance, shares owned, average purchase cost, and trade history.
ð ïž Command Reference
All commands start with /stockwapi.
Ticker symbols are used to specify stocks, but inputting them in lowercase will automatically convert them to uppercase internally.
<ticker> and <item> arguments support Tab completion.
ð Player Commands (No permission required)
| Command | Description |
|---|---|
/stockwapi list |
List tickers and current prices for all stocks |
/stockwapi info <ticker> |
View detailed ticker info (Price, Market Type, Demand, Description) |
/stockwapi myinfo |
View your KABU balance, holdings, and P&L |
/stockwapi portfolio |
Synonym for myinfo (Alias) |
/stockwapi buy <ticker> <quantity> |
Purchase specified quantity of a ticker (instantly filled at current price) |
/stockwapi sell <ticker> <quantity> |
Sell specified quantity of a ticker (instantly filled at current price) |
/stockwapi news |
View latest market news + past news history (up to 30 entries) |
/stockwapi exchange <item> <count> |
Exchange specified item for KABU |
/stockwapi buyitem <item> <count> |
Purchase specified item using KABU |
ð Administrator Commands (OP required, default permission level 2)
| Command | Description |
|---|---|
/stockwapi admin add <ticker> <name> <initialPrice> |
Register and initialize a new ticker. Auto-generates AI company description. Fine-tune parameters in the generated JSON |
/stockwapi admin remove <ticker> <executorUUID> |
Remove a ticker. Requires executor's UUID to prevent accidental deletion. Forcibly liquidates shares for holders |
/stockwapi admin pause |
Pause all market trades and periodic updates |
/stockwapi admin resume |
Resume all market trades and periodic updates |
/stockwapi admin balance |
View the balance of the admin account (pool for commissions) |
/stockwapi admin setrate <item> <kabuRate> |
Add or update an item exchange rate (e.g., diamond 100) |
/stockwapi admin removerate <item> |
Remove an item exchange rate |
/stockwapi admin listrates |
List all item exchange rates |
/stockwapi admin sign <type> [<arg1>] [<arg2>] |
Link a function to a sign block (execute while looking at sign). Arguments vary by type |
/stockwapi admin unsign |
Unlink a function from a sign block (execute while looking at sign) |
ðïž Internal Architecture Supplemental
Market Update Scheduler
The timer itself runs on a daemon thread of ScheduledExecutorService, but to ensure database access and state change safety, the actual update processing is always synchronized with the main server thread (MinecraftServer.execute()).
The update timer is based on real-time and resumes from where it left off upon server restart.
Trade Result Handling (TradeResult Enum)
To prevent command logic from becoming overly complex, internal trade processing results are returned as an Enum (TradeResult) with over 10 states (Success, Insufficient Balance, Insufficient Shares, Ticker Not Registered, Market Locked for Update, etc.). Warning messages for players are also managed centrally by this Enum.
DB Structure (Using aidbwapi_core Category DB)
- Category Name:
stock_wapi - GlobalDatabase: Current prices, price history (full), sentiment values, news history, demand aggregate data, update counter, volume moving average history (
volumeHistory). - PlayerDatabase: KABU balance (
balance), shares owned (holdings), average purchase prices (avgPrices), trade history (tradeHistory).
Thread Safety for Asynchronous Processing
DB access from asynchronous threads, such as the callback for AI company description generation, is delegated to the main thread via MinecraftServer.execute() to guarantee thread safety.
âïž License (License)
The source code and provided binaries of this mod are provided and published under the Apache License, Version 2.0. Creation and redistribution of commercial or non-commercial mods that use or modify this mod are permitted freely within the scope of the license terms.
StockMarket wAPI Mod (stock_wapi)
Minecraft 1.21.1 (NeoForge) åãã®ãAIãçæããçµæžãã¥ãŒã¹ãšãã¬ã€ã€ãŒã®é絊ã«ãã£ãŠæ ªäŸ¡ããªã¢ã«ã¿ã€ã ã«å€åããæ¬æ ŒæŽŸã®ä»®æ³æ ªåŒåžå ŽModã§ãã ç¬èªé貚ãKABUããšä»»æã®ã¢ã€ãã ãšã®åæ¹åäº€ææ©æ§ãåããçæ¿UIãã³ãã³ããéããŠèª°ã§ãæè»œã«æ ªã®å£²è²·ã楜ãããŸãã AIåŠçããã³ããŒã¿æ°žç¶åã¯ãã¹ãŠ AI DataBase wAPI Core ã«å§è²ããŠãããæ¬Modã¯ãæ ªåŒããžãã¯ãšã²ãŒã äœéšãã®ã¿ãæ åœããŸãã
| é ç® | å€ |
|---|---|
| Mod ID | stock_wapi |
| 衚瀺å | StockMarket wapi mod |
| ããŒãžã§ã³äœç³» | 1.21.1-x.y.zïŒMCç-SemVerãcoreãšã¯ç¬ç«ïŒ |
| å°å ¥èŠä»¶ | ** aidbwapi_core å¿ é ** |
| ã©ã€ã»ã³ã¹ | Apache License 2.0 |
ð ã³ã¢æ©èœãšã¢ãŒããã¯ã㣠(Features & Architecture)
1. AIé§åã®æ ªäŸ¡å€åã·ã¹ãã (Market Engine)
æ ªäŸ¡ã¯ä»¥äžã®4ã€ã®èŠçŽ ãåç®ããŠå®ææŽæ°æã«æ±ºå®ãããŸããAIã¯äŸ¡æ ŒãçŽæ¥æ±ºå®ããããããŸã§åœ±é¿èŠçŽ ã®äžã€ãšããŠæ©èœããŸãã
- å éšã©ã³ãã å€å: éæããšã«èšå®ãããåºæ¬ãã©ãã£ãªãã£ã«åºã¥ãèªç¶ãªäŸ¡æ Œå€åã
- ãã¬ã³ãåŸå: éæããšã«èšå®ããããäžæå¯ãïŒäžéå¯ãïŒäžç«ãã®åæåŸåãããšã«ãæ¯åã®å®ææŽæ°æã«äžå®ç¢ºçïŒ8%ïŒã§ãã¬ã³ããåçã«å€åããå¥œæ¯æ°ã»äžæ¯æ°ã®æ³¢ã圢æããŸãã
- ãã¬ã€ã€ãŒé絊圱é¿: æŽæ°ééäžã®ãã¬ã€ã€ãŒã®è²·ãã»å£²ãæ°éãéèšãã察æ°é¢æ° (
log10(1 + |netDemand|)) ãããŒã¹ã«äŸ¡æ Œãžåæ ãæ¥æ¿ãªå€åãæå¶ãã€ã€ãåžå Žåå è ã®è¡åãäŸ¡æ Œã«åœ±é¿ãäžããŸããé絊ã®åæ ã¿ã€ãã³ã°ã¯ãå®ææŽæ°æãã§ããã売買ããç¬éã«å³åº§ã«æ ªäŸ¡ãåãããã§ã¯ãããŸããã - AIåžå Žå¿ç圱é¿:
aidbwapi_coreçµç±ã§LLMã«åžå ŽååããŒã¿ãéä¿¡ããAIãè¿ããåžå Žå¿çã¹ã³ã¢ïŒ-Nã+NïŒããæ£èŠåããŠäŸ¡æ Œåœ±é¿ã«å€æããŸãã
äŸ¡æ Œã®å®å šè£ 眮
- æ ªäŸ¡ã¯æŽæ°ã§ç®¡çã1åã®æŽæ°ãããã®å€åå¹ ã¯æå€§Â±10%ïŒconfig倿Žå¯èœïŒã«ã¯ã©ã³ããããŸãã
- åéæã«ã¯æäœäŸ¡æ ŒïŒ
minPriceïŒãšæé«äŸ¡æ ŒïŒmaxPriceïŒãèšå®ãããäŸ¡æ Œã¯åžžã«ãã®ç¯å²å ã«å¶éãããŸãã - ãªããŠã³ãæ©æ§: æäœäŸ¡æ Œä»è¿ã§ã¯äžèœå§åã匱ããäžæè£æ£ã匷ããããšã§äŸ¡æ Œã0ã«è¿ã¥ãããšãé²ããŸããåç£ã»äžå Žå»æ¢ã¯çºçããŸããã
èªåã¹ã±ãŒã«é©å¿ (Adaptive Demand Scaling)
ãµãŒããŒã®éå»5æ¥åïŒããã©ã«ã120ååïŒã®ç·ååŒéãç§»åå¹³åãšããŠä¿åãããããçšããŠé絊圱é¿ãèªåã§æ£èŠåããŸãããã¬ã€ã€ãŒäººæ°ãååŒèŠæš¡ãå€åããŠããæåã§ã®config調æŽãªãã§é©åãªãã©ã³ã¹ãç¶æãããŸãã
2. AIãã¥ãŒã¹çæ (Market News)
å®ææŽæ°æã« aidbwapi_core ãžåžå ŽååããŒã¿ïŒåéæã®å€åæŠèŠãäžç芳èšå®çïŒãéä¿¡ããAIãçµæžãã¥ãŒã¹æãšåžå Žå¿çã¹ã³ã¢ãçæããŸãã
- å®ææŽæ°æããµãŒããŒå
ã®å
šãã¬ã€ã€ãŒã«
[StockWapi]ã®åœ¢åŒã§ãã¥ãŒã¹ããã£ãããžãããŒããã£ã¹ãããŸããAIçæã倱æããå Žåã¯ããã©ãŒã«ããã¯ãã¥ãŒã¹ïŒãéä¿¡é害ã«ããAIåžå Žãã¥ãŒã¹ã®ååŸã«å€±æããŸãããåžå Žã¯ãã¯ãã«ã«ãªèŠå ã®ã¿ã§åããŠããŸãããïŒã代ããã«ãããŒããã£ã¹ããããåžå ŽäŸ¡æ Œã®æŽæ°èªäœã¯æ£åžžã«è¡ãããŸãã /stockwapi newsã§ææ°ãã¥ãŒã¹ïŒéå»ãã¥ãŒã¹å±¥æŽïŒæå€§30ä»¶ãã¿ã€ã ã¹ã¿ã³ãä»ããæ°ããé ïŒãé²èЧå¯èœã- ãã¥ãŒã¹å±¥æŽã¯ç¡æéä¿æïŒGlobalDBã«ä¿åïŒã
AI倱ææã®æå
AIãªã¯ãšã¹ãã倱æããå ŽåïŒå šã¢ãã«äžå¯çïŒã¯ãAI圱é¿ãŒãïŒsentiment=0ïŒã§ä»ã®èŠçŽ ã®ã¿ã§æ ªäŸ¡ãèšç®ããŸãããã©ãŒã«ããã¯ãã¥ãŒã¹ãå šãã¬ã€ã€ãŒã«ãããŒããã£ã¹ããããŸãã
管çè åã: AIãšã©ãŒçºçæã®ç¢ºèªæé
/dbwapi ai errorsâ çŽè¿ã®ãšã©ãŒå±¥æŽïŒHTTPã¹ããŒã¿ã¹ã³ãŒãã»åå ïŒã確èª/dbwapi model listâ å šã¢ãã«ã®ç¶æ ïŒæå¹/ç¡å¹ãããã«ãã£å€ïŒãäžèŠ§ç¢ºèª/dbwapi model enable <ç»é²å>.<ã¢ãã«å>â èªèšŒãšã©ãŒçã§èªåç¡å¹åãããã¢ãã«ã埩垰/dbwapi model reset <ç»é²å>.<ã¢ãã«å>â ããã«ãã£ã»ã¯ãŒã«ããŠã³ããªã»ãã
3. AIäŒæ¥èª¬æèªåçæ (Company Description)
管çè
ãéæã远å ãããšãéæåã aidbwapi_core ãžéä¿¡ããAIãäŒæ¥èª¬ææãèªåçæããŠDBãžä¿åããŸãããã®åŠçã¯ç»é²æã®ã¿å®è¡ãããŸãã
AIçæã倱æããå Žåã¯ããã©ãŒã«ããã¯èª¬ææïŒãçŸåšãäŒæ¥èª¬æã¯ååŸã§ããŸããããïŒãDBã«èªåä¿åãããŸãã
ãã¬ã€ã€ãŒã¯ /stockwapi info <ticker> ã³ãã³ããçæ¿ããäŒæ¥èª¬æãé²èЧã§ããŸãã
管çè
ãäŒæ¥èª¬æãæåã§ä¿®æ£ã»å·®ãæ¿ããå Žåã¯ãDBãã¡ã€ã«ïŒstock_wapi_GlobalDatabase.jsonïŒã® companyDesc_XXX ããŒãçŽæ¥ç·šéããŠãã ããã
æ¢åã®äŒæ¥èª¬æã空æåïŒ""ïŒã«ããŠãµãŒããŒãåèµ·åãããšãAIãæ°ãã説æãèªååçæããŸãã
4. ç¬èªé貚ãKABUããšã¢ã€ãã 亀æ (Currency & Exchange)
æ¬Modã¯å€éšã®çµæžModã«äŸåãããç¬èªé貚ãKABUãã䜿çšããŸãã
- é貚åç§°: KABUïŒæŽæ°ã®ã¿ãåæææ0ïŒ
- æ®é«ã»ååŒäžé: 1ãã¬ã€ã€ãŒã®ææéäžéãããã³1åã®å šååŒïŒæ ªã®å£²è²·ã»ã¢ã€ãã 亀æãªã©ãã¹ãŠå«ãïŒã®äžé㯠20å KABU (2,000,000,000)ãïŒæŽæ°ãªãŒããŒãããŒããã³çµæžãã©ã³ã¹åŽ©å£é²æ¢ã®ããïŒ
- ãã¬ã€ã€ãŒã¯ä»»æã®ã¢ã€ãã ïŒããã©å«ããã©ã®Modã®ã¢ã€ãã ã§ãå¯ïŒãšKABUãåæ¹åã«äº€æã§ããŸãã亀æã¯çæ¿UIãã³ãã³ãããå®è¡å¯èœã§ãã
- è€æ°ã®ã¢ã€ãã ãããããç°ãªãã¬ãŒãã§ç»é²å¯èœïŒäŸ: ãã€ã€=100KABUãéã€ã³ãŽãã=10KABUïŒã亀æå¯Ÿè±¡ã®ç»é²ã¯ç®¡çè
ã³ãã³ã (
/stockwapi admin setrate) ã§è¡ããã¬ãŒãæ å ±ã¯config/stock_wapi-exchange.jsonã«ä¿åãããŸãã
ã¢ã€ãã 亀æã®å®å 𿩿§
- äºåã€ã³ãã³ããªã¹ãã£ã³: ããã©ä»æ§ã«ããéšåæ¶è²»ãšã©ãŒãé²ãããã亀æåŠçåã«ãã¬ã€ã€ãŒã®ã€ã³ãã³ããªå šäœãã¹ãã£ã³ããææç·éãèŠæ±éã«éããŠããããäºåãã§ãã¯ã
- äžéè¶ éãããã¯: 亀æã«ãã£ãŠææéãäžéïŒ20åKABUïŒãè¶ ããå Žåã¯ãã¢ã€ãã ãæ¶è²»ããåŠçãå®å šã«ãããã¯ã
5. ã€ã³ãµã€ããŒå¯Ÿçãšåžå Žã®å ¬æ£æ§ (Market Integrity)
ãã¥ãŒã¹å ¬éåã®ååŒãæ§é çã«äžå¯èœã«ãããããæŽæ°åŠçã¯ä»¥äžã®å³æ Œãªé åºã§å®è¡ãããŸãã
売買ãã㯠â äŸ¡æ ŒæŽæ° â ãã¥ãŒã¹ä¿å â é ä¿¡ â çæ¿æŽæ° â ããã¯è§£é€
ããã¯äžã«å£²è²·ã詊ã¿ãå Žåã¯ããããã¯ãããŠããæšããã¬ã€ã€ãŒã«éç¥ãããŸãã
6. ææ°æã·ã¹ãã (Commission)
- 売買æã«ææ°æã城åå¯èœãè²·ãã»å£²ãããããåå¥ã«ããŒã»ã³ããŒãžã§èšå®ãããã©ã«ãã¯0%ã
- ææ°æåçã®è¡ãå ã¯ãæ¶æ» ïŒããã©ã«ãïŒããŸãã¯ããµãŒããŒå šäœã®ç®¡çå£åº§ïŒconfig倿Žå¯èœïŒãã管çå£åº§ã¯ç¹å®ãã¬ã€ã€ãŒUUIDã«çŽã¥ããŸããã
/stockwapi admin balanceã§ç®¡çå£åº§ã®æ®é«ã確èªã§ããŸãã
7. çæ¿UI (Sign Interface)
管çè ãèšçœ®ããçæ¿ãããã¯ã«æ©èœãçŽä»ããããšã§ããã¬ã€ã€ãŒã¯å³ã¯ãªãã¯ã ãã§å£²è²·ã»æéã»ãã¥ãŒã¹é²èЧãå¯èœã«ãªããŸãã
- èšçœ®ã¯ç®¡çè
ã®ã¿å¯èœïŒ
/stockwapi admin sign <type> [<arg1>] [<arg2>]ïŒã - æ ªäŸ¡æŽæ°æã«èªåæŽæ°ãçæ¿ããçŽæ¥å£²è²·ãå¯èœïŒå³ã¯ãªãã¯ã§å³æå®è¡ïŒã
- 管çè 以å€ã¯ç Žå£äžå¯ïŒOPãç Žå£ããå Žåã¯èªåç»é²è§£é€ïŒã
çæ¿ã®çš®é¡ïŒå š7çš®ïŒ
| çš®é¡ | èšçœ®ã³ãã³ãäŸ | çæ¿è¡šç€º | å³ã¯ãªãã¯åäœ |
|---|---|---|---|
price |
sign price RDM |
éæå+äŸ¡æ Œ | éæè©³çްããã£ããã«è¡šç€º |
list |
sign list |
éæäžèЧããã | å šéæ+äŸ¡æ Œããã£ããã«è¡šç€º |
buy |
sign buy RDM 5 |
éæ+æ°é+äŸ¡æ Œ | æå®æ°éãå³æè³Œå ¥ |
sell |
sign sell RDM 5 |
éæ+æ°é+äŸ¡æ Œ | æå®æ°éãå³æå£²åŽ |
exchange |
sign exchange diamond 10 |
ã¢ã€ãã å+æ°é+KABUé¡ | ã¢ã€ãã âKABUå³æäº€æ |
buyitem |
sign buyitem diamond 10 |
ã¢ã€ãã å+æ°é+KABUé¡ | KABUâã¢ã€ãã å³æè³Œå ¥ |
news |
sign news |
ææ°ãã¥ãŒã¹ããã | ææ°ãã¥ãŒã¹1ä»¶ããã£ããã«è¡šç€ºïŒã³ãã³ãçã¯30ä»¶å±¥æŽä»ãïŒ |
ç»é²è§£é€: /stockwapi admin unsignïŒç®¡çè
ãçæ¿ãèŠãªããå®è¡ïŒ
ð» åäœèŠä»¶ãšã€ã³ã¹ããŒã« (Requirements & Setup)
- Minecraft: 1.21.1
- Mod Loader: NeoForge 21.1.219 以é
- Java: Java 21 以äž
- å¿
é äŸåMod:
aidbwapi_coreïŒAIéä¿¡ã»ããŒã¿ããŒã¹åºç€ïŒ - ãµã€ã: ãµãŒããŒã»ã¯ã©ã€ã¢ã³ãäž¡æ¹å¿ é
ã€ã³ã¹ããŒã«:
aidbwapi_coreã®ã»ããã¢ãããå®äºããŠããããšïŒAIãããã€ãã®ç»é²ã»ã¢ãã«ã®èšå®æžã¿ïŒã確èªããŠãã ããã- åœMod (
stock_wapi-x.x.x.jar) ããµãŒããŒãŸãã¯ã¯ã©ã€ã¢ã³ãã®modsãã©ã«ãã«é 眮ããŠèµ·åããŸãã - ååèµ·åæããã¢çšã®ããªã»ãã3éæïŒRDM, END, OAKïŒãèªåçæãããŸãã
ð äœ¿çšæ¹æ³ (Usage)
ãµãŒããŒç®¡çè : åæã»ããã¢ãã
Step 1: aidbwapi_core ã®æºå
æ¬Modã®åäœã«ã¯ aidbwapi_core ã®ã»ããã¢ãããå¿
é ã§ãã以äžã®æé ã§å®äºããŠãã ããã
1-1. AIãããã€ãã®ç»é²
AIãµãŒãã¹ïŒOpenAIäºæAPIïŒã®æ¥ç¶æ å ±ããç»é²åïŒKeyNameïŒããšããŠç»é²ããŸãã
/dbwapi keyname add <ç»é²å> <APIãšã³ããã€ã³ãURL> <APIããŒ>
â ïž ã»ãã¥ãªãã£èŠå: Minecraftã®ä»æ§äžããã£ããæ¬ã«å ¥åããã³ãã³ãå šæïŒAPIããŒã®å¹³æïŒã¯ãµãŒããŒã®
logs/latest.logã«ãã®ãŸãŸèšé²ãããŸãã å®å šã®ãããconfig/aidbwapi_core-keynames.jsonãããã¹ããšãã£ã¿ã§çŽæ¥ç·šéããã²ãŒã å ã§/dbwapi reloadãå®è¡ããéçšãåŒ·ãæšå¥šããŸãã
1-2. ã¢ãã«ã®ç»é²
ç»é²ãããããã€ãã«ã䜿çšããAIã¢ãã«ã远å ããŸãã
/dbwapi model add <ç»é²å>.<ã¢ãã«å> <æ¥æ¬¡äžé> <忬¡äžé>
äžéå€ãçç¥ãŸã㯠-1 ã«ãããšç¡å¶éãšããŠç»é²ãããŸãã
è€æ°ã®ãããã€ãã»ã¢ãã«ãç»é²ãããšãé害æã«èªåã§æ¬¡ã®ã¢ãã«ãžåãæ¿ãããŸãïŒãã§ã€ã«ãªãŒããŒïŒã
1-3. åäœç¢ºèª
/dbwapi ai test
AIããã®å¿çãè¿ã£ãŠããã°æºåå®äºã§ãããšã©ãŒãåºãå Žå㯠/dbwapi ai errors ã§ãšã©ãŒå
容ã確èªããŠãã ããã
Step 2: ååèµ·åãšèªåã»ããã¢ãã
æ¬Modã mods ãã©ã«ãã«é
眮ããŠãµãŒããŒãèµ·åãããšã以äžãèªåçã«è¡ãããŸãã
- ãã¢çšããªã»ãã3éæïŒRDM, END, OAKïŒã®å®çŸ©ã
config/stock_wapi-stocks.jsonã«çæ - åéæã®AIäŒæ¥èª¬æãéåæã§èªåçæã»ä¿å
- åžå Žã®å®ææŽæ°ã¹ã±ãžã¥ãŒã©ãéå§ïŒããã©ã«ã: 1æéããšïŒ
Step 3: ã¢ã€ãã 亀æã¬ãŒãã®ç»é²
ãã¬ã€ã€ãŒãKABUãå ¥æããææ®µãšããŠãã¢ã€ãã 亀æã¬ãŒããèšå®ããŠãã ããã
/stockwapi admin setrate diamond 100
/stockwapi admin setrate gold_ingot 10
ããã«ããããã€ã€1å = 100 KABUããéã€ã³ãŽãã1å = 10 KABUãã§äº€æå¯èœã«ãªããŸãã
Step 4: çæ¿ã®èšçœ®ïŒä»»æïŒ
ãã¬ã€ã€ãŒãå³ã¯ãªãã¯ã ãã§æäœã§ãããããçæ¿UIãèšçœ®ã§ããŸãã çæ¿ãããã¯ãèšçœ®ãããããèŠãªãã以äžã®ã³ãã³ããå®è¡ããŠãã ããã
/stockwapi admin sign price RDM â RDMã®äŸ¡æ Œè¡šç€ºçæ¿
/stockwapi admin sign buy RDM 5 â RDMã5æ ªè³Œå
¥ããçæ¿
/stockwapi admin sign sell RDM 5 â RDMã5æ ªå£²åŽããçæ¿
/stockwapi admin sign exchange diamond 10 â ãã€ã€10åâKABUæéã®çæ¿
/stockwapi admin sign buyitem diamond 1 â KABUã§ãã€ã€1åã賌å
¥ããçæ¿
/stockwapi admin sign list â å
šéæäžèЧã®çæ¿
/stockwapi admin sign news â ææ°ãã¥ãŒã¹ã®çæ¿
Step 5: éæã®è¿œå ã»ã«ã¹ã¿ãã€ãºïŒä»»æïŒ
ç¬èªã®éæã远å ããå Žå:
/stockwapi admin add ABC "Alpha Beta Corp" 50000
远å åŸãconfig/stock_wapi-stocks.json ã«éæå®çŸ©ã远èšãããŸãã
ãã©ãã£ãªãã£ãåžå Žã¿ã€ããªã©ã现ãã調æŽãããå Žåã¯ããã®JSONãã¡ã€ã«ããµãŒããŒåæ¢æã«çŽæ¥ç·šéããŠãã ããã
ãã¬ã€ã€ãŒ: åºæ¬çãªéã³æ¹
1. KABUãæã«å ¥ãã
ãŸãã¯ã¢ã€ãã 亀æã§KABUãå ¥æããŸãããã
/stockwapi exchange diamond 10
ïŒç®¡çè ãèšå®ããçæ¿ãããå Žåã¯ãå³ã¯ãªãã¯ã§å³æäº€æãå¯èœïŒ
2. éæã調ã¹ã
/stockwapi list â å
šéæã®çŸåšäŸ¡æ Œã確èª
/stockwapi info RDM â RDMã®è©³çްæ
å ±ã確èª
/stockwapi news â AIãçæããææ°ã®çµæžãã¥ãŒã¹ã確èª
3. æ ªã売買ãã
/stockwapi buy RDM 10 â RDMã10æ ªè³Œå
¥
/stockwapi sell RDM 5 â RDMã5æ ªå£²åŽ
売買å®äºæã«ã¯ãéæåã»æ°éã»å䟡ã»åèšé¡ã»ææ°æã»æ¯æ/ååé¡ã»ä¿ææ°ã»å¹³åååŸäŸ¡æ Œã詳现ã«ãã£ãã衚瀺ãããŸãã
4. èªåã®è³ç£ã確èªãã
/stockwapi myinfo â æ®é«ã»ä¿æéæã»æçãäžèŠ§è¡šç€º
5. KABUãã¢ã€ãã ã«æ»ã
å©çãåºãããKABUãæ¶è²»ããŠã¢ã€ãã ïŒãã€ã€ã¢ã³ãçïŒãè³Œå ¥ã§ããŸãã
/stockwapi buyitem diamond 1 â KABUãæ¯æã£ãŠãã€ã€1åãå
¥æ
éçšTips
- åžå Žã®äžæåæ¢: ã¡ã³ããã³ã¹æãªã©ã¯
/stockwapi admin pauseã§å£²è²·ãšå®ææŽæ°ãäžæ¬åæ¢ã§ããŸããåéã¯/stockwapi admin resumeã - éæã®åé€:
/stockwapi admin remove ABC <ããªãã®UUID>ã§éæãåé€ã§ããŸããä¿æè ãããå Žåã¯çŸåšäŸ¡æ Œã§åŒ·å¶æž ç®ãããŸãã誀æäœé²æ¢ã®ãããããªãèªèº«ã®UUIDã®å ¥åãå¿ é ã§ãã - ææ°æã®æŽ»çš: ææ©çãªå€§é売買ãæå¶ãããå Žåã¯ãTOMLèšå®ã§
buyFeePercent/sellFeePercentãèšå®ããŠãã ãããfeeToAdminAccount = trueã«ãããšææ°æã管çå£åº§ã«ããŒã«ãããŸãã
âïž èšå®ãã¡ã€ã«ãšãã£ã¬ã¯ããªæ§é (Configuration)
-
config/stock_wapi-common.toml: Modå šäœã®åºç€åäœèšå®ãã¡ã€ã«ã[general]ã»ã¯ã·ã§ã³:commandPermissionLevel: 管çè ã³ãã³ãã®èŠæ±OPæš©éã¬ãã«ïŒããã©ã«ã2ïŒãdebugLogging: ãããã°ãã°ã®æå¹åïŒããã©ã«ãfalseïŒãéåžžã¯å€æŽäžèŠã
[market]ã»ã¯ã·ã§ã³:updatesPerDay: 1æ¥ã®åžå ޿޿°åæ°ïŒããã©ã«ã24ããªã¢ã«ã¿ã€ã 1æéããšïŒãmaxPriceChangePercent: 1åã®æŽæ°ãããã®æå€§å€åå¹ ïŒããã©ã«ã10ã±10%ïŒãtradingPausedOnUpdate: æŽæ°åŠçäžã«å£²è²·ãäžæåæ¢ãããïŒããã©ã«ãtrueïŒãfalseã«ãããšã€ã³ãµã€ããŒå¯Ÿçã®ããã¯æ©æ§ãç¡å¹åãããŸãã
[trading]ã»ã¯ã·ã§ã³:buyFeePercent/sellFeePercent: è²·ãã»å£²ãã®ææ°æçïŒããã©ã«ã0ïŒãfeeToAdminAccount: ææ°æã管çå£åº§ã«ããŒã«ãããïŒããã©ã«ãfalseãæ¶æ» ïŒãallowShortSelling: 空売ãã®èš±å¯ãã©ã°ïŒConfigé ç®ãšããŠååšããããçŸåšæªå®è£ ã®ãããtrueã«ããŠãåäœããªãïŒãminTradeUnit: æäœå£²è²·åäœïŒããã©ã«ã1ïŒãmaxTradeAmount: 1åã®æå€§å£²è²·æ°ïŒããã©ã«ã-1ãç¡å¶éïŒãmaxHoldingPerPlayer: 1ãã¬ã€ã€ãŒã®éæå¥ä¿æäžéïŒããã©ã«ã-1ãç¡å¶éïŒã
[ai]ã»ã¯ã·ã§ã³:sentimentScoreRange: AIå¿çã¹ã³ã¢ã®ç¯å²ïŒããã©ã«ã100ã-100ã+100ïŒãnewsLanguage: AIãçæãããã¥ãŒã¹ã®èšèªïŒããã©ã«ãjaïŒãworldSetting: AIã«æž¡ãäžç芳èšå®ããã¹ãïŒããã©ã«ã"Minecraftäžçã®æ¶ç©ºäŒæ¥ã®æ ªåŒåžå Ž"ïŒã
-
config/stock_wapi-stocks.json: å šéæã®è©³çްãã©ã¡ãŒã¿å®çŸ©ãã¡ã€ã«ïŒ1ãã¡ã€ã«ã«é åãšããŠæ ŒçŽïŒã éæè¿œå ã³ãã³ãå®è¡æã«ããã©ã«ãå€ã§èªå远èšãããŸããåæäŸ¡æ Œä»¥å€ã®ãã©ã¡ãŒã¿ïŒãã©ãã£ãªãã£ããã¬ã³ãããªããŠã³ã匷床ãåžå Žã¿ã€ãçïŒã现ãã調æŽãããå Žåã¯ããµãŒããŒåæ¢æã«ãã®ãã¡ã€ã«ãçŽæ¥ç·šéããŠãã ããã{ "ticker": "RDM", "name": "Redstone Dynamics Mining", "initialPrice": 15000, "volatility": 0.03, "stability": 0.9, "trend": "neutral", "marketType": "stable", "minPrice": 1000, "maxPrice": 100000, "reboundStrength": 0.1, "tradeImpactFactor": 0.4, "aiImpactFactor": 0.05, "description": "" } -
config/stock_wapi-exchange.json: ã¢ã€ãã 亀æã¬ãŒãã®ä¿åãã¡ã€ã«ã 管çè ã³ãã³ã (/stockwapi admin setrate) ã§ç»é²ãããã¬ãŒãæ å ±ãä¿åãããŸãã -
[ã¯ãŒã«ãä¿åã«ãŒã]/aidbwapi_core/stock_wapi/: éçšããŒã¿ã®ä¿åå ïŒaidbwapi_coreã®ã«ããŽãªDBæ©æ§ã䜿çšïŒãglobal.json: çŸåšäŸ¡æ ŒãäŸ¡æ Œå±¥æŽããã¥ãŒã¹å±¥æŽãåžå Žå¿çå€ãé絊éèšããŒã¿ãæŽæ°åæ°ã«ãŠã³ã¿ãååŒéã®ç§»åå¹³åå±¥æŽçãplayers/<UUID>.json: ãã¬ã€ã€ãŒããšã®KABUæ®é«ãä¿ææ ªæ°ãå¹³åååŸäŸ¡æ Œã売買履æŽã
ð ïž ã³ãã³ããªãã¡ã¬ã³ã¹ (Command Reference)
ãã¹ãŠã®ã³ãã³ã㯠/stockwapi ã§å§ãŸããŸãã
éæã®æå®ã«ã¯ãã£ãã«ãŒã·ã³ãã«ã䜿çšããŸãããå°æåã§å
¥åããŠãå
éšã§èªåçã«å€§æåã«å€æãããŠåŠçãããŸãã
<ticker> ããã³ <item> åŒæ°ã¯Tabè£å®ã«å¯Ÿå¿ããŠããŸãã
ð ãã¬ã€ã€ãŒã³ãã³ãïŒæš©éäžèŠïŒ
| ã³ãã³ã | 説æ |
|---|---|
/stockwapi list |
å šéæã®ãã£ãã«ãŒãšçŸåšäŸ¡æ ŒãäžèŠ§è¡šç€º |
/stockwapi info <ticker> |
éæã®è©³çްæ å ±ïŒäŸ¡æ Œãåžå Žã¿ã€ããé絊ãäŒæ¥èª¬æïŒã衚瀺 |
/stockwapi myinfo |
èªåã®KABUæ®é«ãšä¿æéæã»æçãäžèŠ§è¡šç€º |
/stockwapi portfolio |
myinfo ãšå矩ïŒãšã€ãªã¢ã¹ïŒ |
/stockwapi buy <ticker> <quantity> |
æå®éæãæå®æ°éè³Œå ¥ïŒçŸåšäŸ¡æ Œã§å³æçŽå®ïŒ |
/stockwapi sell <ticker> <quantity> |
æå®éæãæå®æ°é売åŽïŒçŸåšäŸ¡æ Œã§å³æçŽå®ïŒ |
/stockwapi news |
ææ°ã®åžå Žãã¥ãŒã¹ïŒéå»ãã¥ãŒã¹å±¥æŽïŒæå€§30ä»¶ïŒã衚瀺 |
/stockwapi exchange <item> <count> |
æå®ã¢ã€ãã ãKABUã«æé |
/stockwapi buyitem <item> <count> |
KABUã§æå®ã¢ã€ãã ãè³Œå ¥ |
ð 管çè ã³ãã³ãïŒOPæš©éå¿ é ãããã©ã«ã permission level 2ïŒ
| ã³ãã³ã | 説æ |
|---|---|
/stockwapi admin add <ticker> <name> <initialPrice> |
æ°èŠéæãç»é²ã»åæåãAIäŒæ¥èª¬æãèªåçæã詳现ãã©ã¡ãŒã¿ã¯çæãããJSONãã¡ã€ã«ã§èª¿æŽå¯èœ |
/stockwapi admin remove <ticker> <executorUUID> |
éæãåé€ã誀åé€é²æ¢ã®ããå®è¡è UUIDå¿ é ãä¿æè ã«ã¯åŒ·å¶æž ç®ïŒçŸåšäŸ¡æ Œã§èªå売åŽãKABUãè¿åŽïŒã宿œ |
/stockwapi admin pause |
åžå Žã®ååŒããã³å®ææŽæ°ãäžæåæ¢ |
/stockwapi admin resume |
åžå Žã®ååŒããã³å®ææŽæ°ãåé |
/stockwapi admin balance |
管çå£åº§ïŒå£²è²·ææ°æã®ããŒã«å ïŒã®æ®é«ãç¢ºèª |
/stockwapi admin setrate <item> <kabuRate> |
ã¢ã€ãã ã®äº€æã¬ãŒãã远å ãŸãã¯æŽæ°ïŒäŸ: diamond 100ïŒ |
/stockwapi admin removerate <item> |
ã¢ã€ãã ã®äº€æã¬ãŒããåé€ |
/stockwapi admin listrates |
å šã¢ã€ãã 亀æã¬ãŒããäžèŠ§è¡šç€º |
/stockwapi admin sign <type> [<arg1>] [<arg2>] |
çæ¿ãããã¯ã«æ©èœãçŽä»ããïŒçæ¿ãèŠãªããå®è¡ïŒãåŒæ°ã¯ type ã«ããå¯å€ |
/stockwapi admin unsign |
çæ¿ãããã¯ã®æ©èœç»é²ãè§£é€ïŒçæ¿ãèŠãªããå®è¡ïŒ |
ðïž å éšã¢ãŒããã¯ãã£è£è¶³ (Internal Architecture)
åžå ޿޿°ã¹ã±ãžã¥ãŒã©
ã¿ã€ããŒèªäœã¯ ScheduledExecutorService ã®ããŒã¢ã³ã¹ã¬ããã§çšŒåããŸãããããŒã¿ããŒã¹ã¢ã¯ã»ã¹ãç¶æ
倿Žã®å®å
šæ§ã確ä¿ãããããå®éã®æŽæ°åŠçã¯å¿
ãã¡ã€ã³ãµãŒããŒã¹ã¬ãã (MinecraftServer.execute()) ã«åæããŠå®è¡ãããŸãã
æŽæ°ã¿ã€ããŒã¯ãªã¢ã«ã¿ã€ã åºæºã§ããµãŒããŒåèµ·åæã¯ååã®ç¶ãããåéããŸãã
å£²è²·çµæåŠç (TradeResult Enum)
ã³ãã³ãåŠçã®è€éåãé²ããããå
éšã®å£²è²·åŠççµæã¯10çš®é¡ä»¥äžã®ç¶æ
ïŒæåãæ®é«äžè¶³ãä¿ææ°äžè¶³ãéææªç»é²ãåžå ޿޿°äžã«ããããã¯ãªã©ïŒãæã€ Enum (TradeResult) ã§è¿ãããã¬ã€ã€ãŒãžã®èŠåã¡ãã»ãŒãžããã® Enum ãäžå
管çããŸãã
DBæ§é (aidbwapi_core ã«ããŽãªDB䜿çš)
- ã«ããŽãªå:
stock_wapi - GlobalDatabase: çŸåšäŸ¡æ ŒãäŸ¡æ Œå±¥æŽïŒå
šå±¥æŽïŒãåžå Žå¿çå€ããã¥ãŒã¹å±¥æŽãé絊éèšããŒã¿ãæŽæ°åæ°ã«ãŠã³ã¿ãååŒéã®ç§»åå¹³åå±¥æŽ (
volumeHistory)ã - PlayerDatabase: KABUæ®é« (
balance)ãä¿ææ ªæ° (holdings)ãå¹³åååŸäŸ¡æ Œ (avgPrices)ãå£²è²·å±¥æŽ (tradeHistory)ã
éåæåŠçã®ã¹ã¬ããã»ãŒããã£
AIäŒæ¥èª¬æã®éåæçæã³ãŒã«ããã¯ãªã©ãéåæã¹ã¬ããããã®DBã¢ã¯ã»ã¹ã¯ MinecraftServer.execute() ãçµç±ããŠã¡ã€ã³ã¹ã¬ããã«å§è²ããã¹ã¬ããã»ãŒããä¿èšŒããŠããŸãã
âïž ã©ã€ã»ã³ã¹ (License)
ãã®Modã®ãœãŒã¹ã³ãŒãããã³æäŸããããã€ããªã¯ Apache License, Version 2.0 ã§æäŸã»å ¬éãããŠããŸãã æ¬Modãå©çšã»æ¹å€ããåçšã»éåçšModã®äœæããã³åé åžã¯ãã©ã€ã»ã³ã¹æ¡é ã®ç¯å²å ã§èªç±ã«è¡ã£ãŠããã ããŸãã

