111 lines
4.4 KiB
Markdown
111 lines
4.4 KiB
Markdown
---
|
||
name: oni_agent
|
||
description: "Oxygen Not Included 完全游戏操控 — REST API + CLI 工具链,含分阶段目标/材料系统/可达性/建筑数据库"
|
||
version: "2.1.0"
|
||
---
|
||
|
||
# ONI Agent Skill — 缺氧 AI 完全操控
|
||
|
||
通过 `tools/oni_api.py` CLI + Mod HTTP API 完全控制游戏。**每次决策前必须先 pause**,所有操作自动拉视角到坐标。
|
||
|
||
## 一、坐标系与格子
|
||
|
||
- (0,0)=左下角,x→右,y→上,典型地图 256×384
|
||
- 建筑坐标=左下角锚点
|
||
- 通过 `cell <x> <y>` 查看格子:element / massKg / temperatureC / isSolid / isLiquid / isGas / isDiggable / hasBuilding / hasDuplicant
|
||
- `explore <x> <y> <w> <h>` AI友好区域摘要
|
||
- 可达性:复制人只能在开放空间移动,固体阻挡需挖掘,液体/气体不阻挡
|
||
- 梯子(Ladder)提供垂直移动,砖块(Tile)提供地面
|
||
|
||
## 二、材料系统
|
||
|
||
建筑需要特定类别材料:
|
||
- **BuildableRaw** = SandStone, Granite, IgneousRock, Obsidian (挖掘获得)
|
||
- **Metal** = Cuprite, IronOre, GoldAmalgam, Wolframite (挖掘→精炼)
|
||
- **RefinedMetal** = Copper, Iron, Gold, Steel (精炼生产)
|
||
- **Plastic** = Polypropylene (聚合压机制造)
|
||
- **Glass** = Glass (窑炉烧制)
|
||
- **Farmable** = Dirt (挖掘/堆肥)
|
||
|
||
AI 必须检查世界库存中哪些元素满足建筑的材料类别,选择存量最多的。
|
||
|
||
## 三、分阶段目标
|
||
|
||
### Phase 1 (Cycle 1-20): 生存基础
|
||
- **氧气**: OxygenDiffuser(藻类) 或 Electrolyzer(水→O₂+H₂)
|
||
- **电力**: ManualGenerator → [研究PowerRegulation] → CoalGenerator
|
||
- **食物**: PlanterBox×3-5 种 Mealwood (消耗Dirt)
|
||
- **卫生**: Outhouse + WashBasin → [研究Plumbing] → Lavatory循环
|
||
- **科研**: ResearchStation → FarmingTech先 → PowerRegulation → Plumbing
|
||
- **执行**: `dig` 挖空间 → `build IDs` 建造 → `research_select ID` 研究
|
||
|
||
### Phase 2 (Cycle 20-100): 自持系统
|
||
- **SPOM**: Electrolyzer+H₂发电机 → 无限O₂+部分电 (`oni_builder.py build spom`)
|
||
- **厕所循环**: Lavatory→WaterPurifier→Lavatory (`oni_builder.py build toilet_loop`)
|
||
- **电力升级**: 变压器(Transformer)防过载 + CoalGenerator
|
||
- **隔热**: InsulationTile 包围基地
|
||
- **养殖**: RanchStation + Incubator (哈奇哈奇产煤+食物)
|
||
|
||
### Phase 3 (Cycle 100+): 自动化
|
||
- 液冷模块 Aquatuner+SteamTurbine
|
||
- 石油/天然气发电
|
||
- 喷泉开发
|
||
- 太空探索
|
||
|
||
## 四、关键建筑ID速查
|
||
|
||
| ID | 尺寸 | 材料 | 耗电 | 用途 |
|
||
|----|------|------|------|------|
|
||
| ManualGenerator | 2×2 | Metal | -400W | 人力发电 |
|
||
| CoalGenerator | 2×2 | Metal | -600W | 燃煤发电 |
|
||
| HydrogenGenerator | 2×2 | Metal | -800W | 燃氢发电 |
|
||
| Electrolyzer | 2×2 | Metal | +120W | 水→O₂+H₂ |
|
||
| GasPump | 1×2 | Metal | +240W | 抽气 |
|
||
| WaterPurifier | 2×2 | Metal | +120W | 污水净化 |
|
||
| PlanterBox | 1×1 | BuildableRaw | 0 | 种植 |
|
||
| StorageLocker | 1×1 | BuildableRaw | 0 | 储存 |
|
||
| RationBox | 2×2 | BuildableRaw | 0 | 储食 |
|
||
| Tile | 1×1 | BuildableRaw | 0 | 地板 |
|
||
| InsulationTile | 1×1 | BuildableRaw | 0 | 隔热墙 |
|
||
| Ladder | 1×1 | BuildableRaw | 0 | 梯子 |
|
||
| PneumaticDoor | 1×2 | Metal | 0 | 门 |
|
||
| Battery | 1×1 | Metal | 0 | 电池 |
|
||
| Transformer | 2×1 | Metal | 0 | 变压器 |
|
||
| ResearchStation | 2×2 | BuildableRaw | +60W | 初级科研 |
|
||
| SteamTurbine | 4×2 | Metal | -850W | 热删除+发电 |
|
||
| Aquatuner | 1×2 | RefinedMetal | +1200W | 液冷 |
|
||
| Cot | 1×1 | BuildableRaw | 0 | 床 |
|
||
|
||
## 五、标准操作流程
|
||
|
||
```
|
||
1. pause "原因" ← 必须暂停
|
||
2. status / resources / events ← 感知
|
||
3. explore / cell ← 验证坐标
|
||
4. dig → build / deconstruct ← 执行(自动拉视角)
|
||
5. events ← 检查结果
|
||
6. unpause 1 ← 恢复
|
||
```
|
||
|
||
**紧急响应**: O₂<500→emergency_o2 | 食物<200k→建农场 | CO₂多→fix_co2 | 电力过载→fix_overload
|
||
|
||
## 六、工具速查
|
||
|
||
```bash
|
||
# 监控
|
||
oni_api.py status | resources | events | events N
|
||
oni_api.py explore x y w h | cell x y | cells x y w h | gas x y r
|
||
oni_api.py registry buildings [filter]
|
||
|
||
# 操作(自动拉视角)
|
||
oni_api.py pause "r" | unpause [speed]
|
||
oni_api.py dig x y w h | build id x y | deconstruct x y
|
||
oni_api.py prioritize x y 1-9 | research_select id | batch file
|
||
oni_api.py camera x y [zoom] | save [name]
|
||
|
||
# 分析
|
||
oni_analyzer.py | oni_commander.py diagnose
|
||
oni_commander.py emergency_o2 | fix_co2 | fix_overload
|
||
oni_builder.py build spom/toilet_loop/bedroom x y
|
||
```
|