Cataclysm-dda: Weasel corpse weighting in at 40 kilogram

Created on 11 Jan 2017  Â·  9Comments  Â·  Source: CleverRaven/Cataclysm-DDA

image

Im believe both the volume and especially the weight are certainly wrong for a weasel corpse.

Most helpful comment

I'm not at all clear on what the benefit of having monsters of the same
type weigh different things would be, the precise weight is usually
irrelevant in the game.

As for the inaccuracy, the most obvious solutions are either to add more
size classes or to define some stats like weight per animal.
The former is superficially simpler, but might get revisited a large number
of times to slowly add more and more size classes. At some point someone
will want certain animals to have and similar volume but different weight,
which would complicate things more.
Defining weight per animal moves data out of the code into json, which is
generally what we want to do. It would also be easier to make this change
a little bit at a time.

All 9 comments

Well maybe it's just a really big weasel.

Sure, and we can add Pre- and Suffix' to monsters :)
For this case, the new ingame name would be

Titanic Weasel of Epic Proportions

In item.cpp:2416, the weight of a corpse is simply determined by the 'size' of the critter:

} else if( is_corpse() ) {
        switch( corpse->size ) {
            case MS_TINY:   ret =   1000;  break;
            case MS_SMALL:  ret =  40750;  break;
            case MS_MEDIUM: ret =  81500;  break;
            case MS_LARGE:  ret = 120000;  break;
            case MS_HUGE:   ret = 200000;  break;

It's too crude! Maybe we should manually define the range of possible weight for each monster. Any thoughts?

JIC, that's not the only place the simplification is used. For the sizes from MS_TINY to MS_HUGE, there are 38, 29, 30, 24 and 25 references respectively in src/*. These vary, like "don't embed arrows in TINY/SMALL creatures", setting off traps, etc..

Mass in particular is also used for vehicle-vs-monster collision calculation:

4341         switch( critter->get_size() ) {
4342         case MS_TINY:    // Rodent
4343             mass2 = 1;
4344             break;
4345         case MS_SMALL:   // Half human
4346             mass2 = 41;
4347             break;
4348         default:
4349         case MS_MEDIUM:  // Human
4350             mass2 = 82;
4351             break;
4352         case MS_LARGE:   // Cow
4353             mass2 = 400;
4354             break;
4355         case MS_HUGE:     // TAAAANK
4356             mass2 = 1000;
4357             break;
4358         }

As you can see, they are different. (EDIT: And possibly for a reason.)

(The line numbers are from yesterday's git master.)


EDITs: formatting, syntax

so....monsters have a size, which sets their mass2, which in turns does things.
Right now each monster apparently fals into one of the 5 categories, tiny, small, medium, large, huge

Fact is, a weasel cant possibly weight in at 40 Kilogramms of mass. Its more like 5 or so i guess.

For starters, instead of setting a fixed mass depending on switch case, the mass2 should in my opinion be based on math.random() so one weasel can weight 4, while another may weight 5. This is true for every critter and should be easily adjustable.

Secondly,. there there needs to be more cases in switch (like, tiny1, tiny2, small1, small2) to create a more fluid progression OR the return value needs to be modified based on the its context, i.e. weasel = small, return 81.500, then the function that received this 81500 (its a setter?) modifies it based on its context.

This is not related to the weasels wrong weight (its off by a long shot), but it would be pretty neat to have a more fluid experience with corpses in general.
Also, once the size/mass is randomized to a degree, as opposed to being static per class, you could further refine the butchering gain (amount), so a big weasel gives another chunk of meat as opposed to a less massive weasel.

I'm not at all clear on what the benefit of having monsters of the same
type weigh different things would be, the precise weight is usually
irrelevant in the game.

As for the inaccuracy, the most obvious solutions are either to add more
size classes or to define some stats like weight per animal.
The former is superficially simpler, but might get revisited a large number
of times to slowly add more and more size classes. At some point someone
will want certain animals to have and similar volume but different weight,
which would complicate things more.
Defining weight per animal moves data out of the code into json, which is
generally what we want to do. It would also be easier to make this change
a little bit at a time.

Welp, seeing as I do this now. Heres my synopsis for this occurance.

There are 7 species of weasel that have been recorded to naturally ( I think ) occur in north america.
These are:

  • Mustela erminea or better known as the Short-tailed weasel, Stoat or Ermine
  • Mustela frenata or better known as the Long-tailed weasel
  • Mustela nigripes or better known as the Black-footed ferret which we can include grudgly, seeing as there is no "Ferret" animal in the game and IRL "Ferrets" are actually in the same genus as weasels. Although I dont see this one being our ingame Weasel seeing as it is classified as "Endangered" by the IUCN or International Union for Conservation of Nature. But who knows, the population may have erupted after the Cataclysm, which provided the perfect environment for them.
  • Mustela nivalis or better known as the Least Weasel

Now we start the process of elimination, This process has 3 perameters, Location of Weasel member ( family / genus member ), Behaviour of Weasel ( solitary or travels in packs / kin ), and of course the average Mass of the Weasel.

Each Weasel will have a profile / analysis and a link to the Wikipedia Page where I got the information from. Lets go!!!

Mustela erminea or better known as the Short-tailed weasel, Stoat or Ermine

  • This little fella is commonly found in the cimcumboreal range, or from the 45° N to 60° N ( Latitude OFC ) which puts it smack bang in New England. ✔
  • The behaviour of this Weasel is standard. it does not burrow its own holes, but takes residence in the burrows of its deceased foes. This Weasel may travel in groups, and the ONLY time that This Weasel may wander / stray from its burrow is during the mating period. And even then it is to search for females. In that sense we can assume that as mating periods are not simulated ingame, and animals respawn infinitely that the mating period is all year, which means this make sense. ✔
  • The average mass of this weasel comes in at about 180 - 258 grams, which is roughly 187 times smaller than the ingame weasel.

Mustela frenata or better known as the Long-Tailed Weasel

  • This smol little guy is commonly found in all the US, excluding parts of Arizona, New Mexico, Colorado, Utah and Nevada. Which means it is also found in New England! ✔
  • The behaviour of this Weasel is standard. it does not normally burrow its own holes, butground burrows, under stumps or beneath rock piles, but commonly uses abandoned chipmunk holes. This Weasel may travel in groups, and the ONLY time that This Weasel may travel in groups, is when it and its kin go out for hunting trips. Other than that it is a very solitary weasel type, and is not the Weasel we see ingame.
  • The average mass of this weasel is around 72 - 270 grams, which is roughly 238 times smaller than the ingame weasel.
  • Mustela nigripes or better known as the Black-footed ferret
  • Im going to completely write this one off as a contender. sos. ✘

  • Mustela nivalis or better known as the Least Weasel

  • This weasel is commonly found in the more northern areas of the globe, such as Canada and all of Europe. This of course excludes New England and therefore this contender cannot pass. ✘

We can come to the conclusion that the weasel that we see and love ingame is no other than the Short-Tailed Weasel also known as the Stoat or Ermine.

Also yeah I spent an hour of my life researching and formatting this. Feelsbadman.

I read the TL;DR and the mass lines. Haven't verified.

Seems that the weasel could have a drop from MS_SMALL to MS_TINY?..

Agreed. MS_TINY is more appropriate. The 'Long-Tailed Weasel' is specifically called out in the description already in the json.

As a side note, and as someone who lives with three domestic ferrets, having a world full of 80 pound weasels would be a plausible root cause for the cataclysm.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PlasmaChroma picture PlasmaChroma  Â·  3Comments

Coolthulhu picture Coolthulhu  Â·  3Comments

ituluwituluwzev picture ituluwituluwzev  Â·  3Comments

RogueYun picture RogueYun  Â·  3Comments

busterbogheart picture busterbogheart  Â·  3Comments