[1.0] Rim of Madness - Bones V2.0

Started by SihvMan, May 18, 2017, 04:39:38 AM

Previous topic - Next topic

Nightinggale

Quote from: SheiFoxy on October 25, 2017, 01:27:31 AMThe query here is... how is it supposed to pull all the mod-added animals from this folder when they are all in separate folders with their own mods?
You place the script inside each mod and then make a patch xml file for each mod and add it to patches in your own (or in BoneMod).

However I would not recommend using the perl script anymore. After I wrote the C# solution, that is the way to go. It adds bones at runtime, meaning there is no reason to make patch files anymore. It also integrate with the game UI and applies modifiers for lost body parts and body size. The latter means butchering a newborn alpaca will give a 80% reduction compared to a grown up while the xml patch solution can't tell them apart.

Quote from: Canute on October 25, 2017, 02:45:48 AM
QuoteIf there is no butcherProducts in xml, meat becomes the first. If there is something, then it will be first.
Let me suggest to put meat allways on the first, so meat get hauled allways.
Because meat is rotable and timecritical at this way. While bones and leather can lay around and build full stacks at this way and are haul efficent this way.
That is precisely what I wrote in the bug report. I want vanilla to always provide meat first for that very reason. Nobody replied to it yet, but that's not the same as it isn't in their internal considerations.
ModCheck - boost your patch loading times and include patchmods in your main mod.

ZE

umm i haven't tried this in a while but i have a question........ do bugs have bone? if so, can it be changed to Chitin? https://en.wikipedia.org/wiki/Exoskeleton

and Apini too

Nightinggale

My bugreport has been closed saying butcher hauling has been fixed according to my proposal. This means starting from next release (stable A18?) butchers will haul meat even if there is something in butcherProducts in xml  :D

I'm not sure 50 bones is the right base value. It seems ok in harsh biomes like desert, but I was drowning in bones in the jungle. Still I never cut trees for lumber, meaning only construction and growers did that, yet I had 50% more wood than bones. Maybe it's jungle thing with overflowing resources. Still I'm wondering if it can be configured with a slider from HugsLib or something like that. Proposals are welcome.

I tried making my own new mod to provide new items when butchering. Nothing worth releasing, but harmony worked as expected and the two mods are able to coexist without conflicting. In other words I have verified that my work into making this mod conflict resistant seems to work as planned.

Quote from: ZE on October 26, 2017, 10:15:00 AM
umm i haven't tried this in a while but i have a question........ do bugs have bone? if so, can it be changed to Chitin? https://en.wikipedia.org/wiki/Exoskeleton

and Apini too
Bones is the right word to use for most creatures and it's the name of the mod as well. There are also the concept of a throne of bone and whatever people will use the mod for. Having said that, you do have a point and maybe the text should be updated to say something like "for gameplay simplicity, bones includes non-bone, yet bone like structures such as exoskeletons". I mean the technical correct solution would be to add some chitin item, which can then be used to make bonecrete, but it will complicate gameplay without any benefits whatsoever.
ModCheck - boost your patch loading times and include patchmods in your main mod.

Hydromancerx

Can you add the ability to break open bones and get the Marrow from them as a source of meat?

Nightinggale

Quote from: Hydromancerx on October 26, 2017, 05:20:45 PM
Can you add the ability to break open bones and get the Marrow from them as a source of meat?
First I was like "but you already get food from butchering", but then I thought a bit about this and it's certainly not a bad idea. Marrow is a rich source of food and since it's inside bones, it doesn't rot like meat. In other words it can be stored at normal temperature without going bad. Quite useful for early game, particularly tribal.

Implementation should be fairly simple. Just add marrow as a meat and then make a recipe.

One thing to consider is if we should add the ability to butcher rotten copses, which then turns into rotten meat and bones. It seems that humans did eat bone marrow 3 million years ago and they got the bones from what was left from carnivore feasts. The bone marrow can indeed survive lying like that in the sun while the outside meat can't. I'm not 100% sure how to do this, but we already moved to using C#, so it should be possible.
ModCheck - boost your patch loading times and include patchmods in your main mod.

SihvMan

Quote from: Nightinggale on October 26, 2017, 05:56:15 PM
Quote from: Hydromancerx on October 26, 2017, 05:20:45 PM
Can you add the ability to break open bones and get the Marrow from them as a source of meat?
First I was like "but you already get food from butchering", but then I thought a bit about this and it's certainly not a bad idea. Marrow is a rich source of food and since it's inside bones, it doesn't rot like meat. In other words it can be stored at normal temperature without going bad. Quite useful for early game, particularly tribal.

Implementation should be fairly simple. Just add marrow as a meat and then make a recipe.

One thing to consider is if we should add the ability to butcher rotten copses, which then turns into rotten meat and bones. It seems that humans did eat bone marrow 3 million years ago and they got the bones from what was left from carnivore feasts. The bone marrow can indeed survive lying like that in the sun while the outside meat can't. I'm not 100% sure how to do this, but we already moved to using C#, so it should be possible.

Marrow from bones should be simple enough. Make it a recipe at butcher table, crafting spot or campfire. Make it consume bone to give meat. I'm thinking a single 0.7 nutrition 'marrow' for every two bone used? That seems reasonably balanced. Either that or two 'marrow' per three bone.

As for the rotting body to rotten meat and bones, I'm not sure. Both from a balance perspective, and from a coding perspective. Seems unbalanced if people already have too many bones. It also begs the question of what purpose would rotting meat serve?

From a code perspective, butchering has a filter tag to disallow rotten. My first instinct is to make a copy of the butcher recipe, and remove that tag. The problem being that that would then give non-rotten meat. There would have to be a copy of the

<specialProducts>
<li>Butchery</li>
</specialProducts>

in C, that would then be called upon and give rotten meat, but I'm not nearly good enough at C to handle that.

SihvMan

#81
Also, general announcement that the bone mod is updated for the unstable build of A18. The C code is thankfully identical, and the XML only needed a few tweaks.

Everything seems to be working as it did in A17, and no spectacular errors in the (limited) playtesting I did.

Download on Steam or from the first post.

Nightinggale

Quote from: SihvMan on October 26, 2017, 06:16:40 PMAs for the rotting body to rotten meat and bones, I'm not sure. Both from a balance perspective, and from a coding perspective. Seems unbalanced if people already have too many bones. It also begs the question of what purpose would rotting meat serve?
There is a mod, which uses rotten meat in fertilizer, though I can't remember the name offhand. In fact I think meat vanishes if rotten unless the mod in question is in use.

Quote from: SihvMan on October 26, 2017, 06:16:40 PMFrom a code perspective, butchering has a filter tag to disallow rotten. My first instinct is to make a copy of the butcher recipe, and remove that tag. The problem being that that would then give non-rotten meat. There would have to be a copy of the

<specialProducts>
<li>Butchery</li>
</specialProducts>

in C, that would then be called upon and give rotten meat, but I'm not nearly good enough at C to handle that.
First of all, the programming language is C#, not C. C# is object orientated while C doesn't support objects. This makes them totally different in code design despite using a similar syntax. C is also totally different from C++ and people claiming them to be identical can't code C.

Secondly I think we will have to take over ButcherProducts in Verse.Corpse, or perhaps append to it like I did with Verse.Pawn. This is then used to remove the meat if corpse is rotten and add rotten meat if mod is active. It can then run the make bloodstain code multiple times, indicating that cutting up rotten corpses is a real mess.

Let's forget about rotten corpses for now. It's not really interesting unless there is bone marrow to be extracted.

Quote from: SihvMan on October 26, 2017, 06:21:36 PM
Also, general announcement that the bone mod is updated for the unstable build of A18. The C code is thankfully identical, and the XML only needed a few tweaks.
I had the goal to make the most maintenance free DLL file with the lowest risk of conflicts possible. Looks like I achieved that  :D
ModCheck - boost your patch loading times and include patchmods in your main mod.

SihvMan

Quote from: Nightinggale on October 26, 2017, 07:16:41 PM
Quote from: SihvMan on October 26, 2017, 06:16:40 PMAs for the rotting body to rotten meat and bones, I'm not sure. Both from a balance perspective, and from a coding perspective. Seems unbalanced if people already have too many bones. It also begs the question of what purpose would rotting meat serve?
There is a mod, which uses rotten meat in fertilizer, though I can't remember the name offhand. In fact I think meat vanishes if rotten unless the mod in question is in use.
Rainbeau's Fertile Fields, I think. Vegetable Garden does something similar, but more directly corpse to fertilizer.
(http://steamcommunity.com/sharedfiles/filedetails/?id=935707512)



Quote from: Nightinggale on October 26, 2017, 07:16:41 PM
Quote from: SihvMan on October 26, 2017, 06:16:40 PMFrom a code perspective, butchering has a filter tag to disallow rotten. My first instinct is to make a copy of the butcher recipe, and remove that tag. The problem being that that would then give non-rotten meat. There would have to be a copy of the

<specialProducts>
<li>Butchery</li>
</specialProducts>

in C, that would then be called upon and give rotten meat, but I'm not nearly good enough at C to handle that.

First of all, the programming language is C#, not C. C# is object orientated while C doesn't support objects. This makes them totally different in code design despite using a similar syntax. C is also totally different from C++ and people claiming them to be identical can't code C.

Secondly I think we will have to take over ButcherProducts in Verse.Corpse, or perhaps append to it like I did with Verse.Pawn. This is then used to remove the meat if corpse is rotten and add rotten meat if mod is active. It can then run the make bloodstain code multiple times, indicating that cutting up rotten corpses is a real mess.

Let's forget about rotten corpses for now. It's not really interesting unless there is bone marrow to be extracted.

I'm aware of the difference between C, C++, and C#. Trouble is, my keyboard is beginning to lose functionality, beginning with the 3 key. If I want a '#', I have to copy-paste it from elsewhere. If I say C on this forum, assume I mean C#.

Agreed on the rotten corpses. Too much effort for not enough payoff. Especially without a tie-in for the rotten meat. Maybe I can have people directly cremate rotten corpse for bone ash in the crematorium? Increased use for bone ash at least.

Though, hypothetically, wouldn't it be better to define our own output product, similar to ButcherProducts, if only to avoid wonky behaviors with other mods? Is it even possible to define a separate output like that?

Quote from: Nightinggale on October 26, 2017, 07:16:41 PM
Quote from: SihvMan on October 26, 2017, 06:21:36 PM
Also, general announcement that the bone mod is updated for the unstable build of A18. The C code is thankfully identical, and the XML only needed a few tweaks.
I had the goal to make the most maintenance free DLL file with the lowest risk of conflicts possible. Looks like I achieved that  :D

Thanks for that. :D

Canute

QuoteMarrow from bones should be simple enough. Make it a recipe at butcher table, crafting spot or campfire. Make it consume bone to give meat. I'm thinking a single 0.7 nutrition 'marrow' for every two bone used? That seems reasonably balanced. Either that or two 'marrow' per three bone.
0,7 is far too much. Without looking at the current numbers i think marrow should be like meat 0,05.

The amount of nutri. you can get out of bones should be around 10-25% of the amount you get meat from the corpse.

You should declar marrow as meat, then it could used as meat at cooking, and maybe a special bone soap recipe that wouldn't require to crack the bones first.


Nightinggale

Quote from: Nightinggale on October 26, 2017, 03:15:24 PM
My bugreport has been closed saying butcher hauling has been fixed according to my proposal. This means starting from next release (stable A18?) butchers will haul meat even if there is something in butcherProducts in xml  :D
A18 has been updated and the fix works. Elephant meat is now hauled instead of tusks  :D

Quote from: SihvMan on October 26, 2017, 08:08:16 PMThough, hypothetically, wouldn't it be better to define our own output product, similar to ButcherProducts, if only to avoid wonky behaviors with other mods? Is it even possible to define a separate output like that?
I thought a bit about this and it should be possible to define our own StatDef class and use it like StatDefs with the exception that we can add more tags to it in xml. Alien Race Framework is based on this idea, meaning it must be possible.

This has given me this plan (not 100% sure it's possible)

  • Make a new StatDef class and add ButcheredProduct
  • Make BoneAmount to be of that type and set it to BoneItem
  • Make C# code loop all of the new StatDef class instead of hardcoding BoneAmount
  • If present and bigger than 0, make the item in ButcheredProduct and set count to the number
If I can get this working, there will be nothing in the C# code about bones at all and it would make sense to split the mod into two, one for xml and one for C#. Other mods can then use the C# mod and add other items when butchering without having to rely on BoneMod.

Is it useful? Well it can be used to make mechanoids, which when disassembled will provide steel and plasteel, which are adjusted for missing body parts, meaning if you shoot off an arm, you will get less.
ModCheck - boost your patch loading times and include patchmods in your main mod.

SihvMan

Quote from: Nightinggale on October 27, 2017, 07:11:44 AM
Quote from: Nightinggale on October 26, 2017, 03:15:24 PM
My bugreport has been closed saying butcher hauling has been fixed according to my proposal. This means starting from next release (stable A18?) butchers will haul meat even if there is something in butcherProducts in xml  :D
A18 has been updated and the fix works. Elephant meat is now hauled instead of tusks  :D
Hey, that's great! Glad they fixed that.

Quote from: Nightinggale on October 27, 2017, 07:11:44 AM
Quote from: SihvMan on October 26, 2017, 08:08:16 PMThough, hypothetically, wouldn't it be better to define our own output product, similar to ButcherProducts, if only to avoid wonky behaviors with other mods? Is it even possible to define a separate output like that?
I thought a bit about this and it should be possible to define our own StatDef class and use it like StatDefs with the exception that we can add more tags to it in xml. Alien Race Framework is based on this idea, meaning it must be possible.

This has given me this plan (not 100% sure it's possible)

  • Make a new StatDef class and add ButcheredProduct
  • Make BoneAmount to be of that type and set it to BoneItem
  • Make C# code loop all of the new StatDef class instead of hardcoding BoneAmount
  • If present and bigger than 0, make the item in ButcheredProduct and set count to the number
If I can get this working, there will be nothing in the C# code about bones at all and it would make sense to split the mod into two, one for xml and one for C#. Other mods can then use the C# mod and add other items when butchering without having to rely on BoneMod.

Is it useful? Well it can be used to make mechanoids, which when disassembled will provide steel and plasteel, which are adjusted for missing body parts, meaning if you shoot off an arm, you will get less.

Seems like the kind of thing that possibly should be added to a modding library like HugsLib or JecsTools. Both are general enough to be in everyone's modlist, and would allow others to benefit from the new butcher code.

Or hey, maybe we can submit this mod to the 'see your mod in RW' thread. Do you think it is developed enough for that?

Nightinggale

Quote from: SihvMan on October 27, 2017, 10:54:39 AMSeems like the kind of thing that possibly should be added to a modding library like HugsLib or JecsTools. Both are general enough to be in everyone's modlist, and would allow others to benefit from the new butcher code.

Or hey, maybe we can submit this mod to the 'see your mod in RW' thread. Do you think it is developed enough for that?
It sounds like a good idea to put the "butcher for item" feature in HugsLib or RimWorld itself, but I just need to write it first. For putting BoneMod in RimWorld, I say we should wait and see if I can make something useful with generic programming first. At the very least I figured out a way to write the code a bit cleaner, which I haven't bothered with since it was post 1.4, but I really should if it is going to be submitted like that.
ModCheck - boost your patch loading times and include patchmods in your main mod.

Hydromancerx

@Shivman

So did you like the Bone Marrow idea or not? Note for balance it could take a lot of bones to make one unit of bone marrow.

SihvMan

Quote from: Nightinggale on October 27, 2017, 02:25:35 PM
Quote from: SihvMan on October 27, 2017, 10:54:39 AMSeems like the kind of thing that possibly should be added to a modding library like HugsLib or JecsTools. Both are general enough to be in everyone's modlist, and would allow others to benefit from the new butcher code.

Or hey, maybe we can submit this mod to the 'see your mod in RW' thread. Do you think it is developed enough for that?
It sounds like a good idea to put the "butcher for item" feature in HugsLib or RimWorld itself, but I just need to write it first. For putting BoneMod in RimWorld, I say we should wait and see if I can make something useful with generic programming first. At the very least I figured out a way to write the code a bit cleaner, which I haven't bothered with since it was post 1.4, but I really should if it is going to be submitted like that.

Sounds like a plan. Let me know if you find a solution you're satisfied with.

Quote from: Hydromancerx on October 27, 2017, 03:37:53 PM
@Shivman

So did you like the Bone Marrow idea or not? Note for balance it could take a lot of bones to make one unit of bone marrow.

I do like the idea. I'm currently playing around with it on my beta build, trying to get the numbers balanced appropriately.

Though, Marrow will likely come in the V1.5, which will be released when A18 is stabilized. So, a bit of a wait.