Files
2026-11-05 09:57:11 -05:00

32 lines
1.6 KiB
JavaScript
Executable File

// Original epic_terrain mod uses v7 only as a cave/ore substrate. Its switch,
// seed and geology are creation-time inputs, never a saved-world migration.
// Keep in sync with the game's bundled mapgen defaults.
const NEW_WORLD = Object.freeze([
'mg_name = v7', 'fixed_map_seed = 731104', 'water_level = 32',
'mapgen_limit = 4096',
'mg_flags = caves,nodungeons,light,biomes,ores',
'mgv7_spflags = mountains,ridges,nofloatlands,caverns',
'mgv7_mount_zero_level = 0',
'mgv7_np_terrain_base = 12, 45, (900, 384, 900), 82341, 5, 0.6, 2.0',
'mgv7_np_terrain_alt = -8, 24, (900, 384, 900), 5934, 5, 0.6, 2.0',
'mgv7_np_terrain_persist = 0.6, 0.1, (1200, 1200, 1200), 539, 3, 0.6, 2.0',
'mgv7_np_height_select = -4, 14, (1400, 320, 1400), 4213, 6, 0.7, 2.0',
'mgv7_np_filler_depth = 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0',
'mgv7_np_mount_height = 250, 100, (700, 700, 700), 72449, 3, 0.6, 2.0',
'mgv7_np_mountain = -0.6, 1, (320, 280, 320), 5333, 5, 0.63, 2.0',
'mgv7_np_ridge_uwater = 0, 1, (700, 700, 700), 85039, 5, 0.6, 2.0',
'mgv7_np_ridge = 0, 1, (100, 100, 100), 6467, 4, 0.75, 2.0',
'mg_biome_np_heat = 50, 50, (256, 256, 256), 5349, 3, 0.5, 2.0',
'mg_biome_np_humidity = 50, 50, (256, 256, 256), 842, 3, 0.5, 2.0',
'epic_terrain_enable = true',
]);
export function terrainSettings(newWorld) {
if (typeof newWorld !== 'boolean') throw new TypeError('newWorld must be a boolean.');
return newWorld ? [...NEW_WORLD] : [];
}
export function isTerrainSetting(line) {
return /^\s*(?:mg\w*|fixed_map_seed|water_level|mapgen_limit|epic_terrain_enable)\s*=/.test(line);
}