Skip to content

docs(tools): correct Factorio 2.0 facts in the tool manual - #432

Open
hashbender wants to merge 1 commit into
JackHopkins:mainfrom
hashbender:docs/manual-factorio-2-facts
Open

hashbender wants to merge 1 commit into
JackHopkins:mainfrom
hashbender:docs/manual-factorio-2-facts

Conversation

@hashbender

Copy link
Copy Markdown

Problem

The system prompt (tool docstrings, agent.md manuals and game_types.py) states several things that are false in Factorio 2.0, or false for FLE's own tools:

  • Rocket cost: launch_rocket/agent.md says each launch needs 100 rocket fuel, 100 rocket control units and 100 low density structures. That is the 1.1 cost. In 2.0 the silo needs 100 rocket parts (rocket_parts_required = 100). Each part is 10 processing units, 10 low density structures and 10 rocket fuel, and rocket control units no longer exist.
  • Inserter filters: Prototype.FilterInserter is commented "filter-inserter removed, use fast-inserter", and StackFilterInserter "renamed to bulk-inserter". In 2.0 every inserter has filter slots; these names are only aliases. set_entity_recipe/agent.md says the tool searches "within a 2-tile radius". The Lua searches a ±1-tile box, and on an inserter it sets the first filter slot rather than a recipe.
  • Battery rate: the "Useful statistics" block in tools/agent.md says "Battery - 20 per 60 seconds". The battery recipe takes 4 s and makes 1, so a chemical plant (speed 1) makes 15 per 60 seconds.
  • Caps that don't exist:
    • The sleep docstring says "Sleep for up to 15 seconds". sleep/server.lua adds seconds * 60 ticks with no cap.
    • get_entities/agent.md says "Maximum radius is limited to 50 tiles". The default is 1000, and the Lua uses the radius as given.
  • shift_entity docstring: it is get_connection_amount's docstring ("Calculate the number of connecting entities ...", with source/target/connection_type params that shift_entity doesn't take).
  • connect_entities entry: __call__ is a retry wrapper, so the prompt shows connect_entities(*args, **kwargs) with the docstring "Wrapper method with retry logic for specific Lua errors.". That gives no call form or parameters.
  • Trigger technologies: the research docs don't mention that seven 2.0 base technologies are completed by a game action, not by labs, and have no science-pack cost.

Fix

Corrections only:

  • launch_rocket/agent.md: the 2.0 cost (100 parts × 10 processing units / 10 LDS / 10 rocket fuel = 1,000 of each), and a note that RCUs don't exist in 2.0.
  • game_types.py: the two alias comments say every inserter has filter slots and what each name maps to.
  • set_entity_recipe/agent.md: "within 1 tile", plus a line that on an inserter it sets the first filter slot.
  • tools/agent.md: battery is 15 per 60 seconds.
  • sleep docstring: "Wait for the given number of game seconds before continuing."
  • get_entities/agent.md: the 50-tile line is removed.
  • shift_entity docstring: describes what the tool does (pick up, move distance tiles in direction, place again) and its real parameters.
  • connect_entities docstring: describes the two call forms (source, target, connection_type and *waypoints, connection_type=), plus connection_type, dry_run and the return value. The retry wrapper is unchanged.
  • set_research/agent.md: a "Trigger Technologies" section lists the seven technologies and their triggers, as base/prototypes/technology.lua (2.0.73) defines them:
    • steam-power: craft 50 iron plates;
    • electronics: craft 10 copper plates;
    • automation-science-pack: craft a lab;
    • steel-axe: craft 50 steel plates;
    • oil-processing: mine crude oil;
    • uranium-processing: mine uranium ore;
    • space-science-pack: send a satellite to orbit.

Testing

  • Docs, comments and docstrings only; no behaviour changes.
  • Sources for the facts:
    • the 2.0.73 base data (technology.lua, recipe.lua, and rocket_parts_required in entity/entities.lua);
    • the tool code on main (sleep/server.lua, get_entities/server.lua, set_entity_recipe/server.lua, shift_entity/client.py, connect_entities/client.py).
  • I didn't render the full system prompt on this branch.
  • prettier is clean on the changed markdown files. ruff 0.11.13 format/check is clean on the changed Python files.

Notes

  • The connect_entities signature still shows as (*args, **kwargs); only the docstring changes. Giving the wrapper a real signature would be a code change.
  • I didn't add a note to get_research_progress about what it returns for a trigger technology. I haven't checked research_unit_count on a trigger technology against a server.
  • This branch merges cleanly with fix(research): name every Factorio 2.0 technology, accept names, list closest on unknown #430 (which also edits set_research/agent.md) and with the other open tool PRs.

🤖 Generated with Claude Code

- launch_rocket: a 2.0 rocket is 100 rocket parts, each 10 processing units,
  10 low density structures and 10 rocket fuel; rocket control units are gone.
- game_types: FilterInserter / StackFilterInserter comments say every 2.0
  inserter has filter slots instead of "use fast-inserter".
- set_entity_recipe: the search is within 1 tile, and on an inserter it sets
  the first filter slot.
- agent.md statistics: battery is 15 per 60 seconds (4 s recipe).
- sleep: no 15 second cap; get_entities: no 50 tile radius cap.
- shift_entity: replace the docstring copied from get_connection_amount.
- connect_entities: the prompt showed connect_entities(*args, **kwargs) with
  "Wrapper method with retry logic"; document the call forms instead.
- set_research: list the 2.0 trigger technologies and their triggers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant