Factions & Teams¶
Two distinct social structures sometimes confused with each other:
- Faction — an NPC organization. You build standing with it through behavior; you do not "join" a faction. Affects mission access, pricing, territorial reception.
- Team — a cooperative alliance of player accounts. You explicitly create or are invited to one; affects shared resources, coordinated combat, and treasury access.
A player has standing with every NPC faction simultaneously and is a member of at most one team.
Factions (NPC)¶
The six designed factions¶
| Faction | Type | Theme |
|---|---|---|
| Terran Federation | Lawful Government | Order, security, prosperity |
| Mercantile Guild | Trade Consortium | Profit-neutral, infrastructure-heavy |
| Frontier Coalition | Independent Colonies | Anti-Federation autonomy |
| Astral Mining Consortium | Resource Corp | Monopolistic mining |
| Nova Scientific Institute | Research Org | Quantum/exotic tech focus |
| Fringe Alliance | Outlaw Coalition | Black market, smuggling |
A seventh hostile-only entity, Pirates, cannot be allied with — only attacked.
Reputation scale¶
Per-faction reputation runs −1000 to +1000, with trade-modifier thresholds and rivalry caps in services/faction_service.py.
| Threshold | Tier (code) | Trade modifier |
|---|---|---|
| ≥ +700 | EXALTED | ×0.85 (15% discount) |
| ≥ +500 | REVERED | ×0.90 |
| ≥ +300 | HONORED | ×0.95 |
| ≥ +100 | FRIENDLY | ×0.97 |
| −99 to +99 | NEUTRAL | ×1.00 |
| ≤ −299 | UNFRIENDLY | ×1.05 |
| ≤ −499 | HOSTILE | ×1.15 |
| ≤ −699 | HATED | ×1.30 |
| ≤ −700 | PUBLIC ENEMY | ×1.50 |
Rivalries¶
FACTION_RIVALRIES defines combined reputation caps:
- Terran Federation ↔ Fringe Alliance — combined max 800.
- Mercantile Guild ↔ Shadow Syndicate — combined max 600.
Gaining standing with one faction effectively caps how high you can climb with its rival.
🚧 Planned — additional rivalries (Frontier Coalition vs Astral Mining Consortium, Nova Scientific vs Astral Mining).
Faction missions¶
models/faction.py:FactionMission — combat / trade / exploration / diplomatic mission types with reputation rewards (+10 to +50 typical) and credit rewards. Mission availability gates on reputation tier.
🚧 Partial — mission generation, acceptance, and tracking exist as models and API endpoints (api/routes/factions.py) but the full procedural mission pipeline (board UI, deadline enforcement, mission chains) is design-stage.
Territory & influence¶
Design includes per-sector faction influence percentages (SectorFactionInfluence) and patrol spawn weighting. The model exists; gameplay loops that read it (e.g. dynamic patrols, NPC behavior) are 🚧 Planned.
Source map¶
| Topic | Path |
|---|---|
| Faction service & rivalries | services/gameserver/src/services/faction_service.py |
| Faction model | services/gameserver/src/models/faction.py |
| Reputation model | services/gameserver/src/models/reputation.py |
| API routes | services/gameserver/src/api/routes/factions.py |
Teams (player)¶
Creation and membership¶
- Creation cost: 10,000 credits (
TEAM_CREATION_COSTinservices/team_service.py). - Default size cap: 4 members (
max_membersparameter — configurable per team; the canonical balance target is 4). - One team per player: enforced at creation and invite acceptance.
- 24-hour leave cooldown between teams (design).
Roles¶
models/team_member.py:TeamRole:
- FOUNDER — full control, dissolve team, transfer leadership.
- OFFICER — invite, kick, manage missions/alliances, assign roles below.
- VETERAN — privileged member.
- MEMBER — standard.
- RECRUIT — probationary, limited permissions.
Granular permissions configured per-member via JSON: invite, kick, treasury withdraw, start war, manage territories, etc.
Treasury¶
Shared resource pool with 12 resource types:
Credits, Fuel, Organics, Equipment, Technology, Luxury Items, Precious Metals, Raw Materials, Plasma, Bio Samples, Dark Matter, Quantum Crystals.
Operations: deposit, withdraw (permission-gated), transfer between members, transaction history.
Combat advantages¶
- 60/40 statistical edge against non-team opponents (design).
- Friendly-fire prevention.
- Shared sector vision.
- Coordinated drone deployment.
- Defensive notifications when any teammate is attacked.
Fleet operations¶
A team can field fleets — multi-ship formations for coordinated battle. See combat.md for fleet mechanics.
Team reputation with factions¶
Team has a calculated faction-standing using one of three methods: - Average (default). - Lowest member's standing. - Leader's standing.
Switching method has a 7-day cooldown. Faction interactions treat the team as a unified diplomatic entity.
War system (design only)¶
🚧 Planned — formal war declarations, scoring, ceasefires, victory rewards. Models likely exist; the UI and resolution loop are design-stage.
Alliances (design only)¶
🚧 Planned — multi-team coalitions with shared vision, no-fire pacts, council voting.
Source map¶
| Topic | Path |
|---|---|
| Team service | services/gameserver/src/services/team_service.py |
| Team model | services/gameserver/src/models/team.py |
| Team member roles | services/gameserver/src/models/team_member.py |
| Team API | services/gameserver/src/api/routes/teams.py |
| Fleet service | services/gameserver/src/services/fleet_service.py |
Quick comparison¶
| Faction | Team | |
|---|---|---|
| Members | NPC organization | Up to 4 player accounts |
| Joining | Implicit (you have standing with all of them) | Explicit invite/create |
| Multiple | Yes — standing with all simultaneously | One team per player |
| Resource sharing | No | Treasury (12 types) |
| Combat coordination | No | Yes (fleets, formations, vision sharing) |
| Reputation effect | Per-faction price/mission gating | Aggregate team-wide diplomatic standing |
| Cost | Free | 10,000 credits to create |
| Persistence | Permanent | Disbandable; 24h re-join cooldown |