Important
This tool generates console commands (/c) for Factorio. It does not patch saves or mods directly.
- Features
- Technology Stack
- Technical Notes
- Getting Started
- Testing
- Deployment
- Usage
- Configuration
- License
- Community and Support
- Support the Development
-
Lua command generation for linked belts Generates
/ccommands to spawnlinked-beltentities at player-relative coordinates. -
Tag-driven pairing workflow Lets you define custom tags for source and destination belts so you can wire pairs predictably.
-
Auto-generated link command Builds a combined command using
game.get_entity_by_tag(...), setslinked_belt_type(input/output), then callsconnect_linked_belts(...). -
Copy-to-clipboard UX One-click copy buttons for each generated command block with instant visual feedback.
-
Built-in localization layer Supports multiple UI languages via profile-based locale scripts and persists selection in
localStorage. -
Factorio-themed frontend Pixel-ish dark style tuned to match the in-game visual vibe.
- Languages: HTML5, CSS3, vanilla JavaScript (ES6+)
- Runtime model: Static client-side web app (no backend, no build step)
- Localization: Dynamic script loading from
profiles/*.js - Persistence: Browser
localStoragefor language preference - Target domain: Factorio linked-belt command authoring
.
βββ index.html # App markup and UI layout
βββ style.css # Factorio-inspired styling and animations
βββ script.js # Core command generation, localization, clipboard logic
βββ profiles/ # Locale dictionaries loaded at runtime
β βββ en.js
β βββ ru.js
β βββ ...other locales
βββ README.md
βββ CONTRIBUTING.md
βββ CODE_OF_CONDUCT.md
βββ LICENSE
-
No framework, no bundler The project stays framework-free to keep startup overhead near-zero and make contribution friction minimal.
-
Deterministic command templates Command templates are stored as static string literals and patched only at tag placeholders, making generated output predictable.
-
Lazy locale loading Locale files are loaded only when needed, so the default initial load remains lightweight.
-
Graceful i18n fallback If a locale cannot be loaded, the app automatically falls back to Russian to avoid a broken UI.
Tip
If you are shipping this tool on a static host, keep the profiles/ directory intact; locale loading is path-based.
You only need:
- A modern browser (Chrome, Edge, Firefox, Safari)
- Factorio client (for actually executing generated console commands)
Optional but useful for contributors:
- Git
- Any local static server (for example
python -m http.server)
# 1) Clone the repo
git clone https://github.com/OstinUA/linked-belt.git
# 2) Enter the project folder
cd linked-belt
# 3) Run locally (option A: open directly)
# Open index.html in your browser
# 4) Run locally (option B: local static server, recommended)
python -m http.server 8080
# then open http://localhost:8080Note
Direct file-open mode works, but using a local server is more robust for testing locale script loading and browser behavior consistency.
This repository currently has no formal automated test suite, but you can run pragmatic quality checks:
# Validate JS syntax
node --check script.js
# Quick static smoke test with a local server
python -m http.server 8080
# open http://localhost:8080 and verify:
# - tag inputs update all command blocks
# - copy buttons work
# - language switching updates labels and persists after reloadManual functional checklist:
- Enter two distinct tags.
- Confirm both belt commands use the correct tags.
- Confirm combined command references both tags and links entities.
- Paste commands into Factorio console and validate behavior in-game.
This is a static web app, so deployment is straightforward.
- GitHub Pages
- Netlify
- Vercel (static mode)
- Any CDN/object storage static site hosting
# Push main branch and publish root as static content
git push origin mainWarning
If you deploy under a subpath, ensure relative paths like profiles/<lang>.js remain resolvable.
1) Open the app in browser.
2) Set tag for loading belt (input), e.g. iron_bus_in.
3) Set tag for unloading belt (output), e.g. iron_bus_out.
4) Copy command #1 and execute in Factorio console.
5) Copy command #2 and execute in Factorio console.
6) Copy combined command and execute it to link both entities.
Example generated linking snippet:
/c
local i = game.get_entity_by_tag('iron_bus_in')
local o = game.get_entity_by_tag('iron_bus_out')
i.linked_belt_type = 'input'
o.linked_belt_type = 'output'
i.connect_linked_belts(o)Caution
Tags must be unique and exact. If either tag points to the wrong entity (or no entity), linking will fail.
There is no .env or server-side config in this project.
Current configurable behavior:
- Language selection is persisted in
localStorageunder key:linked-belt-lang. - Supported locales are defined by files in
profiles/and options in the language dropdown. - Default fallback locale is Russian (
ru) when a selected locale fails to load.
Distributed under the Apache License 2.0. See LICENSE for details.
Project created with the support of the FCTostin community.
- GitHub: OstinUA
- Team page: FCTostin-team
- Contribution process: see
CONTRIBUTING.md.