Skip to content

zippyit/chat-debug

Repository files navigation

Chat Debug Mod (Factorio 2.0)

Logs chat-related events to factorio-current.log with optional system context and export tools.

What This Mod Does

  • Captures player chat messages from on_console_chat
  • Logs context with each line:
    • tick
    • player
    • surface
    • force
    • controller
    • position
  • Optionally logs join/leave system events
  • Keeps a rolling in-memory buffer of recent captured lines
  • Supports exporting the last N captured lines as one compact searchable line

Install

  1. Create a zip named chat-debug_0.1.0.zip from this folder contents:
    • info.json
    • control.lua
    • settings.lua
    • README.md
  2. Put the zip in your Factorio mods directory (example):
    • %APPDATA%\Factorio\mods
  3. Start Factorio and enable Chat Debug in the Mods menu.
  4. Load/start a save.

Runtime Settings

Open: Settings -> Mod settings -> Per map

  • chat-debug-enabled (default: true)
    • Enables/disables chat-debug logging
  • chat-debug-log-system (default: true)
    • Enables/disables join/leave system event logging

Commands

  • /chatdebug status

  • /chatdebug on

  • /chatdebug off

    • Applies a per-save runtime override (does not modify mod settings UI values)
  • /chatdebug-system status

  • /chatdebug-system on

  • /chatdebug-system off

    • Applies a per-save runtime override (does not modify mod settings UI values)
  • /chatdebug-export

  • /chatdebug-export 50

    • Exports last N captured lines (1..200) as one compact line to factorio-current.log

Log Output

Search factorio-current.log for:

  • [CHAT DEBUG]
  • [CHAT DEBUG EXPORT]

Typical Workflow

  1. Keep /chatdebug on
  2. Reproduce an issue while chatting/using debug UI
  3. Run /chatdebug-export 50
  4. Open factorio-current.log
  5. Search for [CHAT DEBUG EXPORT] and copy one line for analysis

Notes

  • If no chat happened yet, /chatdebug-export reports no captured lines.
  • Editor warnings in VS Code about script, game, defines, settings, command, log, and global are expected because those are Factorio runtime globals.

About

Chat Debug logs in-game chat activity to `factorio-current.log` so you can review, search, and share diagnostics without manually copying chat from the game UI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages