[A16] WM mods (New mods: SyncGrowth, Medivac) 2017.01.06

Started by Wishmaster, November 07, 2016, 06:50:31 PM

Previous topic - Next topic

BlackGyver

#180
Quote from: Wishmaster on February 02, 2017, 05:14:22 AM
Quote from: BlackGyver on February 02, 2017, 04:43:52 AM
I second sirgzu's suggestion, a customizable food score would also ensure compatibility with other food mods (eg. vegetable garden) if it draws from a general consumables list.

I don't really understand your point. What is the connection between (priority) food score and compatibility ?
The latest version I made allows a total compatibility with VG and maybe with any other food mods.

Your food ordering is done manually, and I don't think it's fair to expect you to make it compatible with support (edit: I don't just mean add unrecognized food at the bottom of the food scores, I mean adding it to the food scores in an intelligent manner) every food mod out there, is it? Vegetable garden was just an example among others, and there are actually compatibility support issues with some of the food from VG. On top of that, some issues arise with the food ordering, like pawns preferring to feed prisoners cheese (from vegetable garden, both subpar nutrition and an ingredient in other recipes) before using canned or simple meals.

Giving players the possibility to edit food scores on the fly (through a menu, for example) would ensure compatibility support with edge cases and allow for easy personal preference tweaks.

Edit: Some smarter food selection errors to add to the food preferability issues example: [Smarter_Food_Selection] Could not determine food preferability for 13 Defs. Are you using unsupported food mods ? (CannedVeg ; CannedMeat ; Cuptea ; Coffee ; Fruitdrink ; soymilk ; coconutmilk ; SaltedMeat ; Rawtofu ; RawPolenta ; ChunkSalt ; RawGlowbulb ; RawGiantLeaf ; )

anno114

Smarter food selection is very useful but for me missing one thing cannibalism filter, could you add this to mod ?

Wishmaster

Quote from: anno114 on February 06, 2017, 09:08:26 AM
Smarter food selection is very useful but for me missing one thing cannibalism filter, could you add this to mod ?

Thank you for your support and I would but I'm done with the RimWorld. I just answer questions for now. I've published the source on github if someone wants to continue it.

@BlackGyver

Make sure you are using the latest version (1.1c) or formerly named "compatibility version".

It provides a way to create your own compatibility patches using XML. (check the /defs folder)

The system mod automatically set a food to a certain preference, but you can override this with those "patches".

I won't make a feature to edit food scores on the fly. I'm really not into UI.

FreyaMaluk

#183
Quote from: Wishmaster on February 06, 2017, 04:08:19 PM
Quote from: anno114 on February 06, 2017, 09:08:26 AM
Smarter food selection is very useful but for me missing one thing cannibalism filter, could you add this to mod ?

Thank you for your support and I would but I'm done with the RimWorld. I just answer questions for now. I've published the source on github if someone wants to continue it.


@BlackGyver

Make sure you are using the latest version (1.1c) or formerly named "compatibility version".

It provides a way to create your own compatibility patches using XML. (check the /defs folder)

The system mod automatically set a food to a certain preference, but you can override this with those "patches".

I won't make a feature to edit food scores on the fly. I'm really not into UI.

wow... that's sad to hear.... but I can understand completely...
The best way for you to go would be to include a big message in the mod's description... You'll avoid extra comments that way I guess..
Good luck on your things... and Thank you for supporting the game with your mods :)

BlackGyver

Quote from: Wishmaster on February 06, 2017, 04:08:19 PM
@BlackGyver

Make sure you are using the latest version (1.1c) or formerly named "compatibility version".

It provides a way to create your own compatibility patches using XML. (check the /defs folder)

The system mod automatically set a food to a certain preference, but you can override this with those "patches".

I won't make a feature to edit food scores on the fly. I'm really not into UI.

Will do! That's already pretty handy, I was still on 1.1b.

Thanks!

FreyaMaluk

Quote from: BlackGyver on February 07, 2017, 04:37:49 AM
Quote from: Wishmaster on February 06, 2017, 04:08:19 PM
@BlackGyver

Make sure you are using the latest version (1.1c) or formerly named "compatibility version".

It provides a way to create your own compatibility patches using XML. (check the /defs folder)

The system mod automatically set a food to a certain preference, but you can override this with those "patches".

I won't make a feature to edit food scores on the fly. I'm really not into UI.

Will do! That's already pretty handy, I was still on 1.1b.

Thanks!

are you gonna continue supporting the mod?? I mean.... just curious :)

Wishmaster

Quote from: FreyaMaluk on February 07, 2017, 06:21:51 AM
are you gonna continue supporting the mod?? I mean.... just curious :)

tbh I don't think so.

I've played too much of RimWorld because it is an amazing game. So much that I'm tired of it.
While programming doesn't bother me, you need to play the game to try your code...

I may be back when RimWorld had significantly evolved and improved. But I can't promise anything.

ambivalence

#187
Exception in Verse.AI.ThinkNode_PrioritySorter TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object
  at WM.SmarterFoodSelection.FoodUtility.BestFoodSourceOnMapEx (Verse.Pawn getter, Verse.Pawn eater, Boolean desperate, FoodPreferability maxPref, Boolean allowPlant, Boolean allowDrug, Boolean allowCorpse, Boolean allowDispenserFull, Boolean allowDispenserEmpty, Boolean allowForbidden, Boolean isAnimalInteraction) [0x00000] in <filename unknown>:0
  at WM.SmarterFoodSelection.FoodUtility.BestFoodSourceOnMap (Verse.Pawn getter, Verse.Pawn eater, Boolean desperate, FoodPreferability maxPref, Boolean allowPlant, Boolean allowDrug, Boolean allowCorpse, Boolean allowDispenserFull, Boolean allowDispenserEmpty, Boolean allowForbidden) [0x00000] in <filename unknown>:0
  at WM.SmarterFoodSelection.FoodUtility.TryFindBestFoodSourceFor (Verse.Pawn getter, Verse.Pawn eater, Boolean desperate, Verse.Thing& foodSource, Verse.ThingDef& foodDef, Boolean canRefillDispenser, Boolean canUseInventory, Boolean allowForbidden, Boolean allowCorpse) [0x00000] in <filename unknown>:0
  at RimWorld.JobGiver_GetFood.TryGiveJob (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_JobGiver.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_PrioritySorter.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_FilterFlagDistance:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn)
RimWorld.ThinkNode_Duty:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn)
RimWorld.ThinkNode_Conditional:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_Subtree:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn)
Verse.AI.Pawn_JobTracker:DetermineNextJob(ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:CheckForJobOverride()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()


pauses game, don't know what causes it :(

[attachment deleted by admin due to age]

Wishmaster

... I'm back in RimWorld after all ! I would like you guys to test this version before I make it official.

I've made a new version following some suggestions (cannibal filter, pets hunting animals to be tamed).
But the most important change is related to the nutrient paste dispenser.

change list v1.1d (2017.02.18)


  • New: Nutrient paste dispenser rework..
  • New: Your pets won't hunt animals marked for taming..
  • New: Can now set a strength ratio limit for your pet's preys (default is 0.25, vanilla is 0.5).
  • New: You can now feed incapacitated colonists like animals as well as prisoners. Feed them with human corpses, they won't say anything.
  • New: Most mod options are now default hidden..
  • New: Added language file..


  • Fix: Downed but not incapacitated colonists not fed normaly.
  • Vanilla Fix: Error when warden wants to bring food to a prisoner in a room with a nutrient paste dispenser.
  • Improved nutrient paste dispenser:

    • The dispenser will now pick ingredients smartly. Bad tasting raw food > tasty raw food > insect meat > human meat.
      If your pawn is cannibal, it will use human meat at first ! It also prefer ingredients that will rot sooner.
    • You can also force the dispenser to output meals. Very useful when preparing for a travel.
    • Visitors will now use the Nutrient paste dispenser. Seriously, why do visitors take the raw food from hoppers instead of using the dispenser ?
    • Fixes the vanilla error when wardens want to bring food to a prisoner in a room with a dispenser.
    • (Optional) Cannibal nutrient paste meal is now a separated item. Useful to avoid to stack it and mix ingredients with non cannibal meals.

Download here WM-Smarter-food-selection-v1.1d-prerelease.zip


@ambivalence

Make sure you are using the latest stable version (1.1c).
If you are already, try this one and please post the error log again. It should show up with more informations.

marvin__

I can't find the compatibility patch for VG, where is it?

Wishmaster

#190
I did not make one. Since I don't play with VG I don't know exactly the preferences the mod's food should have.
You are welcome if you want to make one using XML. I will include it in the mod.

Here are all the food prefs with VG. They are automatically determined.
Making a patch is relevant only if you think at least one prefs are wrong.

[Smarter_Food_Selection] Foods with pref Ignore : Beer ; GoJuice ; Luciferium ; Penoxycyline ; Flake ; Yayo ; SmokeleafJoint ; WakeUp ; Mechanoid_Centipede_Corpse ; Mechanoid_Scyther_Corpse ; Cigarillos ; cider ; rum ; Wine ; strawberrywine ; saki ; vodka ; tequila ; whisky ; Caramel ; Hardcandy ; Taffy ; Cuptea ; Coffee ; Fruitdrink ; Healthdrink ; Rawwheat ; Rawcocoa ; Rawsugarcane ; Sugar ; Flour ; RawTobacco ; Cornmeal ; RawCoffee ; Rawtea ; RawHops ; NeutroPetals ; ChunkSalt ; Plant_Fertilizer ; PlantTobacco ; PlantRose ; PlantDaylily ; PlantAlliumGiganteum ; PlantAnthurium ; PlantNymphHair ; PlantPinkRimstalk ; PlantPlumeria ; PlantSunflower
[Smarter_Food_Selection] Foods with pref InsectCorpse : Megascarab_Corpse ; Spelopede_Corpse ; Megaspider_Corpse
[Smarter_Food_Selection] Foods with pref Corpse : Muffalo_Corpse ; Gazelle_Corpse ; Iguana_Corpse ; Rhinoceros_Corpse ; Dromedary_Corpse ; GrizzlyBear_Corpse ; PolarBear_Corpse ; Cougar_Corpse ; Panther_Corpse ; Lynx_Corpse ; Cassowary_Corpse ; Emu_Corpse ; Ostrich_Corpse ; Turkey_Corpse ; Chicken_Corpse ; Pig_Corpse ; Cow_Corpse ; Alpaca_Corpse ; Elephant_Corpse ; Megasloth_Corpse ; Thrumbo_Corpse ; Hare_Corpse ; Snowhare_Corpse ; YorkshireTerrier_Corpse ; Husky_Corpse ; LabradorRetriever_Corpse ; Cat_Corpse ; Squirrel_Corpse ; Alphabeaver_Corpse ; Capybara_Corpse ; Chinchilla_Corpse ; Boomrat_Corpse ; Raccoon_Corpse ; Rat_Corpse ; Deer_Corpse ; Ibex_Corpse ; Elk_Corpse ; Caribou_Corpse ; WildBoar_Corpse ; Tortoise_Corpse ; Cobra_Corpse ; Monkey_Corpse ; Boomalope_Corpse ; Warg_Corpse ; WolfTimber_Corpse ; WolfArctic_Corpse ; FoxFennec_Corpse ; FoxRed_Corpse ; FoxArctic_Corpse
[Smarter_Food_Selection] Foods with pref Hay : Hay
[Smarter_Food_Selection] Foods with pref Kibble : Kibble ; Silage
[Smarter_Food_Selection] Foods with pref RawBad : EggChickenUnfertilized ; Muffalo_Meat ; Gazelle_Meat ; Iguana_Meat ; Rhinoceros_Meat ; Dromedary_Meat ; GrizzlyBear_Meat ; Cougar_Meat ; Panther_Meat ; Lynx_Meat ; Cassowary_Meat ; Turkey_Meat ; Chicken_Meat ; Pig_Meat ; Cow_Meat ; Alpaca_Meat ; Elephant_Meat ; Megasloth_Meat ; Thrumbo_Meat ; Hare_Meat ; YorkshireTerrier_Meat ; Husky_Meat ; LabradorRetriever_Meat ; Cat_Meat ; Squirrel_Meat ; Alphabeaver_Meat ; Capybara_Meat ; Chinchilla_Meat ; Boomrat_Meat ; Raccoon_Meat ; Rat_Meat ; Deer_Meat ; Ibex_Meat ; Elk_Meat ; Caribou_Meat ; Tortoise_Meat ; Cobra_Meat ; Monkey_Meat ; Boomalope_Meat ; Warg_Meat ; WolfTimber_Meat ; FoxFennec_Meat ; VeganEgg ; RawRice ; RawPotatoes ; RawCorn ; Rawsnowbeet ; RawCarrots
[Smarter_Food_Selection] Foods with pref RawTasty :
[Smarter_Food_Selection] Foods with pref RawInsect : Megaspider_Meat
[Smarter_Food_Selection] Foods with pref RawHuman : Human_Meat
[Smarter_Food_Selection] Foods with pref FertEggs : EggChickenFertilized ; EggCobraFertilized ; EggIguanaFertilized ; EggTortoiseFertilized ; EggCassowaryFertilized ; EggEmuFertilized ; EggOstrichFertilized ; EggTurkeyFertilized
[Smarter_Food_Selection] Foods with pref MealAwful : NutrientPasteDispenser ; MealNutrientPaste ; MealNutrientPasteCannibal ; soymilk ; coconutmilk ; SaltedMeat
[Smarter_Food_Selection] Foods with pref MealSimple : MealSimple ; Pemmican ; MealCannedFood ; CannedVeg ; CannedMeat ; BlueberryPie ; PumpkinPie ; driedfruit ; Bread ; Chocomilk ; grilledcheese ; Porridge ; icecream ; smoothie ; Grilledsteak ; Grilledveg ; Kabob ; Salad ; Cornbread ; Cornbreadmuffin ; cheese
[Smarter_Food_Selection] Foods with pref MealFine : MealSurvivalPack ; MealFine ; InsectJelly ; sweetbun ; grilledmeat ; stirfry ; yogurt ; Tacos ; grilledpolenta ; bakedpolenta ; muffin ; chocomuffin
[Smarter_Food_Selection] Foods with pref MealLavish : MealLavish ; cookie ; bowlstew ; pizza
[Smarter_Food_Selection] Foods with pref Plant : PsychoidLeaves ; SmokeleafLeaves ; PlantPsychoid ; PlantSmokeleaf ; PlantSaguaroCactus ; PlantPincushionCactus ; PlantRaspberry ; PlantBush ; PlantAstragalus ; PlantMoss ; PlantPotato ; PlantCorn ; PlantRice ; PlantSnowbeet ; Planteggplant ; Plantredlentil ; Plantpumpkin ; Plantsquash ; Plantbean ; PlantTomato ; PlantCarrot ; Plantmushroom ; Plantoats ; Plantwheat ; PlantHaygrass ; PlantAppletree ; PlantBananaTree ; PlantorangeTree ; PlantPeachTree ; DateTree ; FigTree ; PlantCherrytree ; PlantCoconuttree ; PlantOlivetree ; Plantpineapple ; Plantgrape ; Plantcloudberry ; Plantgooseberry ; PlantAgave ; PlantStrawberry ; Plantblueberry ; Plantwatermelon ; Plantcocoa ; Plantsugarcane ; PlantTea ; PlantCoffee ; PlantHops ; Plantaloe ; PlantHealroot ; PlantCotton ; PlantDevilstrand ; PlantFlax ; PlantSteelLeaf ; PlantPlasteelLeaf ; PlantGoldLeaf ; PlantSilverLeaf ; PlantUraniumLeaf ; PlantNeutroFlower ; Plantbamboo ; PlantDandelion ; PlantTreeOak ; PlantTreePoplar ; PlantTreePine ; PlantTreeBirch ; PlantTreeTeak ; PlantTreeCecropia ; PlantTreeWeepingWillow ; PlantTreeJapaneseMaple ; PlantTreeIronwood ; PlantTreeCherryBlossom ; PlantTreeCamellia ; PlantTreeAcacia ; PlantTreePalm
[Smarter_Food_Selection] Foods with pref Grass : PlantTallGrass ; PlantGrass
[Smarter_Food_Selection] Foods with pref Luxury : Chocolate ; Milk ; Rawapple ; Rawbanana ; Rawgrape ; Raworange ; Rawpeach ; Rawpineapple ; Rawblueberry ; Rawwatermelon ; Rawdate ; Rawfig ; Rawgooseberry ; Rawcloudberry ; RawCherry ; RawOlive ; RawCoconut ; RawCoconutHalf ; RawBerries ; RawAgave ; RawRedLentil ; Rawtofu ; RawPolenta ; Raweggplant ; Rawpumpkin ; Rawsquash ; Rawbean ; RawTomatoes ; Rawmushroom ; Rawoats ; PickledVeg


FreyaMaluk

Quote from: Wishmaster on February 18, 2017, 07:39:38 PM
... I'm back in RimWorld after all ! I would like you guys to test this version before I make it official.

I've made a new version following some suggestions (cannibal filter, pets hunting animals to be tamed).
But the most important change is related to the nutrient paste dispenser.

change list v1.1d (2017.02.18)


  • New: Nutrient paste dispenser rework..
  • New: Your pets won't hunt animals marked for taming..
  • New: Can now set a strength ratio limit for your pet's preys (default is 0.25, vanilla is 0.5).
  • New: You can now feed incapacitated colonists like animals as well as prisoners. Feed them with human corpses, they won't say anything.
  • New: Most mod options are now default hidden..
  • New: Added language file..


  • Fix: Downed but not incapacitated colonists not fed normaly.
  • Vanilla Fix: Error when warden wants to bring food to a prisoner in a room with a nutrient paste dispenser.
  • Improved nutrient paste dispenser:

    • The dispenser will now pick ingredients smartly. Bad tasting raw food > tasty raw food > insect meat > human meat.
      If your pawn is cannibal, it will use human meat at first ! It also prefer ingredients that will rot sooner.
    • You can also force the dispenser to output meals. Very useful when preparing for a travel.
    • Visitors will now use the Nutrient paste dispenser. Seriously, why do visitors take the raw food from hoppers instead of using the dispenser ?
    • Fixes the vanilla error when wardens want to bring food to a prisoner in a room with a dispenser.
    • (Optional) Cannibal nutrient paste meal is now a separated item. Useful to avoid to stack it and mix ingredients with non cannibal meals.

Download here WM-Smarter-food-selection-v1.1d-prerelease.zip


@ambivalence

Make sure you are using the latest stable version (1.1c).
If you are already, try this one and please post the error log again. It should show up with more informations.

so glad you are back... and yeap... this mod is perfect fit for VG.. you should consider making a compatible version :)

Wishmaster

Quoteso glad you are back... and yeap... this mod is perfect fit for VG.. you should consider making a compatible version :)

If it's not, then help me ! Make an XML patch, I would be glad to include it in Smarter Food Selection.
Have a look in Defs/ folder to get a template.

ambivalence

not error:

[Smarter_Food_Selection] Recorded diets and food preferabilities from 31 mods: Core ; Appetite Suppressant ; FishIndustry ; Hot Coffee ; LT-Gardening ; Vegetable Garden  ; (ADD-ON) Soda Garden alpha 16 ; FF_VG_canned_delights ; ZWCannaHerb A16 ; ZWCannaHerb A16 (VG patch) ; Expanded Woodworking for Vegetable Garden ; Jecrell's Tobacco and Cigarettes V1.3d ; Canned Food ; Storage Crates ; Soylent green a16 ; Ac-Cannibbles ; GouRIMet 1.0 ; WM Smarter food selection ; Dog Bowl ; Additional Joy Objects ; Remote Explosives ; [T] RawCropThoughts ; Psychology ; Prisoners can Joy ; CPBeasties ; Legacy Ark ; Taiga Creatures ; CaveworldFlora ; Wild Healroot ; Taller Grass ; Better Terrain
Verse.Log:Message(String)
HugsLib.Utils.ModLogger:Message(String, Object[])
WM.SmarterFoodSelection.Config:processDefs()
WM.SmarterFoodSelection.Config:DefsLoaded()
HugsLib.HugsLibController:OnDefsLoaded()
HugsLib.HugsLibController:LoadReloadInitialize()
HugsLib.HugsLibController:Initalize()
HugsLib.Core.UnityProxyComponent:Start()


red error, pauses game, happens once

Got ThingsListAt out of bounds: (-1, 0, 123)
Verse.Log:Error(String)
Verse.Log:ErrorOnce(String, Int32)
Verse.ThingGrid:ThingsListAt(IntVec3)
Verse.GridsUtility:GetPlant(IntVec3, Map)
WM.SyncGrowth.GroupsUtils:_Iterate(Plant, List`1)
WM.SyncGrowth.GroupsUtils:TryCreateCropsGroup(Plant)
WM.SyncGrowth.Detour.Plant:TickLong()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()


I loaded the save where the error showed up, but now everything seems fine – with 1.1d version (1.1c was installed before that). Could you explain what should I change to make it work with «Hospitality»? To be honest, I didn't get it – what should be changed in that comp-file.

Wishmaster

@ambivalence

If I understand well, you don't have anymore errors with Smarter Food S. since 1.1d, but got one with SyncGrowth instead (the error you just posted).

TBH I don't know why SFS doesn't show errors anymore. Let me know if any error shows up again.
I could quickly figure out the error for SyncGrowth. Please have a try at this fix and check if the mod is still functional (even if no errors show up).

https://www.dropbox.com/s/eomel1uagbgh28w/WM-sync-growth-v1.0a-hotfix-1.zip?dl=0