Farm Hex

Field manual. Every piece, what it carries, how it strikes, and what it beats. These are the live values in CLASSES, LOADOUT and ANIM_PROFILES — if the code changes, this page changes in the same commit.

Chess × Civ · 1v1 · Godot 4.7 · gl_compatibility

I · The muster

Seven pieces. The gate column is the real tech tree — there is no castle level, only keeps you have raised and prizes you have taken.

Live values from CLASSES
Piece Gold HP Dmg Move Reach Arm Gate
Rogue22782821flankerstart
Brute301503221infantrystart
Ranger40642212archer1 keep
Knight501303621infantry1 keep
Giant701701821infantry2 keeps
Druid452102021infantrythe Grove
Mage60802813archerthe Warden
The one rule about reach

Only the Ranger and the Mage have reach: the Ranger 2 in any direction, the Mage 3 but only down a line. Everything else is hand to hand, and no terrain bonus may grant it — forest sharpens a bow, it does not give a knife range. A forest bonus once handed the Rogue a ranged strike, which made a knife-fighter poke from a hex away and blurred the one line that should never be ambiguous: who can hit you from afar.

Neither prize is first-come-first-served

Claiming the Grove or the Warden unlocks its piece for both houses, permanently. What the first claimant keeps is the relic, not the roster slot — the Warden's crystal (+3 gold a turn, +1 move) or the Grove's staff (your farmland is warded, so razing one of your farms pays the raider nothing). The race is worth winning; it never denies your opponent a piece.

II · Arms carried

Weapons are real meshes parented to the KayKit rig's handslot.l and handslot.r bones through a BoneAttachment3D, so they follow the hand through every clip. Nothing here is faked or drawn on.

  • Knightsword_1handed · shield_badge_color
  • Bruteaxe_1handed · mug_full
  • Roguedagger · dagger — dual wield
  • Rangerbow (left hand)
  • Druiddruid_staff
  • Magestaff · spellbook_closed
  • Giantaxe_2handed_Large

The handslot bones need a 180° yaw (_weapon_tweak()), confirmed by an A/B render at 0° and 180°. Without it, bows arc away from the grip and axe heads face the wielder.

III · Attack styles

Melee — the weapon swings, and that is the whole effect

on_attack_started() draws nothing for a melee strike. The piece is holding a real weapon and the attack clip swings it; only the impact spark remains.

Why there is no arc

A billboarded white quad used to sweep across on every melee hit. On screen it read as “a white rectangle moving back and forth” — and it was covering the swing it stood in for. Deleted.

Swing clips are arrays, so each strike picks a fresh variation:

From ANIM_PROFILES
PieceAttack clips
Brute · GiantMelee_2H_Attack_Chop · _Slice · _Spin
KnightMelee_1H_Attack_Chop · _Slice_Diagonal · _Stab
RogueMelee_Dualwield_Attack_Chop · _Slice · _Stab
DruidMelee_1H_Attack_Chop · Melee_Block_Attack

Ranger — an arrow

Built geometry, not a sprite: a tapered shaft, a steel head and two fletchings, flying point-first along the travel vector. Travel time equals the attacker's windup, so the arrow lands exactly as damage resolves. It was a spinning box, which at close zoom read as a tumbling stick.

Mage — a bolt, down a line

A bright core inside a saturated shell that grows as it flies. Both projectiles have to read on albedo alone: emission does not bloom without glow post-processing, and the compatibility renderer — required for the web build — does not provide it. Saturated and opaque beats emissive and hopeful.

IV · The Mage's V

The Mage is a line piece. It may only strike along the six hex rays, out to two — standing off-axis is genuinely safe, which is what makes it positional rather than a splash blob. On impact the blast opens into a V across the ray it flew down and the next ray round, both to full reach.

M 12 12

The Mage sits at M. It fires along one ray; the blast covers that ray and its neighbour, two hexes deep. Six possible V orientations, one per ray.

Everything off those two rays is untouched — including hexes that are plainly within two of the Mage.

the Mage struck — ray d and ray d+1 in range, but off-axis: safe
If you touch targeting code

Use _can_strike() for every legality question. A bare _hex_dist() <= _attack_range_of() silently ignores the line restriction — and the threat overlay will happily draw danger the Mage cannot deliver.

V · Counters & retaliation

Anything you strike hits back. If the defender could reach you from where it stands, it returns half its damage immediately. The counter does not use up the defender's own action for its turn, and it cannot be countered in turn. Structures never retaliate.

This is what makes standing beside something a cost, and therefore what makes zone of control, screening and body-blocking matter. Reach also decides it: a Ranger struck from beyond its own reach cannot answer a melee attacker it cannot reach, and the Mage can only counter along its lines.

infantry → archer → flanker → infantry

Attacking into your counter is ×1.5; attacking against it is ×0.7. Shown live beside the damage number, so you can read a trade before you commit to it.

ArmPiecesBeats
InfantryKnight · Brute · Druid · Giantarcher
ArcherRanger · Mageflanker
FlankerRogueinfantry

VI · Special verbs

What makes a piece more than its stat line.

VerbWhoEffect
LeapKnightvaults to any hex 2 away, or charges 3 straight; ignores zone of control
Guard auraDruid — for the claimantadjacent allies take ×0.82
SiegeGiant×3.0 vs structures, ×0.5 vs people
PillageKnight · Magerazes an enemy farm outright, +20 gold
ConcealRogue · Rangeruntargetable in forest unless adjacent — fog mode only
Farm healKnight+25 standing on your own farmland

Any piece can damage a farm — farms are ordinary targets. Only Knights and Mages take gold for it, and only if the owner does not hold the Grove's staff. A warded farm still falls; the raider just gets nothing.

V-b · How a match ends

The moment either house farms 40% of the board, a final four rounds begins, announced on screen. Then the realm is judged — farmland weighed first.

So a lead is a signal rather than a guarantee: crossing the threshold tells your opponent exactly how long they have to come and break your fields. It also caps the tail, which is the failure this genre is most prone to — under half of Civilization VI games are ever finished.

You may also concede from the menu. A decided position with no way to close it is the worst thing a strategy game can hand you; chess resigns, and so does this.

A turn clock is available as a mode — Untimed, Rapid (45s) or Blitz (20s). Untimed is the default for solo play; a clock matters when a human is waiting on you.

VI-a · The frontier pays

A farm on their half of the board — nearer their castle than yours — earns +2 on top of everything else, and a keep past the midline earns +4.

Building backwards into your own corner used to be strictly safer and pay exactly the same, so there was no reason to contest the middle until you already wanted to win. Now expansion points at the enemy: the ground that pays best is the ground they can burn.

VI-b · Feeding an army

Your first two soldiers are the levy and cost nothing. Every one after draws 6 gold a turn. On eight farms that curve runs:

ArmyUpkeepNet incomeTurns to save 45g
0–20361.2
412241.9
624123.8
8360

So a large army is paid for by farmland: at 14 farms an army of eight still nets 24 a turn. You cannot muster one every turn, and losing your last soldier is not fatal — your castle raises a free Rogue.

VII · Bars & numbers

The health bar is one quad drawn by shaders/healthbar.gdshader. The fill is a UV comparison in the fragment stage — nothing is scaled, offset or layered — which is what makes it correct under any camera orientation, and why rotating the camera is now only a question of input handling.

  • Yoursgreen → amber → red as it falls
  • Theirsalways red — never work out whose bar you are reading
  • Shownwhen wounded, while selected, and a beat after any hit
Two traps this replaced

Three stacked transparent quads z-fight unless you hand-manage render_priority. That is why bars used to flicker black.

depth_draw_never is not depth_test_disabled. The first only stops the bar writing depth — it still tests against the scene. When the character models grew 1.4×, the bar ended up inside its owner's head and was occluded by it, rendering nothing at all, with no error and no warning.

Damage numbers spawn on the piece, pop from 0.55 scale with a back-ease, drift sideways so a flurry stays readable, and fade in 0.42 seconds. Crits and pillage gold carry their own colours.

VIII · Verifying any of this

None of the above has to be taken on trust. Each mode renders a windowed screenshot:

SHOTMODE=melee knight mid-swing, weapon extended, bars over both heads SHOTMODE=strike arrow and mage bolt caught in flight SHOTMODE=bars bar states including a near-dead piece
Pin the seed

All three take MAPSEED=<n>. Use it. The world re-seeds from randi() on every run, so without it two screenshots are different boards and any comparison between them is meaningless. A depth-of-field probe once reported a huge pixel difference for exactly this reason — it was measuring two different maps, not an effect.