Chat AI Player - Autonomous Character Controller

by sumfeng

Creates and controls AI character entities directly via LuaControl API. Autonomous character controller with built-in behavior engine. AI characters can patrol-collect resources, build ghosts, auto-craft items, follow the player in combat mode, and execute one-shot movement or crafting commands - all without external dependencies.

Utilities
a month ago
2.1
64
Character Cheats

g UI text

2 months ago

All of UI texts are in chinese.

Also the Github link is dead.

2 months ago

Version: 0.1.1
Date: 2026-07-14
Features:
- English UI support via Factorio locale system (auto-adapts to player language)
- Minimap chart tags showing AI character positions with robot icon and name
- On-load callback preservation: GUI buttons now work after loading a save
- /reload console command for hot-reloading mod scripts
- English keyword commands: mine, spawn, stop, status, follow, build patrol, goto, craft
- English short resource names: iron, copper, coal, stone, uranium
Changes:
- All GUI labels, console messages, and behavior notifications now localized
- shooting_state corrected to use defines.shooting enum format
- Weapon range check uses AMMO_RANGE distance instead of can_reach_entity
Bugfixes:
- Fixed AI character not shooting despite having weapon and ammo
- Fixed GUI buttons unresponsive after save load
- Fixed count must be positive error in combat ammo refill
- Fixed "Unknown key" errors: all locale references must use {"text.key"} format
- Fixed "LuaPlayer doesn't contain key language" crash
- Fixed "attempt to concatenate a table value" in GUI append_output and refresh_chat
- Fixed chat history showing locale key names instead of readable text
- Fixed double-print on depot assign (Actions.print + execute_command both printed)
- Fixed hardcoded Chinese text in tooltips, console messages, GUI labels

a month ago
(updated a month ago)

Some texts are still in chinese (chat history, output) ...
[text.msg-action-stopped]
[text.msg-action-stopped]
Also Github link is still dead...

1570.042 Script @chat-ai-player/scripts/logger.lua:64: ChatAiPlayer [2685] [ERROR] [behavior_engine] execute_player_rule error: LuaRecipe doesn't contain key category.

a month ago

Version: 0.1.3
Date: 2026-08-13
Features:
- Pathfinding: replaced A* with async request_path + waypoint following
- Pathfinding: stuck detection (30-tick progress check) with teleport fallback
- Pathfinding: NO_PATH / unreachable targets now teleport 10-20 tiles toward goal
- Pathfinding: long waypoint lists simplified to max 50 waypoints
- Build-patrol: single-target loop (one ghost/deconstruct at a time)
- Build-patrol: multi-worker zone division to reduce path overlap
- Build-patrol: skipped-target tracking with auto-clear to avoid scan deadlock
- Build-patrol: active ghost.revive() building and mining_state deconstruction
- Build-patrol: move_deposit phase sorts deconstructed items into matching chests
- Patrol-collect: skip ores covered by buildings; blocked-resource quick timeout
- Combat-follow: zigzag movement to reduce hit chance
- Combat: auto-equip weapon from inventory; ammo compatibility check
- Combat: corpse selection prefers the corpse that still has items
- Depot: box classification storage with auto-sort and mark-depot tags
- Stop-crafting command (stop_auto_craft intent)
- i18n: new scripts/i18n.lua async translation module (on_string_translated)
- GUI: quick-command buttons now submit localized command text (zh-CN + en)
Changes:
- GUI button layout updated
- walking_state only set on state change to avoid per-tick animation resets
Bugfixes:
- Fixed malformed locale placeholders (.0f1/2/3) causing
literal ".0f" text in console and chat history
- Fixed English keyword ordering so "Stop crafting" / "Clear mark" match the
correct intent instead of generic stop/clear
- Fixed GUI quick-command buttons inserting hardcoded Chinese text in English mode

New response