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

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

Previous topic - Next topic

ambivalence

Quote from: Wishmaster on January 09, 2017, 07:17:33 AM
Quote from: ambivalence on January 09, 2017, 04:02:07 AM
[Smarter_Food_Selection] Could not determine food preferability for 7 Defs. Are you using unsupported food mods ? (CannedVeggies ; SCMeat ; RawHolly ; RawPotatoes ; RawRice ; RawAgave ; RawCorn ; )

Are you using the standard SFS mod or the compatibility version ?
What food mods are you using ?

I use the compatibility version, but not sure about the mod, which adds these defs. As for CannedVeggies it could be Canned Food or possibly Storage Crates. There's also Vegetable Garden, of course, then SeedsPlease!. SCMeat could be from CPBeasties, Mamuffalo or Taiga Creatures that can be found here on forums. No idea what else. May be I can check it in-game somehow?

faltonico

Quote from: ambivalence on January 09, 2017, 07:02:26 PM
I use the compatibility version, but not sure about the mod, which adds these defs. As for CannedVeggies it could be Canned Food or possibly Storage Crates. There's also Vegetable Garden, of course, then SeedsPlease!. SCMeat could be from CPBeasties, Mamuffalo or Taiga Creatures that can be found here on forums. No idea what else. May be I can check it in-game somehow?
I don't know if you can check that in game, but you can check the xml files of the mods you use, you would probably find that kind of information in a folder with "Thing" in the name.
I did a quick check and i saw that all of ones with the "raw" prefix are indeed from Seeds Please. Vegetable garden nor storage crates uses CannedVeggies, it would probably be from canned food but i don't use that one. I don't use any of the other mods you mentioned either.

Wishmaster

#137
I tried it with Vegetable Garden  ; Storage Crates ; CPBeasties ; Canned Food ; Seeds please (seems to be concerned) and haven't found where your other Defs are...
Beside you seem to have mods overriding defs RawPotato.

I just made a modification to find out which mods is concerned.
https://www.dropbox.com/s/f43dfz5yjenyack/WM-Smarter-food-selection-v1.1b-comptability-fix-dev-2.zip?dl=0


I had a look at
CannedVeggies ; SCMeat.

CannedVeggies has a present but empty ingestible properties. only has the ingest sound....
SCMeat is tagged is DesperateOnly, like corpses.
So the only solution for kind of things is compatibility patch.
I'm working on that: XML files you can create to define how Defs from a certain should be defined.

Btw people seem to panic a lot about the warning but it is more harmless than it looks like.
What will happen is that restricted pawns will never eat those undetermined defs.

For example prisoners will never be bring CannedFood but nutrient paste, yes.

ambivalence

#138
hm, now it's 8 defs:

[Smarter_Food_Selection] Could not determine food preferability for 8 Defs. Restricted pawns will ignore them. Are you using unsupported food mods ? ([Mod : Canned Food] CannedVeggies ; CannedMeat ; [Mod : Storage Crates] SCMeat ; [Mod : Holiday Special Edition] RawHolly ; [Mod : [T] RawCropThoughts] RawPotatoes ; RawRice ; RawAgave ; RawCorn ; )

But it made the things clear. Holiday Special Edition is an addon for RimKea, it can be found in its thread; RawCropThoughts was meant to change pawns' thoughts.

Garlic88

Thanks Wellenbrecher that was exactly the problem. Still getting used to all this, sorry to waste your time on something so minor! :S

Wishmaster

#140
I just finished what's actually the next version. I need further testing.

I improved again the automatic food determination and it seems to work pretty well. I need you guys to have a look at this. Are the preferences correctly assigned ?

[Smarter_Food_Selection] Recorded diets and food preferability from 4 mods: Core ; CPBeasties ; Vegetable Garden  ; Storage Crates

[Smarter_Food_Selection] Foods with pref Luxury : Caramel ; Hardcandy ; Taffy ; Cuptea ; Coffee ; Fruitdrink ; Chocolate ; Rawtea ; 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

[Smarter_Food_Selection] Foods with pref RawTasty : Beer ; cider ; rum ; Wine ; strawberrywine ; saki ; vodka ; tequila ; whisky ; Healthdrink ; ChunkSalt ; SCMeat



If it's not, I created a new system where you can force a preference for a given food when a certain mod is present. Just create your XML from the template inside the mod.

You can now create your own compatibility patches with XML !
... if they are still needed !

I already use it for few defs.

http://bit.ly/2iCBrY5

ADM-Ntek

is there any way to have animals not eat human corpses that is just wrong. i just had to execute a puppy because it chewed on a body and would prefer that not to happen again.

Wishmaster

Quote from: ADM-Ntek on January 11, 2017, 05:30:22 AM
is there any way to have animals not eat human corpses that is just wrong. i just had to execute a puppy because it chewed on a body and would prefer that not to happen again.

You can forbid the corpse... But why do you want to save human corpses ? They are such an cost efficient food source for pets after all.
Are your using them for medical training ?
Perhaps I should make it an option.

faltonico

Excellent job with the compatibility version! It runs very good! even with a lot of mods that ads foods in the game.
I am having this following error though, it only happens with caravans from other factions visiting your colony, and only when the settle in one area, not while traveling:

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

Wishmaster

#144
Thank you for telling me about this major bug. I don't play a lot those days so it's hard to test mods properly.
It's an issue with the standard version as well. I'm quite mad.

I've fixed that and hope everything is fine now.
http://bit.ly/2jbCUFN

edit: fixed broken link



BlackGyver

Hello! I'm getting an error from WM Medivac, not sure what's causing it. Here's the error log:

Exception in RimWorld.ThinkNode_ConditionalColonyFaction TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object
  at WM.Medivac.Utils+<>c.<GetBestMedicalBedFor>b__0_7 (KeyValuePair`2 entry) [0x00000] in <filename unknown>:0
  at System.Linq.SortSequenceContext`2[System.Collections.Generic.KeyValuePair`2[Verse.Thing,Verse.Pair`2[System.Single,System.Single]],RimWorld.QualityCategory].Initialize (System.Collections.Generic.KeyValuePair`2[] elements) [0x00000] in <filename unknown>:0
  at System.Linq.SortSequenceContext`2[System.Collections.Generic.KeyValuePair`2[Verse.Thing,Verse.Pair`2[System.Single,System.Single]],System.Single].Initialize (System.Collections.Generic.KeyValuePair`2[] elements) [0x00000] in <filename unknown>:0
  at System.Linq.QuickSort`1[System.Collections.Generic.KeyValuePair`2[Verse.Thing,Verse.Pair`2[System.Single,System.Single]]].PerformSort () [0x00000] in <filename unknown>:0
  at System.Linq.QuickSort`1+<Sort>c__Iterator21[System.Collections.Generic.KeyValuePair`2[Verse.Thing,Verse.Pair`2[System.Single,System.Single]]].MoveNext () [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[System.Collections.Generic.KeyValuePair`2[Verse.Thing,Verse.Pair`2[System.Single,System.Single]],Verse.Thing].MoveNext () [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.First[Thing] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at WM.Medivac.Utils.GetBestMedicalBedFor (Verse.Pawn pawn, System.Predicate`1 customvalidator) [0x00000] in <filename unknown>:0
  at WM.Medivac.RestUtility.FindPatientBedFor (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at RimWorld.JobGiver_PatientGoToBed.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn)
RimWorld.ThinkNode_Conditional:TryIssueJobPackage(Pawn)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn)
Verse.AI.Pawn_JobTracker:DetermineNextJob(ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
Psychology.Detour._Pawn_JobTracker:_EndCurrentJob(Pawn_JobTracker, JobCondition, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()

Wishmaster

Quote from: faltonico on January 21, 2017, 12:50:39 PM
Quote from: Wishmaster on January 14, 2017, 07:47:02 AM
edit: fixed broken link
I just noticed today xD
Thank you again!

arrr poor you...
Quote from: BlackGyver on January 21, 2017, 07:26:16 PM
Hello! I'm getting an error from WM Medivac, not sure what's causing it. Here's the error log:

To be honest I'm totally inactive with RimWorld now.
Does this happen often ? When ? I hope this mod is stable though.

Regarding Smarter food selection you should now use the "compatibility" version as standard.

BlackGyver

Quote from: Wishmaster on January 21, 2017, 08:18:33 PMDoes this happen often ? When ? I hope this mod is stable though.

It doesn't happen often, but when it does, it does so by spamming it hundreds of times, slowing down the game to a crawl for a good while. Haven't been able to pinpoint the "when", I had hoped the error log would tell you that!