Dillon: “Start a new project. An xcom game but the long war overhaul style of the game. I want it in a wasteland theme/style.” So: a squad tactics game with a long, hard campaign, set in post-war Missouri. Our own game: names, story, rules’ numbers and writing are ours; nothing is taken from XCOM or Long War. The enemy is the Harvest: pre-war war machines still on their last orders, taking settlements. Raiders come later as a second threat.
Step 1 (this): one battle, playable.
python3 -m p02. - A ruined town on a 24x20 grid: buildings
(high walls, doorways), wrecks and rubble (low cover). Every open cell
can be walked to (the generator knocks a door through anything that
seals a pocket off). - Your squad of six: rifleman, scout, gunner,
marksman, medic, engineer. Two actions a turn: move (a second move is a
dash), or shoot / overwatch / hunker (each ends the turn); reload,
medkit and grenade use one action. - Cover: low 20, high 40, from the
side facing the shooter; none toward the shooter = flanked (+40 crit).
Hunkering doubles cover. To hit = aim + weapon range modifier - defense
- cover. - The Harvest wait in pods, asleep, until one of your squad
sees them; then they scramble for cover. Husks (fast, claws), sentries
(walking guns), lancers (armored, cutting beam). - Fog: what none of
your squad can see is darker. - AI plays the Harvest always and your
squad on Auto turn. AI vs AI over 100 seeds: the squad won 68, lost 31,
1 ran out of turns; about 2.5 soldiers lost in a win (a careful human
does better).
Numbers: p02/data.py, PLACEHOLDER balance.
Step 2 (2026-11-10): the campaign.
python3 -m p02 now opens the bunker
(p02/campaign.py, p02/campaignview.py). -
Twelve volunteers to start, two of each class; recruits for scrap (the
class is whoever walks in). - Time passes a day at a time. The Harvest’s
threat rises every day; at 100 the campaign is lost. Missions turn up in
Missouri towns and expire if ignored (threat +6). Wins lower it, pay
scrap and salvage (more salvage per Harvest unit destroyed); losses
raise it. - Pick a squad from who’s ready: the wounded heal (3 days a
health point lost), the tired rest (3 days after any mission). Dead is
dead. - XP for kills and for coming home; ranks add aim and health; at
ranks 2 and 4 you pick one of two skills for the class. - Research with
salvage, one project at a time: plating (+1 health), optics (+5 aim),
field surgery (wounds heal twice as fast), more bunks (squads of 7, then
8), and Crack a relay -> Trace the signal, which opens the last
mission under the Whiteman crater. Win it, win the campaign. - Saves
itself after everything you do (~/Project02 campaign.json)
and offers to carry on. - AI-played campaigns (6 seeds): 5 won in about
60 days, 1 lost on day 46; 13 to 31 soldiers lost on the way. Long and
costly, as asked; length is a data.py number to tune with Dillon.
Step 3a (2026-11-10): Dillon’s design, the fort and the
map (replaces Step 2’s Harvest/research campaign; its saves
start over). You run a warband of US Army remnants from the ruins of
Fort Leonard Wood. Eight regions around it (real counties, our groups:
data.REGIONS), each with a dilemma and two rival groups
(warlords, militias, fiefdoms). A mission helps one group and fights the
other’s people (human enemies now: militiamen, raiders, sharpshooters,
armored bruisers). Wins lean the region toward the group you helped;
losses and missed missions lean it away. At either end a group takes the
region: if you did more for them, they’re allies (their assets: weekly
income, perks for every soldier, unlocks for Steps 3b/3c; the rival’s
are lost for good; plus intel, recruits and supplies weekly); if not,
hostile. 5 allied regions win; 4 hostile lose. Squads up to 8 (two since
3b). Downed soldiers may pull through if you hold the field. Map of
Missouri from Project 01’s Census outlines (dev/gen_map.py
-> p02/missouri.json). AI campaigns (8): all won, 57 to
145 days, 9 to 62 dead: probably too easy, to tune with Dillon.
Step 3b (2026-11-11): the unit and the road (Dillon:
“remember two squads make a unit”). - Plan the unit: each ready soldier
stays, or goes in Squad 1 or Squad 2, up to 8 in each (16 in the unit).
In battle Squad 1 is blue and Squad 2 teal, each soldier marked 1 or 2.
- Travel (data.TRAVEL), three types with two tiers each: on
foot (free) or a forced march (faster, -10 aim on arrival); mules (+1 a
reload) or horses (+1 move); motorbikes (one squad at most) or trucks
(the whole unit, +5 defense), and boats (only to regions on the rivers
and lakes). Animals and vehicles are allies’ assets from Step 3a. Each
costs supplies per soldier. - Distance is the real map: km from the fort
to the middle of the region (campaign.region_km, e.g. the
Rolla Plateau 56 km, the Truman Shore 123). Days on the road = km / the
mode’s km a day. The fort runs on while the unit travels: days pass,
other missions can expire. The way home keeps the soldiers tired as long
again. A mission you can’t reach before it expires can’t be taken; one
that’s settled while you’re on the road sends the unit home
empty-handed. - Fixed on the way: an enemy group could start a few cells
from your landing (now never within POD_CLEAR = 9), and on
a crowded map a group could be placed short of fighters (now never). -
AI campaigns are now a script kept in the repo,
dev/ai_campaigns.py [n] [seed] [most sent]. Its commander
is simple, and with it the Step 3a game wins 2 of 8 too; so last night’s
8/8 came from a different (unsaved) runner and the balance question is
still open with Dillon.
Step 3c part 1 (2026-11-11): weapons (Dillon:
“similar to long war of xcom”; our own names and numbers). - Families
(data.FAMILIES): pistol, SMG (+1 move), carbine, rifle,
shotgun, machine gun, marksman rifle, sniper rifle, each with its own
range, clip, damage and crit. Each class carries certain families
(data.CLASS_WEAPONS); the first is what it starts with. -
Four tiers (data.WEAPON_TIERS): scrap-built (what everyone
starts with: exactly the numbers Steps 1-3b were balanced on), pre-war
surplus, military (needs an ally with posse rifles or heavy weapons),
Army arsenal (an ally with workshop power). - The armory (Roster tab,
Armory): buy a soldier a weapon or a pistol for supplies; the old one is
scrapped. Gear is the soldier’s: a dead soldier’s is lost. - Everyone
carries a pistol: a sidearm that never runs dry. Pistol button, then
click an enemy. The AI draws it when its clip is empty and it has one
action left. - AI campaigns unchanged by this part (the AI doesn’t
shop): 3 won of 8, same as 3b.
Step 3c part 2 (2026-11-11): armor and utility
(Dillon: “Higher the armor lesser the utility and vice versa”). - Armor
(data.ARMOR): fatigues (what everyone starts in, adds
nothing), light (road leathers, scout harness), medium (flak jacket,
ceramic vest), heavy (scrap plate, Army plate). Armor takes damage off
each hit; also health, defense, movement. Utility slots: light 3, medium
2, heavy 1. - Utility (data.UTILITY), one item a slot,
restocked after every mission: spare clips (+2 a reload), frag grenade,
medkit, smoke grenade (a 3x3 cloud, +20 defense inside until the end of
your next turn), flashbang (enemies caught wake dazed: one action and
-20 aim on their next turn; needs an ally with demolitions). - Both in
the Armory window. Battle: Smoke and Flashbang buttons; smoke is a pale
haze, a dazed enemy is marked z. The AI doesn’t use them.
Step 3c part 3 (2026-11-11): travel as lines
(Dillon: “from mechanical and animal that will increase in size, mass
and its own utility”; replaces 3b’s travel list). - Foot: on foot,
forced march (free). Animal: pack mules (they walk, the mules carry),
horses (one squad, +1 move), draft wagons (the whole unit, 3 slots;
needs allies with horses AND mules). Mechanical: motorbikes (one squad),
boats (water only), trucks (the whole unit, 2 slots), armored carriers
(the whole unit, +5 defense, 3 slots; needs trucks AND workshop power).
- The convoy’s own utility (data.CONVOY), bought once a
slot and kept for every trip that way: ammo crates (+1 a reload for
everyone), grenade crate (+1 grenade for everyone), aid station (wounds
from the mission heal a quarter faster), rations (home 2 days less
tired). Fort tab, Convoy. - AI campaigns
(dev/ai_campaigns.py 8 1 16; the AI fits no convoy utility
and buys no gear): 2 won of 8, 6 unfinished at day 400 (3b: 3 won;
trucks no longer give +5 defense, armored carriers do).
Step 3d (2026-11-12): facilities (Dillon: “start
from the Long War kind”; our own names and numbers,
data.FACILITIES). Built in the fort’s ruins by one build
crew, one project at a time, paid when started, done when the days are
up. Room for 3; clearing rubble (60 supplies, 5 days) makes a 4th. Level
2 of each needs an ally’s asset. Every level costs upkeep out of the
week’s supplies (never below 0). Fort tab, Facilities. - machine shop:
gear and convoy 15% / 30% cheaper (level 2: workshop power). -
infirmary: wounds heal in 75% / 60% of the time (level 2: field
hospital). - drill yard: +25% / +50% XP from every mission (level 2:
veterans). - radio room: +1 / +2 intel a week, missions wait 1 / 2 days
longer (level 2: radio net). - AI campaigns: 2 won of 8 without building
(dev/ai_campaigns.py 8 1 16), 0 of 8 when it builds
(... 8 1 16 build): the AI’s facilities cost it recruits,
and it loses soldiers fast. These AI numbers measure the AI as much as
the game.
Step 3e part 1 (2026-11-13): the war room, in 3D
(Dillon: a command room with a map table and staff, in a third-person
view; he chose a real 3D engine. Plan:
DESIGN-3e-war-room.md). Panda3D 1.10.16 (BSD). The rules,
saves and tests are unchanged; only the views are new.
p02/warroom.py: you come in at the bunker door and the view
glides to the table (2.5 s). The table holds a pre-war paper map of
Missouri coloured by the campaign (p02/mapstate.py, now
shared with the 2D map). A radio operator, a clerk and an officer work
in the background. Every shape is built in code
(p02/shapes.py); no outside models.
python -m p02.warroom (--shot FILE --at S
renders a frame offscreen). On Dillon’s PC: a venv at
C:\ProgramData\Project02\venv, launcher
Project 02 War Room.cmd on the Public Desktop. From part 3
you can send the unit out from it; the 2D window still does everything
else.
Step 3e part 2 (2026-11-13): the pieces on the
table. Toy pieces, built in code: the fort as a concrete bunker
with a flag; the unit as two toy soldiers on a base (beside the fort, or
by the mission’s pin while it’s out); a pin with a numbered flag for
each mission, in the colour of the group you’d help and numbered as the
2D map numbers them; a wooden block for each region, painted the colour
of the group that holds it (tall) or leans to it (short), bare wood if
undecided, capped white for an ally and black for a hostile. Click a
piece and its briefing shows in the panel at the bottom left. The
briefing text is p02/briefs.py, which the 2D window’s
mission briefing now uses too. Tests: no two pieces overlap, and every
piece can be clicked from the camera, with two missions in every region
and the unit out to each in turn. Known look issue: in the crowded
middle of the state, pieces partly cover some region names.
Step 3e part 3 (2026-11-15): time on the table.
Click a mission’s flag and “Plan the unit” appears (bottom right): the
same plan as the 2D window (squads and travel; PlanDialog
in campaignview.py, a Tk window opened from inside the 3D
room). Go, and the unit’s piece leaves the fort and crosses the map a
day at a time (0.8 s a day), the day counter and the latest news at the
top left, the map recolouring as the days bring news. At the end of the
road the view leans in over the table, then the battle opens; when it’s
over the piece slides home and the view comes back. The campaign now
goes day by day: depart(), road_day() until
on_road() is false, arrive();
launch() is the three at once, and a test pins that
stepping plays out exactly as launch() did. Close the room
on the road and the trip carries on next time, in the war room or the 2D
window.
Step 3e part 4 (2026-11-15): facility to facility.
“To the corridor” (top right of the war room) takes you out into the
bunker’s corridor, seen from behind your commander. The doors, in order
(p02/rooms.py): the war room at the end, then the barracks,
the armory, the motor pool and the works office, then the fort’s four
plots. A plot shows a facility’s door with its name and level, the one
being built (boarded up), an empty plot, or rubble (it can’t be
entered). Click a door and the commander walks down the middle of the
corridor to it (2.4 m a second), turns, and the door swings open. Each
room has its own furniture and someone at work, and a button for the
controls that already exist, in the same windows as the 2D game
(Desks in campaignview.py, now shared by the
2D window and the bunker’s BunkerDesks): - the barracks and
the armory: the roster, with Recruit, Pick skill and the Armory; - the
motor pool: the convoy; - the works office, an empty plot and each
facility: building. Walking costs no game days. A trip on the road plays
on while you’re out of the war room, and the battle still opens when it
arrives. p02/bunker.py; python -m p02.warroom
now opens the war room with the bunker around it. Tests check that the
view stays inside the corridor’s walls on every walk between every pair
of doors, that the commander faces the door when he gets there, and that
each room opens its window. (The corridor and the walking commander were
replaced by the cutaway in Step 3f, on Dillon’s word.)
Step 3f (2026-11-16): the base, cut away; the map from above;
the memorial. Dillon: “an overhaul blueprint of the base rather
than a hallway”, no walking figure, room-to-room moves like XCOM’s, tabs
along the bottom, the map “top down with the ability to zoom in out and
across”, the base to “mimic what a military facility would look like”,
and the rec area as the memorial for everyone killed or missing in
action. The game opens on the whole base cut open from the side
(p02/cutaway.py, layout in rooms.LAYOUT): -
B1: the command room and the garage bay (its vehicle ramp runs back to a
portal on the surface); - B2: the barracks, the rec area, the armory,
the engineer bay; - B3: research (a placeholder for now) and three
plots; - B4: the fourth plot, under rubble until it’s cleared; - a
freight lift down the middle. It looks like a military installation:
poured concrete, walls painted olive below and grey above, stencilled
room numbers (B2-01 BARRACKS) and level numbers, pipes and strip lights,
steel doors, hazard stripes. Up top are the blockhouse over the lift,
sandbags, the wire, a guard tower, a radio mast and the flag.
Getting around: click a room, or its tab along the bottom (Command, Barracks, Armory, Engineering, Garage, Research, Rec, Base), and the view glides there (1.3 s; it backs off on the way, then goes in). The Command tab glides into the command room, then you’re at the war room’s table as before. Each room’s button opens the same windows as the 2D game, and the rec area opens the memorial.
The map table: the camera looks straight down at the whole map. The mouse wheel zooms on the point under the mouse, up to 6x, tilting a little as it goes in so the pieces stand up. Right-drag or the arrow keys (or W A S D) move across the map, and it can’t be moved off the map. Home shows it all.
The memorial: every soldier now has a service record. Each mission
adds the day, region, kind of mission, who they fought for and against,
won or lost, kills, and whether they were wounded or went down. Battles
note how each one went down: “shot by a bruiser with shotgun (a critical
hit), turn 5”, “caught in a grenade blast thrown by Gus, turn 3”. New
rule: downed in a battle you lose means killed or (50%,
MIA_CHANCE) missing in action, and gone either way. The rec
area’s wall has a plaque for each of the fallen. Its window lists them,
newest first, with rank, class, missions, kills, kit, every mission, and
how it ended. Soldiers lost before this step show as “before the fort
kept its records”. Moving about costs no game days, and a trip on the
road plays on while you’re in the base.
Step 4 part 1 (2026-11-17): every county has two
factions. Dillon: “split it so every county has two factions”.
The eight regions became 24 counties (the eight are kept as each
county’s “area”). The 16 groups each keep a county (the Vienna
Regulators hold Maries, home of Vienna; the Dam Keepers hold Miller,
home of Bagnell Dam), and 32 new ones fill the rest, all ours. Each
county has its dilemma, its town (a real one: the biggest place or the
county seat, with its location from the Census places in Project 01’s
world.json, which uses the same coordinates as this map), and each
faction has its gear (items the game already has; caravans bring it home
from Step 4 part 3). Winning takes 14 allied counties; 10 hostile loses.
Up to 5 missions at once. An ally gives 4 supplies and 1 intel a week
(was 10 and 2, with 24 of them possible): PLACEHOLDER balance. On the
table: a block per county (smaller), the county’s name, its town as
three little houses with the name, and pin pieces placed by pushing each
county’s footprint clear of every other’s and the fort’s
(warroom.spots). On the 2D map: the county’s name, and ALLY
or HOSTILE once decided.
Step 4 part 2 (2026-11-17): incursions, and your standing with each faction. Dillon: “an incusion happens and then and there the player chooses to support one side or another … The higher the point value unlocks tiers.” New missions are incursions: a county’s two factions are fighting (over a storehouse, for a town, over a convoy’s crossing), one at a time in a county, and nobody’s side is set. Its flag is cream on the table and the 2D map. Its briefing gives both sides, who you’d fight either way, and your standing with each. When you plan the unit you pick the side to back (“Back”, in the plan; Go waits for it). That sets who you fight, and their fighters are drawn then. Backing a faction raises your AFFINITY with it, 0 to 100: +20 for a win, +5 for a loss (you still came). It is separate from the county’s tug of war, which still moves with each win or loss, so backing both sides in turn keeps the war going while you build standing with both. Tiers: 25 trade, 50 weapons, 75 armor and kit (caravans collect these from part 3), and 100 their asset (boats, trucks…), as winning the county with your help gives. Each tier is in the log as you reach it. An incursion nobody joins expires and moves nobody. A county’s briefing shows your standing with both sides and its town. Old saves’ missions keep the side they had.
Step 4 part 3 (2026-11-17): caravans. Dillon: “the player at some point of the tier can then start sending convoys to the side and they will pick up whatever they have unlocked. Doing this risks one side raiding them”. Every faction that trades with you (25 standing, or your ally) puts goods by each week: from 25 a recruit, from 50 one of each weapon in its gear, from 75 one of each other gear item. An ally gives all of it whatever your standing. Piles are capped at 4 recruits and 3 of each item. When the side you backed takes a county, the loser’s goods (2 of each of its gear items, and 2 recruits) go on the winner’s pile at once. A caravan is sent like a mission’s unit, from Caravans in the convoy window (the Garage, and the 2D window). You plan squads and travel, and its piece walks the war table. At the town, the county’s OTHER side may ambush it (35%, two groups of their fighters): a battle. Win, or no ambush, and the recruits join the roster (the usual classes) and the items go to the fort’s store. Lose, and the raiders keep the goods. It goes on the soldiers’ records as a caravan and moves no standing. The armory fits weapons, armor and utility items from the store free, unlocks or not (a faction’s gift), as far as the soldier’s class can carry them. Convoy items in the store can’t be fitted yet.
The main menu (2026-11-17). Dillon: “make a main
menu with the new game load game features as seen in most games”. The
war room opens on it (p02/menu.py): Continue (the save
played last), New Game (a new campaign in a save of its own, “Campaign
N.json” in “Project02 saves” in the home folder: the others are kept),
Load Game (every save, newest first, with its day, soldiers and when it
was saved; one that can’t be read is listed, greyed out), Quit. The save
from before the menu (“Project02 campaign.json”, also the 2D window’s)
is listed and played in place, never moved. Saves from before the
counties (Step 4 part 1) are converted as they load
(campaign._migrate;
tests/fixtures/save-3f.json is a real one, written by the
3f code).
Dev:
python3 -m venv ~/venvs/p02-3d && ~/venvs/p02-3d/bin/pip install panda3d,
then
xvfb-run -a ~/venvs/p02-3d/bin/python -m unittest discover -s tests
(215; without Panda3D the 48 3D tests skip). The trip with its real
windows:
xvfb-run -a ~/venvs/p02-3d/bin/python tests/warroom_smoke.py.
Tests:
python3 -m unittest discover -s tests -p 'test_*.py' (167,
plus 48 for 3D). The windows:
xvfb-run -a python3 tests/gui_smoke.py. Mutation-checked:
battle 24 rule breaks, regions 23, the unit and the road 25, weapons 22,
armor and utility 22, convoy 16, facilities 26, war room 15, all caught;
the pieces 23, 22 caught (the one that survived changes nothing: only
pieces can be hit, so traversing the whole room picks the same piece);
time on the table 23, all caught; facility to facility 35, 34 caught
(the one that survived changes nothing: the war room also sets the
camera while you are in the bunker, and the bunker sets it again in the
same frame). The menu and old-save conversion 9, all caught. Caravans,
raids and the store 14, all caught. Incursions and affinity 13, all
caught (after a check that the side picked is the side backed). Counties
8, 7 caught (the 8th only changes how fast the layout settles, not where
pieces end up), after 2 tests added. The base, the map view and the
memorial 28, all caught (after 4 tests added for the 4 that survived the
first run: the zoom limit, the first zoom guess, the memorial’s order, a
click mid-glide). On Dillon’s PC: C:\ProgramData\Project02,
launcher Project 02 Battle.cmd on the Public Desktop (opens
the bunker since Step 2).