Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarf Fortress Genetics  (Read 6856 times)

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Dwarf Fortress Genetics
« on: November 10, 2010, 11:59:01 am »

This thread in the modding forum mentions a problem that I have never actually seen, but have seen referred to a couple of times - that the latter entries for a creature's possible hair/eye/skin color are not, or only insufficiently, used. Since I don't want to derail that thread, but still am curious about the reality of the situation, I'd like to see the normal dwarf raws in action (or any creature that has variable colors, whether modded or not), and determine whether what people see is the saved genetic information of the civilization in question, or if there is a problem with the distribution of colors.

My first set are a pre-embark seven of dwarves of a civilization called The Plank of Flying (in my time, we used broomsticks!). I'll check the other dwarven civilizations in this world later on.

Spoiler (click to show/hide)
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Lawec

  • Bay Watcher
  • Dabbling Goblinslayer
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #1 on: November 10, 2010, 02:48:08 pm »

Test it!
For dwarven science!
Logged
In order to improve the universe's frame rate, we must all throw rocks into volcanoes and then do absolutely nothing, worldwide, for a week, to take pressure off pathfinding.

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #2 on: November 10, 2010, 02:51:45 pm »

The Scraped Bell (1st on the list)
Spoiler (click to show/hide)

The Gloved Tour (3rd on the list)
Spoiler (click to show/hide)
I'm sensing a pattern...

The Helpful Daggers (4th on the list)
Spoiler (click to show/hide)
Well, that was helpful. But many of these guys also seem to have had slit eyes...

The Oil of Competition (5th and last on the list)
Spoiler (click to show/hide)
Just when I thought I had everything figured out, these guys come and mix things up.

Another visit to the Plank of Flying (2nd on the list)
Spoiler (click to show/hide)
Consistent with the first visit, after an abandon.

My findings so far indicate that there may be a problem in diversity - there are usually two colors that are fixed, but the Oil of Competition deviates from that by having only one fixed color, and I have no idea whether the hair color of the Helpful Daggers changes by dwarf as I suspect it does. In case anyone is curious, the world I used is actually uploaded on the DFFD, in the bugged saves section. Just get rid of the adventurer somehow. I may also try it with other worlds, but if someone has their own experiences to share, that would be cool as well.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Ieb

  • Bay Watcher
  • A Breakdancing Ogre
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #3 on: November 10, 2010, 03:52:23 pm »

I noticed this too, and even found a solution.
I modded in a race that used every color DF had for skin or hair color. While it did sort of work right, I noticed that on different games, there was one constant thing between them. At least, I think there was just one. Might have been two.

Anyway.

While the hair did function properly, as rainbow-colored as it should have been, their skin color was all the same. Every single one of the 7 starter units had the same skin color, as did every migrant who arrived.

The fix for that though was that when you add in the color tags and the number, along the lines of TAUPE_SANDY:1 and then continue with more color options, you +1 to it. So the next color gets :2, then :3 and so on.

After I did that everyone was rainbow properly. And not a masterrace who had genocided all other skin colors. That's how I figured it, anyway. Thinking that Toady had gone so deep to worldgen issues that the game tracked what color skin your entity races had and did minority/majority calculations which included certain skin colors "dying out".

I'm not sure if that's a good thing.

"In the year 246, the last brown skinned dwarf died."

Oh god, I just went there, didn't I?
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #4 on: November 10, 2010, 04:22:26 pm »

The fix for that though was that when you add in the color tags and the number, along the lines of TAUPE_SANDY:1 and then continue with more color options, you +1 to it. So the next color gets :2, then :3 and so on.
That's the same thing proposed in the linked thread, and certainly it works to increase diversity. I'm still not sure that the described problem is the actual problem, but there is definitely something odd going on with the genetics of at least the Starting Seven. I created a test world that ran a total of 2 years. In theory, if the starting sevens use the genetic information of their culture, and the first dwarves all have random information, then the starting seven of such a world should be just as random in their genetics. Well, these are the results:

The Sly Lenses (1st)
Spoiler (click to show/hide)
Two fixed colors. I also think a lot of the eyes were bulging. Not a good start, it seems.

The Post of Evening (2nd)
Spoiler (click to show/hide)
That's surprising, no fixed colors. Is the early start year helping after all?

The Swift Castle (3rd)
Spoiler (click to show/hide)
I guess I spoke too soon. That's nothing short of ridiculous.

The Perplexing Quakes (4th)
Spoiler (click to show/hide)
Okay, another civ with no fixed colors.

So I guess it's half success, 1 quarter failure, 1 quarter dismal failure. There definitely is a problem, but I guess it isn't the problem identified in the original post of the linked thread. The colors certainly seem to run farther than suggested there when they do run. But it is something I still need to check - where do these colors fall in the dwarven spectrum, and in relation to each other?
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #5 on: November 10, 2010, 05:20:50 pm »

While the hair did function properly, as rainbow-colored as it should have been, their skin color was all the same. Every single one of the 7 starter units had the same skin color, as did every migrant who arrived.

The fix for that though was that when you add in the color tags and the number, along the lines of TAUPE_SANDY:1 and then continue with more color options, you +1 to it. So the next color gets :2, then :3 and so on.

Wouldn't it be easier just to use the [TLCM_GENETIC_MODEL:MIX] token?
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

Ieb

  • Bay Watcher
  • A Breakdancing Ogre
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #6 on: November 10, 2010, 05:38:13 pm »

Well I guess it would have been.
Had I known that such a tag existed.

And it wasn't exactly hard to do it my way, and from what I've seen, it works so I'm content. Although my fingers hurt.

That might just be from all that +1 though.
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #7 on: November 10, 2010, 06:02:15 pm »

While the hair did function properly, as rainbow-colored as it should have been, their skin color was all the same. Every single one of the 7 starter units had the same skin color, as did every migrant who arrived.

The fix for that though was that when you add in the color tags and the number, along the lines of TAUPE_SANDY:1 and then continue with more color options, you +1 to it. So the next color gets :2, then :3 and so on.

Wouldn't it be easier just to use the [TLCM_GENETIC_MODEL:MIX] token?
Yeah, there wasn't all that much experimentation with the genetic model tags, and we don't really know what the other two models do, do we?

Anyway, last one from me for tonight, checking where the posted colors fit into the spectrum.

The existing colors:
Spoiler (click to show/hide)

Where my posts fit:
Spoiler (click to show/hide)

I haven't fully analyzed the data, but it does seem that the first color is chosen often after all, so I guess I have to revise my position there. However, everywhere except possibly hair colors, late colors do come up often enough, so it doesn't seem too dominant. Whether these are flukes or not would probably require more data. The problem of uniform colors (and sometimes descriptors?) remains in any case.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #8 on: November 11, 2010, 12:14:17 am »

IanFC but iirc today said that haircollors etc. are recessive in order of there appearance in the raw. If you have say Red, green and Blue. Blue will be recessive to Green which in turn is recessive to red.
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Dwarf Fortress Genetics
« Reply #9 on: November 11, 2010, 10:12:00 am »

IanFC but iirc today said that haircollors etc. are recessive in order of there appearance in the raw. If you have say Red, green and Blue. Blue will be recessive to Green which in turn is recessive to red.
Looks like it was mentioned in DF Talk 8.

Quote
...all of the colours, like eye colours, hair colour, I think that uses a dominant/recessive thing now where you pass on two copies and then it picks probably the colour with the lowest index; maybe there's an alphabetic bias right now on which genes are dominant, or it might be the first you listed, it could be the first one you list in the raws that's the dominant gene.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu