Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 12

Author Topic: Biome Manipulator, a world gen/pre embark biome region manipulation tool  (Read 55680 times)

Devast

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #60 on: December 15, 2017, 08:26:46 pm »

So I'm clear on this. I could
1. Start in on a tame biome
2. Build a strong fortress
3. Make it terrifying and now deal with thralls/zombie hair?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #61 on: December 16, 2017, 04:46:19 am »

So I'm clear on this. I could
1. Start in on a tame biome
2. Build a strong fortress
3. Make it terrifying and now deal with thralls/zombie hair?

Maybe. The usage you describe lies outside of both world gen and pre embark and so isn't within the intended usage range.
However, to my surprise the script actually seemed to be able to manipulate the world when invoked while a fortress was loaded, but I didn't check to see if it had any effect on the fortress (and my brief attempt only changed a single remote region, and didn't try any other functionality).

To get the "evil weather" effects on the biome all you would have to do is to assign an appropriate evil weather to the region, as DF doesn't actually check that a region is evil to apply weather (it assumes that it did that check before assigning the weather, I presume). Again, I have absolutely no idea if such a change would have any effect on an existing fortress., so if you try it, please report back.
I also don't know what happens if you tried to change the biome/region of the region. I'd expect you wouldn't be able to get any plants or animals that weren't available within a 7*7 world region centered on your world embark tile, for instance, as the stuff you get is drawn from a pool created from what's available in that region (that's what region-pops reports, by the way), and it would be a surprise if this pool was rebuilt. I also don't know if you'd get ANY different flora/fauna as a result of a biome change, though I would expect the surface farm plot supported crop set would change (with attendant problems if set to grow something that no longer is available).
Logged

Devast

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #62 on: December 19, 2017, 12:31:23 am »

I gave it a try and it appears that changing an embark doesn't result in zombies/thralls being generated on deaths/weather.

That said I am not a clever man.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #63 on: December 19, 2017, 05:53:10 am »

Yes, I tried it as well. I did get it to rain abhorrent sludge, but no reanimation (and I don't have any thralling weather to try it with in the save).

Found a forwards compatibility bug in setting evilness on a region, resulting in a script update:
0.29 2017-12-19: Updated whole region evilness change to work with named region fields.
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #64 on: December 19, 2017, 08:01:17 pm »

I've been directed here from DFhack regarding fixing mineral composition in a world, upping it to the "100" or "300" levels. How should I go about doing this? I want to ensure the minerals are regenerated, but appropriate to the extant layers. Do I have to add one mineral at a time?
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #65 on: December 20, 2017, 04:54:17 am »

I have trouble understanding what you're asking. The 100/300 statement doesn't ring any bells at all, as the closest thing I can think of is the world gen mineral scarcity, which typically has a much higher value, so that's probably not what you refer to.
Also, I'm unsure about which meaning of "regenerated" you refer to, i.e. "restore mined minerals" (which the script does not support, but I think there's a fortress mode DFHack script to refill veins), or "generate the composition from scratch", which it doesn't do automatically, as all manipulation is manual, so each change made is manual.

The functionality supported is to modify existing geo biomes and to build new ones in a manual process.
- You can expand or shrink the thickness of layers in the geo biome you're working on (one geo biome at a time).
- You can morph the layer material to any other layer material. This wipes the vein/cluster inclusions clean, so you'd have to repopulate those manually (as desired).
- You can add and remove veins, clusters, and inclusions in veins and clusters. Removing a vein/cluster will also wipe their inclusion sheet clean.
- The selections of veins, clusters, and inclusions respect the rules laid out by the raws, so you can only add vein/clusters/inclusions where they're allowed (you can't add any of those to soil, for instance).
- I've been unable to find the criteria for when a layer is "alluvial", so things that should be possible in alluvial environments cannot be added (and I think that completely excludes some gems that would otherwise be found in soil layers).
- The script doesn't restrict where you place your layers (so you can create a sand layer deep down, for instance).
- DF seems to always generate 4 Z levels of soil (possibly 3 in deserts) in the geo biome. However, the DF logic supports up to 10 at the top. Each 5 Z levels of elevation above 100 reduces the number of layers by 1, "eroding" the top ones first, with some bugginess involved when layers are multiple Z levels deep. This means that an elevation of 141 and above will not get any soil aquifer, as aquifers appear at the 3:rd layer or below (you can still get stone aquifers).
- DF supports a maximum of 16 layers (anything beyond that is simply ignored), and the script enforces the 16 layer limit.
- The geo biome describes the layer stack, but it does not guarantee the whole stack will be present at an embark, as the SMR will cut off the parts of the geo biome that would have appeared deeper. This can cause DF to report the presence of flux or deep metals for an embark when those are actually cut away by the SMR (similarly, DF can report the presence of clay and aquifers when soil erosion causes those to actually not be present).
- I think the lowest geo biome level is extended downwards as needed to ensure there is something all the way down to the SMR if the geo biome's vertical extent is lacking.
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #66 on: December 21, 2017, 09:58:11 am »

I have trouble understanding what you're asking. The 100/300 statement doesn't ring any bells at all, as the closest thing I can think of is the world gen mineral scarcity, which typically has a much higher value, so that's probably not what you refer to.
Also, I'm unsure about which meaning of "regenerated" you refer to, i.e. "restore mined minerals" (which the script does not support, but I think there's a fortress mode DFHack script to refill veins), or "generate the composition from scratch", which it doesn't do automatically, as all manipulation is manual, so each change made is manual.

I actually did refer to the mineral scarcity setting. So basically change the mineral composition to reflect closely what would have been generated in the layers of the biomes if I had used a high mineral setting ("everywhere" on the default quick worldgen settings). I do not want to restore mined out veins (if possible).

So I'd basically have to create a script that trolls through all the biomes, and for each biome creates a random but decent deal of minerals that respects existing layer stone, right?

- I've been unable to find the criteria for when a layer is "alluvial", so things that should be possible in alluvial environments cannot be added (and I think that completely excludes some gems that would otherwise be found in soil layers).

On this, I believe alluvial refers to the river area itself, or it co-exists with Sedimentary rock. I think this was fixed as of DF2011, an update compatible with DF2010 which fixed a lot of bugs.
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #67 on: December 21, 2017, 11:25:20 am »

Given that I use a mineral scarcity of 80000 (a bit scarcer than the lowest standard setting), I didn't expect that setting to use such low values (and it was a long time since I looked at those).

I wouldn't expect changing the geo biomes to affect existing fortresses (i.e. mined out veins), as I think those are generated and locked down at embark (and kept for later resuming/reclaim), but I haven't tried.

If you want to "correct" the whole world yes, you'd either make a script for it or do it manually (which is probably a rather tedious process, which I wouldn't embark upon). If you only want to affect your intended embark it's probably easier to do it manually. Also note that existing civs/sites will most likely not be affected by the manipulations, as I think their mineral resource access is determined when the site is created (again, no actual knowledge, only assumptions).

When it comes to writing a world adjustment script, a key point is finding what the mineral placement algorithm is (or something sufficiently close). Once that is available it should be a matter of trawling though each layer and populate it (or wipe each geo biome and generate it completely from scratch, including the layers, but that's probably overkill: using what was generated originally and just wipe what's inside and regenerate that is probably enough).

You can obviously use this script as a starting point (key logic parts were copied [and not fully understood] from prospector [called as "prospect" from the DFHack prompt], by the way), but I have no knowledge about the generation/distribution algorithm itself (I've thought about an option to let the script populate morphed layers, but the lack of knowledge of how DF does it has kept the idea in the drawer).

Alluvial: Interesting info. If that's the case alluvial only minerals may not actually be part of the geo biome at all, but added "from the side" to suitable embarks at embark generation.

Edit:
Found the geo biome "map" wasn't panning, so that's been fixed.
Updated to 0.30 2017-12-22.

Alluvial: I've tried to look for alluvial only minerals, and they're all associated with ENVIRONMENT_NON_SOIL_OCEAN, which isn't one that's present in geo biomes. However, these minerals occur in geo biomes, and all cases I've found have been in geo biomes exclusive to ocean tiles. Jade has been found in sedimentary shallow ocean layers, while cassiterite has been found in granite, the very lowest level of that geo biome. Thus, it looks like there's an ocean connection to alluvial only minerals.
« Last Edit: December 22, 2017, 10:15:04 am by PatrikLundell »
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #68 on: December 22, 2017, 12:03:46 pm »

I wouldn't expect changing the geo biomes to affect existing fortresses (i.e. mined out veins), as I think those are generated and locked down at embark (and kept for later resuming/reclaim), but I haven't tried.

I'm not expecting it to change mined out veins but unexplored and so on areas in existing fortresses, I do also want to change if possible.

It seems like some !!experimentation!! is required here.
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #69 on: December 22, 2017, 12:45:18 pm »

I very much doubt you can change existing fortresses by changing the geo biomes they reside in. All the tiles in a fortress are generated at embark: it's basically (or quite possibly actually) a flag that determines whether a tiles is revealed or not. To change unrevealed tiles in an existing fortress you'd probably have to explicitly change each such tile though a script. Furthermore, I don't know if the game level tile data is even loaded by DF for fortresses that aren't currently played (adventure mode would obviously have to load it while an adventurer is present, but it unloads it as the adventurer moves on), which would make it rather tricky to get at the data (and still no guarantee it would be saved, rather than just loaded anew the next time, although it seems DF tends to save stuff that isn't generated on the fly).

Also, in your quote, I should have said "for example" rather than "that is".
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #70 on: December 22, 2017, 08:35:32 pm »

I very much doubt you can change existing fortresses by changing the geo biomes they reside in. All the tiles in a fortress are generated at embark: it's basically (or quite possibly actually) a flag that determines whether a tiles is revealed or not. To change unrevealed tiles in an existing fortress you'd probably have to explicitly change each such tile though a script. Furthermore, I don't know if the game level tile data is even loaded by DF for fortresses that aren't currently played (adventure mode would obviously have to load it while an adventurer is present, but it unloads it as the adventurer moves on), which would make it rather tricky to get at the data (and still no guarantee it would be saved, rather than just loaded anew the next time, although it seems DF tends to save stuff that isn't generated on the fly).

Also, in your quote, I should have said "for example" rather than "that is".

I'll go for one thing at a time then, starting with the non-embarked regions.
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #71 on: December 25, 2017, 04:21:25 am »

Updated to 0.31 2017-12-25:
- Updated DFHack version detection to detect beta and gamma releases.
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #72 on: December 25, 2017, 05:35:17 pm »

Updated to 0.31 2017-12-25:
- Updated DFHack version detection to detect beta and gamma releases.

Comments I have, after testing the script for the first time:
-It would really help to have a "repopulate randomly with minerals" command, that goes through all layers of a biome and pump in a large number of minerals. Maybe have ore-heavy or gem-heavy variants.
-It would really help to be able to do that to the entire map, so you could have ore-heavy mountains or something. That way there would be another "reason" to embark on mountains.
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #73 on: December 26, 2017, 04:26:51 am »

If you (or someone else) can provide the formula for how DF selects (or not) veins/clusters/inclusions based on the scarcity value (and other possible factors) I'll implement it at least for new/morphed layers (assuming the formula is based on info I can make available to the script).

Whole geo biome/all geo biome makeovers are somewhat outside the main scope of the script, but the flora/fauna diversity commands are examples of that kind of commands. Again, it hinges on having the formula.

It's possible to implement a "cram everything that's legal here in" command for a layer/cluster/vein, but, assuming DF doesn't barf, it would just result in some random selection of the things being present (there are usually not that many veins available, to an embark, so you'd probably get some, and you'd probably get small amounts of each).
Logged

CaptainArchmage

  • Bay Watcher
  • Profile Pic has Changed! Sorry for the Delay.
    • View Profile
Re: Biome Manipulator, a world gen/pre embark biome region manipulation tool
« Reply #74 on: December 26, 2017, 10:07:00 am »

If you (or someone else) can provide the formula for how DF selects (or not) veins/clusters/inclusions based on the scarcity value (and other possible factors) I'll implement it at least for new/morphed layers (assuming the formula is based on info I can make available to the script).

Whole geo biome/all geo biome makeovers are somewhat outside the main scope of the script, but the flora/fauna diversity commands are examples of that kind of commands. Again, it hinges on having the formula.

It's possible to implement a "cram everything that's legal here in" command for a layer/cluster/vein, but, assuming DF doesn't barf, it would just result in some random selection of the things being present (there are usually not that many veins available, to an embark, so you'd probably get some, and you'd probably get small amounts of each).

I think there's probably a probability distribution or something which firstly selects some kinds of minerals, and then distributes them according to some probability distribution. It isn't 100% possible to figure out the probability distribution with certainty but you can get close. I agree with the general assessment though, as well as with the flora and fauna diversity.

Since the flora and fauna is specific to a biome, does that mean adding new creatures (say we get Rhynchotherium, a kind of proboscid) to a biome our fort is in and adding a non-zero population, we might get a herd of them show up to an existing fort? That is assuming our fort doesn't take up the whole biome.
Logged
Given current events, I've altered my profile pic and I'm sorry it took so long to fix. If you find the old one on any of my accounts elsewhere on the internet, let me know by message (along with the specific site) and I'll fix. Can't link the revised avatar for some reason.
Pages: 1 ... 3 4 [5] 6 7 ... 12