Bay 12 Games Forum

Please login or register.

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

Author Topic: Raw tags for butchering returns  (Read 6196 times)

nanomage

  • Bay Watcher
    • View Profile
Re: Raw tags for butchering returns
« Reply #45 on: June 18, 2011, 12:09:13 pm »

Yep, here's answer.
I modded dragons to reach adult size in ten years, and their corpse weights in arena are now well more than rocs'!
Now gragons leave corpses 25-26kU and are butchered into 600+ meat, 350+ bones and ~200 fat.

Looks like arena "Always adult" rule was not coping with their incredible 1000 years of adult hood, and they were generated 250 years old or so (if we assume their growth is linear)
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Raw tags for butchering returns
« Reply #46 on: June 18, 2011, 12:19:15 pm »

Ha you got to it first, I was about to try that after making mother ducks incredibly unfortunate creatures.

So I guess then that arena mode does indeed just assign some arbitrary age to the creature between the child age and the max age.  And since a dragon lacks both, it dosn't know what to do in the case of the dragon and picks a non-ideal value.   !!SCIENCE!! has succeeded!
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

AutomataKittay

  • Bay Watcher
  • Grinding gears
    • View Profile
Re: Raw tags for butchering returns
« Reply #47 on: June 18, 2011, 12:33:04 pm »

Excellent work! Wouldn't had expected it  :D
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Raw tags for butchering returns
« Reply #48 on: June 18, 2011, 12:33:14 pm »

This seems to be on the fault of the egg tag apparently nullifying the child tag.  With no child to base it off (replaced by egging) there's no ages.

AutomataKittay

  • Bay Watcher
  • Grinding gears
    • View Profile
Re: Raw tags for butchering returns
« Reply #49 on: June 18, 2011, 12:39:40 pm »

This seems to be on the fault of the egg tag apparently nullifying the child tag.  With no child to base it off (replaced by egging) there's no ages.

That wouldn't explain the results I get in .18, which I'm fairly sure is at least one version before eggs.
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Raw tags for butchering returns
« Reply #50 on: June 18, 2011, 12:55:06 pm »

But the egg tags don't nullify the child tags.  They just add an extra step to the process.  Hell they don't even nullify the baby tags.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Raw tags for butchering returns
« Reply #51 on: June 18, 2011, 01:06:46 pm »

In my raws, the dragon entry doesn't have a child or baby tag.

AutomataKittay

  • Bay Watcher
  • Grinding gears
    • View Profile
Re: Raw tags for butchering returns
« Reply #52 on: June 18, 2011, 01:15:09 pm »

Are there any other long-lived creature ( preferrably in excess of 500 years ) that grows over extremely long span of time, that could be tested with? Or even just modding some critter should be able to tell us something about how arena mode aging works.
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Raw tags for butchering returns
« Reply #53 on: June 18, 2011, 01:19:32 pm »

A better test would be live-bearing dragon vs. egg-laying dragon.

Butchery returns are decided by looking at what material a body part is made of, dividing the size of the animal by (or into) the relative size of the body part, and returning one or more units of whatever stuff hits a certain value. Since birds have fewer parts than dragons, each individual bit is larger and more likely to cross the threshold from 'assorted bits' to 'useable chunks'.

Exceptions are skulls, and possibly skin. Since so little of any given part is made up of skin, it would have to be very large to give any skin along with the usual meat and bone. But skin is treated like any other material in the raws, so in theory it could be returned from severed bits.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Raw tags for butchering returns
« Reply #54 on: June 18, 2011, 02:10:09 pm »

It appears that the butchering process works by first dividing up the creature into all of its body parts.  This works by looking at all the items in the creature's BODY line, breaking up the body into all the parts defined in body_default, and using the DEFAULT_RELSIZE to determine the relative size of each body part.  This is used to determine the actual size of each body part.  Body parts with a size below about 185 are ignored at this point, yielding nothing.  The only exception is the skull, apparently because it has the [TOTEMABLE] tag.

The butchering code then examines each body part and looks at the tissues defined in b_detail_plan_default.  Every tissue listed in the layers for every body part is added to the result, no matter the relative thickness of the tissue - there's no threshold applied at this point.  Now depending on what kind of tissue it is you might get stacks or only a single object for the entire butchering process.  The BUTCHER_SPECIAL tag defined on some of the material types in material_template_default seems to be responsible for causing some tissue types to form stacks depending on the size and amount of tissue present in each body layer.  Tissue types without the BUTCHER_SPECIAL, such as skin and scale, usually only yield a single item no matter the relative amount of that tissue present.  The only exception is bone, which forms stacks despite not having the BUTCHER_SPECIAL tag.  That might be either hard-coded, or linked to the [BONE] tag in the material definition, or something, I don't know.

The amount of meat is partially determined by the number of body parts a creature has.  Creatures with fewer body parts have a smaller minimum size in order to drop meat when butchered.  On the other hand, creatures with more body parts tend to drop more meat, because there are more body parts that pass the minimum size threshold for a body part to contribute to the final total.  Above a certain fairly large size each body part can contribute more than one unit of meat/fat/whatever, which is why you can get creatures yielding hundreds of units of meat despite not having hundreds of body parts.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Raw tags for butchering returns
« Reply #55 on: June 18, 2011, 02:21:39 pm »

I'm still trying to figure out eyes.  A dog and a whale both have two eyes of wildly different sizes, and both butcher 2 eyes exactly.  Same with lungs and hearts and kidneys etc.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Raw tags for butchering returns
« Reply #56 on: June 18, 2011, 02:45:30 pm »

I'm still trying to figure out eyes.  A dog and a whale both have two eyes of wildly different sizes, and both butcher 2 eyes exactly.  Same with lungs and hearts and kidneys etc.

The game breaks apart the animal into each type of body part, and figures out the size of each part.  A standard dog has a size of 30000.  It has two eye-type body parts, LEYE and REYE, each of which works out to a size of 16 when the overall body size of 30000 is broken down into individual body sizes.  This is below the body part threshold of 185, so butchering a dog doesn't yield any eyes.

A cow, on the other hand, has a overall body size of 600000.  When this is broken down into the individual body parts, the body parts LEYE and REYE each come out to a size of 316.  This is above the threshold of 185, so each of these body parts adds to the final butcher total.  Both of these body parts is composed of a single type of tissue, so each adds one unit of eye tissue to the final total.

A whale has a standard body size of 20000000.  When broken down into the individual body parts, each of the parts LEYE and REYE have a size of 18148.  This is above the threshold of 185, so each of these adds a single unit of eye tissue to the final butchering yield.

It is possible for a body part to yield more than one unit of tissue to the final total.  This seems to happen when a body part reaches a size of somewhere around 35400, where two units of tissue will result, and one more added for each 17700 after that.  So a whale has two kidneys, RKIDNEY and LKIDNEY, each of which has a size of 362976 for a standard-sized whale.  Each of these yields 20 units of kidney tissue, so butchering a standard whale gets you 40 units of kidney.  Still only two units of eyes, since even for whales the size of the eye is below 35400.

If a body part has more than one tissue type, the relative thickness of each tissue layer is used to determine how much of each tissue is present.  For example, a whale's left flipper (L_FLIP) contributes 18 units of bone, 18 units of meat, 3 units of fat, and 1 unit of skin - although skin is always limited to yield one item per butchering action no matter what.

So as you can see, the amount of meat you get is non-linear with body size.  For mid-sized animals like cows and dogs meat yield is more dependent on the number of body parts.  It isn't till you get to large creatures like whales that butchering results starts to scale with body size, because of the huge difference between the minimum size to yield one item of meat and the amount required for additional units.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Raw tags for butchering returns
« Reply #57 on: June 18, 2011, 09:54:40 pm »

Fascinating...  Now we just need to figure out what makes skin unique that it only gives 1 skin per job.  The only thing obviously unique about skin, is that it's TAN_MAT reaction class, and it has an extremely small thickness on the body.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Raw tags for butchering returns
« Reply #58 on: June 18, 2011, 10:16:16 pm »

Fascinating...  Now we just need to figure out what makes skin unique that it only gives 1 skin per job.  The only thing obviously unique about skin, is that it's TAN_MAT reaction class, and it has an extremely small thickness on the body.

It's not unique to skin.  Any tissue type that doesn't have [BUTCHER_SPECIAL:something] tag defined in its material raws will yield only a single item from butchering.  This includes skin, shell, scale, cartilage, nervous tissue, as well as weird stuff like plump helmet man tissue and blood man blood.  The only exception is bone, which lacks BUTCHER_SPECIAL yet still returns stacks instead of a single 'bone' item.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Raw tags for butchering returns
« Reply #59 on: June 18, 2011, 10:21:56 pm »

I see!  Does that mean you could add the [BUTCHER_SPECIAL:SKIN:NONE] and have it produce multiple skins?  Or would it be RAW_HIDE / HIDE_RAW?
Pages: 1 2 3 [4] 5