RimWorld

RimWorld

Community Framework
79 Comments
Scorpio May 4 @ 2:55am 
CF.HatcherExtension is gone?
Turnovus  [author] Mar 7 @ 6:59pm 
@Punful Guy
The CF's sole goal is to provide broad functionality for modders, and does not claim to improve performance or stability.

With that said, invoking any Harmony patch does come with a marginal overhead. Reducing the number of individual Harmony patches on high-volume methods could lead to a minute increase in performance, though I'd expect the effects to be negligible at best.

Reducing the number of Harmony patches can also provide better stability, as there are fewer third-party methods fighting each other over how the program should behave.
Punful Guy Mar 5 @ 8:27pm 
Are these patched methods actually more efficient with this mod? As in with enough mods this would actually increase performance by cutting unnecessary calls?
Tleno Aug 29, 2024 @ 6:12am 
Hey could it be possible to make a request?

Like Output or Recipe Worker that randomizes output so spending consistent resources crafting you randomly get one of multiple defined objects instead of one specific?

Or what about randomization to glower class so object starts off with one of random glow colours instead of predefined?
Fighting Pirate Mar 30, 2024 @ 2:51pm 
Thank you for updating this! This framework has been a really helpful tool. Glade to see it still being supported for 1.5.
Oddbase Feb 22, 2024 @ 2:46pm 
hey you think you would be able to make it so the slavesuppressionoffset stat actually works with hediffs?
Turnovus  [author] Feb 13, 2024 @ 9:20am 
@dinhkhiem199833
I was worried that this might be the case, I will start working on a fix for it.
Kaden Ha Feb 12, 2024 @ 9:30pm 
Is it intended that comps that's added through CompsToAddWhenStuff is NOT saved? I tested with the self repair comp on doors, as they have Normal tickertype, then save and reload, the comp disappeared. They stopped healing and the extra inspection also gone.
Kaden Ha Oct 19, 2023 @ 6:32pm 
There's a comp to add comps to items when stuffed with the material, so can I suggest the opposite, a comp that removes comps from items when they're stuffed?
TurtleShroom Oct 1, 2023 @ 2:39pm 
I don't know how to update C-Sharp code myself, so if I sent it over, could it be updated by the men behind this Mod instead of depending on my wallet to update it?
TurtleShroom Oct 1, 2023 @ 2:35pm 
Years ago, I inherited a Mod that added C-Sharp and, with the original author's explicit permission, I was given full control over it and its future.

The problem on my end is that I cannot code in C-Sharp to save my life. This means that I am heavily dependent on the original author (with whom I am no longer friends), or the "Rimworld" Mod Market Discord chat room (my poor wallet).

Would it be possible that I could submit the C-Sharp code to the Community Frame Work for all future maintenance and update purposes? I have permission to do so and the code is already complete.
Capataina Jul 25, 2023 @ 9:41am 
Yeah no I used that to attach the comp to clothes but since apparel doesn't have tickertype, it wouldn't heal. The way I got around it is I just designed a new apparel that had optional self repair if this framework was also in the mod pack.

I'm not sure about how to add normal tickertype to clothing made by that textile since from what I tested, that extension only adds comps to items, it can't change tickertype of apparel to normal as well.

I might be missing something here but thats what I came up with basically.
Turnovus  [author] Jul 25, 2023 @ 8:42am 
@Capataina
Did you apply the comp to the textile itself? Comps attached to stuff don't normally extend to things made out of that stuff. However, the Community Framework does have an extension that will allow you to do that:
https://github.com/Turnovus/communityframework/wiki/Basic-Features-(XML)#44-create-stuff-that-adds-comps-to-things-made-of-it
Capataina Jul 24, 2023 @ 12:59pm 
Does apparel not have normal TickerType?
Capataina Jul 24, 2023 @ 12:57pm 
The self heal comp seems like it doesn't work. When I add it to items it simply says "CompSelfRepair with TicksPerRepair (number)" on the item itself and the item never actually restores hitpoints. Tested on a vanilla shirt with a textile I created.
Twilight Jul 2, 2023 @ 1:24pm 
Welp, that did it. Only subscribed the other day and didn't consider I'd have stale content already. Cheers!
Turnovus  [author] Jul 2, 2023 @ 4:52am 
@Twilight
Please make sure you have the latest version of the Framework. You can check the Framework's version in your mod list, under the supported game versions:
https://i.imgur.com/ZcM686O.png

If you don't see a "Mod version" field there, then your version of the Framework is likely out of date. Steam Workshop can have trouble updating mods from time to time. Unsubscribe from the Framework, then go to your downloads page and make sure RimWorld has updated. Then subscribe to the Framework again, and wait for it to download.

Also keep in mind that new features are only available for the latest version of the game, in this case 1.4.
Twilight Jul 1, 2023 @ 8:25pm 
Was looking to trying out the HediffComp_MultiplyOtherHediffDuration function. But when I try to include the affectsExistingHediffs property in my Hediff I get a error when loading the game.

XML error: <affectsExistingHediffs>true</affectsExistingHediffs> doesn't correspond to any field in type HediffCompProperties_MultiplyOtherHediff.

Without this, the effect appears to work but only on newly added Hediffs. I see the examples of affectsExistingHediffs in the wiki and in the source on GitHub but when I DNSpy the communityframework.dll I only see the affectedHediffs and multiplier properties. Wasn't sure if I'm using it wrong or if the DLL wasnt built with the current content of the source files?
Church Apr 29, 2023 @ 1:17pm 
Nvm im just retarded. Turns out the component doesnt tick when attached to a weapon. In hindsight, that makes perfect sense.
Church Apr 29, 2023 @ 12:36pm 
Im trying to add the apocriton as a spawnable mech using the pawnhatcher, but the egg progress on my spawner item remains at 0.0pct forever, any ideas why? Im not getting any errors in the log
Vardath Jan 20, 2023 @ 5:42pm 
Not sure what's going on here, an error comes up in Visual Exceptions but I don't really know what it's doing.

https://pastebin.com/8yNU08Pv

https://gist.github.com/3723d32d50ea243b931009b3d37a94b5
Katieclysm Nov 10, 2022 @ 6:30pm 
Ignore previous report. Apparently the problem going away with removal of CF was coincidental and temporary.
Turnovus  [author] Nov 10, 2022 @ 7:01am 
@Jarin
This is definitely some sort of conflict. Double-clicking works fine for me with only CF installed, and CF doesn't change the camera's behaviors.

Consider sending a log for me to look at. This guide will explain how:
https://steamcommunity.com/sharedfiles/filedetails/?id=725234314
Katieclysm Nov 9, 2022 @ 10:38pm 
Don't even know where to start looking for conflict with this one. Adding CF to a save removes the ability to double-click on a pawn's portrait to jump to them.
Zaljerem Oct 23, 2022 @ 12:39pm 
Thanks again!
Turnovus  [author] Oct 23, 2022 @ 12:36pm 
@Zaljerem
RegenSideEffect was moved to a different namespace. Though you can remove "Class="CF.RegenSideEffect"" from that li completely, and the game will just infer it.
Zaljerem Oct 23, 2022 @ 12:29pm 
Here's the HeDiffDef comp I'm using:
<comps>
<li Class="CF.HediffCompProperties_HealPermanentWoundsConfigurable">
<regenHediffs>
<li Class="CF.RegenSideEffect">
<!--Any Hediff can be used, even custom ones-->
<hediffDef>Anesthetic</hediffDef>
<severity>1</severity>
<isGlobalHediff>true</isGlobalHediff>
</li>
</regenHediffs>
<regenInterval>1~5</regenInterval>
<!--A day-->
<regenIntervalTicks>60000</regenIntervalTicks>
<injuryRegenListMode>None</injuryRegenListMode>
<usesBeforeExhaustion>-1</usesBeforeExhaustion>
<canHealDestroyed>true</canHealDestroyed>
</li>
</comps>
Zaljerem Oct 23, 2022 @ 12:29pm 
@Turnovus
Thanks for the quick response! "Ugh, transpiler" as I've heard a few people say. I figured there'd be nothing easy about it. Thanks for looking into it all the same. I have and will continue to mess with the lifeStageAges and other HAR stuff (minAgeForAdulthood, etc.)

CF.HediffCompProperties_HealPermanentWoundsConfigurable ... it can't find CF.RegenSideEffect.
Turnovus  [author] Oct 23, 2022 @ 12:15pm 
@Zaljerem
The vanilla hatch function doesn't return or store the hatched pawn, so modifying it directly would require a complicated Harmony transpiler patch. I will try to look into it, but no promises. You could try messing around with the race's lifeStageAges, but I don't know what effect those will have.

When you say "regen code", are you refering to CF.HediffCompProperties_HealPermanentWoundsConfigurable, or to CF.CompProperties_SelfRepair?
Zaljerem Oct 23, 2022 @ 9:41am 
Hi guys, love the framework. As I update mods to 1.4, I've run into a few things:

Pawn hatcher - in 1.3 they pawns spawned as adults, in 1.4 as babies. It would be great to have an option to specify what age the pawn is "born" at ... babies are good for many races but for several races (Automatons, Folia / Potatoid / Deathkap) it would be really useful. I'm not sure how complex or feasible this is, though, or if there's another way I can specify it. I've tried all the settings in Humanoid Alien Races to no avail (granted it is still being actively worked on, so maybe those features haven't been fixed yet) ... just thought I'd report the difference in behavior either way.

Regen code: I'm updating a race mod that uses the regen code, it appears to be correct comparing it to the wiki but it can't seem to find the class. Did the name change, or something else I need to know?

Thanks!
Rince Sep 30, 2022 @ 5:48am 
okay guys on discord telled me mod extention going jist in a body of thingdef
But thei im having "Could not find type named CF.HatcherExtension" problem
Rince Sep 30, 2022 @ 5:37am 
im trying to make a patch for eggs,
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Community Framework</li>
</mods>
<match Class="PatchOperationSequence">

<operations>
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName="C_Egg"]/comps </xpath>
<value>


<li Class="CF.HatcherExtension">
<hatcheeForcePlayerFaction>true</hatcheeForcePlayerFaction>
</li>


</value>
</li>
</operations>

</match>
</Operation>
</Patch>
aaand game no finding such an operation. Are i slapping this patch in a wrong place? Im kinda new even in xml coding, but if i see li Class, it seems logical to slap it in comps
Fartblaster Sep 30, 2022 @ 4:56am 
Thanks a ton for the rapid reply and fix
Turnovus  [author] Sep 29, 2022 @ 11:28pm 
@Fartblaster
A fix for this issue has just been released. However, the system is now opt-in only. For more information, please refer to the updated documentation here: https://github.com/ISOR3X/communityframework/wiki/Basic-Features-(XML)#46-make-any-type-of-pawn-craftable-using-eggs
Fartblaster Sep 29, 2022 @ 7:14pm 
@Turnovus
I"m trying to utilize the pawn hatching patch, however they never spawn as my faction. Is there something I need to add to get it to use that patch?
Tec Sep 18, 2022 @ 2:47pm 
Suggestion: Ingredient Transfer. Would allow using an item that has ingredients in another meal recipe, for more complex ingredient lists. Biggest use would be meat optimisation mods. Could have Raw, Prime, Insect, Fish, Humanoid Meats defs that you make from certain animals. You can easily stack these meats while they still get included in the final meal and recognised by ideology precepts and memes.
FarmerJoe Aug 3, 2022 @ 11:05am 
Suggestion
can CF.CompProperties_UnlocksRecipe support multiple linkable module?
like
Linkable A unlock one set of recipe
then Linkable B unlock another set of recipe and so on
Turnovus  [author] Jul 7, 2022 @ 12:49am 
@自由

CF is causing that. It's not a bug; I'm not sure who, but somebody who worked on the framework in the past added a patch that does this. This patch will be removed in the next update, in favor of a less-intrusive solution.
自由 Jul 6, 2022 @ 11:53pm 
@Turnovus
Hello, after installing this mod, gears increase carrying capacity all changed to increase carry cargo, is this a bug?
Turnovus  [author] Jun 22, 2022 @ 1:56pm 
@Deustodo

The hidden removed parts bug will also be fixed in the upcoming version. Thank you for bringing all of these to my attention.
Deustodo Jun 22, 2022 @ 1:53pm 
No problem. The main thing I was trying to "fix" was that the regeneration is triggering even on hidden removed hediffs, such as body parts after you install a bionic replacement. I guess I'll just settle with a side effect that applies to the whole body but is less impactful.
Turnovus  [author] Jun 22, 2022 @ 1:23pm 
@Deustodo

Yeah, looks like an oversight I made in the regen script, where it tries to apply side-effects *before* healing. I'll add a fix to the ongoing development branch, though I can't make any promises as to when that will go live.
Deustodo Jun 22, 2022 @ 12:50pm 
Hi, I'm reworking a mod and I can't seem to apply a sideEffect to a bodypart that was restored using HealPermanentWoundsConfigurable.

<li Class="CF.HediffCompProperties_HealPermanentWoundsConfigurable">
<regenHediffs>
<li Class="CF.RegenSideEffect">
<hediffDef>CelRegen</hediffDef>
<severity>1</severity>
<isGlobalHediff>false</isGlobalHediff>
</li>
</regenHediffs>
<regenInterval>1~5</regenInterval>
<!--A day-->
<regenIntervalTicks>60000</regenIntervalTicks>
<injuryRegenListMode>None</injuryRegenListMode>
<usesBeforeExhaustion>-1</usesBeforeExhaustion>
<canHealDestroyed>true</canHealDestroyed>
</li>

No matter what I do when the effect triggers it always gives the error:

'Tried to add health diff to missing part BodyPartRecord([ *name of body part here* ] parts.Count=0)'
Turnovus  [author] Feb 24, 2022 @ 9:36pm 
@bearhiderug
Development is slow but ongoing. Keep an eye on the GitHub repo if you're interested, we're currently working on a very large pull request.
bearhiderug Feb 24, 2022 @ 9:23pm 
Make this standard plz
Keep this updated. I beseech you!
Turnovus  [author] Dec 19, 2021 @ 1:40pm 
@Destiny Phoenix

Thank you. I'll try to get into touch with the Moonjellies author to work out the issue.
Destiny Phoenix Dec 19, 2021 @ 1:36pm 
Alright I did some digging and I found it. It's the Moonjellies Race mod. There's a file in there (Regen.xml) that's the cause of this error.
Turnovus  [author] Dec 19, 2021 @ 1:34pm 
@Destiny Phoenix

Could you send me a HugsLib log? I should be able to figure out what's causing it with that. You can upload it using the "Share Logs" button in the lower left of the debug log with HugsLib enabled.
Destiny Phoenix Dec 19, 2021 @ 1:26pm 
Actually not sure - it's kind of weird. My current modlist has no errors, but if I add Community Framework (and nothing else) that error shows up.
I was trying to use this together with Biotechnology, but even without that mod activated I still get this error if CF is added.
Turnovus  [author] Dec 19, 2021 @ 10:04am 
@Destiny Phoenix

As of now, the framework doesn't contain any XML of its own, so this error would have to be the result of another mod using the framework.

Any idea what mod is causing this? I may need to get into touch with the developer, as this code is likely the result of an oversight in the wiki.