readLogfile: Parse Nethack Logfiles

NethackLogfilesR Documentation

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 TRUE.

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

Date; end of game

birth.date

Date; start of game

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://alt.org/nethack/

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)

enricoschumann/NethackLogfiles documentation built on Feb. 3, 2023, 2:36 p.m.