Difference between revisions of "Xlogfile"

From NetHackWiki
Jump to navigation Jump to search
(Add reference section)
m (File format: Grammar/style)
 
(8 intermediate revisions by 4 users not shown)
Line 8: Line 8:
 
}}
 
}}
  
'''xlogfile''', or the extended [[logfile]], is a [[compile-time option]] for NetHack that makes the game log more data at the end of a game. The data is saved into a file xlogfile in the same directory as the normal logfile. Each line contains several <tt>field=value</tt> pairs, separated by a colon. For example:
+
'''xlogfile''', or the extended [[logfile]], is a [[compile-time option]] for NetHack that makes the game log more data at the end of a game than is stored by default in the regular [[logfile]]
version=3.4.3:points=55590:deathdnum=0:deathlev=7:maxlvl=12:hp=-14:maxhp=92:deaths=1:deathdate=20090502:birthdate=20090501:uid=5:role=Tou:race=Hum:gender=Fem:align=Neu:name=gibbas:death=killed by a mumak:conduct=0xf86:turns=16662:achieve=0x400:realtime=18452:starttime=1241195443:endtime=1241214565:gender0=Fem:align0=Neu
 
  
The xlogfile began as a [[patch]] for [[NetHack 3.4.3]]. It was incorporated into the mainline in [[NetHack 3.6.0]]. It is an optional feature, and can be removed by commenting out the definition of XLOGFILE in include/config.h.
+
The xlogfile began as a [[patch]] for [[NetHack 3.4.3]]. It was incorporated into the mainline in [[NetHack 3.6.0]]. It is an optional feature, enabled by default, and can be removed by commenting out the definition of XLOGFILE in include/config.h.
  
Most of the fields are self-explanatory, or are the same as in the normal logfile, except:
+
== File format ==
  
*conduct: A bitfield in hexadecimal format:
+
The data is saved into a file named <code>xlogfile</code> in the same directory as the normal logfile. Each line contains several <tt>field=value</tt> pairs, delimited by tabs. For example:
**0x001: Foodless
+
version=3.6.3 points=972 deathdnum=0 deathlev=4 maxlvl=5 hp=0 maxhp=48 deaths=1 deathdate=20191206 birthdate=20191206 uid=5 role=Val race=Hum gender=Fem align=Law name=merpish death=killed by a water elemental conduct=0xf80 turns=3711 achieve=0x0 realtime=708 starttime=1575647272 endtime=1575647980 gender0=Fem align0=Law flags=0x4
**0x002: vegan
+
 
 +
In the original patch, fields are delimited by colons.
 +
 
 +
Most of the fields are self-explanatory, or are the same as in the normal [[logfile]]. Exceptions are:
 +
 
 +
*[[conduct]]: A bitfield in hexadecimal format:
 +
**0x001: [[Foodless]]
 +
**0x002: Vegan
 
**0x004: Vegetarian
 
**0x004: Vegetarian
**0x008: Atheist
+
**0x008: [[Atheist]]
**0x010: Weaponless
+
**0x010: [[Never hit with a wielded weapon|Weaponless]]
**0x020: Pacifist
+
**0x020: [[Pacifist]]
**0x040: Illiterate
+
**0x040: [[Illiterate]]
 
**0x080: Polypileless
 
**0x080: Polypileless
 
**0x100: Polyselfless
 
**0x100: Polyselfless
**0x200: Wishless
+
**0x200: [[Wishless]]
 
**0x400: Artifact wishless
 
**0x400: Artifact wishless
 
**0x800: Genocideless
 
**0x800: Genocideless
 
*achieve: A bitfield in hexadecimal format:
 
*achieve: A bitfield in hexadecimal format:
**0x001: Got the [[Bell of Opening]]
+
**0x0001: Got the [[Bell of Opening]]
**0x002: Entered [[Gehennom]]
+
**0x0002: Entered [[Gehennom]]
**0x004: Got the [[Candelabrum of Invocation]]
+
**0x0004: Got the [[Candelabrum of Invocation]]
**0x008: Got the [[Book of the Dead]]
+
**0x0008: Got the [[Book of the Dead]]
**0x010: Performed the [[Invocation]]
+
**0x0010: Performed the [[Invocation]]
**0x020: Got the [[Amulet of Yendor]]
+
**0x0020: Got the [[Amulet of Yendor]]
**0x040: Was in Endgame
+
**0x0040: Was in the [[End Game]]
**0x080: Was on The [[Astral Plane]]
+
**0x0080: Was on the [[Astral Plane]]
**0x100: Ascended
+
**0x0100: Ascended
**0x200: Got the [[Luckstone]] at the [[Mine's End]]
+
**0x0200: Got the [[Luckstone]] at [[Mines' End]]
**0x400: Finished [[Sokoban]]
+
**0x0400: Finished [[Sokoban]]
**0x800: Killed [[Medusa]]
+
**0x0800: Killed [[Medusa]]
 +
**0x1000: [[Zen]] conduct intact
 +
**0x2000: [[Nudist]] conduct intact
 
*realtime: How long the game was, in seconds.
 
*realtime: How long the game was, in seconds.
 
*starttime and endtime: Seconds since [[wikipedia:UNIX Epoch|UNIX Epoch]].
 
*starttime and endtime: Seconds since [[wikipedia:UNIX Epoch|UNIX Epoch]].
 
*gender0: The original (starting) [[gender]].
 
*gender0: The original (starting) [[gender]].
 
*align0: The original (starting) [[alignment]].
 
*align0: The original (starting) [[alignment]].
*death: all colons are replaced with underscores, otherwise the same as in normal logfile.
+
*death: All colons are replaced with underscores, otherwise the same as in the normal logfile.
 
*flags: A bitfield in hexadecimal format:{{reffunc|topten.c|encodexlogflags}}
 
*flags: A bitfield in hexadecimal format:{{reffunc|topten.c|encodexlogflags}}
 
**0x1: [[Wizard mode]]
 
**0x1: [[Wizard mode]]
 
**0x2: [[Discover mode]]
 
**0x2: [[Discover mode]]
**0x4: Never loaded a [[Bone file]]
+
**0x4: Never loaded a [[Bones]] file
 +
 
 +
{{upcoming|NetHack 3.7.0|The fields <code>conductX</code> and <code>achieveX</code> are added that encode conducts and game achievements in text form, allowing for easier addition of new conducts and achievements and making the file easier to read by humans.}}
  
 
==References==
 
==References==
Line 55: Line 65:
  
 
[[Category:Annotations]]
 
[[Category:Annotations]]
{{nethack-360}}
+
[[Category:Patches]]
 +
{{nethack-366}}

Latest revision as of 18:23, 16 June 2021

This page is a stub. Should you wish to do so, you can contribute by expanding this page.
xlogfile
Author Aardvark Joe
Download unknown
NetHack PatchDB 289

xlogfile, or the extended logfile, is a compile-time option for NetHack that makes the game log more data at the end of a game than is stored by default in the regular logfile

The xlogfile began as a patch for NetHack 3.4.3. It was incorporated into the mainline in NetHack 3.6.0. It is an optional feature, enabled by default, and can be removed by commenting out the definition of XLOGFILE in include/config.h.

File format

The data is saved into a file named xlogfile in the same directory as the normal logfile. Each line contains several field=value pairs, delimited by tabs. For example:

version=3.6.3	points=972	deathdnum=0	deathlev=4	maxlvl=5	hp=0	maxhp=48	deaths=1	deathdate=20191206	birthdate=20191206	uid=5	role=Val	race=Hum	gender=Fem	align=Law	name=merpish	death=killed by a water elemental	conduct=0xf80	turns=3711	achieve=0x0	realtime=708	starttime=1575647272	endtime=1575647980	gender0=Fem	align0=Law	flags=0x4

In the original patch, fields are delimited by colons.

Most of the fields are self-explanatory, or are the same as in the normal logfile. Exceptions are:

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

The fields conductX and achieveX are added that encode conducts and game achievements in text form, allowing for easier addition of new conducts and achievements and making the file easier to read by humans.

References