Cobblemon Economy
Cobblemon Economy 是专为 Cobblemon 服务器打造的一体化经济核心模组。
它提供现代化的 NPC 商店、双货币系统、完整的任务 NPC 进度层,以及兼容性桥接功能,让您可以保留模组兼容性,同时使用 CobEco 作为主要经济系统。
为什么选择 Cobblemon Economy
- 为您的服务器提供一个统一的经济核心,而非分散的余额系统。
- 支持 CobbleDollars 和 Impactor 的桥接功能,使许多依赖经济的现有模组能够继续正常工作。
- 主货币切换功能,支持按世界配置(
cobeco、cobbledollars、impactor)。
- PvE 进度奖励(捕捉、战斗、突袭巢穴、战斗塔)以及轮换的任务板。
- 适合生产环境:JSON 配置文件、热重载工具、SQLite 持久化存储。
Discord (支持)
在此加入:
您将获得的功能
- PokeDollars + PCO 双货币
- 带分页功能的 NPC 购买与出售商店
- 带有可配置任务板的任务 NPC
- 基于命令的商店物品(支持出售命令,而不仅仅是物品)
- 捕捉/发现/战斗奖励及倍率加成
- 突袭巢穴奖励兼容性
- 战斗塔 PCO 奖励及完成奖励
- 跨经济系统桥接 + API 同步支持
- 可切换的主后端:
cobeco、cobbledollars、impactor(按世界设置)
任务 NPC 系统 (0.0.16)
- 一个 NPC 实体,两种角色:
SHOP 或 QUEST(不重复实体类型)。
- 按世界的任务文件,具备完整的数据驱动行为:
quests.json:目标、奖励、可重复性、冷却时间、前置条件。
quest_npcs.json:NPC 池、最大活跃任务数、可见任务板大小、轮换策略。
- 任务目标覆盖范围包括:
- 捕捉过滤器(
species、type、ball、dimension/dimensions、闪光、标签)。
- 进度事件(
battle_win、raid_win、tower_win、fossil_revive)。
- 奖励模型支持:
- 货币奖励(
pokedollars、pco)以及每个任务可选的命令奖励。
- 前置条件链、重复策略、时间限制和冷却锁定。
- 自定义任务板用户体验:
- 默认最多显示 4 个任务(可按 NPC 配置)。
- 详细的目标文本(物种/类型/球种/位置/闪光/标签)。
- 剩余时间、冷却剩余时间及清晰的操作状态。
- 轮换系统:
- 所有玩家共享任务板或每位玩家独立任务板(通过
sharedRotation 配置)。
- 轮换模式确切为
MIDNIGHT 或 HOURS(rotationMode)。
MIDNIGHT:在下一个本地服务器午夜时轮换。
HOURS:每经过 rotationHours 小时轮换一次(最小值为 1)。
- 已取消/过期的任务可以阻止直到下一次轮换。
如何设置任务 NPC(召唤 + 绑定)
- 生成一个店员 NPC:
- 使用生成蛋
cobblemon-economy:shopkeeper_spawn_egg,或者
- 运行
/summon cobblemon-economy:shopkeeper。
- 使用
/eco questnpc list 查看可用的任务 NPC 配置。
- 使用
/eco questnpc get <id> 获取任务 NPC 设置物品。
- 右键点击生成的店员并使用该设置物品,将其切换为
QUEST 角色并绑定 questNpcId。
- 可选:使用
/eco shop get <shopId> 获取物品后右键点击,将同一 NPC 切换回普通商店模式。
最小化 quest_npcs.json 示例
{
"quest_npcs": {
"safari_guide": {
"displayName": "Safari Guide",
"skin": "shopkeeper",
"maxActive": 2,
"visibleQuests": 4,
"sharedRotation": true,
"rotationMode": "MIDNIGHT",
"rotationHours": 24,
"questPool": ["safari_water_10", "safari_bug_12"]
}
}
}
配置警告
- 配置支持有限。
- 不提供自定义配置故障排除的手把手指导:请在测试世界/服务器上逐步测试更改。
- 如果自定义设置失败,请首先验证 JSON 语法、任务 ID、NPC ID 和目标键。
安装
- 将
cobblemon-economy-0.0.16.jar 放入 mods/ 目录。
- 启动服务器一次。
- 编辑
world/config/cobblemon-economy/config.json。
- 重启服务器(或仅编辑配置时使用
/eco reload)。
文件结构(按世界)
world/config/cobblemon-economy/config.json
world/config/cobblemon-economy/shops.json
world/config/cobblemon-economy/quests.json
world/config/cobblemon-economy/quest_npcs.json
world/config/cobblemon-economy/milestone.json
world/config/cobblemon-economy/economy.db
world/config/cobblemon-economy/quests.db
world/config/cobblemon-economy/skins/*.png
main_currency 也是按世界设置的,因为它位于此世界配置文件夹中。
各配置文件的作用
config.json
- 全局经济行为(货币、奖励、倍率、分析)。
- 不再需要包含商店定义。
shops.json
- 所有商店定义(
title 标题、currency 货币、items 物品、限制、关联商店等)。
- 向后兼容: 如果此文件缺失,模组会加载旧版
config.json.shops 并自动创建 shops.json。
quests.json
- 任务定义和目标。
- 支持捕获过滤器(物种、属性、球种、
dimension 或 dimensions 维度、闪光、标签)。
- 支持事件目标:
battle_win 战斗胜利、raid_win 团本胜利、tower_win 塔之挑战胜利、fossil_revive 化石复活。
- 单个任务的独立控制:
repeatable 可重复性、repeatPolicy 重复策略、cooldownMinutes 冷却时间(分钟)、timeLimitMinutes 限时(分钟)、requiresCompleted 前置完成要求。
- 支持奖励(
pokedollars 宝可梦币、pco PCO、可选命令列表)。
quest_npcs.json
- 任务 NPC 定义(显示名称、皮肤、对话行、任务池、最大活跃任务数)。
- 公告板/轮换控制:
visibleQuests 可见任务、sharedRotation 共享轮换、rotationMode 轮换模式(MIDNIGHT 午夜 / HOURS 小时)、rotationHours 轮换小时数。
- 一个 NPC 可以通过
questPool 提供多个任务的列表。
milestone.json
快速入门(5 分钟)
- 首次启动服务器以生成默认配置。
- 打开
config.json 并设置:
{
"main_currency": "cobeco"
}
- 向任意商店添加一个测试物品。
- 加入服务器并运行
/bal。
- 进行买卖以确认经济系统运行正常。
指令
玩家
/bal 或 /balance
/pco
/pay <player> <amount>
管理员
/eco reload
/eco shop list
/eco shop get <id>
/eco quest list
/eco questnpc list
/eco questnpc get <id>
/eco skin <name>
/eco item
/balance <player> <add|remove|set> <amount>
/pco <player> <add|remove|set> <amount>
主货币模式
在 config.json 中配置:
{
"main_currency": "cobeco"
}
有效值:
cobeco(默认)
cobbledollars
impactor
行为说明:
cobeco: CobEco 数据库为权威数据源;当存在时,余额会镜像同步到 CobbleDollars 和 Impactor,且桥接钩子会将外部交易同步回 CobEco。
cobbledollars: CobEco 的余额操作路由至 CobbleDollars。
impactor: CobEco 的余额操作路由至 Impactor 主货币。
实际操作中:你可以选择 CobEco 作为主要经济系统,同时保持对期望 CobbleDollars/Impactor 风格流程的模组的广泛兼容性。
奖励
主要奖励键名:
battleVictoryReward
raidDenVictoryReward
captureReward
newDiscoveryReward
battleVictoryPcoReward
battleTowerCompletionPcoBonus
倍率:
shinyMultiplier
radiantMultiplier
legendaryMultiplier
paradoxMultiplier
里程碑
文件路径:world/config/cobblemon-economy/milestone.json
示例:
{ "10": 300, "50": 700, "100": 1500, "200": 3000 }
商店物品类型
标准物品
{ "id": "minecraft:diamond", "name": "Diamond", "price": 1000 }
组件物品
{
"id": "academy:booster_pack",
"name": "Booster Pack",
"price": 200,
"components": {
"academy:booster_pack": "\"base\""
}
}
命令物品
{
"type": "command",
"command": "crate key give vote 1 %player%",
"price": 100,
"displayItem": {
"material": "supplementaries:key",
"displayname": "Vote Crate Key",
"enchantEffect": true
}
}
集成支持
- CobbleDollars(桥接 + 转换,交易同步支持)
- Impactor(桥接 + 转换,交易同步支持)
- Cobblemon Raid Dens(团本胜利奖励)
- Cobblemon Battle Tower(塔之挑战胜利 PCO 奖励 + 通关加成)
- Star Academy(可选)
- Placeholder API(可选)
- YAWP(可选)
Placeholder API
推荐命名空间:cobeco
cobeco:balance
cobeco:balance_symbol
cobeco:pco
cobeco:pco_symbol
故障排除
- 更新后指令缺失:完全重启服务器(仅使用
/eco reload 不够)。
- 经济桥接未激活:验证目标模组已加载且版本兼容。
- 后端行为错误:检查世界配置中的
main_currency。
- 现有世界未显示新的默认任务池:你的
quests.json / quest_npcs.json 已存在;请手动合并或在备份后重新生成。
需要帮助?
Discord 支持:
致谢
感谢 Rikunji 对本项目的贡献。
Cobblemon Economy
Cobblemon Economy is the all-in-one economy core for Cobblemon servers.
It gives you modern NPC shops, dual currencies, a full Quest NPC progression layer, and a compatibility bridge so you can keep mod compatibility while still using CobEco as your main economy.
Why Cobblemon Economy
- One economy core for your server instead of fragmented balances.
- Bridge support for CobbleDollars and Impactor, so many existing economy-dependent mods keep working.
- Main-currency switch with per-world config (
cobeco, cobbledollars, impactor).
- PvE progression rewards (capture, battle, raid dens, battle tower) plus rotating quest boards.
- Production-friendly: JSON config, hot reload tools, SQLite persistence.
Discord (Support)
Join here:
What You Get
- PokeDollars + PCO currencies
- Buy and sell NPC shops with pagination
- Quest NPCs with configurable mission boards
- Command-based shop items (sell commands, not only items)
- Capture/discovery/battle rewards + multipliers
- Raid Dens reward compatibility
- Battle Tower PCO rewards + completion bonus
- Cross-economy bridge + API sync support
- Switchable main backend:
cobeco, cobbledollars, impactor (per world)
Quest NPC System (0.0.16)
- One NPC entity, two roles:
SHOP or QUEST (no duplicate entity type).
- Per-world quest files with full data-driven behavior:
quests.json: objectives, rewards, repeatability, cooldowns, prerequisites.
quest_npcs.json: NPC pool, max active quests, visible board size, rotation strategy.
- Quest objective coverage includes:
- Capture filters (
species, type, ball, dimension/dimensions, shiny, labels).
- Progression events (
battle_win, raid_win, tower_win, fossil_revive).
- Reward model supports:
- Currency rewards (
pokedollars, pco) and optional command rewards per quest.
- Prerequisite chains, repeat policies, time limits, and cooldown lockouts.
- Custom quest board UX:
- Up to 4 missions visible by default (configurable per NPC).
- Detailed objective text (species/type/ball/location/shiny/labels).
- Time remaining, cooldown remaining, and clear action states.
- Rotation system:
- Shared board for all players or per-player board (configurable via
sharedRotation).
- Rotation mode is exactly
MIDNIGHT or HOURS (rotationMode).
MIDNIGHT: rotates on next local server midnight.
HOURS: rotates every rotationHours block (minimum 1).
- Cancelled/expired quests can be blocked until next rotation.
How To Set A Quest NPC (Summon + Bind)
- Spawn a shopkeeper NPC:
- Use the spawn egg
cobblemon-economy:shopkeeper_spawn_egg, or
- Run
/summon cobblemon-economy:shopkeeper.
- Check available quest NPC profiles with
/eco questnpc list.
- Get a Quest NPC setter item with
/eco questnpc get <id>.
- Right-click the spawned shopkeeper with that setter to switch it to
QUEST role and bind questNpcId.
- Optional: switch the same NPC back to a normal shop with
/eco shop get <shopId> then right-click.
Minimal quest_npcs.json Example
{
"quest_npcs": {
"safari_guide": {
"displayName": "Safari Guide",
"skin": "shopkeeper",
"maxActive": 2,
"visibleQuests": 4,
"sharedRotation": true,
"rotationMode": "MIDNIGHT",
"rotationHours": 24,
"questPool": ["safari_water_10", "safari_bug_12"]
}
}
}
Configuration Warning
- Configuration support is limited.
- No hand-holding for custom config troubleshooting: test changes incrementally on a staging world/server.
- If a custom setup fails, validate JSON syntax, quest IDs, npc IDs, and objective keys first.
Installation
- Put
cobblemon-economy-0.0.16.jar in mods/.
- Start the server once.
- Edit
world/config/cobblemon-economy/config.json.
- Restart server (or
/eco reload for config-only edits).
File Layout (Per World)
world/config/cobblemon-economy/config.json
world/config/cobblemon-economy/shops.json
world/config/cobblemon-economy/quests.json
world/config/cobblemon-economy/quest_npcs.json
world/config/cobblemon-economy/milestone.json
world/config/cobblemon-economy/economy.db
world/config/cobblemon-economy/quests.db
world/config/cobblemon-economy/skins/*.png
main_currency is also per-world because it lives in this world config folder.
How Each Config Works
config.json
- Global economy behavior (currencies, rewards, multipliers, profiling).
- Does not need to contain shops anymore.
shops.json
- All shop definitions (
title, currency, items, limits, linked shops, etc.).
- Backward compatibility: if this file is missing, the mod loads legacy
config.json.shops and auto-creates shops.json.
quests.json
- Quest definitions and objectives.
- Supports capture filters (species, type, ball,
dimension or dimensions, shiny, labels).
- Supports event objectives:
battle_win, raid_win, tower_win, fossil_revive.
- Per-quest control:
repeatable, repeatPolicy, cooldownMinutes, timeLimitMinutes, requiresCompleted.
- Supports rewards (
pokedollars, pco, optional command list).
quest_npcs.json
- Quest NPC definitions (display name, skin, dialogue lines, quest pool, max active quests).
- Board/rotation control:
visibleQuests, sharedRotation, rotationMode (MIDNIGHT/HOURS), rotationHours.
- One NPC can offer a list of multiple quests via
questPool.
milestone.json
- Unique-capture milestone rewards.
Quick Start (5 Minutes)
- Start server once to generate defaults.
- Open
config.json and set:
{
"main_currency": "cobeco"
}
- Add one test item to any shop.
- Join server and run
/bal.
- Buy/sell to confirm economy flow.
Commands
Player
/bal or /balance
/pco
/pay <player> <amount>
Admin
/eco reload
/eco shop list
/eco shop get <id>
/eco quest list
/eco questnpc list
/eco questnpc get <id>
/eco skin <name>
/eco item
/balance <player> <add|remove|set> <amount>
/pco <player> <add|remove|set> <amount>
Main Currency Modes
Configure in config.json:
{
"main_currency": "cobeco"
}
Valid values:
cobeco (default)
cobbledollars
impactor
Behavior:
cobeco: CobEco DB is authoritative; balances are mirrored to CobbleDollars and Impactor when present, and bridge hooks keep external transactions synced back into CobEco.
cobbledollars: CobEco balance operations route to CobbleDollars.
impactor: CobEco balance operations route to Impactor primary currency.
In practice: you can choose CobEco as your main economy and still keep broad compatibility with mods that expect CobbleDollars/Impactor-style flows.
Rewards
Main reward keys:
battleVictoryReward
raidDenVictoryReward
captureReward
newDiscoveryReward
battleVictoryPcoReward
battleTowerCompletionPcoBonus
Multipliers:
shinyMultiplier
radiantMultiplier
legendaryMultiplier
paradoxMultiplier
Milestones
File: world/config/cobblemon-economy/milestone.json
Example:
{ "10": 300, "50": 700, "100": 1500, "200": 3000 }
Shop Item Types
Standard item
{ "id": "minecraft:diamond", "name": "Diamond", "price": 1000 }
Component item
{
"id": "academy:booster_pack",
"name": "Booster Pack",
"price": 200,
"components": {
"academy:booster_pack": "\"base\""
}
}
Command item
{
"type": "command",
"command": "crate key give vote 1 %player%",
"price": 100,
"displayItem": {
"material": "supplementaries:key",
"displayname": "Vote Crate Key",
"enchantEffect": true
}
}
Integrations
- CobbleDollars (bridge + conversion, transaction sync support)
- Impactor (bridge + conversion, transaction sync support)
- Cobblemon Raid Dens (raid win rewards)
- Cobblemon Battle Tower (PCO rewards on tower wins + completion bonus)
- Star Academy (optional)
- Placeholder API (optional)
- YAWP (optional)
Placeholder API
Recommended namespace: cobeco
cobeco:balance
cobeco:balance_symbol
cobeco:pco
cobeco:pco_symbol
Troubleshooting
- Command missing after update: restart server fully (not only
/eco reload).
- Economy bridge not active: verify target mod is loaded and version-compatible.
- Wrong backend behavior: check
main_currency in world config.
- Existing world does not show new default quest pools: your
quests.json / quest_npcs.json already exists; merge manually or regenerate after backup.
Need Help?
Discord support:
Acknowledgements
Thanks to Rikunji for their contributions to the project.
评论 0
登录后参与评分
还没有评论,来抢沙发吧