Thanks for trying it out. If it has any use it's a success from my perspective.
Brackish is described on the biome wiki page as having a salinity of 33-65. Mangrove is a saltwater swamp with a drain <10.
I know Tropical Dry Broadleaf is latitude dependent, but how do you know whether you get that or Tropical Moist Broadleaf instead? At a guess, rainfall determines which one you get, but I don't have the info (I assume it shouldn't be too hard to check for pole, and you can probably compute latitude.
Levels 25-30 should be the air ones, so your embark is probably fairly shallow. In the embark in your world I've primarily used for testing the shearing of biome 25, which also was present on the surface, did not fail to retrieve the data, presumably because the biome had to be available for its usage on the ground, so shearing of biomes that exists "legally"elsewhere is not detected by that method. I may try to replace plus signs with something else to depict the biome number (the number itself can't be used as it's generally two digits).
If I understand your edit correctly, you changed the world by modifying a distant tile, regenerated, and reembarked?
I've found a way to handle lakes, and I've fixed a bug with streams and brooks, but it's still far from perfect. If you were to check an embark where you've dug a strip mine below the ocean level is should show that area as ocean, for instance.
Updated showbiomes:
--Displays biomes within the current fortress embark. Open showbiomes.lua to see a legend description.
--[====[
showbiomes
========
Shows the biome layout of the current fortress embark in the dfhack window as a two dimensional character matrix. You probably need to widen the window to see it properly, as it wraps around otherwise.
The output is color coded according to evilness/savagery:
Serene: Light Cyan
Mirthful: Light Blue
Joyous Wilds: Blue
Calm: White
Wilderness: Light Yellow
Untamed Wilds: Yellow
Sinister: Light Red
Haunted: Red
Terrifying: Dark Grey
The biomes have semi randomly assigned character associated with them (note that the do not exactly match DF's definitions, but rather the wiki's descriptions, and Tropical Dryleaf forest thus isn't present). It should be possible to indicate desert types of no vegetation, no vegetation regrowth, and no tree regrowth in addition to the normal ones:
+ = Mountain
* = Glacier
t = Tundra
p = Swamp Temperate Freshwater
P = Swamp Temperate Brackish
q = Swamp Temperate Saltwater
n = Marsh Temperate Freshwater
N = Marsh Temperate Brackish
m = Marsh Temperate Saltwater
Q = Swamp Tropical Freshwater
r = Swamp Tropical Brackish
R = Swamp Tropical Saltwater
M = Mangrove Swamp
x = Marsh Tropical Freshwater
X = Marsh Tropical Brackish
y = Marsh Tropical Saltwater
T = Forest Taiga
c = Forest Temperate Conifer
l = Forest Temperate Broadleaf
C = Forest Tropical Conifer
L = Forest Tropical Broadleaf
g = Grassland Temperate (Flat)
G = Grassland Temperate (Hilly)
s = Savanna Temperate (Flat)
S = Savanna Temperate (Hilly)
u = Shrubland Temperate (Flat)
U = Shrubland Temperate (Hilly)
k = Grassland Tropical (Flat)
K = Grassland Tropical (Hilly)
_ = Savanna Tropical (Flat)
~ = Savanna Tropical (Hilly)
z = Shrubland Tropical (Flat)
Z = Shrubland Tropical (Hilly)
B = Desert Badlands
r = Desert Rocky (Flat)
R = Desert Rocky (Hilly)
D = Desert Sand
O = Ocean Tropical
o = Ocean Temperate
a = Ocean Arctic
. = Pool Temperate Freshwater
: = Pool Temperate Brackish
! = Pool Temperate Saltwater
, = Pool Tropical Freshwater
; = Pool Tropical Brackish
| = Pool Tropical Saltwater
< = Lake Temperate Freshwater
- = Lake Temperate Brackish
[ = Lake Temperate Saltwater
> = Lake Tropical Freshwater
"= = Lake Tropical Brackish
] = Lake Tropical Saltwater
\ = River Temperate Freshwater
% = River Temperate Brackish
( = River Temperate Saltwater
/ = River Tropical Freshwater
& = River Tropical Brackish
) = River Tropical Saltwater
Missing = Chasm
A = Lava
]====]
function showbiomes()
local elevation
local temperature
local savagery
local evilness
local drainage
local rainfall
local salinity
local max_x, max_y, max_z = dfhack.maps.getTileSize()
local tile_type
for i=0,max_x-1 do
for k=0,max_y-1 do
for l=0,max_z-1 do
tile_type=dfhack.maps.getTileType(k,i,max_z-1-l)
if dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)~=nil and
tile_type > 1 and
tile_type ~= 32 and
(tile_type < 67 or tile_type > 72) and
(tile_type < 90 or tile_type > 224) and
(tile_type < 480 or tile_type > 514) and
(tile_type < 590 or tile_type > 604) and
(tile_type < 680 or tile_type > 694) then
elevation=dfhack.maps.getRegionBiome(dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)).elevation
temperature=dfhack.maps.getRegionBiome(dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)).temperature
savagery=dfhack.maps.getRegionBiome(dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)).savagery
evilness=dfhack.maps.getRegionBiome(dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)).evilness
drainage=dfhack.maps.getRegionBiome(dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)).drainage
rainfall=dfhack.maps.getRegionBiome(dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)).rainfall
salinity=dfhack.maps.getRegionBiome(dfhack.maps.getTileBiomeRgn(k,i,max_z-1-l)).salinity
if evilness < 34 then
if savagery < 34 then
dfhack.color(COLOR_LIGHTCYAN)
elseif savagery < 67 then
dfhack.color(COLOR_LIGHTBLUE)
else
dfhack.color(COLOR_BLUE)
end
elseif evilness < 67 then
if savagery < 34 then
dfhack.color(COLOR_WHITE)
elseif savagery < 67 then
dfhack.color(COLOR_LIGHTYELLOW)
else
dfhack.color(COLOR_YELLOW)
end
else
if savagery < 34 then
dfhack.color(COLOR_LIGHTRED)
elseif savagery < 67 then
dfhack.color(COLOR_RED)
else
dfhack.color(COLOR_DARKGREY)
end
end
if elevation < 100 then
if temperature < -4 then
dfhack.print("a")
elseif temperature < 85 then
dfhack.print("o")
else
dfhack.print("O")
end
elseif elevation > 299 then
dfhack.print("+")
else
if tile_type==2 or
tile_type==3 then
if salinity<33 then
if temperature <85 then
dfhack.print(".")
else
dfhack.print(",")
end
elseif salinity<66 then
if temperature <85 then
dfhack.print(":")
else
dfhack.print(";")
end
else
if temperature <85 then
dfhack.print("!")
else
dfhack.print("|")
end
end
elseif tile_type==89 or
tile_type==90 or
(tile_type > 360 and tile_type < 378) or
(tile_type > 464 and tile_type < 473) then
if salinity<33 then
if temperature <85 then
dfhack.print("\\")
else
dfhack.print("/")
end
elseif salinity<66 then
if temperature <85 then
dfhack.print("%")
else
dfhack.print("&")
end
else
if temperature <85 then
dfhack.print("(")
else
dfhack.print(")")
end
end
elseif temperature < -4 then
if drainage < 75 then
dfhack.print("t")
else
dfhack.print("*")
end
elseif dfhack.maps.getTileFlags(k,i,max_z-1-l).flow_size~=0 then
if dfhack.maps.getTileFlags(k,i,max_z-1-l).liquid_type==df.tile_liquid.Magma then
dfhack.print("A")
else
if salinity < 34 then
if temperature < 85 then
dfhack.print("<")
else
dfhack.print(">")
end
elseif salinity < 66 then
if temperature < 85 then
dfhack.print("-")
else
dfhack.print("=")
end
else
if temperature < 85 then
dfhack.print("[")
else
dfhack.print("]")
end
end
end
elseif temperature < 10 and
drainage > 32 and
rainfall > 65 and
rainfall < 75 then
dfhack.print("T")
elseif temperature < 85 then
if rainfall < 10 then
if drainage < 33 then
dfhack.print("D")
elseif drainage < 50 then
dfhack.print("r")
elseif drainage < 66 then
dfhack.print("R")
else
dfhack.print("B")
end
elseif rainfall < 20 then
if drainage < 50 then
dfhack.print("g")
else
dfhack.print("G")
end
elseif rainfall < 33 then
if drainage < 50 then
dfhack.print("s")
else
dfhack.print("S")
end
elseif rainfall < 66 then
if drainage < 33 then
if salinity < 34 then
dfhack.print("n")
elseif salinity < 66 then
dfhack.print("N")
else
dfhack.print("m")
end
elseif drainage < 50 then
dfhack.print("u")
else
dfhack.print("U")
end
elseif rainfall < 75 and
drainage > 32 then
dfhack.print("c")
else
if drainage < 33 then
if salinity < 34 then
dfhack.print("p")
elseif salinity < 66 then
dfhack.print("P")
else
dfhack.print("q")
end
else
dfhack.print("l")
end
end
else
if rainfall < 10 then
if drainage < 33 then
dfhack.print("D")
elseif drainage < 50 then
dfhack.print("r")
elseif drainage < 66 then
dfhack.print("R")
else
dfhack.print("B")
end
elseif rainfall < 20 then
if drainage < 50 then
dfhack.print("k")
else
dfhack.print("K")
end
elseif rainfall < 33 then
if drainage < 50 then
dfhack.print("_")
else
dfhack.print("~")
end
elseif rainfall < 66 then
if drainage < 33 then
if salinity < 34 then
dfhack.print("Q")
elseif salinity < 66 then
dfhack.print("r")
else
dfhack.print("R")
end
elseif drainage < 50 then
dfhack.print("z")
else
dfhack.print("Z")
end
elseif rainfall < 75 and
drainage > 32 then
dfhack.print("C")
else
if drainage < 33 then
if salinity < 34 then
dfhack.print("x")
elseif salinity < 66 then
dfhack.print("X")
else
if drainage < 10 then
dfhack.print("M")
else
dfhack.print("Y")
end
end
else
dfhack.print("L")
end
end
end
end
break
end
end
end
dfhack.println()
end
dfhack.color(COLOR_RESET)
dfhack.println()
end
showbiomes()