Document NPC supply chains

This commit is contained in:
CoalGov Deploy
2026-05-06 02:41:54 +00:00
parent cf0a71f900
commit 6ec7e1f0f4
2 changed files with 51 additions and 1 deletions

View File

@@ -1,9 +1,30 @@
====== NPC Supply Chains ======
CoalGov NPCs use Citizens and are managed with:
CoalGov NPCs use Citizens. They are server-side entities, so players do not need client mods.
NPCs are managed with:
/cgnpc
===== NPC Types =====
* Trader - stores goods, has a coal account, and can haggle with players.
* Worker - patrols an assigned NPC zone and performs configured labor.
Workers and traders have their own persisted CoalGov inventories. Supply chains move items between those inventories before goods reach players.
===== Zones =====
NPCs work inside polygon zones. Use the claim wand to mark points around the work area:
/claim wand
/cgnpc zone create <name>
Create NPCs while standing where they should spawn:
/cgnpc create worker <name> <zone>
/cgnpc create trader <name> <zone>
===== Farm-To-Market Example =====
Select a polygon around the farm with ''/claim wand'', then create an NPC zone:
@@ -30,6 +51,34 @@ Example player trade:
/cgnpc list
/cgnpc haggle <traderId> buy BREAD 8 8
===== Farm Workers =====
Farm workers use real world blocks. They scan their NPC zone for mature crops, walk to the crop, harvest it, collect the drops into NPC inventory, and replant if they have the correct seed or crop item.
Default supported crops:
* WHEAT, replanted with WHEAT_SEEDS
* CARROTS, replanted with CARROT
* POTATOES, replanted with POTATO
* BEETROOTS, replanted with BEETROOT_SEEDS
If a worker cannot replant, check its inventory and seed stock:
/cgnpc stock <id> WHEAT_SEEDS 64
===== Traders =====
Traders sell from their own inventory. Workers in the same zone can stock traders automatically up to the configured restock target.
Players haggle with:
/cgnpc haggle <id> buy <material> <amount> <offer>
Admins can add starting goods or coal:
/cgnpc stock <id> BREAD 64
/cgnpc funds <id> 100
===== Configuration =====
Worker roles are matched by NPC name under ''npc.worker.roles''. For example, an NPC named ''Farmer Joe'' uses the ''farmer'' role.