Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Tip for getting desired soil layers on embark (sand, clay etc)  (Read 7700 times)

Trollhammaren

  • Bay Watcher
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #15 on: August 27, 2013, 06:56:54 pm »

But it didn't stay that way over worldgen, right? Before your edit you noted you got different sands. As is expected because they are present in the same places. I like the new edit less since it makes it seem like you actually believe the sand proof while you previously didn't. :P

It's known and reported before that even if you regen the world with the same seeds you will not get the same exact minerals on your embark. The explanation - they are handled by biome tokens and chosen for the embark ad hoc.

And no, you are still wrong about the sorting. Let's just do a concrete example:
Read "a, c, b" in order to array, then print array[1], array[3], array[2]. Then switch array[2] to d and print again.
Output: abcabd
Read "a, c, b" in order, then sort alphabetically to array, then print array[1], array[2], array[3]. Then switch array[3] to d and print again.
Output: abcabd
You cannot tell if the input was sorted without knowing the algorithm. And it's the same if these are pointers to a file which reads "a c b", the switch operation is equivalent to another program writing d in place of b to that file between prints.
« Last Edit: August 27, 2013, 06:59:01 pm by Trollhammaren »
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #16 on: August 27, 2013, 07:01:54 pm »

Let me get you absolutely straight here:

You are saying: "the game picks layers randomly, even if the same seed is used", right? Otherwise your argument makes no sense. ( I wouldn't need to know the algorithm, if I know what the output is supposed to be.)

Otherwise, you are not listening to me. I am regenerating the world, not swapping the raws behind an existing world's back.
If the game sorted the array, it wouldn't matter what order the sand entities were in.

I can test your assertion easily. I can generate the same world untouched twice, and compare.

« Last Edit: August 27, 2013, 07:05:56 pm by wierd »
Logged

Trollhammaren

  • Bay Watcher
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #17 on: August 27, 2013, 07:06:30 pm »

Okay. And you have a region that you've generated five times with the normal raws and the same embark there is gabbro based every time, so we know it's not just randomly switching like minerals can (at least in previous versions)? And then you switch their place in the raws and it's granite based?

If that's what you've done then actually I'm wrong and you're right, order does matter more than the raws would have you believe. Still can't deduce the sorting but yeah, that's actually a pretty cool discovery. I'm just skeptical until I see it because it seems like overhead on the game.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #18 on: August 27, 2013, 07:11:28 pm »

I can test that to be sure, but yes. That is what I am saying.

I will do due diligence and regenerate a world 5 times from identical raws and compare.
Logged

mek42

  • Bay Watcher
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #19 on: August 27, 2013, 07:15:58 pm »

Has anyone verified, for example, that switching peat for fire clay in this manner yielded fire clay that was gatherable and made liquid tight pots?  Or is it just peat that we now call fire clay?
Logged
"Is that the game with the blinky characters and no pictures?  Maybe you do have Asperger's." - My wife after I mentioned my excitement over the elves bringing by caravan a whole bunch of wood after my deforestation project was neglected due to a near-tantrum spiral and total loss of my initial seven and a bunch of immigrants.

Trollhammaren

  • Bay Watcher
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #20 on: August 27, 2013, 07:16:57 pm »

I'll say in advance that very nicely done if it turns out to work like that, despite initial skepticism. It's also good to know if you can now trust minerals to be same. :)

Broseph Stalin

  • Bay Watcher
  • Dabbling Surgeon, Proficient Butcher.
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #21 on: August 27, 2013, 07:20:43 pm »

Has anyone verified, for example, that switching peat for fire clay in this manner yielded fire clay that was gatherable and made liquid tight pots?  Or is it just peat that we now call fire clay?
If you're talking about changevein/layer then yes it changes the former into the latter.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #22 on: August 27, 2013, 07:23:41 pm »

Ok. I just did the due dilligence. Yes. The site keeps the layers intact with every worldgen. No random variance.

The array is clearly unsorted.
Logged

Trollhammaren

  • Bay Watcher
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #23 on: August 27, 2013, 07:32:45 pm »

Thanks. Good, you're right on that. Sorting:

An alphabetically sorted array:
1: gabbro
2: granite
3: obsidian
An unsorted array:
1: obsidian
2: gabbro
3: granite

How do you know the biome expects an unsorted array and points to [2] when it wants gabbro and not a sorted array and points to [1] when it wants gabbro? Both will change similarly if you change what the part where it reads "gabbro" from in the raws actually says. That is what I've been trying to ask for 5(?) posts now.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #24 on: August 27, 2013, 07:44:56 pm »

The observed behavior suggests that any [igneous_intrusive] stone layer is a drop in replacement for any other, EXCEPT obsidian. The obsidian swap test failed. The game clearly parses the array specifically for the obsidian record, but does not care otherwise.

So, what the game appears to do:

Read the raw file entries one at a time.
If the token is "[igneous_intrusive]", redimension the Igneous_Intrusive() array for a new member
Append the entry at the bottom of the array
Process next record.

On worldgen, a random selection of entity records is chosen based on the algo rules, but the contents of those entities aren't checked. With exception to special cases, like obsidian, the game treats eg, Gabbro the same as Granie, since both are Igneous_Intrusive.

The seed used to make this selection results in the same raw array entries being selected, regardless of their population.

The list is "roughly" sorted by "type", but not fine sorted by member.
Logged

Drazinononda

  • Bay Watcher
  • I'm really too normal to play this game so much.`
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #25 on: August 27, 2013, 08:10:55 pm »

The observed behavior suggests that any [igneous_intrusive] stone layer is a drop in replacement for any other, EXCEPT obsidian. The obsidian swap test failed. The game clearly parses the array specifically for the obsidian record, but does not care otherwise.

Did you test obsidian swapping in the case of obsidian layers, or only for volcano walls? Remember that volcanos/magma tubes are features, not subject to the random whims of raw-swapping. The feature creation code specifically calls for obsidian walls surrounding magma sources to create those features. However, obsidian layers (among other stone types) are possible in volcanic areas as a non-feature occurrence, so you'd have to actually test for that rather than just swapping raws and looking at a volcano.
Logged
Children you rescue shouldn't behave like rabid beasts.  I guess your regular companions shouldn't act like rabid beasts either.
I think that's a little more impossible than I'm likely to have time for.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #26 on: August 27, 2013, 08:17:32 pm »

I actually looked at both.

1) I had a mountain made of gabbro. I swapped gabbro with obsidian. The mountain stayed gabbro.

2) I did a quick test embark on a volcano, and looked at the walls. They were obsidian.

Obsidian is clearly looked for explicitly when populating the vector table, and given a hard set value to ensure it is always obsidian.


*edit

I am now curious just how pedantic Toady is in his exception and fault handling. Deletion of the obsidian record wholesale, then generating a world, will cause this parsing operation to fail catastrophically.  I am now curious if it causes the game to crash, or if it results in an undefined array pointer.

The latter may produce "Interesting results".
« Last Edit: August 27, 2013, 08:24:40 pm by wierd »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #27 on: August 27, 2013, 08:39:37 pm »

Obsidian has the [LAVA] token, and according to the wiki that token: "Specifies that the stone is created when combining water and magma, also causing it to line the edges of magma pools and volcanoes. If multiple minerals are marked as lava stones, a different one will be used in each biome or geological region". That wiki edit was made by Quietust, so it was probably researched carefully.

http://dwarffortresswiki.org/index.php/DF2012:Inorganic_material_definition_token

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #28 on: August 27, 2013, 08:49:19 pm »

That's cool to know. Doesn't answer the "undefined" condition question though.

(Eg, what happens when no [lava] token holding entity exists, and the subsequent array has no members.)

That would result in an undefined pointer. Silliness can happen in that case. Like, segfault silliness. Toady really should have an exception trap for that. I am at work, and have spent too much time doing DF science already (have a deadline to meet! EEP!) But that is still an interesting question for later.

Logged

Gentlefish

  • Bay Watcher
  • [PREFSTRING: balloon-like qualities]
    • View Profile
Re: Tip for getting desired soil layers on embark (sand, clay etc)
« Reply #29 on: August 27, 2013, 09:03:50 pm »

I done it. The obsidian, surprisingly enough, turns to rock. But the world generated into the "Draconic age"?
Pages: 1 [2] 3