Chronicle of major events, and livelog

Log game events, such as entering a new dungeon level, breaking
a conduct, or killing a unique monster, in a new "Major events"
chronicle. The entries record the turn when the event happened.
The log can be viewed with #chronicle -command, and the entries
also show up in the end-of-game dump, if that is available.

This feature is on by default, but can be disabled by
defining NO_CHRONICLE compile-time option.

This also contains "live logging", writing the events as they
happen into a single livelog-file. This is mostly useful for
public servers. The livelog is off by default, and must be
compiled in with LIVELOG, and then turned on in sysconf.

Mostly this a version of livelogging from the Hardfought server,
with some changes.
This commit is contained in:
Pasi Kallinen
2022-02-09 22:49:25 +02:00
parent cfcfc3429f
commit 1e90f89203
43 changed files with 624 additions and 53 deletions
+4
View File
@@ -331,10 +331,14 @@ demon_talk(register struct monst *mtmp)
if (!Deaf && ((offer = bribe(mtmp)) >= demand)) {
pline("%s vanishes, laughing about cowardly mortals.",
Amonnam(mtmp));
livelog_printf(LL_UMONST, "bribed %s with %ld %s for safe passage",
Amonnam(mtmp), offer, currency(offer));
} else if (offer > 0L
&& (long) rnd(5 * ACURR(A_CHA)) > (demand - offer)) {
pline("%s scowls at you menacingly, then vanishes.",
Amonnam(mtmp));
livelog_printf(LL_UMONST, "bribed %s with %ld %s for safe passage",
Amonnam(mtmp), offer, currency(offer));
} else {
pline("%s gets angry...", Amonnam(mtmp));
mtmp->mpeaceful = 0;