perl/schtarr.git
15 years agoXXX: scmap: restore metadata marking (era-dependant styling) master
Mischa POSLAWSKY [Thu, 12 Feb 2009 05:08:46 +0000 (06:08 +0100)]
XXX: scmap: restore metadata marking (era-dependant styling)

15 years agoXXX: handle multiple MTXM chunks correctly (tileset obfuscation for example in BlitzX...
Mischa POSLAWSKY [Thu, 12 Feb 2009 05:07:55 +0000 (06:07 +0100)]
XXX: handle multiple MTXM chunks correctly (tileset obfuscation for example in BlitzX_200)

15 years agoXXX: TileSet: imager
Mischa POSLAWSKY [Thu, 12 Feb 2009 02:34:19 +0000 (03:34 +0100)]
XXX: TileSet: imager

15 years agoXXX: scmap: literal map image
Mischa POSLAWSKY [Thu, 12 Feb 2009 02:32:56 +0000 (03:32 +0100)]
XXX: scmap: literal map image

15 years agofix debug messages during replay parsing
Shiar [Sun, 28 Sep 2008 03:10:10 +0000 (05:10 +0200)]
fix debug messages during replay parsing

Verbosity is defined by $SHOWWARN in the main namespace, which needs to
be specified specifically since moving into a different module.

15 years agoscrep: postpone loading modules for optional features
Shiar [Sun, 28 Sep 2008 03:06:09 +0000 (05:06 +0200)]
screp: postpone loading modules for optional features

Load modules at runtime, so they do not need to be installed if they
aren't used.

15 years agoscmap: correct tileset detection
Shiar [Sun, 21 Sep 2008 01:24:50 +0000 (03:24 +0200)]
scmap: correct tileset detection

Only lower 3 bits indicate tileset.  Other (unknown) bits are also set
in some maps, resulting in an incorrect detection.

15 years agoimprove scmap color coding to tile function
Shiar [Fri, 11 Jul 2008 22:35:05 +0000 (00:35 +0200)]
improve scmap color coding to tile function

Figure out some specific bitmask values of Data::StarCraft::Tileset
->tileavg->{walk} (besides for &1 for obvious walkability, and ignoring
anything above the random pick of 10).

Ramps (height transfers) are always &16 at some point, so mark those
with green because they're usually very significant control points.

&2 and 4 seem to indicate ground level.  Not highlighted yet because
tile color usually gives a good clue already.  Maybe a special mode
later.

&8 appears to be high level, but never for ground, but only sole objects
like statues (blocking vision?). Don't know what to do with those
exactly, but set a bright red color for now to identify them.

15 years agoData::StarCraft::Tileset->tileavg optimization
Shiar [Sat, 19 Jul 2008 20:39:36 +0000 (22:39 +0200)]
Data::StarCraft::Tileset->tileavg optimization

Split out summation of each color channel, similar to col().
This is quite significant (can easily save over a second to run for all
tiles in a map).

15 years agographplay: draw unit limit
Shiar [Mon, 11 Feb 2008 20:15:15 +0000 (21:15 +0100)]
graphplay: draw unit limit

Fill area between current unit count and unit cap (same color as units
line, but transparant).

15 years agodocument sample usage in scmap
Shiar [Wed, 9 Jul 2008 22:18:25 +0000 (00:18 +0200)]
document sample usage in scmap

15 years agorecognize all tilesets in scmap::world
Shiar [Wed, 9 Jul 2008 22:16:05 +0000 (00:16 +0200)]
recognize all tilesets in scmap::world

These should be all eight eras.  Does not always match because many
(custom) maps do not match to 0..7 - still need to figure out why.

15 years agocomplete tile drawing support in Data::StarCraft::Tileset
Shiar [Wed, 9 Jul 2008 22:04:34 +0000 (00:04 +0200)]
complete tile drawing support in Data::StarCraft::Tileset

Read minitile data (including full bitmaps) and palette.

Several new methods to get tile information:
- tile gives general details, including an image of one pixel per
  minitile.
- tileavg aggregates all minitile data to just one total per tile,
  including the average color of all minitiles.
- sprite gives the full bitmap of any tile.

Replaces manual guesswork in Data::StarCraft::Map and conversion in
scmap.

15 years agoData::StarCraft::Tileset to parse tileset data
Shiar [Tue, 11 Dec 2007 15:56:21 +0000 (16:56 +0100)]
Data::StarCraft::Tileset to parse tileset data

Initial module setup to parse map tiles, using individual tileset files
extracted from mpq files.

15 years agocapture: license under dual gpl/perl
Shiar [Sun, 10 Feb 2008 07:17:40 +0000 (08:17 +0100)]
capture: license under dual gpl/perl

16 years agocapture and graphplay scripts take command line options
Shiar [Sun, 10 Feb 2008 07:13:54 +0000 (08:13 +0100)]
capture and graphplay scripts take command line options

Fix the need to modify code for changing run mode.
Debug mode can be triggered by --verbose (-v).
Map capturing can be enabled by --map (-m).
Common --version and --help are handled as a bonus (short documentation
setup written for capture).

16 years agocapture: put text filter colors on seperate lines
Shiar [Fri, 8 Feb 2008 18:50:00 +0000 (19:50 +0100)]
capture: put text filter colors on seperate lines

Valid colors to filter_color() put on seperate lines to allow source
comments and easy extension on future encounters.

16 years agosimplify paths produced by graphplay
Shiar [Wed, 6 Feb 2008 21:39:30 +0000 (22:39 +0100)]
simplify paths produced by graphplay

Only keep first and last entries for identical values. In other words,
horizontal lines will not have each pixel specified, but only the two
corners. This already results in significantly smaller files (test case
went from 1.8MB to 1.5MB, and to just 130kB for unit graphs!). The same
thing should be done for sloped lines, but this is not as obviously
simple.

16 years agographplay to draw SVG graphs of gameplay statistics
Shiar [Wed, 6 Feb 2008 21:39:30 +0000 (22:39 +0100)]
graphplay to draw SVG graphs of gameplay statistics

Parses game stats output of capture script, and draws progression of
minerals, gas, and units over time per player.

SVG is simple enough to write manually (template at *DATA), but
produces essentially the same as SVG::TT::Graph::TimeSeries would
(except much faster and easier to understand/modify).

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