RimWorld

RimWorld

Onimods - Plant Fiber
46 Comments
Onimorphus  [author] 12 Jul @ 2:55pm 
@Michiko
Thanks!
I got most of my mods at apparently running locally without errors on 1.6, from the few tests I done after the update properly released, but there are still some bits to fix...
I also want to use the version change opportunity to implement some "high risk of messing with ongoing saves" alterations, and haven't got to actually doing a test run of the new DLC at all yet.

So, currently , I'm aiming to release the 1.6 updates sometime during this week, if time allows :cozyspaceengineersc:
Michiko 12 Jul @ 10:00am 
I tried to use it in 1.6 and it seems to cause issues. Pawns are unable to cut plants with this mod active. A short snippet of the player.log shows:

Exception in JobDriver tick for pawn Tara driver=JobDriver_PlantCut_Designated (toilIndex=5) driver.job=(CutPlantDesignated (Job_85983) A = Thing_Plant_Bush59683 Giver = JobGiver_Work [workGiverDef: PlantsCut])
System.MissingMethodException: Method not found: bool Verse.GenPlace.TryPlaceThing(Verse.Thing,Verse.IntVec3,Verse.Map,Verse.ThingPlaceMode,System.Action`2<Verse.Thing, int>,System.Predicate`1<Verse.IntVec3>,Verse.Rot4)

Would love a 1.6 update please!
Tinda 16 Jun @ 9:59pm 
Thanks for the reply, sounds like your method is not quite what I want, then.
I'll ask around, thank you :)
Onimorphus  [author] 16 Jun @ 8:08pm 
@Tinda
Hey! Glad to see more people doing their own mods!
The way I did it was harmony patching the Plant.PlantCollected method, so I could do the plant fiber to drop, with some extra calculations for the conditions and amount dropped based on the mod settings (all this required custom C# code).
I don't think it's something that can be properly done with only XML (there may be a tag for extra item drops, but it probably will just always drop the extra resource not mater how the plant is destroyed, and won't count the plant growth % into the extra item amount created).

If you need more help in doing your new mod, best place to get it is the mod-development channel on the rimworld discord :cozyspaceengineersc:
Tinda 16 Jun @ 11:55am 
Hello, I'm a long term fan.
I'm trying to build a similar mod myself, adding banana fibers as additional harvest of another mod's banana tree (Biomes!Islands)
But it seems just xml alone won't be enough. Can I ask, how did you manage to get multiple kinds of harvested items?
Onimorphus  [author] 7 Feb @ 7:58pm 
@jptrrs
Ah, tranquilo! :cozyspaceengineersc:
(e realmente, muito item por ai atrapalha mesmo, tenho ideas de no futuro tentar dar a opção de só coletar as 'plant fibers' do que for cortado em zonas marcadas, algo do tipo...)
jptrrs 7 Feb @ 11:32am 
Vish.... Era só eu dizendo que ter duas "sobras" diferentes para cada planta aumenta muito o número de itens espalhados pelo mapa, o que por sua vez ocupa demais os colonos. E que talvez a substituição pudesse ser uma opção... mas enfim, de boa.
Onimorphus  [author] 6 Feb @ 9:56pm 
Acho que a steam sumiu com o ultimo comentario feito aqui... -_-
(a aba de notificações mostra o começo do comentario, mas ele não ta aqui... êêêê steam... XD)
Onimorphus  [author] 5 Feb @ 10:23am 
@jptrrs
Opa, valeu! :cozybethesda:
E é intencional eu não ter substituido o drop dos 'scraps' do Fertile Fields em si, principalmente para não atrapalhar com outros mods que façam uso dos 'scraps', mas tambem porque ambos mods tem regras padrão diferentes para o spawn dos seus respectivos items, alem de opções para ajustar a quantidade criada, então prefiro deixar a cargo do jogador ajustar e/ou remover o drop de um ou outro nas configurações, como preferir.
jptrrs 4 Feb @ 5:19pm 
Ótima ideia esse mod, irmão! Parabéns! Descobri recentemente, mas achei que se for para compatibilizar com o Fertile Fields, você deveria substituir totalmente o "scrap" dele pelo seu "plant fiber". É fácil, só precisa de literalmente uma linha de código. Eu faria uma contribuição pelo Github, mas não te achei por lá, então vai aqui mesmo:
Traverse.CreateWithType("RFF_Code.FFDefOf").Field("PlantScraps").SetValue(DefDatabase<ThingDef>.GetNamed("Onimods_PlantFiber"));

Te chamei no chat do Steam, se te interessar. Abç.
Onimorphus  [author] 10 Nov, 2024 @ 8:31am 
@beetlecat
Updated adding the new 1.5 version, seems to be working properly now :cozyspaceengineersc:
Onimorphus  [author] 9 Nov, 2024 @ 10:56pm 
@beetlecat
Good to know that's likely the issue, it's a simple fix this one, and thanks for informing it! \o/
I'll try to push a small 'official' update with that fix latter :cozybethesda:
beetlecat 9 Nov, 2024 @ 9:59pm 
Oh! NVM. Found it -- I'm not familiar with the LoadFolders method -- that's cool.
beetlecat 9 Nov, 2024 @ 9:56pm 
@Oni --- ah! That'll be it, likely. The new FF package ID for the 1.5 version is: greysuki.RF.fertilefields

Where is this called in the configs? I was going to try "fixing" it myself.
Onimorphus  [author] 9 Nov, 2024 @ 5:48pm 
@beetlecat
It should be on the campfires and stoves, as the cave moss and hay recipes you mentioned, but just to confirm, you are running on which version?
The Fertile Fields version I made the compatibility for don't seems to have been updated to 1.5 (the one from Jamaican Castle), I still left that on just in case it was updated, but from some quick searching looks like someone else made a 1.5 update version for the mod, so if that version got a new mod-ID my patching will miss it, should be an easy fix if that's the case though :cozybethesda:
beetlecat 9 Nov, 2024 @ 4:28pm 
What workbench(es) hold the recipe to convert Fertile Fields plant scraps into plant fibers? I can't seem to find it. The campfire and stove seem to have it for cave moss & hay.
Onimorphus  [author] 30 Jun, 2024 @ 10:55am 
@Snuggl
Thanks! :cozybethesda:
And yeah, needing to plant Hay just for the floors is kinda of annoying in base game too, since you can't even use it to tame animals or process to chemfuel without turning it onto kibble.

(I also need to try doing a Medieval Overhaul run some day, check for more potential mod interactions XD)
Snuggl 29 Jun, 2024 @ 3:53am 
Nice mod, i like it! I was was like "Oooooooooh, nice!!" when i saw the plant fiber straw matting floor. When you play with Medieval Overhaul enabled it takes a while until you have hay because you need wheat for that, but now i can have my plant fiber tent walls and straw floor before that! Good for a tribal playthrough 😊
DaniAngione 18 May, 2024 @ 3:07pm 
Ooooh if such a mod exists it's perfect! Because fertile fields allows me to configure how many of them drops and it can be 0! Thank you!
Onimorphus  [author] 18 May, 2024 @ 2:54pm 
@DaniAngione
Thanks! :cozyspaceengineersc:

About your question, I guess the easiest way for you to do that is by using a mod like Resource Dictionary , that allows for the replacing of items, including on recipes from what I heard (I haven't personally used any such mod to be sure).

But I have no idea if that will allow for swapping/replacing the 'plant fiber' and/or 'plant scraps' that are dropped upon cutting though, since I think in both cases it is done directly via code, and replacing stuff there involves some deep arcane code wizardry still beyond my level... XD

Also of note, while really similar indeed, Fertile Fields 'plant scraps' can be used directly as animal feed (and is kinda of OP on that... XD), while this mod 'plant fiber' has no nutrition value by itself, but can be used as a crafting material, so there are some different uses still
DaniAngione 18 May, 2024 @ 7:14am 
Hey there, this is a very nice mod! But I have a question:
Is there a way to, when using Fertile Fields, replace their plant scraps entirely with the plant fibers? As in, make them be the same item and work for the same recipes?

I appreciate the conversion already, of course, but it feels really convoluted to have to manage two items which are essentially the same.
Onimorphus  [author] 18 May, 2024 @ 1:42am 
@Victor
Update is up, well, at least that was a quick fix for a silly attention mistake... XD

@UncleRippu @ALE199
Also, added a way to convert Plant Fiber to Hay, it's disabled by default, so check the mod settings to enable the recipes :cozybethesda:
Onimorphus  [author] 17 May, 2024 @ 11:22pm 
@Victor
Oh... damn... -_-
That's a lot of log lines, thanks for pointing that! XD

Looks like I indeed forgot to //comment out// the debug log lines for part of settings checking code, I'll push a fix update for this on the weekend now, and maybe add some simple extra stuff form 'the list' too along with that :steamthumbsup:
Victor 17 May, 2024 @ 5:46pm 
Hey, could you disable logging stuff by default? My log is full of irrelevant things coming from this mod https://gist.github.com/HugsLibRecordKeeper/83900afd99df155731b73b8ce9d4c674
Victor 6 May, 2024 @ 5:08am 
That's great news then, I'm quite enjoying your mod :)
Onimorphus  [author] 6 May, 2024 @ 1:47am 
( ¬_¬ annoying Steam comment character limit...)

@Victor
About the Adobe Abode mod, I'll add it to the 'to-do support' list, but it looks like it wasn't updated to v1.5 yet, so going to wait on checking that one until then.

(...also, I do have plans of making some kind of 'ceramics' mod, either standalone or as an add-on to my planned 'water resource' mod, so i might wait to implement such compatibility when doing those)
Onimorphus  [author] 6 May, 2024 @ 1:45am 
@Victor
Currently using the normal "Cut" work order directly on plants will drop plant fiber from grasses, bushes and vines (also trees and/or harvest crops, if activated on the mod settings), but I do agree that it's a very boring and 'micromanage-y' way to collect them.

Adding a 'harvest plant fiber' designator, or a toggle on the growing zones, was something I looked at when first making the mod, and it still is on the list of potential future improvements, but that's on the 'back burner' part of the list for now, since the game 'works/jobs' system that control those aspects is a quite complex one, and I don't have much knowledge on it yet... XD
Victor 4 May, 2024 @ 12:50pm 
Victor 4 May, 2024 @ 12:49pm 
Oh I see, I hadn't checked the settings :P

So another suggestion: could you add a work order for cutting only plants that give off fiber? So not trees or berry bushes, in order to collect them. Currently you only get them when colonists automatically cut grass in growing zones in order to sow crops.
Onimorphus  [author] 27 Apr, 2024 @ 5:14pm 
@Victor
Thanks!
The plant fiber item already does decays faster than most other materials, and also has lower base HP, so overall it gets destroyed if left outside faster. I'll check if the multiplier to decay rate due to being under rain can also be increased, as it would make sense too.

But if you are finding the amount dropped to be too much, you can also adjust the general drop from plant cutting multiplier on the mod settings :steamthumbsup:
Victor 27 Apr, 2024 @ 4:10pm 
Cool idea! You could also make it decay faster to balance the enormous supply, maybe dependent on the biome?
Onimorphus  [author] 27 Apr, 2024 @ 3:17pm 
@Jedia Kyrol
Updated the mod with the fix for that looping red error you reported, it should be gone now. :cozybethesda:
Onimorphus  [author] 17 Apr, 2024 @ 4:13am 
@Jedia Kyrol
Found what was that problem, it's something that got changed probably on the v1.5 stable patch, but it's just a error warning regarding some UI text, so it's not causing any problem besides the annoying error message.

I already got it fixed locally, so if all goes to plan I may get the mod updated on the weekend :steamthumbsup:
Onimorphus  [author] 15 Apr, 2024 @ 1:51pm 
@Jedia Kyrol

Thanks for the report! It seems to be something with some text display on the details tab for the recipe.
I'll take a look at that :cozybethesda:
Jedia Kyrol 15 Apr, 2024 @ 8:52am 
kibble recipe is throwing an infinitely repeating error

Called for SingleIngredient on an IngredientCount that is not IsSingleIngredient: (1x protein)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch4 (string)
Verse.IngredientCount:get_FixedIngredient ()
Onimods_PlantFiber.IngredientValueGetter_NutritionThenVolume:BillRequirementsDescription (Verse.RecipeDef,Verse.IngredientCount)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Dialog_BillConfig.DoWindowContents_Patch0 (RimWorld.Dialog_BillConfig,UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
ALE199 12 Mar, 2024 @ 11:20pm 
there should be an option to turn plant fiber into hay.
Onimorphus  [author] 29 Feb, 2024 @ 7:17pm 
@UncleRippu
Hum, I do have plans for a 'water resource' mod of sorts (in a different way than how Dubs Bad Hygiene implements it), so that's something I could add there... but still that's something I'll keep in mind :cozybethesda:
UncleRippu 29 Feb, 2024 @ 6:05pm 
@Omnimorphus That's understandable, maybe in the future there could be a way to turn plant fiber into hay like how you can do the inverse? Either way, great mod.
Onimorphus  [author] 29 Feb, 2024 @ 12:45pm 
@UncleRippu
During the mod development I tried making plant fiber itself edible and giving it a very low nutritional value (0.01), but it was very annoying having free-roaming animals eating all of that before you could even collect it, or worst, raiding your stockpiles... XD

Ended up adding the alternative kibble recipe so it still could be used for feed-stock (and as consequence, taming), but not just by itself for the sake of balance (plant fiber being so easily acquired).

But it's relatively simple to do a personal mod (or just locally edit the mod .xml files, but that's very prone to be overridden by mod updates) to just remove the meat/protein ingredient part for the alternative kibble recipe. Try checking out the wiki for the basics of modding and PatchOperations, or ask around on the rimworld discord, people there are very helpful :cozybethesda:
UncleRippu 28 Feb, 2024 @ 10:10am 
If possible, maybe you could have it so plant fiber can be used to tame animals? I have like 500 plant fiber but can't use it to tame animals for livestock. Yeah you can turn it into kibble, but its not an easy fix if you don't have other food for it.
Onimorphus  [author] 25 Feb, 2024 @ 4:23pm 
@beetlecat
Thanks!
I haven't used Resource Dictionary before, but going from the description it should work to normalize recipes to just one of the resources, but the item drops themselves from plant cutting, those I'd guess will be unaffected.
Now, 'plant fiber' drops from plant cutting can be fully disabled on the mod settings, so it may be worthy also checking the settings on Fertile Fields for the plant scraps generation and see if you can tune both mods to your liking :cozybethesda:

That said, I may add a recipe to "dry plant scraps into plant fiber" on next patch, as a soft compatibility/integration solution...
beetlecat 25 Feb, 2024 @ 10:00am 
Awesome!

I suppose this could be mergeable with "plant scraps" from Fertile Fields using something like Resource Dictionary?
Onimorphus  [author] 24 Feb, 2024 @ 9:16am 
@MrTitanium
Thanks!
Also sure, just remember to mark them as 'translations' when uploading, and add the base mods as dependencies. :cozybethesda:
MrTitanium 24 Feb, 2024 @ 7:47am 
Really great works!Can I make Chinese translation packs for your mods?
Onimorphus  [author] 23 Feb, 2024 @ 10:53pm 
@Limey Lassen
Thanks! Plant fiber can't be used directly as fuel, but can be processed into Chemfuel (at a Biofuel Refinery).

But I do have plans for another mod that will add a more flexible solution for fire based buildings fuel, so things that make sense being 'burnable' can be used so.

In the meantime, there where some mods that allowed you to pick items to use as fuel.
( LWM's Fuel Filter and [JPT] Burn It for Fuel (Continued) are two that I remember, but have not idea if still are working )
Limey Lassen 23 Feb, 2024 @ 10:03pm 
I like it!

Is it selectable as an auto fuel for campfires / kitchens, etc?