Add ProjectZomboidCmdLog (cmd.txt)

Per-line client RPC trace. Parser captures only the timestamp;
analysers decompose steamid/player/command/coords via CmdPattern::FIELDS.
Detectors: filename match plus content signature on the
'steamid "name" command @ x,y,z' line shape.
This commit is contained in:
2026-04-30 20:36:26 +00:00
parent e74c105625
commit cc9c512667
4 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace IndifferentKetchup\Codex\Pattern\ProjectZomboid;
/**
* Regex constants for the Project Zomboid cmd.txt format.
*
* [time] steamid "player" command @ x,y,z.
*
* LINE captures, in order:
* 1. time
*/
class CmdPattern
{
public const string LINE = '/^\[(\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3})\] \d{17} "[^"]+" \S+ @ \d+,\d+,\d+\.$/';
public const string FIELDS = '/^\[\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}\] (?<steamid>\d{17}) "(?<player>[^"]+)" (?<command>\S+) @ (?<x>\d+),(?<y>\d+),(?<z>\d+)\.$/';
}