Loading...
Loading...
Launch, see and drive a real game so an agent can test its own mods. Covers launching via Steam or the exe, windowed mode at a fixed size, screenshots of the game window (GPU-safe capture), clicking and typing into menus, holding keys, relative mouse, crash-reporter cleanup, killing by PID, reading logs, scripted test scenes, and an in-game JSON bridge that lets an agent observe and act. Windows-first (also from WSL), with notes for Linux and macOS. Use when a mod must be verified in game, when navigating menus automatically, or when building a repeatable test or demo scene.
npx skill4agent add rehan-remade/universal-modder game-automationum winum win setup # once: PowerShell tools + an ffmpeg with gfxcapture, picks NVENC/AMF/QSV/x264
um win ps # windowed processes: pid, name, title
um win launch --steam 105600 # or: um win launch "C:\Games\Foo\Foo.exe" -- -windowed
um win shot --exe Terraria.exe shot.png --scale 0.33 # full frame + a 1/3 copy that's cheap to look at
um win drive --proc Terraria "focus" "click 640 360" "key 0x1B" "type hello" "hold 0x44 1500"
um win drive --proc Terraria idle # seconds since the user last touched mouse/keyboard
um win kill <pid> # exact PID only
um win reg get "HKCU\Software\..." # registry (reg set backs the key up first)from um.win import Drive, shot, Recorderd = Drive("AoE2DE_s")d.focus()d.click(x, y)d.key("0x0D")um/ps1/WinDrive.ps1move x yclick x y [right]mdownmupdrag x0 y0 x1 y1rel dx dywheel 120key <vk> [tap|down|up]hold <vk> <ms>type <text>scanmode onfocusrectsize <w> <h>titlefgidleuntopidleknowledge/techniques/driving-real-games-safely.mdidle--scale 0.33[/Script/Engine.GameUserSettings]GameUserSettings.iniScreenmanager Fullscreen modeResolutionHKCU\Software\<company>\<product>-windowed -w 1920 -h 1080-screen-fullscreen 0 -screen-width 1920 -screen-height 1080-sw -w 1920 -h 1080Mode DisplayWindowed Width/Heightum win drive --proc X "size 1920 1080"-skipintro-nosplash-popupwindow-skipselect Player:WorldMain.instance.InactiveSleepTime = TimeSpan.ZeroApplication.runInBackground = truet.IdleWhenNotForeground 0/arsenal/mothership127.0.0.1examples/terraria-tmodloader/reference/AgentBridge.csobserveclick <id>controlsstepBsSndRpt64.exeCrashReportClient.exeUnityCrashHandler64.exeum win psum win kill <pid>pkill -ftaskkill /IMxdotool search --name "Game" windowactivate --sync key Escapexdotool mousemove --window $W 640 360 click 1import -window $(xdotool search --name Game) shot.pngx11grabgrimWINEDLLOVERRIDESPROTON_LOG=1screencapture -l <windowid> shot.pngGetWindowIDosascriptcliclick