-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
The upstream IlyaChichkov/RIMAPI mod exposes a read-only REST API on localhost:8765. RLE agents need to act — pause/unpause the game, assign jobs, draft colonists, place blueprints, set research targets. This requires forking the mod and adding write endpoints.
Required Write Endpoints (Core 8)
These are blocking for the turn-based game loop:
| Endpoint | Method | Purpose |
|---|---|---|
/game/pause |
POST | Pause game (start of each tick) |
/game/unpause |
POST | Resume game (end of each tick) |
/colonists/{id}/job |
POST | Assign a colonist to a specific job |
/colonists/{id}/draft |
POST | Draft/undraft a colonist for combat |
/colonists/{id}/priorities |
POST | Set work type priorities |
/blueprints |
POST | Place a building blueprint |
/designations/{id} |
DELETE | Cancel a blueprint/designation |
/research/target |
POST | Set the active research project |
Additional Endpoints (Full Coverage)
For all 16 agent action types to work:
| Endpoint | Method | Purpose | Agent |
|---|---|---|---|
/colonists/{id}/move |
POST | Move/reposition a colonist | DefenseCommander |
/colonists/{id}/haul |
POST | Create a haul job | ResourceManager |
/zones/growing |
POST | Create/modify growing zone | ResourceManager |
/power/toggle |
POST | Toggle power on a building | ResourceManager |
/colonists/{id}/research |
POST | Assign colonist as researcher | ResearchDirector |
/colonists/{id}/recreation |
POST | Set recreation schedule | SocialOverseer |
/colonists/{id}/social |
POST | Assign joy activity | SocialOverseer |
/colonists/{id}/bed-rest |
POST | Assign to medical bed | MedicalOfficer |
/medical/administer |
POST | Doctor tends patient | MedicalOfficer |
Technical Notes
- The upstream mod uses a producer-consumer queue pattern: HTTP requests arrive on a background thread, get enqueued, and are processed on Unity's main thread via
Update(). Write endpoints inherit this thread safety. - The Python side currently mocks all write responses in tests, so the C# fork can be developed in parallel.
- The Python client (
src/rle/rimapi/client.py) already has 7 stubbed write methods raisingNotImplementedError— ready to wire up once the mod is forked.
Approach
- Fork
IlyaChichkov/RIMAPI - Add an RLE-specific controller with the endpoints above
- Use existing upstream services where possible (game speed, pawn edit, builder)
- Add new Harmony patches / RimWorld API calls for novel operations (research target, growing zones, medical)
- Test in-game with curl / Python test script
Related
- Python integration work: tracked in Implement RIMAPI write methods and wire all 16 action types #2
- Implementation plan:
logical-swinging-popcorn.mdin this repo
@CalebisGross — wanted to discuss approach and priority on this. This is the main blocker before we can do live testing (Phase 6). The Python side works fully with mocks through Phase 5, so this can be developed in parallel. What are your thoughts on timeline and who should own the C# work?
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels