Finite Biter Battles

by rs2klee

A competitive Factorio prototype with fixed finite resources, symmetric arena generation, central spectator and penalty islands, multiplayer North/South team selection, dedicated-server-safe player handling, deterministic spawning, shared team research, resource depletion tracking, pollution-driven enemy waves, and admin/player timeout moderation. Battle Credits economy with configurable scoring, live North/South scoreboard, and a player-voted victory target.

Scenarios
2 hours ago
2.0
0
Combat Enemies Environment Fluids

Changelog

Finite Biter Battles v0.1.101
- Removed the duplicate "Research Completed" wording from the FBB research-credit notification.
- Native Factorio research completion messages remain; the FBB line now shows the team Credit award with the technology icon without repeating the completion notice.

Finite Biter Battles v0.1.100
- SPECTATE / AFK players are now distributed around the spectator island instead of all being placed at one point.
- Uses deterministic positions around the grass area so multiple spectators can coexist without stacking.
- Spectator position correction now uses each player's assigned spectator position.

Version 0.1.99
- Fix SPECTATE / AFK return so the saved pre-spectate position is repeatedly and authoritatively restored after the team character/controller is recreated.
- Remove the old team character when entering native spectator mode so spectator/return transitions do not leave duplicate player bodies behind.
- Clean orphan character entities at the fixed team/spectator spawn areas during arena reset and mod configuration migration.
- FBB roster display now continues to derive from live team forces; disconnected players are not intended to appear as active GUI roster members.

Version 0.1.98
- Randomised iron, copper, coal and stone deposit placement on every new arena.
- Kept all oil and uranium deposits at their existing fixed locations.
- Preserved NORTH/SOUTH symmetry and equal resource mixes while varying ore positions between matches.
- Arena reset announcement now uses the actual FBB build version dynamically.

v0.1.97
- Added a pistol and 100 firearm magazines to the starting kit for early-game defence.
- Kept the existing 10 burner mining drills, 10 stone furnaces, and 50 coal starter resources.
- Updated runtime/build version references.

Version 0.1.96
- Fixed SPECTATE / AFK return ordering so the controller-change handler cannot overwrite the saved pre-spectate position with the team spawn.
- Preserves the existing inventory/equipment/quickbar restoration while returning to the exact pre-spectate location.
- Arena reset announcement now uses the current FBB version dynamically.

Version 0.1.95
- Fix SPECTATE / AFK return position: controller-change handling no longer overwrites the saved pre-spectate position with the team spawn.
- Preserve the saved position until the deferred spectator restoration completes.
- Update the arena-reset announcement from the stale v0.1.89 label to v0.1.95.

Version 0.1.94
- Rebalanced automatic FBB battle waves to use small and medium biters only.
- Automatic waves no longer spawn spitters, big biters, or behemoth biters.
- Small biters remain the primary wave unit, with medium biters introduced as evolution increases.

Version 0.1.93
- SPECTATE / AFK now remembers the player's exact pre-spectate position and returns them there instead of the team starting spawn.
- Preserves the working spectator inventory, armor/equipment, quickbar, weapon/ammo, and cursor restoration.

Version 0.1.92
- Fix Factorio 2.0 spectator inventory restoration to correctly handle LuaInventory.get_contents() item records.
- Preserve item name, count, and quality when restoring carried inventory.
- Prevent the SPECTATE / AFK return path from crashing on Factorio 2.0 inventory data.

Version 0.1.91
- Fix a Lua syntax error in the spectator inventory restoration function that prevented the headless server from loading.
- Preserve the deferred spectator restoration lifecycle introduced for SPECTATE / AFK.

Version 0.1.90
- Fix the missing Lua block closure introduced during the spectator inventory restoration work.

Version 0.1.89
- Harden SPECTATE / AFK return so the saved carried state is restored after the normal team character/controller lifecycle has settled.
- Preserve inventory contents, armor/equipment, quickbar filters, and cursor stack across SPECTATE / AFK.
- Retry the restoration on subsequent ticks if the character or equipment grid is not ready yet, instead of consuming the saved snapshot.
- Clear pending spectator restoration state when an arena reset starts a new match.

Version 0.1.86
- Make the Game Length Vote immediately visible after joining NORTH or SOUTH.
- Refresh the FBB GUI automatically after a successful team join so the 5,000 / 10,000 / 20,000 / 50,000 vote buttons appear without reopening the panel.
- Change the top FBB button to `FBB • VOTE` while an active game-length vote is available to the player.
- Add a clearer tooltip indicating that the game-length vote is active.

Version 0.1.85
- Fix crash when the victory-target vote closes: `format_number` is now declared before `finalize_victory_vote`.
- No gameplay/economy changes.

Version 0.1.84
- Restore and harden the Victory Target / Game Length voting system.
- Players can vote from the FBB GUI for 5,000 (SHORT), 10,000 (STANDARD), 20,000 (LONG), or 50,000 (MARATHON) Battle Credits.
- The active vote shows live vote totals and a countdown.
- The top scoreboard now clearly shows when the game-length vote is active.
- The winning target is announced when the 60-second vote closes; no-vote and tie results default to 10,000 Credits.
- Arena reset starts a completely fresh game-length vote and clears the previous vote state.

Version 0.1.83
- Fix arena reset so the NORTH, SOUTH, and spectator technology trees reset to a fresh unresearched state for every new match.
- Reset force research progress, recipes, and research modifiers when a new arena is created.

Version 0.1.82
- Fix timeout state and countdown UI so active timeouts do not carry over into a new arena/match.
- Clear timeout votes, timeout correction state, timeout history and spectator-break state during arena reset.
- Refresh the FBB top-bar controls after a reset so stale TIMEOUT countdown buttons are removed.
- Rename the player spectator button from Spectator Break to SPECTATE / AFK.
- Add a ready-to-use colourful Factorio server-listing name and description for the Browse Games/server browser.

Version 0.1.81
- Enforce balanced team joining: players cannot voluntarily join the larger active team.
- Restrict player timeout voting to the target's own team; NORTH cannot vote to timeout SOUTH and vice versa.
- Split player Timeout Vote controls from the admin-only Admin Commands section.
- Rename the moderation GUI section to Admin Commands and keep admin timeout, timeout release and arena reset controls admin-only.
- Add admin test controls to send 8 basic small biters to NORTH or SOUTH. Test biters do not award Battle Credits.
- Add symmetric concrete running areas around both starting boxes.
- Add 50 coal to each player's starting kit.
- Preserve the v0.1.80 science-production Credits, personal Credits and leaderboard systems.

Version 0.1.80
- Add team Battle Credit rewards for actual science-pack production: every 10 produced packs awards the configured science reward.
- Add separate configurable science rewards for red, green, military, blue, production, utility and space science.
- Add separate personal Credits earned from qualifying hand-crafted items; personal Credits are separate from the team victory score.
- Add Top 10 personal Credit leaderboard and display the player's personal Credits and rank in the FBB panel.
- Add /battle-leaderboard command.
- Science-production Credit gains use the team HUD notification instead of chat spam.
- Remove continuous spawn-debug watch processing from normal gameplay to reduce server log spam.
- Preserve the tested v0.1.79 resource collection fixes and all existing battle systems.

Version 0.1.79
- Fix finite oil collection/reporting radius so all 24 starting oil wells are included in Resources Remaining and Deposits totals.
- Preserve the tested 1,500% combined oil field and 24-well layout.
- Keep the v0.1.78 GUI crash fixes and all previously tested gameplay systems unchanged.

Version 0.1.78
- Fix Resources Remaining GUI crash caused by print_resources being declared after the on_gui_click handler.
- Fix Deposits GUI handler ordering so print_deposits is available when the GUI is clicked.
- Move resource-total/resource-reporting helpers before GUI event handling so they are resolved as local functions at runtime.
- Harden resource/deposit reporting against missing or partially initialized storage.
- Preserve the existing finite resource, oil, fish, Battle Credit, voting, spectator, moderation, and multiplayer systems.

Version 0.1.62
- Add per-player Credit HUD ON/OFF toggle in the FBB GUI.
- Disabled players receive no personal or team machine-production Credit HUD notifications.
- Credits, scoreboard, and game mechanics are unchanged.

Version 0.1.60
- Machine-produced Credits now display as a batched team HUD notification.
- Production notifications are shown to all connected members of the producing team instead of chat spam.

Version 0.1.59
- Fix assembler Credit tracking using Factorio products_finished.
- Automated production now awards Credits reliably even when outputs are immediately removed by inserters.
- Existing assemblers are re-registered after mod updates and periodically discovered.

Version 0.1.58
- Fix assembler Credit production tracking.
- Detect completed assembler crafting cycles instead of relying on output-inventory increases.
- Credits are awarded even when inserters immediately remove the finished item.
- Assembler placement and ghost placement still award no Credits.

Version 0.1.57
- Rebuilt Battle Credit production tracking from the known-good 0.1.54 base.
- Credits are awarded for actually crafting qualifying building items, not placing them.
- Hand-crafted qualifying items award Credits through on_player_crafted_item.
- Assembling-machine production of qualifying items is tracked from output inventory increases.
- Ghost placement, ordinary placement, deconstruction, and rebuilding do not award Credits.
- Removed the broken data-final-fixes recipe handling introduced in 0.1.56.

Version 0.1.54
- Fix Credit exploit where ghost blueprint/entity placement awarded construction Credits.
- Credits are now awarded only when a real entity is actually constructed.

Version 0.1.53
- Replace ordinary construction Credit chat spam with a batched temporary HUD notification.
- Construction Credit gains no longer broadcast to multiplayer chat.
- Important FBB Credit events remain visible in chat.

Version 0.1.52
- Prevent construction Credit farming by deconstructing and rebuilding the same building at the same location.

Version 0.1.51
- Fix Battle Credits scoreboard crash caused by team_credits being declared after its first runtime use.

Version 0.1.50
- Added Battle Credits economy, live scoreboard, configurable victory target, kill/build/research credit rewards, and match-complete detection.

Version 0.1.48
- Make the spectator island observation-only by using Factorio's native spectator controller.
- Spectator-break players can no longer pick up items, mine, build, or interact with the world.

Version 0.1.47
- Finalized the timeout/penalty-island system.
- Added authoritative penalty-island position correction and reconnect-safe enforcement.
- Timed-out players receive a restricted penalty-box GUI and cannot use battle or moderation controls.
- Added admin END TIMEOUT control for early release.
- Added lightweight per-player timeout history.
- Preserved North/South team assignment throughout timeout and return.

Version 0.1.46
- Make Spectator Break position authoritative for a short correction window.
- Disable the vanilla Freeplay intro message/cutscene popup.

Version 0.1.45
- Fix Spectator Break crash caused by local function declaration order.
Version: 0.1.44
Date: 2026-09-28
  - Fixed missing function closure in control.lua that prevented headless server initialization.
Version: 0.1.43
Date: 2026-09-28
  - Fixed control.lua syntax error in top-bar state handling that prevented headless/server initialization.

Version 0.1.42
- Added a dedicated penalty-box island for player timeouts.
- Added admin timeout controls with 30-second to 30-minute durations.
- Added player timeout voting with majority approval and a 30-second voting window.
- Timeout players keep their original North/South team assignment and automatically return when the penalty expires.
- Added a live timeout countdown in the top GUI.
- Timeout players cannot participate in team play while serving the penalty.

Version 0.1.41
- Added a Spectator Break button for active team players.
- Players can move to the central spectator island without losing their team assignment or factory.
- Added a Return to NORTH/SOUTH button to resume play.
- Break state survives reconnects.
- New players still use the spectator island lobby and choose their initial team.

Version 0.1.40
- Add a central spectator island for new and unassigned multiplayer players.
- New players no longer get auto-assigned to North/South; they choose their side when ready.
- Add JOIN NORTH and JOIN SOUTH buttons directly in the top GUI and in the FBB control panel.
- Keep existing players on their saved team when reconnecting.
- Add a visible spectator-area message explaining how to choose a team.
- Remove duplicate automatic join announcements from team assignment.
- Preserve the existing arena, resources, waves, GUI, starter kit, and research systems.

Version 0.1.39
- Explicitly tell each joining player whether they joined NORTH or SOUTH after the multiplayer join event.
- Announce the player's side to the whole match after the join UI is ready.

Version 0.1.38
- Fix multiplayer join so new players do not remain in the Factorio intro/welcome cutscene.
- Joiners are immediately placed into their assigned North/South team character.
- No arena, resource, team, wave, GUI, or research changes.


Version 0.1.62
- Fix machine-produced Credit notifications so they use the team HUD instead of chat.


Version 0.1.63
- Added player voting for the match victory target.
- Active NORTH/SOUTH players can vote for 5,000, 10,000, 20,000, or 50,000 Credits.
- Players can change their vote while voting is open.
- Victory target defaults to 10,000 Credits if there are no votes or a tie.
- The selected target is locked for the match and a new vote starts after arena reset.


Version 0.1.64
- Removed the duplicate FBB research announcement so Factorio's native research message is shown only once.
- Kept the technology icon in the FBB research Credit notification.
- Research Credit notifications now show the technology icon followed by "Research Completed".


Version 0.1.65
- Reworked the starting resource layout so all four main starting ore patches sit inside the team home box.
- Moved starting oil into the home area and reduced its physical patch radius to better suit approximately 24 pumpjacks.
- Increased starting ore patches to 50,000 total units each and enlarged their generated footprint.
- Increased central contested ore patches to 100,000 total units each and enlarged their generated footprint.
- Preserved exact North/South rotational symmetry.


Version 0.1.66
- Fixed a crash when the victory-target vote expired: the vote finalizer was calling format_number before that local function was declared.
- The vote finalizer now safely closes the open FBB vote panel without calling later-declared GUI helpers.


Version 0.1.67
- Fixed arena reset resource cleanup so old FBB resource entities are removed before new deposits are generated.
- Fixed arena reset so all connected players are returned to the central spectator island and their old team assignment is cleared.
- New matches now start from the lobby after a reset, with players choosing JOIN NORTH or JOIN SOUTH again.
- Preserved the revised symmetric North/South resource layout.


Version 0.1.68
- Arena reset now removes all persistent entities from the FBB control area, including player-built machines, belts and ghosts, before rebuilding the arena.
- Arena reset now clears connected players inventories/cursors so the new match starts cleanly.
- Replaced remaining player-facing Team A/Team B wording with NORTH/SOUTH.
- Bumped the displayed mod version to 0.1.68.


Version 0.1.69
- Increased main starting and contested ore deposits to about 1.4 million units per patch.
- Increased resource richness/density substantially while preserving the existing patch footprints.
- Increased oil fields to at least 1,500% yield per oil tile (about 170,000 total field units with the current oil footprint).
- Enforced these minimum resource totals even if an existing server setting still contains the older lower value.

Version 0.1.71
- Reworked starting oil into 24 separate pumpjack positions per team.
- Each oil well starts at 1,500% yield (450,000 cycles).
- Oil wells are spaced 4 tiles apart to provide practical room for pumpjacks and pipework.
- Preserved the 1.4M finite ore patches and all previous reset/victory-vote fixes.


Version 0.1.72
- Fixed invalid oil startup setting range that prevented the mod from loading.
- Oil field remains fixed at 1,500% combined across the 24 starting wells.

Version 0.1.73
- Fixed starting oil generation to produce exactly 1,500% combined yield across 24 wells.
- Cleared natural obstacles around oil wells so all 24 pumpjacks can be placed.
- Added runtime normalization and verification of oil field amounts.


Version 0.1.74
- Corrected the runtime oil amount scaling so the 24 starting wells total exactly 1,500% combined yield.
- Increased the generated runtime oil total from 450,000 to 4,500,000 units to match Factorio's displayed yield scaling.
- Preserved the spread-out 24-well layout and 1.4M finite ore patches.


Version 0.1.75
- Corrected FBB starting oil runtime amounts so the 24-well starting field displays 1,500% combined yield.
- Preserved the spread-out 24-well layout and 1.4M ore patches.

Version 0.1.76
- Corrected generated oil runtime amount to 4,500,000 total units for a 1,500% combined starting field across 24 wells.


Version 0.1.77
- Added deterministic fish around the surrounding water moat for player healing.
- Fish are recreated on every arena reset and kept outside the playable arena.

Version 0.1.94
- Automatic battle waves now use small/medium biters only; no spitters, big biters, or behemoths.