Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 6 7 [8]

Author Topic: DFHack script: showbiomes  (Read 26961 times)

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #105 on: December 15, 2019, 05:30:40 am »

I didn't understand you were looking to create a script, but thought it was a discussion.
The reason I've been vague is that the script was written years ago, and I don't muck around much in that area, so I don't remember the details.

However, I believe the only thing needed is to change the "biome" fields to match those of the surface tiles below them. The scripts shearvanilla.lua and shearcenter.lua can be found here https://github.com/PatrikLundell/scripts/tree/own_scripts (note: the pages referenced are web pages with the scripts on them, not script files, so the web page stuff has to be removed, i.e. you can't save the references as script files).
These scripts fix shears by converting the shears in the sky to the "normal" sky biome in the first script and all of the sky to the current world tile in the second one.
The logic from these scripts ought to be possible to apply with the addition of picking up the "biome" offset values from the ground and replicate them in the air above them.

As mentioned earlier, I don't know if DF produces any odd effects if you do propagate the biomes upwards, although I wouldn't expect much problems.
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #106 on: December 15, 2019, 06:44:41 pm »

Thanks! I'm testing that approach now (identify the highest non-air z-level and propagate the block designation and region_offset values upward.) I'm testing by channeling away and re-casting some obsidian cast flooring.

Two things I noticed: air biomes seem to happen at mid-map tile 48x48 granularity, and it looks like there's one currently unidentified block flag that appears to toggle at the point where surface transitions to air. For the blocks I looked at, flags[9] was true for air biomes and false for surface biomes.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #107 on: December 16, 2019, 05:16:45 am »

Nominal elevation is on the Mid Level Tile level, so it more or less follows that the lower air biome boundary also follows the Mid Level Tile boundaries (the alternative would have been to follow the actual elevation curves).

Your flag observation is interesting. However, the flag ought to be checked for Ocean, Lake, and Glacier biomes as well, as these are biomes that do not allow for trees (or shrubs), so it might be a vegetation flag of some kind.
You could also try to change the flag for an unmodified air biome, muddy obsidian, and see if shrubs grow on it (you won't get trees, as surface trees require soil in the tile beneath them).
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack script: showbiomes
« Reply #108 on: December 16, 2019, 08:13:07 am »

I expect said obsidian experiment will not work - it's not just trees which require the soil walls in 3-tile radius underneath, but all aboveground shrubs and saplings. (Visible in the save here, where soil was dug away underneath an animal pen.)

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #109 on: December 16, 2019, 11:52:16 am »

I've made experiments in the past (0.40.24) with muddied floor and dug natural soil with the level below dug away, and what I saw there was that no saplings appeared at all, but some shrubs did appear, although considerably fewer of them than in the surrounding areas.
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #110 on: December 16, 2019, 09:58:31 pm »

Thanks! Okay, I'll test all of those cases. (with and without solid cast obsidian below the z-level, and with/without messing with that mystery flag)

Unfortunately, I chose a biome that's frozen much of the year for Gishdistzanos Nashoninir Ograd, (Frozenhopes, the Bloody Decline of Reason). I wanted to test zombie pathing, plus evil weather + freezing combinations, but I didn't think about how that would affect my above-ground pump stacks, and I can only pump water for aboveground obsidian casting 2 months of the year, and the plan for a full-fortress height waterfall was an awful idea...
Logged

muldrake

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #111 on: May 22, 2022, 07:58:42 pm »

I hope the necro isn't unwelcome, I just want to point out this fairly old script still appears to work just fine, and for its intended purpose.  I'd just embarked in what looked like neutral terrain in the embark assistant, and had near dwarf utopia, i.e., a volcanic island (with a huge impractical peak), metals deep and shallow, a light aquifer (albeit salt water requiring desalination), a bit of stagnant ground water, flux, sand, and no neighbors at all.

It was called the "Land of Mortality" and it was in "the Ignoble Sea" but hey, it said it was neutral so whatever.  Okay it's in a slightly bad neighborhood but tons of trees and no knife-eared hippies to whine about whatever we did with them, all the magma anyone could want, so what?  Evil schmevil.

But then we started being incessantly pestered by undead albatrosses.  They are absolutely helpless and easily wrecked, but why?  Apparently while the ground is (relatively) neutral albeit with somewhat high savagery (on purpose), there is serious evil in the air.

[DFHack]# cat showbiomes.lua
cat is not recognized. Did you mean catsplosion?
[DFHack]# showbiomes
biomes found: 4
Biome reference: x: 59, y: 9, biome: OCEAN_TEMPERATE, Savagery: 62. Evilness: 94, found in the air only
Biome reference: x: 57, y: 7, biome: OCEAN_TEMPERATE, Savagery: 63. Evilness: 79, found in the air only
Biome reference: x: 58, y: 7, biome: OCEAN_TEMPERATE, Savagery: 55. Evilness: 71, found in the air only
Biome reference: x: 58, y: 8, biome: FOREST_TEMPERATE_CONIFER, Savagery: 59. Evilness: 60, found at ground level
Potential air biomes found:5
Biome reference x: 57, y: 8, biome: OCEAN_TEMPERATE, Savagery: 61. Evilness: 79
Biome reference x: 57, y: 9, biome: OCEAN_TEMPERATE, Savagery: 63. Evilness: 75
Biome reference x: 58, y: 9, biome: OCEAN_TEMPERATE, Savagery: 57. Evilness: 81
Biome reference x: 59, y: 7, biome: OCEAN_TEMPERATE, Savagery: 58. Evilness: 93
Biome reference x: 59, y: 8, biome: OCEAN_TEMPERATE, Savagery: 56. Evilness: 69

(Tbh what is on the ground is not that fantastic either.)
« Last Edit: May 22, 2022, 08:00:23 pm by muldrake »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #112 on: June 09, 2022, 02:33:42 am »

There is a long standing bug in DF that causes the air biome to be that of the world tile to the NW of the embark world tile. The biome of that world tile seems to be an evil reanimating ocean biome.
Logged

muldrake

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #113 on: June 09, 2022, 03:58:39 pm »

There is a long standing bug in DF that causes the air biome to be that of the world tile to the NW of the embark world tile. The biome of that world tile seems to be an evil reanimating ocean biome.
My worry is that a giant roc or dragon or something genuinely dangerous shows up from that direction, but so far, nothing but albatrosses, and even those stopped a few years ago.
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #114 on: June 11, 2022, 02:46:37 pm »

Umm, (not sure, but guessing)  I think since megabeasts are historical figures, maybe they would have to be undeadified as part of a historical event, while your random undead albatrosses are region populations that are pulled from that overall count and made undead as part of being in the reanimating biome? So you can still have a megabeast attack, but the mechanism for showing up as undead would be different than just entering from a reanimating biome?

Interested to see if anyone knows that mechanic better.

Also you can use dfhack to repopulate biomes if you're running low on visiting things.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #115 on: June 11, 2022, 03:57:59 pm »

I've had FBs becoming undead in the caverns, but that's because they were killed by the undead wildlife and then reanimated, and the same thing can presumably happen on the surface. Hist figs would likely have to be reanimated by a necromancer for them to arrive as undead, as I suspect reanimating biomes won't have their reanimation applied to hist figs killed in them when they're not part of an embark, but that's just speculation on my part.

Megabeasts seem to just sort of teleport to the embark from their lairs ("sort of", as I suspect they are "armies", and thus actually travel (still abstract, though) from where they happen to be when selected to show up).
Logged

muldrake

  • Bay Watcher
    • View Profile
Re: DFHack script: showbiomes
« Reply #116 on: June 11, 2022, 05:05:03 pm »

I once had a very short-lived fort (which never even got to be a fort) where the first thing that showed up was an undead giant sperm whale or something that obliterated all of the starting seven in about seven lines of reports.  Well that was fun.  Should have spent that time choosing cassiterite as a starting ore just writing a will.
Logged
Pages: 1 ... 6 7 [8]