Simulate comfort levels and discomfort distribution
planned
Space Haven Planner
User feedback:
> Ah, this was the first half my dream!
> The second half is that it would simulate the comfort levels!
>
> Or if just the precise rules of discomfort distribution would be posted somewhere.
> I tried to make experiments how much 1 wall or 1 wall + 1 empty cell protect from discomfort, and the results contradicted each other...
---
## Investigation: Comfort Mechanics in Space Haven
### Official Mechanics
- The comfort system is divided into three categories: Work,Leisure, andSleep. Each tile has a comfort value in each of these three.
- Facilities generate positive comfortfor some categories, andnegative comfortfor others. E.g., arcade machines give leisure comfort but might negatively affect sleep (noise).
- Positive comfort no longer decays with distance(since Alpha 14). Negative comfortdoeshave fall-off with distance.
### Role of Walls, Empty Cells & "Bleeding"
- Walls and doors reduce(but don't fully block) the spread of negative comfort.
- Buffer space behind walls helps substantially—even 1 tile of empty space makes a difference.
- Multiple negative sources (industry, generators) stack their debuffs, overwhelming thin walls.
### What's Known vs. Unclear
| Aspect | Known | Unclear |
|---|---|---|
| Facility comfort values | Many documented in wiki/patch notes (Alpha 14+) | Some items not well tested; specific fall-off distances vary |
| Wall buffering | Walls reduce spread; empty tiles help | Exact attenuation amounts (how many tiles needed?) |
| Empty cells vs walls | Buffer space helps more than walls alone | Is 1 tile gap sufficient, or 2-3 needed? |
| Multiple negative sources | Negative comfort stacks | Linear vs exponential decay; overlapping radius behavior |
### Common Contradictions Explained
- Wrong overlay view: Work/Leisure/Sleep are separate—check the right one
- Hidden negative sources: Generators outside walls still bleed through
- Dual-purpose items: Jukeboxes help leisure but hurt sleep if too close
---
## Implementation Notes
### Data Sources
The game's
spacehaven.jar
contains structure definitions in library/haven
XML, but comfort/discomfort values are not currently parsed
by our JAR converter. We'd need to:- Extend the JAR parserto extract comfort-related attributes from structure definitions (likelyenvEffect,comfort, or similar XML elements)
- Reverse-engineer propagation rulesthrough community testing or game code analysis
- Build a heatmap overlaythat renders comfort values per tile
### Technical Approach
ComfortSystem:
- Parse comfort emitter data from JAR (positive/negative values, radius)
- Implement propagation algorithm:
- Positive: flat value, no distance decay
- Negative: distance decay + wall attenuation
- Render as color-coded overlay (green=high comfort, red=discomfort)
- Toggle between Work/Leisure/Sleep modes
### Open Questions
- What XML attributes in the JAR define comfort values?
- What's the exact wall attenuation formula?
- How do multiple overlapping sources combine?
---
Effort:
8 (requires JAR parser extension + propagation algorithm + rendering)Impact:
4 (high user value for ship optimization)Space Haven Planner
## Initial Investigation Summary
Researched how Space Haven's comfort system works:
Key findings:
- 3 comfort modes: Work, Leisure, Sleep (separate overlays)
- Positive comfort: flat value, no distance decay (since Alpha 14)
- Negative comfort: decays with distance, partially blocked by walls
- Walls reduce but don't fully block discomfort—buffer space helps
Why results seem contradictory:
- You might be viewing the wrong comfort overlay (Work vs Sleep)
- Negative sources outside walls still bleed through
- Wall attenuation formula isn't publicly documented
To implement this feature, we'd need to:
- Extend JAR parser to extract comfort values from structure definitions
- Reverse-engineer propagation rules (or get community help testing)
- Build a heatmap overlay with Work/Leisure/Sleep toggle
Estimate:
Impact 4, Effort 8Space Haven Planner
marked this post as
planned