perl/schtarr.git
16 years agofix game capture position of timer
Shiar [Thu, 7 Feb 2008 22:23:37 +0000 (23:23 +0100)]
fix game capture position of timer

Offset 586 included a leading semicolon at "Elapsed Time: 11:11"
(shortest text displayed, so furthermost left).

16 years agorewritten game capture
Shiar [Wed, 6 Feb 2008 17:59:15 +0000 (18:59 +0100)]
rewritten game capture

Uses Imager for its nicer Perl interface and available X11 capture
module. Depending on command line arguments, opens image files or
captures from DISPLAY (map every second (doesn't update any more often),
stats more often). Characters are compared by all pixels (and ignoring
'shadow' colors for much greater effect).

16 years agogame capture prototype
Shiar [Fri, 1 Feb 2008 03:35:18 +0000 (04:35 +0100)]
game capture prototype

Parses game screenshots (either by display capture or reading image files).
Writes animated gif of minimap area, and tries to parse the game status
texts (player stats and replay time). Character parsing is done as a match
of total color value per pixel column (cannot distinguish between certain
digits), but at least it's a working setup.

16 years agoMerge commit 'raz/master'
Shiar [Sat, 19 Jan 2008 05:29:47 +0000 (06:29 +0100)]
Merge commit 'raz/master'

Conflicts:
screp

16 years agoscmtomap: extract map data from scm
Shiar [Wed, 28 Nov 2007 03:54:21 +0000 (04:54 +0100)]
scmtomap: extract map data from scm

Perl Archive::MoPaQ map extractor prototype. Assumes the data to be the
first file part, which certainly isn't always correct (detection later).
Can only extract to an external file rightnow.

16 years agoscrep: insert replay data directly into database
Shiar [Thu, 17 Jan 2008 06:17:40 +0000 (06:17 +0000)]
screp: insert replay data directly into database

Automates either a complete insert of game and players through --dbname
option (requires replay file as argument to assertain mtime), or --dbid
to add replay data to an existing game entry (initial insert from pvpgn
report; only sets data unique to replay).

16 years agoGames::StarCraft::DB class for schtarr database
Shiar [Thu, 17 Jan 2008 06:16:07 +0000 (06:16 +0000)]
Games::StarCraft::DB class for schtarr database

DBIx::Simple with automated connect to starcraft database.
Configured through @Games::StarCraft::DB::Conf, set in untracked
Games::StarCraft::DB::Local class (loaded automatically).

Replaces manual DBIx::Simple setup with config from dbinfo.inc.pl.

16 years agorun options can be given to pvpgnreport
Shiar [Thu, 17 Jan 2008 06:09:20 +0000 (06:09 +0000)]
run options can be given to pvpgnreport

Arguments -t and -v allow easy setup of $TEST and $DBG respectively.
Also reports 1.00 as --version now.

16 years agoscrep: show slot numbers in player summary
Shiar [Sat, 12 Jan 2008 02:57:48 +0000 (02:57 +0000)]
screp: show slot numbers in player summary

Useful to know player id for later processing.

16 years agoscrep --version|--help
Shiar [Thu, 17 Jan 2008 05:34:37 +0000 (05:34 +0000)]
screp --version|--help

Simple version and usage options for screp tool.
Also allow single-char options bundled (i.e. -va for -v -a).

16 years agoseperate class Data::StarCraft::PvPGN::Report
Shiar [Tue, 1 Jan 2008 22:26:01 +0000 (22:26 +0000)]
seperate class Data::StarCraft::PvPGN::Report

Move pvpgn report file parser code into its own class.
Same functionality, except now reusable outside of pvpgnreport.

16 years agosupport auto-add of recordless replays
Shiar [Sat, 12 Jan 2008 21:23:23 +0000 (21:23 +0000)]
support auto-add of recordless replays

16 years agonew replay name shorthand 'Nxxnxn' for date prefix of N days ago
Shiar [Sat, 12 Jan 2008 21:21:24 +0000 (21:21 +0000)]
new replay name shorthand 'Nxxnxn' for date prefix of N days ago

16 years ago'new' script for automatic game insertion into database
Shiar [Fri, 11 Jan 2008 01:14:46 +0000 (01:14 +0000)]
'new' script for automatic game insertion into database

16 years agodo not track generated files for Archive::MoPaQ
Shiar [Mon, 31 Dec 2007 16:37:54 +0000 (17:37 +0100)]
do not track generated files for Archive::MoPaQ

16 years agogive an error if pvpgn report insertion fails
Shiar [Mon, 31 Dec 2007 16:19:26 +0000 (16:19 +0000)]
give an error if pvpgn report insertion fails

16 years agostrip path name to pvpgn report file for name
Shiar [Mon, 31 Dec 2007 16:18:35 +0000 (16:18 +0000)]
strip path name to pvpgn report file for name

16 years agoirc bot reporting on bnetd activities
Shiar [Mon, 31 Dec 2007 16:11:46 +0000 (16:11 +0000)]
irc bot reporting on bnetd activities

Connects to #schtarr at flutnet and prints out basic Starcraft activity
on the server (players entering/leaving, games starting/ending).

16 years agorecognize team in replay's player data
Shiar [Mon, 31 Dec 2007 15:42:53 +0000 (15:42 +0000)]
recognize team in replay's player data

16 years agoparse ladder info from pvpgn logs
Shiar [Tue, 13 Nov 2007 23:36:27 +0000 (23:36 +0000)]
parse ladder info from pvpgn logs

16 years agoData::StarCraft::Replay package taken out of screp
Shiar [Tue, 27 Nov 2007 19:29:49 +0000 (20:29 +0100)]
Data::StarCraft::Replay package taken out of screp

16 years agoscrep --act to create an animated image of replay actions
Shiar [Wed, 14 Nov 2007 07:55:33 +0000 (08:55 +0100)]
screp --act to create an animated image of replay actions

Creates an animated GIF using GD, with pixels set at move/attack/builds
locations for each player per time period. Could use some love.

16 years agoData::StarCraft::Map package taken out of scmap
Shiar [Tue, 27 Nov 2007 19:18:02 +0000 (20:18 +0100)]
Data::StarCraft::Map package taken out of scmap

16 years agoArchive::MoPaQ - perl interface to libmpq
Shiar [Tue, 27 Nov 2007 18:54:42 +0000 (19:54 +0100)]
Archive::MoPaQ - perl interface to libmpq

Module setup using h2xs.

Provides basic methods to open an archive and extract files by number,
but not much else yet.

16 years agopvpgn report file parser
Shiar [Sun, 11 Nov 2007 23:50:51 +0000 (23:50 +0000)]
pvpgn report file parser

Reads a game report file (mixed formatting of formatted text and xml),
and inserts basic game information into the database.

16 years agoscrep -a to write an SVG file with apm history per player
Shiar [Mon, 12 Nov 2007 20:06:05 +0000 (21:06 +0100)]
screp -a to write an SVG file with apm history per player

Uses SVG::TT::Graph::TimeSeries to draw a (very) nice graph of average
action speeds per user over the course of the game.

16 years agoscrep: parse player data
Shiar [Mon, 12 Nov 2007 20:03:52 +0000 (21:03 +0100)]
screp: parse player data

Shows players by name and race.

16 years agoscrep: do not include trailing nulls in map name
Shiar [Mon, 12 Nov 2007 15:15:17 +0000 (16:15 +0100)]
screp: do not include trailing nulls in map name

16 years agoscrep: document unknown command 0x1B
Shiar [Mon, 12 Nov 2007 15:14:46 +0000 (16:14 +0100)]
screp: document unknown command 0x1B

16 years agoscrep: fix apm (ignore first 1'20 correctly)
Shiar [Mon, 12 Nov 2007 15:14:22 +0000 (16:14 +0100)]
screp: fix apm (ignore first 1'20 correctly)

16 years agoscrep: show number of played frames
Shiar [Mon, 12 Nov 2007 14:05:03 +0000 (15:05 +0100)]
screp: show number of played frames

Last frame (and it's time at fastest) for each player.
No more need to show general last frame ('duration').

16 years agoalso read replay header in screp
Shiar [Mon, 12 Nov 2007 04:24:26 +0000 (05:24 +0100)]
also read replay header in screp

Parses the header leading commands (no problem since it should always
have a constant size), so input (extractor) needs to be modified.
Recognizes most data, but players array can benefit from some additional
parsing and usage in commands output.

16 years agostarcraft replay parser
Shiar [Sun, 11 Nov 2007 23:38:03 +0000 (00:38 +0100)]
starcraft replay parser

Read commands part from a StarCraft replay file on stdin (cannot extract
this itself yet), and parses all command blocks. Outputs each player's
apm by default.

Maps ids of commands, build types, units, upgrades, and actions into an
appropriate text. Gives warnings when it encounters something not
recognized.

Most format details were supplied by the document 'Starcraft Replay file
format description' version 0.10 by Soar Chin <webmaster@soarchin.com>.

16 years agostarcraft replay map parser
Shiar [Wed, 7 Nov 2007 03:30:52 +0000 (04:30 +0100)]
starcraft replay map parser

Reads a raw map extracted from a replay, and parses its data into a perl
hash. Input is given on stdin, and accepts command line arguments for
setting options.

Can also format map tiles to an ascii or ppm picture, as far as I could
determine the tile identifier. It handles Jungle maps quite decently
(though all data was set up by comparing output to minimaps and map
thumbnails); especially all data in most Lost Temple maps are defined.

Started on support for other tilesets (not only colors differ, but
apparantly also meanings (ramp = wall for example)), but needs to be
worked out.

After collecting sufficient guess points, hopefully a more
complete/abstract determination can be made.

16 years agopure perl mopaq parser setup
Shiar [Sun, 4 Nov 2007 18:05:43 +0000 (19:05 +0100)]
pure perl mopaq parser setup

To get started. Can read and parse a mpq header, but neither good nor
efficient. Built from format description at
https://zohar.devklog.net/projects/mpqkit/wiki/MoPaQ_Format