NPCs & Galaxy Life
The galaxy of TW 3002 doesn’t pause when players log out. A background simulation runs every 15 minutes, driving NPC movement, faction warfare, and economic activity. An optional LLM (large language model) adds organic unpredictability to the most dangerous NPCs.
How the Galaxy Ticks
Every 15 minutes, the server processes all active NPCs in sequence. Each NPC evaluates its situation and takes one action: move to a connected sector, trade at a port, engage another NPC in combat, or idle.
This happens ~96 times per day. The cumulative effect is a galaxy that shifts and breathes — Fremen patrols advance, Sardaukar push back, traders circulate goods, and occasional skirmishes make the news.
NPC Types
NPCs are categorized by type and faction, which determine their behavior:
| Type | Role | Typical Behavior |
|---|---|---|
| Trader | Background economy | Moves between ports, buys commodities, keeps the market circulating |
| Patrol | Sector security | Moves toward safe and caution sectors, hunts Sardaukar when encountered |
| Raider | Hostile threat | Moves through dangerous sectors, attacks other NPCs on sight |
Factions
Factions layer personality onto NPC types:
| Faction | Behavior |
|---|---|
| Sardaukar | Most aggressive. 40% move, 50% attack anything. Cannot be bribed. Deals +3 damage in combat. |
| Fremen | Territorial. Patrols dangerous sectors. Actively hunts Sardaukar. |
| CHOAM | Corporate. Trades actively, defends ports. |
| Guild | Neutral. Facilitates trade, avoids combat. |
| Independent | Unaligned. Generic raider or trader behavior. |
Sardaukar and Fremen are the galaxy’s pressure points — their clashes generate news and shift the balance of dangerous sectors.
The LLM: Smarter Raiders
Raider-type NPCs (including Sardaukar and Fremen) use an AI model to choose their next action. The LLM receives a short snapshot: the NPC’s type and faction, the current sector’s danger level, whether a port is present, and the number of warp exits. From this, it responds with one word: move, combat, trade, or idle.
Traders and patrols do not use the LLM. They follow a fixed probability matrix:
| NPC | Move | Combat/Hunt | Trade | Idle |
|---|---|---|---|---|
| Trader | 60% | — | 30% | 10% |
| Patrol | 70% | 20% | — | 10% |
| Raider (generic) | 60% | 30% | — | 10% |
| Sardaukar | 40% | 50% | — | 10% |
| Fremen | 50% | 30% (Sardaukar only) | — | 20% |
What the LLM changes: Instead of a random roll, the AI picks the action based on context. A Sardaukar in a dangerous sector with few exits might be more aggressive; a Fremen near a port might prefer to patrol. The impact is subtle — the same four actions are available — but it makes raider behavior feel less robotic.
What the LLM does NOT do: It cannot see other NPCs, players, fighter deployments, minefields, or cargo. It cannot choose which sector to move to or which commodity to trade. All tactical decisions (target selection, route finding, combat resolution) are handled by the deterministic server code.
NPC Combat
When two hostile NPCs occupy the same sector, combat resolves instantly:
- Each side deals weapon damage simultaneously
- No shields — damage goes straight to hull
- The loser is deactivated; the winner continues
- If both die, they destroy each other
Combat outcomes generate news headlines visible in the sector news feed. Major faction clashes (Sardaukar vs Fremen) are particularly newsworthy.
The Daily Galaxy Summary
Every morning at 8 AM UTC, the server generates a daily digest email for the game admin. This email now includes an AI-generated narrative paragraph — a 2–3 sentence in-universe summary of the past 24 hours:
“Three captains dominated the Charybdis Corridor, with Spicyrunn claiming two kills near Sector 42. The Fremen patrols pushed deeper into dangerous space while CHOAM traders moved 847 units of cargo through Habbanya Landing.”
The summary is generated from real activity data: player counts, actions, combat stats, and trader profiles. It’s one LLM call per day, giving the admin a living chronicle of the galaxy.
How Players Interact with NPCs
When you warp into a sector with hostile NPCs (raiders), the Combat screen opens. You choose to attack, flee, or bribe. This is the only time NPCs directly affect you — NPCs do not hunt players across sectors, and they do not engage players unless the player warps into their current location.
Your deployed fighters and mines do not engage NPCs. They only activate when other players warp into the sector. NPCs moving through the sector on their own during the 15-minute tick ignore all player defenses.
The LLM is transparent to gameplay — if disabled, all NPCs revert to their fixed probability matrices and no features break without it.
