| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to have a consistent and logical ordering of branches
without requiring the branch enum itself to be reordered (which could
have save compatibility implications). The new ordering of branches just
moves Depths to the place in the ordering that it already is planned to
go on the next major save compat bump, but other changes are possible,
if desired. All places in the code that iterate over branches have been
updated to use the new iterator except for code dealing with save files,
which still uses enum order, so that we can change the display ordering
without affecting saves.
|
|
|
|
|
|
|
| |
.cc, moving its contents into the new stepdown.cc and strings.cc.
(The latter also got many donations from libutil.h.)
Down with stuff! Up the new flesh!
|
| |
|
| |
|
|
|
|
|
| |
For the basic counting field of each item and monster type, find the
minimum, maximum, and sample standard deviation over the iterations.
|
|
|
|
|
|
|
|
| |
Previously we were recording during the monster and item creation
functions, but this resulted in some excess counting, due to
(probably) objects placed in vaults on levels that were eventually
rejected. We now iterate over objects after the level generation is
complete.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously an additional check on a level that builder() had accepted
could cause both mapstat and objstat to abort. We now only abort
mapstat in this case, because these failures aren't very relevant to
objstat. We also fail in objstat if builder() fails, since such levels
might be very problematic for object statistics, but continue on with
mapstat in this case.
|
|
|
|
|
|
|
| |
Display the correct properties for the first two, and report 0
chunks/nutrition for monsters that don't leave a corpse. Mimics are
now revealed after the level is generated so that the mimic monster is
created, and we don't count the mimic items towards item statistics.
|
|
|
|
|
|
|
|
| |
The -objstat command-line option will generate iterations of the given
levels, compiling stats on every item and monster generated, and
average the results over the iterations. It's only available in debug
builds and uses the same map specification format as -mapstat. The
default number of iterations is 100.
|
|
|
|
|
| |
Print the numbers of levels, iterations, and branches, as well as the
output file.
|
|
|
|
|
| |
Remove an unnecessary loop and properly prefix some static functions
and variables.
|
|
|
|
|
|
| |
The command-line option is -mapstat, so the non-static functions use
the prefix mapstat_ instead of mapgen_ now for consistency. The static
functions and variables have had their mg_ prefixes removed.
|
| |
|
|
|
|
|
|
|
| |
We turn on the watchdog during mapstat generation, but writing the log
could take some time because of the calls to mg_find_random_vaults
selecting 10000 random maps per level. Now we pet the watchdog before
writing each level's stats.
|
|
|
|
| |
In particular, ctrl-O should no longer mention the branch.
|
|
|
|
|
|
|
|
| |
It trades readability and consistency for an utterly negligible bit of
speed. With the amount of further processing mpr() does, a single sprintf
is nothing.
This reverts commit d9dfa8fc9755fb0a4e8954c7eb94f32fe97b82e0.
|
|
|
|
| |
Scripted, then manually reviewed.
|
|
|
|
| |
Scripted, then manually reviewed.
|
|
|
|
|
| |
map or set.count() can test the presence of a given key and return 0 or 1
outright.
|
|
|
|
|
| |
Seriously, even preparing this commit gave me a pain in the triangle between
the thumb and index finger's bases and the wrist.
|
|
|
|
|
|
|
|
| |
This allows moving branches around without breaking save compat or at least
serious hacks.
The portal stack can be probably dropped now: two copies of the same level
can't exist anyway.
|
|
|
|
|
|
| |
If set, maps will be colour-coded to show what vaults were placed, and where.
Such dumps are fit for viewing on a terminal (via cat or less -R), but not
with GUI text viewers. For HTML, you probably want ansi2html.
|
|
|
|
| |
A hard limit of 60 seconds of CPU time per level.
|
|
|
|
|
|
|
| |
A real fix would be to skip disabled roulette branches, but I think a full
coverage in a single iteration might be worth such a workaround.
There's just one vault with this problem, as far as I know.
|
|
|
|
| |
All branches are checked anyway, but some vaults check branch state.
|
|
|
|
|
| |
The only cost is having assignments be a function, as you can't overload
operator[] to have separate bits be lvalues.
|
|
|
|
|
|
| |
In the default mode, each iteration generates maps for all possible levels,
so an iteration is equivalent to a full game. No state should survive
between one and another.
|
| |
|
|
|
|
| |
Also, close the file afterwards, abort() doesn't flush libc buffers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since mapstat doesn't handle overflow temples, there's no much point in
handling Temple maps exactly as in real games, at least as far as altar
substitution is concerned.
Also, fixed uniques need to be cleared when their vaults are cleared.
I think this makes remaining errors that pop up on --mapstat real bugs;
there's depressingly many of them:
* layout_roguey special rooms getting overwritten by other vaults
* grunt_rogues_gallery running out of subvaults (usually on encompass levels)
* No vault found for tag 'laboratory_2'
* Lua error: »…«/dat/des/traps/grate.des:87: attempt to index global 'e' (a nil value)
* Bad (disconnected) level on XXX (vault1, vault2)
• this tends to be a vault with bad substitutions, like current zaba_anthell
* invalid zombie size: small zombie for moth of suppression
|
|
|
|
|
| |
Errors thrown (and blindly silenced) due to bad item names are benign, but
crowd out real errors.
|
| |
|
|\
| |
| |
| | |
Yay for conflicts galore (wax removal, std:: purge, tileidx changes).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I had to rename distance() (in coord.h) to distance2() because it conflicts
with the STL function to compare 2 iterators. Not a bad change given how it
returns the square of the distance anyway.
I also had to rename the message global variable (in message.cc) to buffer.
I tried to fix and improve the coding style has much as I could, but I
probably missed a few given how huge and tedious it is.
I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool
and util/levcomp.*, because I have no clue about those.
|
| | |
|
| |
| |
| |
| |
| |
| | |
They're meant to stop autoexplore, and maybe request a confirmation for
being opened. This is not yet implemented, but we can use them for
converting secret doors that were used for marking a place as interesting.
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
Data such as uniques or artefacts generated is cleared between generator runs,
and there is enough runs for oddities like this.
|
| |
|
|
|
|
|
|
|
|
|
| |
These accumulate but never get removed; no wonder compilation times keep
rising.
The includes.sh script has lots of false negatives (and positives...), and
can't check .h files which cause the biggest slowdown, it'd be nice to run
multidelta on those somehow.
|
| |
|
|
|
|
|
| |
There's no support for producing maps for a level you're not on, around half
of functions assumed this.
|
|
|
|
|
|
|
|
| |
As a side effect, branches can now be shortened without breaking major save
compat.
This commit itself doesn't preserve compat though, even though it'd be easy
-- other parts are too nasty already.
|
| |
|
|
|
|
|
| |
Most are annoying STL types (which can still cause crashes on exotic
platforms), but there's a number of actual bugs as well.
|
|
|
|
|
|
|
|
|
| |
For the scroll, it makes no sense to not affect the whole map when you
happen to stand just near an edge.
Ashenzari and the mutation were fine.
For decks and the ball, it makes no sense to see further diagonally.
|
|\
| |
| |
| |
| | |
There are some issues left, like incorrect wrapping in some cases, but
we can fix them later.
|