[1.0] Smarter Food Selection, Hydroponics with lamps and more...

Started by Wishmaster, February 20, 2017, 05:34:05 PM

Previous topic - Next topic

SpaceDorf

Because of the many, many items that show up in my apparel list.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Canute

I think he want that you write a script that create apparel subfolders and sort these into them. Sorted by equipment slot type maybe.

But this you can't made, i think. The authors of the mods need to add this, like spacedorf allready mention at some of the armor mods.

SpaceDorf

I wanted to know if such a script was possible, not that Wishmaster should do it,

I just thought sorting leather types by their properties is a similiar enough scenario that there may be some overlap
on how to do it.

For starters the subcategories could be added by xml defs, thats not the problem.
But having a general mod that moves the types around instead of patching every single fracking mod would be a great reliev.


Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Canute

Yep apparel sorted by layers, like you can choose at prepare carefully would be realy helpful.

SpaceDorf

Yeah, what is the difference .. hats get a own folder while shirts and pants have to share ..

and the same goes for weapons .. but I am content for apparel right now.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Mehni

Your mod spams any output_log.txt. In fact, it spams it so badly that the poor logwriter gives up out of sheer desperation with a String too long for TextMeshGenerator. Cutting off characters. message and that stops all further error logging.

Please take a look at this
https://gist.github.com/HugsLibRecordKeeper/2783e3b1de064db66c53809462c67421
https://gist.github.com/03860e7645883df5781b2408f5ad2656
https://cdn.discordapp.com/attachments/257987178834034688/339710793664823297/output_log.txt
and tell me how anyone is supposed to troubleshoot a log.

On a vanilla save, it's bad. Add in VG and an animal pack and it exponentially grows.

Please remove it from the output_log. Log it elsewhere, or make it log on demand-only. Dev mode has a nice example of writing wind speeds to the log when users click on a button. I propose the latter as the most elegant solution.

Wishmaster

@Mehdi this has already been reported. But I made no update since.
Also since I messed up with the version management it became difficult to update the current stable.

Should I update the mod one day I'll remove this.

@SpaceDorf I am pretty sure it is possible. XML would allow to merge several defined apparels into one. Just like TML detours spawning of leathers.

StGeorges

Hello Wishmaster,

I'm still using alpha 16 game and i updated Hugslib yesterday (from 2.4.3 to 2.4.5) then a following conflict appeared with Too Many Leathers:
Quote[HugsLib] WM_Too_Many_Leathers caused an exception during OnDefsLoaded: System.ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[Verse.ThingDef,Verse.ThingDef].Add (Verse.ThingDef key, Verse.ThingDef value) [0x00000] in <filename unknown>:0
  at WM.TooManyLeathers.Config.DefsLoaded () [0x00000] in <filename unknown>:0
  at HugsLib.HugsLibController.OnDefsLoaded () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
HugsLib.Utils.ModLogger:ReportException(Exception, String, Boolean, String)
HugsLib.HugsLibController:OnDefsLoaded()
HugsLib.HugsLibController:LoadReloadInitialize()
HugsLib.HugsLibController:Initalize()
HugsLib.Core.UnityProxyComponent:Start()

All the saves are affected: only 5 types of merged leathers are still available (from 1 to 5)
I desinstalled rebooted then reinstalled the older version of Hugslib and your mod but no change at all.
Any advice ?

And thanks for all of your mods .... :D

Oblitus

Quote from: StGeorges on August 03, 2017, 02:15:14 PM
I'm still using alpha 16 game and i updated Hugslib yesterday (from 2.4.3 to 2.4.5) then a following conflict appeared with Too Many Leathers:
Quote[HugsLib] WM_Too_Many_Leathers caused an exception during OnDefsLoaded: System.ArgumentException: An element with the same key already exists in the dictionary.
It's a bug only fixed in A17 release.

StGeorges

Quote from: Oblitus on August 03, 2017, 02:27:44 PM
It's a bug only fixed in A17 release.

Arghhhhhh.... so i think i've got to keep playing with such a bug, for i'am no eager to give up my 50 yrs old colony at the moment. So I'm going to build quite quite a (really) much bigger storage room for all my leathers. 
Thanks for the info Oblitus. :)

Lupin III

With the smarter food selection mod active, my pawns get stuck in a loop of picking up food and immediately dropping it again when they are assigned to handle animals. I described more of it there: https://ludeon.com/forums/index.php?topic=35133.0 . All pawns except one cause "x started 10 jobs in 10 ticks" messages, as soon as there is more than one pawn currently trying to handle animals. Changing any of the options of SFS didn't change that behaviour (I hoped I could leave the mod active and just deactivate the food handling for animals).

lordmidas

#191
First of all, thanks for all these mods :).

I have a question regarding Smart Food Selection:

I like to keep my animals grazing in the wild. When set to the default "Animals" policy, my animals eat grass but don't eat live plants (like bushes and flowers in the wild). I want them to eat the other live plants as well because sometimes in winter the grass dies out but the bushes are still available. But under all the policies available in the mod they don't eat any live plant except grass.

When I change the policy to "Unrestricted" they start eating those live plants again if no grass is found in their zoned area. How can I add "live plants" such as bushes, flowers etc. growing in the wild to the policy? Are all bushes/flowers etc. categorized as LivePlants in the game code?

EDIT: Ok I figured it out using the guide that you have linked to on the Steam Workshop. I added "Plant /" in the default animal policy after grass :) and it works!

Wishmaster

@flonz

Unfortunately this is triggered by a "slimegirl" trying to fetch food... since I don't work on my mods anymore (at least for now), I can't fix it...

@Lupin III

This is a known conflict with Combat Extended. This is because CE tries to drop all unused items and items not used for taming in vanilla, such as Hay.
While SFS uses quite everything the tamee eats.

Maybe set it to "unrestricted" or to default policy will fix the problem...

@lordmidas

I hesitate to put those in "grass". Since you might want to keep flowers for beauty. (However animals should never eat plants in plant pots).
However grass includes moss and dandelions and perhaps other modded things.

Also glad someone managed to understand this dark and unclear guide lol.

skullywag

If you werent using destructive detours on TakeFoodForAnimalInteractJob, CE has a postfix that addresses this problem, but due to the destructive detour it never fires. Wishmaster whats the likelihood of you picking this mod back up and moving to harmony non destructive detours/transpiling?
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Wishmaster

Quote from: skullywag on September 01, 2017, 03:48:59 AM
If you werent using destructive detours on TakeFoodForAnimalInteractJob, CE has a postfix that addresses this problem, but due to the destructive detour it never fires. Wishmaster whats the likelihood of you picking this mod back up and moving to harmony non destructive detours/transpiling?

I am done with destructive detouring since A17.
and actually...
    [HarmonyPatch(typeof(RimWorld.WorkGiver_InteractAnimal), "TakeFoodForAnimalInteractJob")]
     public static class TakeFoodForAnimalInteractJob
     {
         static bool Prefix(Pawn pawn)
         {
             return Config.ControlDisabledForPawn(pawn);
         }
         static void Postfix(RimWorld.WorkGiver_InteractAnimal __instance, ref Job __result, Pawn pawn, Pawn tamee)
         {
             __result = WorkGiver_InteractAnimal.WorkGiver_InteractAnimal.TakeFoodForAnimalInteractJob(pawn, tamee);
         }
     }



That's not why the conflict with CE happens. AFAIK CE just tries to drop anything that is not used for taming in vanilla.