Type: | Package |
Title: | Read Nethack Logfiles |
Version: | 0.99-0 |
Date: | 2019-12-24 |
Maintainer: | Enrico Schumann <es@enricoschumann.net> |
Description: | Read logfiles of the ancient game of 'Nethack'. The package provides functions for parsing logfiles and xlogfiles. Abbreviations in those files (such as character class and alignment) can be expanded. |
License: | GPL-3 |
URL: | http://enricoschumann.net/NethackLogfiles/, https://github.com/enricoschumann/NethackLogfiles |
NeedsCompilation: | no |
Packaged: | 2024-04-07 16:36:42 UTC; es19 |
Author: | Enrico Schumann [aut, cre] |
Built: | R 4.5.0; ; 2024-04-07 16:36:42 UTC; unix |
Parse Nethack Logfiles
Description
Read logfiles of the ancient game of Nethack.
Usage
read_logfile (file, version = NULL, expand.abbrevs = TRUE, verbose = TRUE)
read_xlogfile(file, version = NULL, expand.abbrevs = TRUE, verbose = TRUE, sep = "\t")
Arguments
file |
character; the logfile (or record file) |
version |
character |
expand.abbrevs |
logical; should abbreviated rolenames etc. be expanded?
Default is |
verbose |
logical: write messages? |
sep |
character: the field separator |
Details
Currently only version 3.4.3 and newer are supported (i.e. regularly tested). Logfiles for version 3.1.0 should also work.
Value
A data.frame
.
version |
Nethack version |
name |
player name |
score |
score |
dun.num |
|
dun.level |
dungeon level when killed |
dun.level.max |
deepest dungeon level visited |
hp |
hitpoints |
hp.max |
maximum hitpoints |
ndeaths |
number of deaths |
death.date |
|
birth.date |
|
uid |
uid |
role |
role |
race |
race |
gender |
gender: male or female |
alignment |
alignment |
cause |
cause of death |
while |
additional comment |
Author(s)
Enrico Schumann
References
http://www.saunalahti.fi/~juklahta/nethack.html
http://nethackwiki.com/wiki/Logfile
https://metacpan.org/source/SARTAK/NetHack-Logfile-1.00/lib/NetHack/Logfile/Entry/33.pm
http://nethack.wikia.com/wiki/NetHack_3.1.0/topten.c
https://nethackwiki.com/wiki/Source:NetHack_3.1.0/topten.c
http://ftp.sunet.se/pub/games/nethack/General/Source/Utils/reclist.c
https://github.com/NetHack/NetHack
https://github.com/enricoschumann/NethackLogfiles
https://scoreboard.xd.cm/about.html
Examples
## Not run:
library("NethackLogfiles")
nh <- read_logfile("/var/games/nethack/logfile")
nh <- read_xlogfile("/var/games/nethack/xlogfile")
table(nh$role)
boxplot(nh$score ~ nh$role)
boxplot(log(nh$score) ~ nh$role)
plot(nh$death.date, nh$score, type = "h") ## score as a time-series
boxplot(nh$score ~ format(nh$death.date, "
nh <- read_xlogfile("/var/games/nethack/xlogfile",
expand.abbrevs = FALSE)
boxplot(nh$dun.level.max ~ nh$role)
## End(Not run)