Topic on User talk:Harakoni

Jump to navigation Jump to search
Ickputzdirwech (talkcontribs)

I noticed that all leather amounts are of. Could you add a property for them like Property:Meat Yield? They are calculated by pretty much the same formula:

40*bodysize, with the following post-process curve:

(0,0) (5,14) (40,40) (100000,100000)

The following creatures have a different base value though:

Chicken = 0; Duck = 0; Goose = 36; Megascarab = 0; Spelopede = 0; Megaspider = 0; Human = 75

Ickputzdirwech (talkcontribs)

oh, I just noticed Property:Leather Yield already exists. In the infoboxes the values are wrong however. I think I have to remove the old definitions.

Harakoni (talkcontribs)

I can set it up so that it automatically interpolates the value from the body size, and then you can manually override that with the template. Do you happen to know a few of the correct leather amounts for the animals you've removed so I can test it?

Cheldra (talkcontribs)

Here's all of them (automatically scraped & calculated):

Megasloth: 160, Thrumbo: 160, Elephant: 160, Rhinoceros: 120, Cow: 96, Muffalo: 96, Bison: 96, Horse: 96, Grizzly bear: 86, Polar bear: 86, Dromedary: 84, Elk: 84, Yak: 84, Boomalope: 80, Pig: 68, Donkey: 56, Warg: 56, Deer: 48, Alpaca: 40, Ostrich: 40, Caribou: 40, Ibex: 40, Cougar: 40, Panther: 40, Wild boar: 36, Timber wolf: 36, Arctic wolf: 36, Husky: 36, Goat: 33, Sheep: 33, Capybara: 33, Labrador retriever: 33, Gazelle: 31, Turkey: 28, Emu: 28, Cassowary: 28, Lynx: 28, Fennec fox: 27, Red fox: 27, Arctic fox: 27, Goose: 26, Tortoise: 25, Alphabeaver: 24, Raccoon: 22, Iguana: 22, Chinchilla: 21, Monkey: 21, Cat: 20, Yorkshire terrier: 20, Cobra: 18, Hare: 16, Snowhare: 16, Squirrel: 16, Rat: 16, Boomrat: 16, Guinea pig: 16, Chicken: 0, Duck: 0

Also, in case it's helpful, here's an adaption of the interpolator I used on Template:Animals/Row for the baby meat yield, as it has the same post-processing curve as leather yield:

{{#vardefine:pre_curve_leather_yield
 | {{#switch: {{{name|}}}
   | Goose = {{#expr:36*{{{bodysize|}}}}}
   | Chicken | Duck | Spelopede | Megaspider = 0
   | #default = {{#expr:40*{{{bodysize|}}}}}
  }}
}}

{{#vardefine:leather_yield
 | {{#ifexpr: {{#var:pre_curve_leather_yield}} > 40
   | {{#var:pre_curve_leather_yield}}
   | {{#ifexpr: {{#var:pre_curve_leather_yield}} > 5
     | {{#expr: (40-14)/(40-5)*{{#var:pre_curve_leather_yield}} + (40 - (40-14)/(40-5)*40)}}
     | {{#expr: 14/5*{{#var:pre_curve_leather_yield}}}}
    }}
  }}
}}
Harakoni (talkcontribs)

Thanks Cheldra, but I'm confused because many of those values are the same as what was removed as outdated. Who is wrong here?

Harakoni (talkcontribs)

Oh and thank you for the code snippet, that is very much appreciated.

Cheldra (talkcontribs)

I think all of the leather below 40 were incorrect until a few weeks ago, but then I fixed a few of them such as Squirrel as I spotted the mistakes. It looks like I missed a few though, since Gazelle's was still incorrect at 26, wheras the interpolation (and the in-game reported value that I just double-checked) is 31, so it was correct to have been removed.

All the leather yield values above 40, such as Deer, are unaffected by the post-processing curve, and so were already correct and did not need to be removed.

Ickputzdirwech (talkcontribs)

Sorry got interrupted. Yes, the values above 40 were mostly correct. I removed them anyway because otherwise they wouldn't get updated in case the body size gets changed. So not the value itself was necessarily outdated but rather the way it was defined. If you don't mind I will continue remove it for all animals.

Anyway, as Cheldra noted the values for animals with leather yield below 40 are still wrong. I had a quick look at Template:Infobox main and it looks like meat yield is also not calculated properly.

Harakoni (talkcontribs)

Ah that's fine then, that was basically my plan - have it automatically calculate for most animals and then have leather yield be available to override the calc for things like Goose. Just the edit summary that was tripping me up. Please go ahead, and let me know if you have any troubles. I do ask that you double check any changes you make to infobox main, just because its used everywhere but I reckon you've got a handle on it.

Thanks to you both.

Ickputzdirwech (talkcontribs)

I'll be extra careful :)

Cheldra (talkcontribs)

I've added in the leather interpolator to Template:Infobox main, and I'm pretty sure it didn't break anything :)

I'll do the same for meat yield now.

edit: done meat yield too, I think both should be calculated correctly now! (though exceptions like geese still have to be set manually)