Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - SihvMan

#31
Releases / Re: [A17 and A18] Bone Mod V1.4
October 27, 2017, 08:23:59 PM
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.
#32
Releases / Re: [A17 and A18] Bone Mod V1.4
October 27, 2017, 10:54:39 AM
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?
#33
Releases / Re: [A17 and A18] Bone Mod V1.4
October 26, 2017, 08:08:16 PM
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
#34
Releases / Re: [A17 and A18] Bone Mod V1.4
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.

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.
#35
Releases / Re: [A17 and A18] Bone Mod V1.4
October 26, 2017, 06:16:40 PM
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.
#36
Releases / Re: [A17] Bone Mod V1.3
October 24, 2017, 07:51:48 PM
Quote from: Nightinggale on October 23, 2017, 12:58:56 PM
I coded a small mod and attached it here and the plan is that it should be merged into BoneMod itself.

-SNIP-
On top of the modifiers for amount of bones written here, it will also multiply with the butcher's efficiency. This means if you have a butcher with lower manipulation or consciousness, he will provide fewer bones, just like he will provide less meat and leather.

Oh goody! You once again improved this mod four-fold. As far as I'm concerned, you're just as much the author of this as I am.

Quote from: Nightinggale on October 23, 2017, 12:58:56 PM
I think I have done what I can/want for this mod. Now it's a question of figuring out if 50 is the right default value for game balance and make patches for modded creatures, which shouldn't provide bones. This is all xml, the layout is already in place in the mod and modding it shouldn't require C# skills or setting up the compiler. I will naturally still be around for bugfixing if that should be needed.

A little playtesting shows that your changes seem to add bones to even mod added creatures. No patches required except for mechanoids.
#37
Releases / Re: [A17] Bone Mod V1.3
October 10, 2017, 08:20:06 PM
Quote from: Shotgunfrenzy on October 10, 2017, 07:45:08 PM
Download link has stopped working...

Whoops. Fixed it.
#38
Releases / Re: [A17] Bone Mod V1.2.1
October 10, 2017, 07:11:20 PM
Ahhh.... I'm finally back to RW. Now to check my mod, surely nothing has -
Quote from: Nightinggale on October 09, 2017, 09:17:28 PM
-SNIP-

Studying the features usable in patches, I started experimenting with PatchOperationSequence. I managed to get it to a state where it inserts bones if the animal has no bones already. Even more importantly, if the animal is missing, it will fail silently. This means Bone Mod can have one patch xml file for each animal mod and it will just work if Bone Mod is loaded last.

Using this script is really easy. Just copy it into ThingDefs_Races and double click it. It will then generate a new xml file, which you move to Patches and rename. There are more details in the top of the script (it's plain text, just like xml files) and there are some settings, which can be tweaked. Most importantly the amount of bones. I have set it to 50 * body size (rounded down), which seems to be ok from a balance point of view. Remember this just generates the files. The actual numbers can be adjusted by hand afterwards if needed. The script has no way of knowing if the animal is an octopus (no bones at all) or something with a thick exoskeleton.

Since the script is written in perl, you may have to install perl. For windows I recommend strawberry perl. For none-windows, it's usually installed by default.

-SNIP-

HELLO! You just became my new favorite person on this forum. A script to autogen patches? That just made compatibility real easy.

QuoteI also added the generated patch files for AnimalCollabProj and Beasts of the Rim. You should be able to generate them yourself, but since I already got them, I might as well add them.

Thanks. I've since made some for TiberiumRim, Megafauna, and Cosmic Horrors. Those should cover the majority of the big creature patches.

Quote
Technically this would be my first Rimworld mod and it's my first post on the forum, not bad considering I made it in just one evening  :)

And what a mod to make! This is excellent.

Quote
Also for the next release, do update the link in About.xml to link to this thread. Right now it goes to the forum frontpage if you click the link, which is supposed to go to this thread.

Aaaanndd... fixed.

-------------------------------

Version 1.3 now up. Couple of XML tweaks, added the patches, and this AMAZING BIT OF CODE.
#39
So, if you research GDI tech, you get relation buffs with GDI and penalties with Nod, and vice versa with Nod Tech. What happens to faction relations if you research both? Are both good, both bad, neutral?
#40
Mod bugs / Re: Error on Planet Generation
October 06, 2017, 09:28:31 PM
Are you perchance using "Mechanoids Extraordinaire"? I had been getting that same error for a while, and disabling that mod seemed to fix it. I think it has a conflict with Orion's Faction Discovery.
#41
Quote from: lorebot on July 03, 2017, 10:15:01 AM
Quote from: SihvMan on July 03, 2017, 04:37:39 AM
Emphasis mine. The "skill not high enough" isn't from Quality Surgeon. Removing carcinoma requires a surgeon w/ skill level 10. If your highest level doc doesn't have Medicine 10, they can't do the surgery.

Okay, I was not aware of that. I don't recall what skill level my best doctor was at the time, but I should have still seen something on the right click menu shouldn't I? Why did all my other Doctors get the 'Skill not high enough' right click menu option but my best doc didn't?

If you aren't getting any option when right clicking, check the med tab of the pawn you want to surgery. Specifically, if you have them set to herbal med only, that can stop some surgeries. For reasons unknown, certain surgeries require non-herbal medicine, but give no UI notice at all. This is a vanilla issue.

Set the medicine to glitter med and see if the option comes up.
#42
Quote from: lorebot on July 02, 2017, 04:05:05 PM
I believe I'm having an issue with Quality Surgeon. My best Doctor can't/won't perform any surgeries for me. I'm trying to excise a carcinoma from the foot of one of my colonists, Quality Surgeon is preventing all my other doctors from doing the operation (at least I think it's Quality Surgeon) and says their skill is not high enough when I try to click on the option in the right click menu. But the option doesn't even appear in the right click menu when I have my best doctor selected. I've had to install a few wooden legs and a denture to, the other doctors are able to do those. But again, my best doctor doesn't even have the option in the right click menu.

It's extremely frustrating and I'm not sure what to do about it or if it's safe for me to uninstall the mod to confirm it's really the problem. I'm playing on permadeath mode atm so I can't make backup saves to experiment with :(

Emphasis mine. The "skill not high enough" isn't from Quality Surgeon. Removing carcinoma requires a surgeon w/ skill level 10. If your highest level doc doesn't have Medicine 10, they can't do the surgery.
#43
Releases / Re: [A17] Bone Mod V1.2
June 29, 2017, 01:44:07 PM
Quote from: Canute on June 29, 2017, 12:50:45 PM
Hi SihvMan
i am geting this error.
[Bone Mod] Patch operation Verse.PatchOperationAdd(*/ThingDef[defName = "ElectricCrematorium"]/recipes) failed
Verse.Log:Error(String)
Verse.PatchOperation:Complete(String)
Verse.LoadedModManager:LoadAllActiveMods()
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__84E()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__84C()


Yeah, this frustrated me for a bit. Turns out, xpath is much more case sensitive than most RW Def files. [defName] needs to be [DefName] in the xpath, because the Crematorium uses <DefName> instead of <defName> I'll upload the fix shortly.
#44
Releases / Re: [A17] Bone Mod V1.2
June 28, 2017, 06:01:08 PM
Quote from: Jedi0n on June 28, 2017, 11:50:34 AM
Quote from: SihvMan on May 18, 2017, 04:39:38 AM

Good For?

    • Tribal play-throughs, before stone-cutting is researched. Bone has no flammability, so can be used to fireproof parts of your early base.

Steel, which inherently has 20% flammability, burns at ~2500 degrees. Bone, while I suppose doesn't necessarily burn, does brittle and crack at some ~1830 degrees. It surely is not likely to be utilized in fireproofing. I can't find anything online at least that would suggest it's useful for that.

Unfortunately that alone bars me from further interest in the mod, I'm sorry. But don't let my thirst for realism shoot anyone down, I think it's always a good thing to maintain and work on mods. Keep up the good work.

To be fair, I think the fact that steel walls burn in RimWorld is more unrealistic than bones not burning. That being said, to each their own. I'm glad you took the time to at least look and comment, and I thank you for your encouragement.
#45
Releases / Re: [A17] Bone Mod V1.2
June 24, 2017, 10:43:06 PM
Quote from: Mitz on June 24, 2017, 09:08:33 PM
Literally unlplayable - not on steam

Should be... I can see it. Did I accidentally set it to hidden?

EDIT: Turns out, yes I did have it set to hidden. Visible now.

Quote from: damngrl on June 24, 2017, 09:24:43 PM
7 bone per humanoid? Wow thats pretty harsh nerf. From 75 to 7. BTW Turkey have 5 bones yet humans 7? If you want to nerf bones you have to hit animals harder or buff humans a little. PS Forget about building walls anymore 5 bone per wall for 140hp not worth imo. Just install ICE mod to make ice walls. But progress is progress good job. I just made floor patch for myself 2 bones per tile. Better use bones this way.

Accidentally put in wrong version of bone add patch. Should be resolved (ie back to old values).