Update all docs: README, AI_KNOWLEDGE_BASE, MOD_DEV_GUIDE, batch_example, SKILL

This commit is contained in:
JianFeeeee
2026-05-30 12:51:05 +08:00
parent 3d70338087
commit 21423a6bb4
4 changed files with 367 additions and 824 deletions

View File

@ -1,268 +1,189 @@
# ONI Knowledge Base — AI Reference
# ONI AI Knowledge Base — 建筑/元素/科技/机制参考
This file aggregates all building IDs, element IDs, tech IDs, and their semantic metadata
in one structured document. The AI uses this to understand what each entity means and
how to reason about the game.
AI Agent 查询用参考手册。所有 buildingId 可通过 `/api/registry/buildings` 动态查询。
## Coordinate System
## 坐标系
ONI uses a 2D grid. The origin (0,0) is at the **bottom-left** of the map.
- x increases to the right
- y increases upward
- Each cell is 1x1 tile
- Buildings may occupy multiple cells (width x height); the (x,y) is the **bottom-left anchor**
- World size varies by asteroid (default ~256x384 cells)
- 原点 (0,0) = 地图**左下角**,x→右,y→上
- 建筑坐标 = 左下角锚点 (width × height)
- 默认地图大小:256×384
When the AI wants to reference a location:
- Use absolute (x,y) coordinates
- For regions: (x, y, width, height)
- For buildings: reference the bottom-left cell of the building
- For movement: "at (x,y)" or "from (x1,y1) to (x2,y2)"
## 建筑数据库
## Building Categories
### 氧气
| ID | 尺寸 | 材料 | 耗电(W) | 功能 |
|----|------|------|---------|------|
| Electrolyzer | 2×2 | Metal | 120 | 水→O₂+H₂ (1kg/s水) |
| OxygenDiffuser | 2×2 | Metal | 120 | 藻类→O₂ (早期) |
| Deodorizer | 1×2 | Metal | 0 | 污染氧→氧气 (需过滤介质) |
| AlgaeDistillery | 3×4 | Metal | 120 | 藻泥→藻类 |
| AlgaeHabitat | 1×2 | Farmable | 0 | 藻类养殖 |
| Category | Purpose | Examples |
|------------|----------------------------------------|---------------------------------------------------|
| Base | Structure, storage, doors, ladders | Tile, Ladder, StorageBin, InsulatedTile, Door |
| Oxygen | Oxygen production, gas cleaning | Electrolyzer, OxygenDiffuser, Deodorizer |
| Power | Power generation, storage, wiring | CoalGenerator, HydrogenGenerator, Battery |
| Food | Food production, cooking, ranching | PlanterBox, ElectricGrill, MicrobeMusher, Ranch |
| Plumbing | Liquid handling, hygiene | LiquidPump, Lavatory, WaterSiever, Shower |
| Ventilation| Gas handling | GasPump, GasFilter, GasVent |
| Refinement | Material processing | MetalRefinery, RockCrusher, Kiln, Compost |
| Medicine | Health, disease treatment | Apothecary, MassageTable, SickBay |
| Furniture | Decor, morale, stress relief | Cot, MessTable, ArcadeCabinet, FlowerPot |
| Stations | Research, suit docks, crafting | ResearchStation, SuperComputer, AtmoSuitDock |
| Utilities | Temperature management | ThermoAquatuner, SpaceHeater, TempshiftPlate |
| Automation | Logic circuits, sensors | AND Gate, AtmoSensor, AutomationWire |
| Shipping | Conveyor systems | ConveyorLoader, ConveyorRail, SolidFilter |
### 电力
| ID | 尺寸 | 材料 | 发电(W) | 燃料 |
|----|------|------|---------|------|
| ManualGenerator | 2×2 | Metal | 400 | 人力 |
| CoalGenerator | 2×2 | Metal | 600 | 煤 |
| HydrogenGenerator | 2×2 | Metal | 800 | 氢 |
| NaturalGasGenerator | 2×2 | Metal | 800 | 天然气 |
| PetroleumGenerator | 3×2 | Metal | 2000 | 石油 |
| SteamTurbine | 4×2 | Metal | 850 | 蒸汽(热删除) |
| SolarPanel | 2×1 | Metal | 380 | 光照 |
| Battery | 1×1 | Metal | 0 | 储电 10kJ |
| JumboBattery | 2×1 | Metal | 0 | 储电 40kJ |
| Transformer | 2×1 | Metal | 0 | 电路分离 |
## Key Building IDs (frequently used by AI)
### 管道/通风
| ID | 尺寸 | 材料 | 耗电 | 功能 |
|----|------|------|------|------|
| GasPump | 1×2 | Metal | 240W | 抽气 |
| GasFilter | 1×2 | Metal | 120W | 气体分离 |
| GasVent | 1×1 | Metal | 0 | 排气口 |
| LiquidPump | 1×2 | Metal | 240W | 抽液 |
| LiquidFilter | 1×2 | Metal | 120W | 液体分离 |
| LiquidVent | 1×1 | Metal | 0 | 排水口 |
| WaterPurifier | 2×2 | Metal | 120W | 污水→清水 |
```
# Oxygen production
Electrolyzer -> Produces O2 + H2 from water (needs 1kg/s water)
OxygenDiffuser -> Produces O2 from algae (early game)
Deodorizer -> Converts PollutedOxygen to Oxygen (needs filtration medium)
### 食物/农业
| ID | 尺寸 | 材料 | 功能 |
|----|------|------|------|
| PlanterBox | 1×1 | BuildableRaw | 种植(需泥土) |
| FarmTile | 1×1 | BuildableRaw | 种植(需灌溉) |
| HydroponicFarmTile | 1×2 | Metal | 液培(需液体管道) |
| StorageLocker | 1×1 | BuildableRaw | 储物 |
| RationBox | 2×2 | BuildableRaw | 储食(CO₂防腐) |
| Refrigerator | 1×2 | Metal | 冷藏(耗电) |
| ElectricGrill | 2×2 | Metal | 烹饪 |
| MicrobeMusher | 2×2 | BuildableRaw | 初期制食 |
# Power
ManualGenerator -> 400W, duplicant powered
CoalGenerator -> 600W, consumes Coal
HydrogenGenerator -> 800W, consumes H2
NaturalGasGenerator-> 800W, consumes NaturalGas
PetroleumGenerator -> 2000W, consumes Petroleum
SteamTurbine -> Extracts heat from steam, produces power
SolarPanel -> 380W max, needs light
WoodBurner -> 300W, consumes Lumber
### 卫生
| ID | 尺寸 | 材料 | 功能 |
|----|------|------|------|
| Outhouse | 1×2 | BuildableRaw | 初期厕所(需清理) |
| WashBasin | 1×1 | BuildableRaw | 洗手(需水) |
| Lavatory | 1×2 | Metal | 抽水马桶(需水管) |
| WashSink | 1×1 | Metal | 自动洗手(需水管) |
| Shower | 2×1 | Metal | 淋浴(士气) |
# Power storage
Battery -> 10kJ storage, small
JumboBattery -> 40kJ storage
SmartBattery -> 20kJ storage, automation output
### 基地
| ID | 尺寸 | 材料 | 功能 |
|----|------|------|------|
| Tile | 1×1 | BuildableRaw | 地板/墙 |
| InsulationTile | 1×1 | BuildableRaw | 隔热 |
| Ladder | 1×1 | BuildableRaw | 攀爬 |
| FirePole | 1×1 | Metal | 速降 |
| PneumaticDoor | 1×2 | Metal | 自动门 |
| ManualDoor | 1×2 | BuildableRaw | 手动门 |
| Cot | 1×1 | BuildableRaw | 床 |
| ResearchStation | 2×2 | BuildableRaw | 初级科研(60W) |
| SuperComputer | 2×2 | Plastic | 高级科研(120W) |
| TriageCot | 1×2 | BuildableRaw | 医疗床 |
# Food
PlanterBox -> Grows plants, needs dupe delivery
FarmTile -> Grows plants with irrigation
HydroponicFarm -> Grows plants with automatic irrigation
ElectricGrill -> Cooks food (better quality)
MicrobeMusher -> Makes basic mush bars from water + dirt
GasRange -> Advanced cooking with gas
Refrigerator -> Stores food, slows decay
### 精炼
| ID | 尺寸 | 材料 | 功能 |
|----|------|------|------|
| MetalRefinery | 3×2 | Metal | 精炼金属(1200W) |
| RockCrusher | 2×2 | BuildableRaw | 碎矿 |
| Kiln | 1×2 | BuildableRaw | 烧陶瓷/玻璃 |
| PolymerPress | 2×3 | Metal | 石油→塑料(240W) |
| OilRefinery | 3×2 | Metal | 石油→天然气+石油 |
| Compost | 2×2 | BuildableRaw | 污染土→泥土 |
# Plumbing
LiquidPump -> Pumps liquids (240kg/s)
Lavatory -> Produces PollutedWater from dupe use
WaterSiever -> Filters PollutedWater -> Water
Desalinator -> Removes salt from SaltWater/Brine
LiquidVent -> Outputs liquid into world
### 温度控制
| ID | 尺寸 | 材料 | 功能 |
|----|------|------|------|
| Aquatuner | 1×2 | RefinedMetal | 液冷(1200W) |
| SpaceHeater | 1×1 | Metal | 加热(120W) |
| IceFan | 2×1 | BuildableRaw | 降温(耗冰) |
| IceKettle | 1×2 | BuildableRaw | 冰→水 |
| TempshiftPlate | 1×1 | BuildableRaw | 导热板 |
# Ventilation
GasPump -> Pumps gases (500g/s)
GasFilter -> Filters specific gas from mixed pipes
GasVent -> Outputs gas into world
HighPressureGasVent-> 20kg/tile max pressure
### 动物/养殖
| ID | 尺寸 | 材料 | 功能 |
|----|------|------|------|
| RanchStation | 2×2 | BuildableRaw | 养殖站 |
| Incubator | 2×2 | BuildableRaw | 孵化器 |
| CritterFeeder | 1×2 | BuildableRaw | 投喂器 |
| CritterTrap | 1×1 | Metal | 陷阱 |
# Refinement
MetalRefinery -> Refines metal ores into refined metals
RockCrusher -> Crushes rock into sand/power
Kiln -> Burns clay -> ceramic
GlassForge -> Makes glass from sand
Compost -> Converts polluted dirt into dirt
## 材料类别映射
# Base
Tile -> Standard tile, 2 tiles high
Ladder -> Allows vertical movement
InsulatedTile -> Reduces heat transfer (best insulation)
ManualAirlock -> Manual door
PneumaticDoor -> Auto door, lets gas pass
MechanizedAirlock -> Auto door, seals gas/liquid
StorageBin -> Stores solid resources
LiquidReservoir -> Stores 5t of liquid
GasReservoir -> Stores 150kg of gas
| 类别 | 包含元素 | 来源 |
|------|---------|------|
| BuildableRaw | SandStone, Granite, IgneousRock, SedimentaryRock, Obsidian, MaficRock | 挖掘 |
| Metal | Cuprite, IronOre, GoldAmalgam, Wolframite, Cobaltite | 挖掘 |
| RefinedMetal | Copper, Iron, Gold, Steel, Tungsten | 精炼 |
| Plastic | Polypropylene | 聚合压机制造 |
| Glass | MoltenGlass→Glass | 窑炉 |
| BuildingFiber | ReedFiber | 耕种 |
| Transparent | Diamond, Glass | 挖掘/制造 |
| Farmable | Dirt | 挖掘/堆肥 |
# Temperature
ThermoAquatuner -> Cools liquid piped through it (needs steam room)
ThermoRegulator -> Cools gas piped through it
SpaceHeater -> Heats area (inefficient)
LiquidTepidizer -> Heats liquid (up to 85C)
TempshiftPlate -> Distributes heat evenly
## 元素属性参考
# Stations
ResearchStation -> Basic research (needs dirt)
SuperComputer -> Advanced research (needs plastic)
AtmoSuitDock -> Stores atmo suit
GroomingStation -> Grooms critters for happiness/eggs
RanchStation -> Ranching skill station
FarmStation -> Improves farm yield (needs fertilizer)
PowerControlStation-> Improves generator efficiency
| 元素 | 比热容(J/g·K) | 导热(W/m·K) | 熔点(°C) |
|------|--------------|-------------|---------|
| SandStone | 0.800 | 2.000 | - |
| Granite | 0.790 | 3.390 | - |
| IgneousRock | 1.000 | 2.000 | - |
| SedimentaryRock | 0.200 | 2.000 | - |
| Cuprite | 0.600 | 4.500 | - |
| IronOre | 0.440 | 4.000 | - |
| GoldAmalgam | 0.240 | 2.000 | - |
| Water | 4.179 | 0.609 | 0/100 |
| PollutedWater | 4.179 | 0.580 | -0.65/100 |
| Oxygen | 1.005 | 0.024 | -183/-183 |
| Hydrogen | 8.640 | 0.168 | -252/-252 |
| CarbonDioxide | 0.846 | 0.015 | 0/-78 |
| CrudeOil | 1.690 | 2.000 | -40/400 |
# Medicine
MassageTable -> Reduces stress
SickBay -> Cures diseases
TriageCot -> Heals physical damage
Apothecary -> Produces medicine
## 科技树 (常用)
# Automation (common items)
AtmoSensor -> Senses gas pressure
ThermoSensor -> Senses temperature
HydroSensor -> Senses liquid pressure
GasElementSensor -> Senses specific gas type
AND Gate, NOT Gate, FILTER Gate, BUFFER Gate
```
| Tech ID | 名称 | 前置 | 解锁 |
|---------|------|------|------|
| FarmingTech | 农业技术 | - | PlanterBox, FarmTile |
| PowerRegulation | 电力调节 | - | Transformer, HeavyWire |
| Plumbing | 管道 | - | Lavatory, WaterPurifier |
| Ventilation | 通风 | - | GasPump, GasFilter |
| Refinement | 精炼 | - | MetalRefinery, RockCrusher |
| TemperatureModulation | 调温 | - | Aquatuner, SteamTurbine |
| SmartStorage | 智能存储 | - | SmartStorageBin |
| AdvancedPowerRegulation | 高级电力 | PowerRegulation | PowerTransformer |
| LiquidPiping | 液体管道 | Plumbing | LiquidPump, LiquidFilter |
| GasPiping | 气体管道 | Ventilation | GasValve |
| FineDining | 精致餐饮 | FarmingTech | ElectricGrill |
| AnimalControl | 动物控制 | - | CritterTraps |
| Ranching | 畜牧 | AnimalControl | RanchStation |
## Key Element IDs (resources)
## 房间系统
```
# Critical survival
Oxygen -> Breathable gas (needed by dupes)
Water -> Essential for farming, electrolysis, life support
Dirt -> Used in research (early) and farming
Algae -> Consumed by OxygenDiffuser
| 房间 | 要求 | 加成 |
|------|------|------|
| Bedroom(卧室) | 4×床, 封闭 | +1士气 |
| Washroom(卫生间) | 洗手盆+马桶, 封闭 | +1士气 |
| MessHall(餐厅) | 餐桌+配给盒, 封闭 | +2士气 |
| GreatHall(大堂) | 装饰+餐桌+配给盒 | +4士气 |
| Greenhouse(温室) | 种植+光照, 封闭 | 植物生长+50% |
| Hospital(医院) | 医疗床+医生, 封闭 | 治疗加速 |
| Ranch(畜舍) | 养殖站+喂食器 | 动物繁殖加速 |
| PowerPlant(电站) | 发电机×2+电池 | 发电效率+10% |
# Food chain
Calories -> Aggregate food energy for colony
MealLice -> Basic food from mealwood plants
BristleBerry -> Mid-tier food from bristle blossom
Mushroom -> Food from dusk cap (needs CO2 + slime)
RawEgg -> Egg for cooking
Meat -> From ranching
## 电路规则
# Power chain
Coal -> Burned in CoalGenerator
Hydrogen -> Burned in HydrogenGenerator
NaturalGas -> Burned in NaturalGasGenerator
Petroleum -> Burned in PetroleumGenerator
CrudeOil -> Can be refined to Petroleum
- 普通电线最大负载:1000W
- 重导线(Wire) 最大负载:2000W
- 超过负载 → 过载损坏 → 复制人维修
- 使用变压器(Transformer)将重导线电路分成普通导线子电路
- 智能电池可连接自动化电路控制发电机启停
# Construction metals
CopperOre -> Early building material
IronOre -> Mid building material
GoldAmalgam -> High corrosion resistance
Wolframite -> Very high melting point (tungsten source)
Steel -> Strong, high melting point (refined)
RefinedIron -> Mid refined metal
Plastic -> Advanced material (from polymer press or dreckos)
Ceramic -> Best insulation material
## 紧急阈值
# Water / liquids
SaltWater -> Can be desalinated to Water
Brine -> Can be desalinated (more salt per water)
PollutedWater -> Can be filtered to Water (also used by reed fiber)
CrudeOil -> Pumped from oil biome
Petroleum -> Refined from oil (cooking or refinery)
Lumber -> From arbor trees, burned in wood burner
Ethanol -> From lumber, burned in petroleum generator
# Gas handling
PollutedOxygen -> Can be deodorized to Oxygen
CarbonDioxide -> Sinks to bottom, used by mushrooms/soda fountain
ChlorineGas -> Disinfects, used by balm lily
SourGas -> Can be cooled to methane + sulfur
# Rare / advanced
Niobium -> End-game space material
Thermium -> Best heat conductor (space material)
Isoresin -> Used for insulation (space material)
ViscoGel -> Non-mixing liquid (space material)
Radium -> Radioactive, spaced out DLC
```
## Research Tech Tree (simplified path)
```
Tier 0 (start): FarmingTech, PowerRegulation, Plumbing, Ventilation
Tier 1: FoodPreparation (-> ElectricGrill, MicrobeMusher)
InteriorDecor (-> Cot, FlowerPot, various decor)
AdvancedPowerRegulation (-> SmartBattery, PowerTransformer)
LiquidPiping (-> LiquidPump, WaterSiever, Desalinator)
GasPiping (-> GasPump, GasFilter)
FineDining (-> GasRange, Refrigerator)
Tier 2: ImprovedOxygen (-> Electrolyzer)
RefinedObjects (-> MetalRefinery, RockCrusher)
TemperatureModulation (-> ThermoAquatuner, ThermoRegulator)
Ranching (-> GroomingStation, Incubator)
SmartStorage (-> LiquidReservoir, GasReservoir)
Automation (-> first automation buildings)
Tier 3: HighTemperatureForging (-> Steel)
SpaceProgram (-> telescope, rocket platform)
CryoFuelPropulsion (-> hydrogen rocket engine)
Tier 4: MaterialsScience (-> SuperCoolant, ViscoGel)
```
## Building Size Reference (width x height)
```
1x1: Wire, GasPipe, LiquidPipe, AutomationWire, Switch, Sensor
1x2: ManualGenerator, Battery, PlanterBox, FarmTile, RationBox
2x1: GasFilter, LiquidFilter, Incubator, Jukebot
2x2: CoalGenerator, HydrogenGenerator, OxygenDiffuser, Electrolyzer,
GasPump, LiquidPump, AlgaeTerrarium, Deodorizer, WaterSiever,
ElectricGrill, MicrobeMusher, RockCrusher, Kiln, Compost,
MassageTable, Apothecary, ResearchStation, TextileLoom
2x3: MetalRefinery, PolymerPress, OilRefinery, AtmoSuitDock
2x4: Telescope, MolecularForge
3x1: LadderBed, DisplayShelf
3x2: ManualAirlock, PneumaticDoor, MechanizedAirlock, ConveyorLoader,
SmartStorageBin, LiquidReservoir, GasReservoir
3x3: Shower, Sauna, HotTub
3x4: SteamTurbine
4x2: SuperComputer, JumboBattery, StorageBin
4x4: SolarPanel
```
## Common Game Mechanics (AI reference)
### Gas/Liquid Physics
- Gases **layer by density**: CO2 (sinks) < O2 < PollutedO2 < NaturalGas < H2 (rises)
- Liquids **layer by density**: Petroleum < Water/SaltWater/Brine < CrudeOil < Mercury
- Pressure limit for gas vents: GasVent = 2kg/tile, HighPressureGasVent = 20kg/tile
- Buildings overheat above their overheat temperature (default 75C, some higher)
- Insulated Tile reduces heat transfer by ~100x
### Duplicant Needs
- Oxygen: need ~100g/s per dupe
- Food: need ~1000kcal/cycle per dupe
- Stress: > 50% starts causing problems, > 80% mental breaks
- Temperature: comfortable at 18-35C, hypothermia below 10C, hyperthermia above 40C
- Morale: affected by decor, food quality, room bonuses
### Room Types
- Latrine: Outhouse + WashBasin = +1 morale
- Washroom: Lavatory + Sink = +2 morale
- Barracks: Cot/LadderBed + 1 decor = +1 morale
- Bedroom: ComfyBed + 1 decor = +2 morale
- Mess Hall: MessTable + 1 decor = +3 morale
- Great Hall: MessTable + 2+ decor and recreation = +6 morale
- Park: 4+ wild/planted plants = +1 morale
- Nature Reserve: 12+ wild plants = +6 morale
- Stable: GroomingStation + CritterDropOff = ranching room
- Ranch: Incubator + feeder (spaced out)
### SPOM (Self-Powered Oxygen Module)
The classic Rodriguez SPOM:
- 1 Electrolyzer (consumes 1kg/s water -> 888g/s O2 + 112g/s H2)
- 2 GasPumps for O2 extraction
- 1 HydrogenGenerator (burns 100g/s H2, produces 800W)
- 1 GasFilter to separate H2 from O2
- Net power positive (runs on its own hydrogen)
- Standard size: 8x6 tiles
| 指标 | 警告 | 危险 | 应对 |
|------|------|------|------|
| O₂质量 | <2000kg | <500kg | 增加制氧 |
| 食物 | <500kkcal | <200kkcal | 增加农场 |
| 水 | <20000kg | <5000kg | 找水源/净化 |
| 温度 | >35°C | >50°C | 隔热+冷却 |
| CO₂ | 可见积聚 | >2kg/tile | 挖排气管 |
| 藻类 | <2000kg | <500kg | 转电解器 |
| 煤 | <5000kg | <1000kg | 找煤矿/换发电 |