Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Entity level ethnic groups  (Read 1309 times)

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Entity level ethnic groups
« on: April 30, 2011, 11:11:15 am »

I've been doing a bit of modding recently, and I have found myself wanting a few things to be implemented into the game.  One of the biggest is ethnic groups.

I made several different "cultures" which all have differing languages, governments, and reactions.  They all have the same creature type - human.  For the most part this works very well.  Adding the correct tags to their governments makes it so each culture can take another over easily and naturally.  It makes the world much more dynamic.

But I am experiencing some problems.  Namely, the tissue layer markers.  Since all the human cultures are based on the human creature, when generating a random culture, the game chooses a random skin and hair color from the basic creature file.  This often does not jibe with the real-world culture I am trying to emulate.  I have seen Black-skinned "Asians", pearly-white "Arabs", and Sepia "Nords".

If one were able to set an Entity-level token that would allow an entity to have a specific kind of skin or hair color, as we are now able to set their hair-styles, this process would be made much easier.

Also, when a creature moves from town to town, and settles in a different culture, they keep their name and coloration.  However, when they marry and have children, those children are invariably a member of their adopted culture in all ways: name, color, and tissue.  It doesn't even seem to matter what cultural group their mate is from, either.

I would imagine that Toady's wish is to make ethnic groups possible, but have them be more procedural than pre-set.  This is good, but these kinds of entity-level tags would make it easier to set up "hints" in the files, allowing the produced procedural cultures to have several sets of pre-generated data from which to choose and adapt FROM.

In summary:
Entity level skin and hair color tags
Tracking of a family's actual ethnic heritage
Better genetic model

Also, not so much a suggestion but a question: Has anyone done any research on the genetics tags that are already in-game? There appears to be two tags, Appearance and Tissue Layer.  There are also three types of genetic model found in the string dump.  I have yet to find any information on how to use these, and/or what the different types mean.
Logged
I like fortresses because they are still underground.

Svarte Troner

  • Bay Watcher
    • View Profile
Re: Entity level ethnic groups
« Reply #1 on: April 30, 2011, 11:57:24 am »

This would be awesome! You've inspired me to start modding my own human "cultures".
Logged
That metal guy that pops up sometimes in places
To put it simply, Dwarf Fortress is the Black Metal of video games.

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Entity level ethnic groups
« Reply #2 on: April 30, 2011, 01:03:51 pm »

I know, right?

Simple method: Copy [ENTITY:PLAINS], change the name.  Multiple entities can use the same creature type, and will move between towns freely... if their ethics differ they will go to war.  If there is a position that has the tag [CONQUERED_SITE] which can appoint somehow the rest of the government, conquering armies will take the town over instead of raiding it.
Logged
I like fortresses because they are still underground.

sockless

  • Bay Watcher
    • View Profile
Re: Entity level ethnic groups
« Reply #3 on: April 30, 2011, 07:47:53 pm »

I think that this all just comes down to a better genetic model, which wouldn't be too hard to implement, the problem then comes with storing all the genetic information, because the human genome is like 1 Gb in size or something large like that, but in DF I guess there'd be a lot less traits for each entity.
Logged
Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.
What color was the mailman's hair?

ludsoe

  • Bay Watcher
  • All hail Urst of Urstland
    • View Profile
Re: Entity level ethnic groups
« Reply #4 on: April 30, 2011, 09:03:38 pm »

Wont we only need to store heritage? Like skin colors,hair colors, face details, height, and eye colors? I don't see the need for saving the data of a child's ancestors. The game should only check the parents stats find dominant stats and apply them. For example Mom has blond hair while dad has brown hair. Doing some math the game will use a percentage check for what hair color will mostly likely be applied. After determining the parents hair color percentages the game picks one out of random. And the child will carry the picked color but also carry's the percentages determined before. When the child grows up and has children the percentages will merge with the child's partner. And another color is picked at random based on percentages and so on. With this way it wont be so cluttering and still keeps world saves small.
Logged
Ludsoe has cancels life: Interrupted by Dwarf Fortress

(Reserved for more stuff)

Nasikabatrachus

  • Bay Watcher
  • Who watchdwarfs the watchdwarves?
    • View Profile
Re: Entity level ethnic groups
« Reply #5 on: April 30, 2011, 10:50:19 pm »

I imagine an entity having [ETHNICITY_RANDOM] tags by default and to specify this the modder adds [ETHNICITY_CUSTOM] with other details added, the function of which would be to define the variety and proportion of phenotypes of the starting population. Subsequent breeding determines how the group "looks", which could lead to interesting results while still being somewhat naturalistic. Or rather than make it random, have it depend on the entity's starting biome, e.g. have tropical peoples have darker skin and high-lattitude peoples have lighter skin because of differences in the way the skin interacts with available sunlight.

Also, when a creature moves from town to town, and settles in a different culture, they keep their name and coloration.  However, when they marry and have children, those children are invariably a member of their adopted culture in all ways: name, color, and tissue.  It doesn't even seem to matter what cultural group their mate is from, either.

Is this how it currently works? Weird.

ps Jeoshua, have you posted anywhere describing this culture modding in more detail?
Logged
"I want to have goblins about me, for I am courageous. The courage which scareth away ghosts, createth for itself goblins--it wanteth to laugh." Thus Spake Zarathustra, chapter 7, Friedrich Nietzsche

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Entity level ethnic groups
« Reply #6 on: April 30, 2011, 11:01:58 pm »

I think that this all just comes down to a better genetic model, which wouldn't be too hard to implement, the problem then comes with storing all the genetic information, because the human genome is like 1 Gb in size or something large like that, but in DF I guess there'd be a lot less traits for each entity.

Lol, yes.  WAY fewer traits.  No need to keep track of rare blood types or tendencies for alcoholism, retardation, etc.  Just hair color, eye color, and skin color.  Additionally for ethnicity one could keep track of ethics, clothing and hair style, and which language they speak.  Hah... 1gb...  funny guy :P

There is already a genetic model that is not switched on in vanilla DF.  Problem is, nobody seems to know how, or indeed IF it works.  It's not found in the raws but it is found in the string dump.  I repeat my request for any information that is known on it, just in case anyone reading this thread knows anything about it.

I can deal with someone who speaks a pseudo arab language, follows a pseudo arab lifestyle, etc, who is actually blond haired and blue eyed, so long as their children are the same as they are and I can keep track of this on a per-world basis.

Wont we only need to store heritage? Like skin colors,hair colors, face details, height, and eye colors? I don't see the need for saving the data of a child's ancestors.

That's basically the goal I'm looking for.  All this information doesn't need to be kept track of in a long-form family tree.  Having instantaneous data is good enough, so long as each generation takes their own information from their parents.

As to the rest of the points you brought up, the genetic model that DF seems to have somewhere buried deep inside but switched off, as I mentioned above, has 3 modes:
MIX
DOMINANT_LESS
DOMINANT_MORE

Problem is nobody seems to know what these tokens are exactly, or more to the point how they would work.  They are placed, seemingly, into two tokens:
APP_MOD_GENETIC_MODEL
TLCM_GENETIC_MODEL

Again... the only thing known about these two tokens is that one is for appearance mods (which are poorly understood to begin with) and the other is for tissue layers.  This knowledge, however, is known only from their very names.  How they work, however...

ps Jeoshua, have you posted anywhere describing this culture modding in more detail?

No I have not, except as vague information.  I would post a long thread on the subject but... honestly... I can't make heads nor tails of any of it.  All I know is that one can have multiple entities with the same creature, or different creatures, and if they move into a place together they seem to be kept separate.  If they're the same creature type (in my testing, I've used humans), they can breed, but any creature comming out of their union seems to pay attention only to their place of birth as far as entity-level things go.

It would seem that certian things are stored on a per-actor basis, and others are stored on a per-civ basis... problem is that since legends mode is often very vague about all of this, there is usually not a way to differentiate the two.
« Last Edit: April 30, 2011, 11:07:50 pm by Jeoshua »
Logged
I like fortresses because they are still underground.

sockless

  • Bay Watcher
    • View Profile
Re: Entity level ethnic groups
« Reply #7 on: April 30, 2011, 11:17:08 pm »

I think that on a global level, important figures could have some basic information stored on them, like ethnicity and maybe 1 or 2 random major traits, so you could get in the legends something like "He was known for his big nose and freckly skin", for fortress dwarves we could store a larger amount of information, including the different alleles etc, so we keep track of if they are a bb, BB or Bb. For general populations, general traits would be stored, so the Clasping Mirrors might have dark skin and curly hair, whilst the Shining Moon might have light skin and slanted eyes. These traits might change over time as they get invaded and stuff, or maybe just over time due to climate etc.
Logged
Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.
What color was the mailman's hair?

Svarte Troner

  • Bay Watcher
    • View Profile
Re: Entity level ethnic groups
« Reply #8 on: May 01, 2011, 12:41:26 pm »

Nazi fortress Uhh.. Murdering-people-who-are-different-fortress may truly become a reality someday... Instead of carrying out mass genocidal murders on Elves, we can eliminate our fellow dwarf based on eye color. Someone had to bring it up.
« Last Edit: May 03, 2011, 04:17:12 pm by Svarte Troner »
Logged
That metal guy that pops up sometimes in places
To put it simply, Dwarf Fortress is the Black Metal of video games.

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Entity level ethnic groups
« Reply #9 on: May 01, 2011, 12:47:18 pm »

Nazi fortress

Godwin's law, you lose, out out OUT!!!

Seriously tho, almost every race has [ETHIC:KILL_SAME_RACE:UNTHINKABLE] anyways.  Maybe you could play Nazi Dark Fortress as Goblins or something but none of the other races would even stand for it.  I suppose that might change with procedural ethics but... SO off topic it's not funny.

And no, someone didn't need to say it.  This is a thread about ethnic groups, not ethnic "cleansing"
Logged
I like fortresses because they are still underground.

Svarte Troner

  • Bay Watcher
    • View Profile
Re: Entity level ethnic groups
« Reply #10 on: May 03, 2011, 04:45:42 pm »

Nazi fortress

Godwin's law, you lose, out out OUT!!!

Seriously tho, almost every race has [ETHIC:KILL_SAME_RACE:UNTHINKABLE] anyways.  Maybe you could play Nazi Dark Fortress as Goblins or something but none of the other races would even stand for it.  I suppose that might change with procedural ethics but... SO off topic it's not funny.

And no, someone didn't need to say it.  This is a thread about ethnic groups, not ethnic "cleansing"

You got me  :-[.
 With a deeper genetics model, would all people within a "culture" look the same? What kind of variation would there be within these groups... thinking about it, this all seems so complicated to me for a video game. If it's accomplished, I'll be in awe.
Logged
That metal guy that pops up sometimes in places
To put it simply, Dwarf Fortress is the Black Metal of video games.

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Entity level ethnic groups
« Reply #11 on: May 03, 2011, 05:19:18 pm »

It wouldn't require much more complexity than a simple token in the entity files that declares the range of colorations and appearance modifiers that might exist within that entity.  The functionality is already present in the Creature objects, this would just move some copy or access to that code into the Entity object.

The genetic model is already in the game, somehow.  I plan on focusing my !!SCIENCE!! on seeing how or if it works in the game as-is. At any rate, unless we can declare this kind of thing on an entity basis, we would end up getting, every time, a creature who is in the midrange of the genetic pool, however it is defined.  Over time all genetic markers will converge onto one type.

The problem there is that the cultural influences are not thereby modeled.  Certain people will find certain other types of people attractive on a basic level in reality, and prefer them to other types.  By having Entity object be able to basically declare the overall outcome of what this preference would be, the randomly generated creatures within that entity will better simulate what that civilization would look like.

For example, a human "subrace" could be declared that tends not towards the sepia brown tones of the current humans, but blond and fair skinned, almost exclusively.  Then set them to start out in the tundras and prefer colder biomes.

Creatures naturally move from site to site when given the proper tags, so there would be movement to other cities.  This would work for any race's site-type, so Dwarves, Elves, and Goblins do this, too.  And since their creature type is the same, they could then have babies, as worldgen creatures are wont to do.

With the genetic markers turned on as is, it would lead to the dominant coloration and appearance modifiers comming to the forefront, or the weakest if the genetic marker was switched.  However, in order to have dominant and recessive genes, the genetic model must have two sets of modifiers: The mother's contribution, and the father's.  X and Y linked traits would probably be way more detail than is necessary, so a simple pair of the tracked genetic features would be enough.  Since they're very simple eye, skin, and hair color markers, the added complexity of which part of a genome they would appear on isn't strictly necessary.

So the result of an ethnically mixed creature would be the same as their dominant parent, but Entities with prolonged contact with other ethnic groups would end up having a substantial portion of their civilization having the traits of both groups.  If that race died off, however, and the migrants stopped coming, the randomly generated historical figures would exhibit an "evolutionary pressure" back towards the type for their entity, since their genetics are created within that base range.

Additionally, an entity that has alot of contact and migrations from another entity's site may slowly become ethnically the same as their trading partner, while maintaining the civics and government of their motherland.  And sites that are taken over, in war, by another entity become slowly homogenized with their new overlords.

TLDR; The beatiful thing is that all this stuff happens on it's own as a result of the way civs are handled in DF.  So honestly, a little added complexity to the entity files and genetic modelling leads to a VAST change in the depth and complexity of the resulting histories and people.
« Last Edit: May 03, 2011, 05:23:57 pm by Jeoshua »
Logged
I like fortresses because they are still underground.