View Single Post
Old October 25, 2019, 21:20   #2
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,164
wobbly is on a distinguished road
Quote:
Originally Posted by Tibarius View Post
(C) It seems i can remove cavern levels if i set the cutoff just to -1. Correct?
yes

Quote:
Originally Posted by Tibarius View Post
(A) Unluckily labyrinths have a cutoff of -1. That means i cannot prevent them from being generated modifying the .txt file. You need to change code to prevent them from appearing, right?
yes. Moria & labyrinth levels are placed in the code itself. They are not that difficult to remove if you know how to compile (there are instructions pinned somewhere on the forum). The relevant section of generate.c

Code:
/* Make the profile choice */

	if (p->depth == 0) {

		profile = find_cave_profile("town");

	} else if (is_quest(p->depth) && !OPT(p, birth_levels_persist)) {

		/* Quest levels must be normal levels */

		profile = find_cave_profile("classic");

	} else if (labyrinth_check(p->depth)) {

		profile = find_cave_profile("labyrinth");

	} else if ((p->depth >= 10) && (p->depth < 40) && one_in_(40)) {

		profile = find_cave_profile("moria");

	} else {

		int pick = randint0(200);

		size_t i;

		for (i = 0; i < z_info->profile_max; i++) {

			profile = &cave_profiles[i];

			if (profile->cutoff >= pick) break;

		}

	}
wobbly is offline   Reply With Quote