Wars stop being isolated 1-v-1 grudges. Each pair of nearby realms carries an
attitude that drifts over time, crystallising into alliances / non-aggression
pacts / rivalries. Allies don't fight and join each other's wars (coalitions),
and wars end in real peace treaties. Extends the Step-5 conflict subsystem
in place (same stepConflict tick, same war RNG), saved v22 + snapshotted.
- PlanetTypes.hpp: DiploKind + DiploTie {a,b capital indices, attitude, truceUntil,
kind}; diplo* config knobs; WeatherSnapshot carries diplomacy.
- PlanetConflict.cpp: a diplomacy pass in stepConflict (revolts -> prosecute ->
diplomacy -> declare). Attitude drifts from culture/faith affinity + a war
penalty + truce recovery + per-pair noise; reclassified by threshold with
hysteresis (kind-6 events on change). War-declare skips allied/non-aggression/
truced pairs; hostility now rises as attitude falls (rivals fight); a defender's
allies join by declaring their own war on the aggressor; a war end sets a truce
+ grudge. diploBetween/realmsAllied helpers.
- Save v22 + step-back: allegiance/wars block joined by a diplomacy block (new
hasDiplo readState param + per-frame history block); captureWeather/restoreWeather
carry the ties.
- Render: green alliance / dark-red rivalry great-circle arcs over the Territory
view (P), per-realm ally/rival counts + active-wars list in the Realms tab, a
cell-info allies/rivals line, kind-6 events (= icon).
- test_diplomacy.cpp: alliances/rivalries form, allies never war, coalitions form,
truces after peace, determinism, RNG isolation, save-v22 + snapshot round-trip.
All 14 suites green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
No description provided
Languages
C++
99.6%
CMake
0.4%