Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Blood rain in neutral biomes?  (Read 3858 times)

TarrynPellimar

  • Escaped Lunatic
    • View Profile
Blood rain in neutral biomes?
« on: August 03, 2017, 12:12:17 am »

I have an embark that is 1mo old (00125-02-15). I've had elf blood rain two or three times already now.

The thing is, I specifically chose an embark that was neutral to avoid this kind of thing. How is this possible? Do I need to worry about other, more sinister types of rain as well?

I double-checked (by reloading a save of my pristine world): Every single biome in the entire region I embarked in (not just the embark itself) is listed as Calm. Expanding out to the 8 regions around my region, all of those biomes in every region are Calm or Wilderness ... except for exactly one biome of the one region to the northwest; that one is Sinister. Even among the 15 further regions, there is exactly one biome of one region that is Sinister; again, all the rest are Calm or Wilderness!

Can evil rain be generated an entire region away and migrate over my region/embark site?

There are goblin settlements on many of the regions around me, including within my own region; though obviously not within my embark site itself. Would that make a difference?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #1 on: August 03, 2017, 02:03:23 am »

There is what's presumably a bug in DF that the biome of the air (starting a few Z levels above the ground) takes on the biome of the world tile to the NW rather than that of the that of its own world tile (there's also another bug where "shears" can appear in the air, where the shears are 16*16 tile patches of a random biome out of the 9 local ones [8 surrounding world tiles plus the local one]).

Evil rain appearing in the air in this fashion does not land on the ground, but may land on top of anything that's high enough to reach the air biome (such as trees, walls, etc.).
Evil air biomes have sometimes resulted in the appearance of flying undead. If the evil biome is reanimating anything dying up there can be reanimated, and it is possible for an evil region to have both blood rains and other effects (such as evil clouds).

I've made a DFHack script to change the air biome (and any shears within it) to the own world tile's biome rather than the NW one:
shearcenter.lua:
Spoiler (click to show/hide)

Copy the code above into the "text" file <DF>\hack\scripts\shearcenter.lua and invoke it from the DFHack console by typing "shearcenter" (without the quotes).
Logged

TarrynPellimar

  • Escaped Lunatic
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #2 on: August 05, 2017, 04:23:23 pm »

Thanks for the help! In particular, thanks for the confirmation that I was seeing something "odd", and that the NW region was somehow influencing my embark.

In the script you helpfully provided, it's not clear to me what the magic 4 in the region_offset assignment does. I did some inspection, and it seems like that numbers are sometimes 3, sometimes 4, and sometimes 0. It might help if I actually understood what region_offset does or means. It's also not clear to me that removing shears altogether is the right solution either.

In the end, I used your showbiomes script (thanks for that too!) to examine my biomes, which confirmed everything you had said so far, including an evil air-only biome. From examining that script, I was able to look at the evilness of my region and nearby regions with lua:

Code: [Select]
~ df.global.world.world_data.active_site[0].pos
-- replace X and Y with n-1, n, n+1 of the x,y values from pos
~ df.global.world.world_data.region_map[X]:_displace(Y).evilness

And sure enough, one region reported an evilness of 88, while all the others were in the 50-60 range.

So, for the one region that was 88 I simply reset it to 58 (which seemed reasonable based on nearby values):

Code: [Select]
df.global.world.world_data.region_map[X]:_displace(Y).evilness = 58

And then running showbiomes confirmed that there was no longer an evil air biome.

This may have actually reset the evilness of that region in the world (instead of just within my embark); I have not abandoned the fortress to confirm this yet. But either way, I'm satisfied.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #3 on: August 06, 2017, 04:46:42 am »

What you've done is to change the evilness of the world tile to the NW, and that changes the evilness of all the game tiles governed by that world tile. This change generates a single non evil world tile within a biome region that's evil, which is something DF doesn't do, but it probably doesn't cause any harm (it hasn't in my brief experiments with it). If you were to make farm plots in the air (by muddying platforms) you'd find the plants supported by those farm plots are the ones of the biome of the world tile to the NW (possibly with a switch between the tropical and temperate version, due to DF rules).
What you've done is to change the data for the tile to the NW, rather than what the script does, which is to then the reference to refer to its own world tile instead of the one to the NW. Also, you haven't removed the evil rain, unless you've removed the evil rain from the biome region (which can be done)...

The region_offset value is a number that tells DF which world tile it should go to in order determine the biome of the game tile. Unfortunately, DF uses at least 3 different mappings for the same general logic, and Toady probably mixed them up when setting the default value for the air to 0.
The center in the map below is the current world tile, and the offsets are placed in the relative directions they refer to):
Game Tile Mapping (the issue at hand):
012
345
678

Region Details mapping (Almost all references in DF are to the current world tile, which is probably it's set at index 0, especially given that with C you can then address the data without giving any index at all):
123
405
678

Mid Level Tile mapping ("region"). Not involved in your case
789
456
123

Oh, look at the time! The lecture's over.
Logged

TarrynPellimar

  • Escaped Lunatic
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #4 on: August 08, 2017, 02:28:26 pm »

Once again, thank you so much!

Indeed, you are right that after my last post, I discovered that the evil rain was still happening, despite resetting the evilness of the NW tile. [I should probably put that back then.]

Then I ran your script, examining various metrics about how often the region_offset was set to each number, etc to convince myself that it was at least "safe". So in the end, I did change everything to 4 as your script suggested, and I'm happy to report that in the last couple months I've only seen clear, sweet, normal rain.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #5 on: August 08, 2017, 02:37:41 pm »

Worth considering for later: changing them to other values. You can still get animals, freeze water and farm plants on air-only biomes, so it's worth considering, though you can get something like you desire in vanilla simply by repeatedly embarking on same spot until you get desired air setup. (I've tweaked PL's script for that before (takes 1 or more numbers as arguments, and goes through them to lay them out line by line by z-level, starting from lowest z air z-level and repeating from start after reaching the last number))
« Last Edit: August 08, 2017, 02:39:15 pm by Fleeting Frames »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #6 on: August 08, 2017, 04:46:09 pm »

Yes you can change the air biomes to get critters from surrounding tiles, but I change the surface ones instead (pre embark), while restoring the air one to what it should have been.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #7 on: August 09, 2017, 06:16:52 am »

Mhm, but changing ground biome doesn't guarantee 9 biomes with 1x1 embark, I think. One test embark reveals 5. Which is still pretty good, tbh.

The air biomes shall be hundreds - possibly thousands- of times easier to get in vanilla, though, when dfhack will be yet to update for v 0.45.01

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #8 on: August 09, 2017, 08:06:41 am »

True. Since I don't do 1 * 1 embarks, but rather 3 * 3 ones, I've got a mental blind spot there (and you still can't get fruit trees in the air without hacking a soil layer there, but getting cultivated plants goes a long way).
Logged

sambojin

  • Bay Watcher
  • Three seconds to catsplosion and counting.......
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #9 on: August 22, 2017, 02:51:55 am »

Changing evilness/goodness of air biome z-levels actually sounds like a nice way of tricksying otherwise useful embarks into having some nice flora potential and random crittering. Sure, you can just find the right spot, but why not always have giant eagles fighting skeletal vultures as your dwarves tend their air-garden platforms?

I'll have to fiddle with it a bit, and see if there's any distinctive geographic good/evil features that occur or are allowed on steep/shallow inclines/cliffs once the values are hacked. Especially including after fort retirement, if it offloads the hacked values properly, and world-gen continues a little. Not really sure what I'm expecting, but if air tiles manage to go to ground due to erosion, some weird stuff could crop up, if erosion continues (although it would be a niche case of backwards erosion, or "slumping" of cliff faces, into previously air-type tiles. I don't think erosion works like this, or in extended world-gen after retirement anyway). I think it's just pops interactions, not geology, layout or erosion that happens in the post retirement world-gen gap.

Still, it might be a simple cure-all for the world-gen thread of "sure, you can have all that anywhere. But only in the air, and only for aerial creatures". So have all the multi-biome air-gardens and pegasi you want, but no unicorns. Just run this script that changes three z-levels of air to good, neutral, evil, and don't call me in the morning, because problems WILL persist.

Actually, as a question, precisely how much can we change about air z-levels? Just good/evil, or the whole panoply including savagery and actual biome (IE, throw a savage/evil tundra z-level in, and a calm/neutral tropical one, and a peaceful/good temperate one)? Just to make world-gen questions REALLY easy to answer, because hacking 3-6 air z-levels in a script is a lot better sometimes than giving actual advice and the time it takes to do so.
« Last Edit: August 22, 2017, 03:26:23 am by sambojin »
Logged
It's a game. Have fun.

sambojin

  • Bay Watcher
  • Three seconds to catsplosion and counting.......
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #10 on: August 22, 2017, 03:45:03 am »

Actually, thinking of this a little further, are floors/bridges considered as "ground compatible" for purposes of wild creatures spawning? They're one of the few things you can build at map-edge, so maybe after hacking the good/evil of air z-levels, you could have an "entry" tower made of floors at the appropriate z-levels, with walls and stairways down a little way off the map-edge, to get those biome's ground-based wild creatures to spawn in regardless of actual embark biomes.

Damn! So much !!science!! to do, so little wish to do it myself......

Basic test. Can you get evil ground-based wildlife, with a 1-z entry tower at each biome map-edge, with 1-z of evil air above the ground on a flat'ish site? In an otherwise neutral or good embark? Probably best to test with a 1x1 embark, so only four entry towers needed at most.


(note: if raising bridges are ground-compatible, you may as well use them. And connect them to a lever. Just for shits and giggles really. !!Science!! is fun! ))
« Last Edit: August 22, 2017, 04:00:43 am by sambojin »
Logged
It's a game. Have fun.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #11 on: August 22, 2017, 04:22:58 am »

Well, you don't have to do that science, I already did that (starting here...wow, nearly a year ago: Massive FPS issue that was not present in 0.34).

Summary:

It's not just evilness, but full biomes. Air biomes are set, often randomly, at embark and persist on retirement (tested with (re-building) farm plots).

That means your shallow cliff ideas doesn't work; air biomes also only start past the highest point in a 48x48 square.


If you hack in soil walls (just floor won't do) at the air z-levels, wild shrubs and saplings of that biome will appear there.

If you build floors to map edge, land creatures will enter through that.

The otherwise-not-present reanimation does persist in air biomes, and so does temperature.

You can get bit of unusual "this biome isn't found anywhere else in the world" effects with reversed tropicality at the edge of tropical and temperate too, iirc. I'll let PatrikLundell field that one:

sambojin

  • Bay Watcher
  • Three seconds to catsplosion and counting.......
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #12 on: August 22, 2017, 04:35:39 am »

So ocean or shoreline biomes can exist, in an air z-level? Because if we can get a salt-water pool setup at map-edge somehow without hacks after the air z-levels, that wildlife respects for spawns, I'm not just talking air drops of whale-petunia-gore here, but mermaid farms ANYWHERE.

This type of science could become very complicated, and I'm glad to be a part of it :)


Do they even need salt water? Or just an ocean biome and water to enter from? Or even that? So much to do......
« Last Edit: August 22, 2017, 04:54:34 am by sambojin »
Logged
It's a game. Have fun.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #13 on: August 22, 2017, 06:05:17 am »

Not just anywhere. Only within 1 regional tile of an ocean tile.

Iirc previous ocean biome experiments showed that flooded ocean biome land sections worked fine for sea wildlife (once flooded and rest of map walled off).

Kind of a hassle to set that up, though, plus I find land animals more interesting.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Blood rain in neutral biomes?
« Reply #14 on: August 22, 2017, 07:48:44 am »

I believe people have created artificial waterways in the air above oceans to capture waterborne aquatic creatures entering the map (walling off the actual ocean) but a problem is that they're rare, so you basically have to kill off the land critters to get ocean ones to spawn, if I remember correctly.

The biomes you can have on your embark are the ones belonging to its own world tile and the ones belonging to the 8 world tiles surrounding it, while the tropicality of an "imported" biome is determined by the latitude of the importing biome. However, air biomes seem to be wholly controlled by the exporting world tile's latitude. If you hack things you can hack any mid level ("region") tile to take on the biome of a neighboring world tile pre embark. DF then naturally allow the biome of the neighboring mid level tiles to "spill over" into the embark (which is what causes biomes to appear even though DF didn't report them pre embark: DF doesn't know beforehand how it's going to spill biomes into each other at the later embark generation).

The creatures you can get on a biome are determined by the creatures listed in the biome entity and it's then filtered to only allow those of the actual biome and savagery. Evilness is a property of the whole region applied to each world tile, and hacking the world tile data does not affect which flora/fauna you can get: that was determined when the region was created, and isn't rechecked dynamically (evil weather operates in a similar manner). Hacking the biome flora/fauna/evilness/evil weather allows "forbidden" combinations, such as wormy tendrils on a good world tile.

It also seems any flora/fauna hacking of biomes has to take place prior to embarking (with the strange exception of grasses, which is rather boring), according to my investigations.

Creatures entering a biome do respect their mode of locomotion and habitat (with the [sort of] exception of land based critters getting stuck in cavern trees), so you'd have to provide water for aquatic creatures to appear, walkable tiles for land based ones, and either air or walkable tiles for flying ones. Amphibian creatures can appear both in water and on walkable tiles.
Logged