MiguelEconomy X EasyNPC
将你的 EasyNPC 角色变成真正的店主 —— 由 MiguelEconomy 驱动。
此模组是一个桥接两个热门模组的插件:EasyNPC(允许你放置和自定义 NPC 角色)和 MiguelEconomy(添加了游戏内货币系统)。它们共同让玩家能够走近 NPC,打开商店,并使用金币买卖物品 —— 无需命令方块,也无需复杂的设置。
模组功能
- NPC 商店 — 为任意 EasyNPC 角色分配一个商店。玩家可以通过右键点击该 NPC 来打开它。
- 买卖功能 — 商店中的每个物品都可以设置为允许购买、出售或两者兼有,且各自拥有独立的价格。
- 进阶系统 — 玩家随着游戏进程(基于获得的金钱和工作等级)获得等级。更高等级可以解锁进入更好的商店和获取独家物品的权限。
- 商店构建器 — 服务器管理员可以直接在游戏内的可视化菜单中构建和编辑商店,无需触碰任何文件。
- JSON 配置 — 所有商店和 NPC 绑定信息都存储在服务器 config 文件夹中易于阅读的 JSON 文件中,以便高级用户如果愿意可以直接编辑。
依赖项
| 模组 |
是否必需 |
| Minecraft Forge 1.20.1 |
是 |
| MiguelEconomy |
是(负责处理货币) |
| EasyNPC |
是(提供 NPC) |
使用方法
对于玩家
- 走近已分配商店的 NPC 并右键点击它。
- 商店窗口打开。浏览列出的物品。
- 点击购买以购买商品(金币将从你的余额中扣除),或点击出售将背包中的物品转化为金币。
- 某些物品或商店被锁定在等级之后。打开进阶界面(可从商店屏幕访问)以查看你当前的等级以及达到下一等级所需的内容。
对于服务器管理员 — 设置商店
选项 A:游戏内商店构建器
- 使用
/shop create 命令(需要操作员权限)。
- 商店构建器菜单打开。添加物品,设置买卖价格,然后保存。
- 保存后,打开 NPC 绑定配置文件,并将商店 ID 链接到 NPC 的名称或 UUID。
选项 B:JSON 文件
- 启动服务器一次 —— 它将在以下位置创建 config 文件夹:
config/migueleconomy_easynpc/npc_shops/
- 该文件夹中的每个
.json 文件代表一个 NPC 的商店。你可以复制并编辑 example_npc.json 作为起点。
- 重启服务器,或运行
/shop reload 以应用更改。
示例 NPC 商店文件:
{
"shops": [
{
"id": "basic_goods",
"title": "Basic Goods",
"description": "Everyday supplies.",
"requiredTier": "survivor",
"entries": [
{
"id": "bread",
"item": { "itemId": "minecraft:bread", "count": 1 },
"buyEnabled": true,
"sellEnabled": false,
"buyPrice": 10,
"sellPrice": 0,
"description": "A loaf of bread."
}
]
}
],
"npcBindings": [
{
"npcName": "Merchant",
"shopIds": ["basic_goods"]
}
]
}
提示: 你可以通过名称 (npcName) 或精确的 UUID (npcUuid) 来匹配 NPC。如果多个 NPC 共享相同的名称,使用 UUID 会更可靠。
进阶层级
玩家从幸存者 (Survivor) 等级开始。随着他们通过 MiguelEconomy 赚取金钱和提升工作等级,他们会自动晋升等级。每个等级可以解锁:
层级列表和要求配置在:
config/migueleconomy_easynpc/progression.json
命令
| 命令 |
权限 |
功能 |
/level |
玩家 |
打开你的进阶界面,让你查看当前层级和解锁路径 |
/shop create |
操作员 |
打开游戏内商店构建器,为一个新商店生成空白草稿 |
/shop builder |
操作员 |
打开游戏内商店构建器 |
/shop builder open |
操作员 |
与 /shop builder 相同;保留为易读的别名 |
/shop reload |
操作员 |
重新加载商店、NPC 绑定、进阶和经济配置,无需重启 |
/shop debug |
操作员 |
显示商店/调试计数、检测到的 EasyNPC 实体、映射的 NPC 以及经济适配器状态 |
/he shopbuilder |
操作员 |
打开商店构建器的旧版别名 |
/he reloadshops |
操作员 |
/shop reload 的旧版别名 |
/he debugshop |
操作员 |
/shop debug 的旧版别名 |
/he settier <players> <tier> |
操作员 |
手动将一个或多个玩家设置为指定的进阶层级 |
/shop create、/shop builder、/shop reload、/shop debug 以及 /he 管理命令需要 2 级操作员权限。
配置文件夹结构
config/
└── migueleconomy_easynpc/
├── progression.json ← 层级定义和解锁要求
└── npc_shops/
├── example_npc.json ← 自动生成的示例,可安全删除
└── your_npc.json ← 每个 NPC(或一组 NPC)对应一个文件
MiguelEconomy X EasyNPC
Turn your EasyNPC characters into real shopkeepers — powered by MiguelEconomy.
This mod is an addon that bridges two popular mods: EasyNPC (which lets you place and customize NPC characters) and MiguelEconomy (which adds an in-game currency system). Together they let players walk up to an NPC, open a shop, and buy or sell items using coins — no command blocks, no complicated setup.
What This Mod Does
- NPC Shops — Assign a shop to any EasyNPC character. Players can open it by right-clicking the NPC.
- Buy & Sell — Each item in a shop can be set to allow buying, selling, or both, each at its own price.
- Progression System — Players earn ranks as they play (based on money earned and job levels). Higher ranks unlock access to better shops and exclusive items.
- Shop Builder — Server operators can build and edit shops directly in-game through a visual menu, without touching any files.
- JSON Config — All shops and NPC assignments are stored in easy-to-read JSON files in the server's config folder, so advanced users can edit them directly if they prefer.
Requirements
| Mod |
Required? |
| Minecraft Forge 1.20.1 |
Yes |
| MiguelEconomy |
Yes (handles the currency) |
| EasyNPC |
Yes (provides the NPCs) |
How to Use
For Players
- Walk up to an NPC that has a shop assigned and right-click it.
- A shop window opens. Browse the items listed.
- Click Buy to purchase an item (coins are deducted from your balance) or Sell to turn items in your inventory into coins.
- Some items or shops are locked behind a rank. Open the Progression screen (available from the shop screen) to see your current rank and what you need to reach the next one.
For Server Operators — Setting Up a Shop
Option A: In-Game Shop Builder
- Use the
/shop create command (requires operator permission).
- The Shop Builder menu opens. Add items, set buy/sell prices, and save.
- Once saved, open the NPC binding config file and link the shop ID to the NPC's name or UUID.
Option B: JSON Files
- Start the server once — it will create the config folder at:
config/migueleconomy_easynpc/npc_shops/
- Each
.json file in that folder represents one NPC's shop. You can copy and edit example_npc.json as a starting point.
- Restart the server, or run
/shop reload, to apply changes.
Example NPC shop file:
{
"shops": [
{
"id": "basic_goods",
"title": "Basic Goods",
"description": "Everyday supplies.",
"requiredTier": "survivor",
"entries": [
{
"id": "bread",
"item": { "itemId": "minecraft:bread", "count": 1 },
"buyEnabled": true,
"sellEnabled": false,
"buyPrice": 10,
"sellPrice": 0,
"description": "A loaf of bread."
}
]
}
],
"npcBindings": [
{
"npcName": "Merchant",
"shopIds": ["basic_goods"]
}
]
}
Tip: You can match an NPC by name (npcName) or by their exact UUID (npcUuid). Using UUID is more reliable if multiple NPCs share the same name.
Progression Tiers
Players start at the Survivor rank. As they earn money and level up jobs through MiguelEconomy, they automatically advance through ranks. Each rank can unlock:
- Access to entire shops
- Individual items within a shop
The tier list and requirements are configured in:
config/migueleconomy_easynpc/progression.json
Commands
| Command |
Permission |
What it does |
/level |
Player |
Opens your progression screen so you can see your current tier and unlock path |
/shop create |
Operator |
Opens the in-game Shop Builder with a blank draft for a new shop |
/shop builder |
Operator |
Opens the in-game Shop Builder |
/shop builder open |
Operator |
Same as /shop builder; kept as a readable alias |
/shop reload |
Operator |
Reloads shop, NPC binding, progression, and economy config without restarting |
/shop debug |
Operator |
Shows shop/debug counts, detected EasyNPC entities, mapped NPCs, and economy adapter status |
/he shopbuilder |
Operator |
Legacy alias for opening the Shop Builder |
/he reloadshops |
Operator |
Legacy alias for /shop reload |
/he debugshop |
Operator |
Legacy alias for /shop debug |
/he settier <players> <tier> |
Operator |
Manually sets one or more players to a progression tier |
/shop create, /shop builder, /shop reload, /shop debug, and the /he admin commands require operator permission level 2.
Config Folder Layout
config/
└── migueleconomy_easynpc/
├── progression.json ← tier definitions and unlock requirements
└── npc_shops/
├── example_npc.json ← auto-generated sample, safe to delete
└── your_npc.json ← one file per NPC (or group of NPCs)
评论 0
登录后参与评分
还没有评论,来抢沙发吧