Skip to content

Noisemaker111/server-spider-dashboard

Repository files navigation

Server Spider

Purpose

  • Custom spidertron named server-spider controllable in-game with english by sending commands to the next.js server from the in-game chat using RCON through a factorio server.

tasks it should be able to do

  • move to a location
  • mine a resource
  • craft an item
  • follow a player
  • stop following a player
  • stop all actions

Install (script)

./script/Move-compress-install.ps1

What it does:

  • Reads info.json to get name/version
  • Zips to mods Folder
  • Enables the mod in the modlist

Server / RCON

  • Launch Factorio via Steam with RCON (Steam enforces command confirmation; use Steam properties):

    • Steam → Library → Factorio → Properties → Launch Options: --rcon-bind 127.0.0.1:27015 --rcon-password server-spider --start-server-load-latest
  • Next.js env (.env.local):

    # DASH_TOKEN is optional; if omitted, a secure per-launch token is generated
    # DASH_TOKEN=your-secret-token
    RCON_HOST=127.0.0.1
    RCON_PORT=27015
    RCON_PASSWORD=server-spider
    RCON_VERBOSE=1
  • Start the dashboard:

    npm run dev

    Open the dashboard. Auth initializes automatically and sets an HttpOnly cookie; no manual token entry needed.

  • Endpoints/controls:

    • /api/rcon/ping checks RCON connectivity
    • /api/rcon/poll fetches queued A! requests for the agent

Behavior Notes

  • Movement uses waypoint queue via add_autopilot_destination.
  • Force: uses game.forces.player.
  • Finder selects the first matching spider on a surface.
  • In-game logs (chat): queue, poll, move/go, and agent messages are printed with [server-spider] tags for visibility.

Current Test Suite

  • Follow me
  • follow noiseymaker11
  • mine iron ore
  • mine a big rock
  • mine 5 stone and craft a stone-furnace
  • go to nearest enemy
  • chop nearest tree
  • stop all actions
  • stop following a player
  • move up 10 then right 10
  • research Automation

Feature Test Suite

  • move to a tagged location
  • put items in a chest/furnace/assembler

Broad Future Features