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

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

Previous topic - Next topic

faltonico

Hello there!
What do i have to do to make a compatibility patch for Smarter Food Selection and Vegetable Garden? Just add a preferability tag to all the new foods?

Wishmaster

#121
Quote from: asquirrel on January 06, 2017, 05:54:13 PM

The one you just uploaded (https://github.com/Wishmaster01/Smarter.food.selection) doesn't have any def files inside. Is that a problem?   The last release you did had a defs folder (version 1.1a).  Inside your def folder you had a file named "injector.xml."

Going to wait for your response before I update.

Do you think SyncGrowth is a cheat?  I'm just thinking because each crop normally has a different growth rate, correct?  Thanks for the feedback!

The injector.xml file is gone thanx to HugsLib.
SyncGrowth is NOT a cheat. The average growth rate of a plantation remains the same. Some crops grow slower, some grow faster.

Quote from: faltonico on January 07, 2017, 03:15:40 AM
Hello there!
What do i have to do to make a compatibility patch for Smarter Food Selection and Vegetable Garden? Just add a preferability tag to all the new foods?

Smarter Food Selection mostly uses the following fields to determine the preferability :
ingestible.foodType
ingestible.preferability
ingestible.tasteThought


The last one is a bit particular. It is currently only used to determine preferability for raw food that gives bad thoughts.

I think that would indeed make it compatible but i'm not 100% sure. You should really have a try.
Honestly I never had a look at Vegetable Garden. Does the new food gives thoughts ? Do you use some tag ? Which ones ?


Edit:
I just realized that the download link on header wasn't updated ! You may still be using the 1.1a version !!!


faltonico

Quote from: Wishmaster on January 07, 2017, 06:21:02 AM
Does the new food gives thoughts ? Do you use some tag ? Which ones ?
*The new Lavish, fine meals and raw food have a <tasteThought>, all of the new food have <preferability>.
*Some use <li Class="CompProperties_Drug"> to give joy or/and <li Class="IngestionOutcomeDoer_GiveHediff"> and a few others if they are addictive.
*Most of the meals give different increases on stats like metabolism, blood filtration, etc. it uses <outcomeDoers> and <HediffDef> for that.
*They all use either <ThingDef ParentName="VG_MealBase">, <ThingDef ParentName="VG_MealRottable">, <ThingDef ParentName="VG_RawFruitBase"> or <ThingDef ParentName="VG_PlantFoodRawBase">, they are all defined in a Def_Bases.xml.
*Prefereabilities are:
- NeverForNutrition (like tea and caramel).
- DesperateOnly.
- RawBad.
- RawTasty.
- MealSimple.
- MealFine.
- MealLavish.
I saw you don't have "DesperateOnly" and "NeverForNutrition" on your List<FoodPref>.

I know almost nothing of coding, but i think i can try, if i know where to start xD

Wishmaster

#123
Quote from: faltonico on January 07, 2017, 10:25:40 AM
Quote from: Wishmaster on January 07, 2017, 06:21:02 AM
Does the new food gives thoughts ? Do you use some tag ? Which ones ?
*The new Lavish, fine meals and raw food have a <tasteThought>, all of the new food have <preferability>.
*Some use <li Class="CompProperties_Drug"> to give joy or/and <li Class="IngestionOutcomeDoer_GiveHediff"> and a few others if they are addictive.
*Most of the meals give different increases on stats like metabolism, blood filtration, etc. it uses <outcomeDoers> and <HediffDef> for that.
*They all use either <ThingDef ParentName="VG_MealBase">, <ThingDef ParentName="VG_MealRottable">, <ThingDef ParentName="VG_RawFruitBase"> or <ThingDef ParentName="VG_PlantFoodRawBase">, they are all defined in a Def_Bases.xml.
*Prefereabilities are:
- NeverForNutrition (like tea and caramel).
- DesperateOnly.
- RawBad.
- RawTasty.
- MealSimple.
- MealFine.
- MealLavish.
I saw you don't have "DesperateOnly" and "NeverForNutrition" on your List<FoodPref>.

I know almost nothing of coding, but i think i can try, if i know where to start xD

Did you mean enum FoodPref {...} ? :p

FoodPref is a custom translation of the vanilla food preferences for my mod.
It affects how the pawns select their food.
(It might sounds weird to have a translation but it actually makes sense).

I don't use NeverForNutrition and I realize it's actually a mistake. I should add it to the next version, I don't want to make a hotfix just for this. (should I ?).
Meanwhile if you want your pets not to ingest tea and caramel, have a try and set their foodType to.... liquor !

Even you know very few of coding, you can try to have a look at the function _determineFoodPrefLevel() in FoodPref.cs . It's a relatively simple part of code to understand.
Everything about the conversion to FoodPref is here.

Do you need more information for trying to make a patch ?

faltonico

You seem to have a list called List<FoodPref> (internal static List<FoodPref> colonistPref = new List<FoodPref>) for all the diferent pawns that have, well, a list with all the preferabilities, "DesperateOnly" and "NeverForNutrition" are never mentioned, so my guess is that the mod will not know what to do with those foods tagged like that.

I mostly don't worry about pets eating my food or drugs, i have areas a plenty, i might just place them far away from them.

I was thinking if it was possible to make something like a patch, that we can install after the 2 mods so they can work together, not to directly edit your files. Though i will check that file you mentioned.

Thank you for your reply!

Wishmaster

"DesperateOnly" and "NeverForNutrition" are never mentioned.

(internal static List<FoodPref> colonistPref ) is not used yet. Don't worry about that.

Colonists with no restrictions (not ascetic, not incapacitated) just pick their food just like in the vanilla game .

asquirrel

Hey WM! 

I disabled the old smarted food selection.  Then shut down Rimworld.  Then deleted the folder.  Then put the new version in the mods folder.  Then started up Rimworld.  Then enabled the new version (the one without the injector).  Got error (yellow error) Restarted Rimworld. Same yellow error.  I've attached a screenshot.  Running a couple of mods which might be the cause of the error.  Big one is vegetable garden.  Also running one (Rimarsenal?) where I get raids with dudes that have pet razertooths (lizard / dog hybrids).

Am I on target here in that basically your mod doesn't have those items listed for preference so that's why I'm getting these errors?  Thanks for the info!

[attachment deleted by admin due to age]

Wishmaster

#127
Are you using unsupported food mods ?

I just had a look at Rimsenal and VG defs and figured out what's wrong.
Now I got only 3 undetermined Defs (Chocolate ; Rawtofu ; RawPolenta ; ).
They are tagged as "DesperateOnly"... seriously ?

Anyway, have a try at this and let me know how it works.
https://www.dropbox.com/s/wi64crd8at9e7dm/WM-Smarter-food-selection-v1.1b-comptability-fix-dev.zip?dl=0

Btw you can copy the log and share it when HugsLib. No need screenshoot.

asquirrel

#128
Quote from: Wishmaster on January 07, 2017, 04:32:26 PM
Are you using unsupported food mods ?

I just had a look at Rimsenal and VG defs and figured out what's wrong.
Now I got only 3 undetermined Defs (Chocolate ; Rawtofu ; RawPolenta ; ).
They are tagged as "DesperateOnly"... seriously ?

Anyway, have a try at this and let me know how it works.
https://www.dropbox.com/s/wi64crd8at9e7dm/WM-Smarter-food-selection-v1.1b-comptability-fix-dev.zip?dl=0

Btw you can copy the log and share it when HugsLib. No need screenshoot.

Holy carp man, you did good!!  It's all gone!   I know you said no need screenshot but I wanted to show your awesomeness! :)

How do you share your log here?  I saw the new feature upload but I don't know how to link it to my post. :(
Oh wait, can you see this log? :)

https://gist.github.com/74ac884402ffc7a893f3684fb6bda52e

I just looked at my log and it's massive.  Wow, that  didn't sound right.

[attachment deleted by admin due to age]

Wishmaster

Thank you.

It needs further testing however to ensure the pawns will behave correctly over those non-vanilla foods. I posted a test compatibility version.

For logs, can simply copy it to press paper. Just click on an entry in the log.

WoodyDaOcas

Hello :) First, thank you for your mods, great ideas ) Also, I encountered the error with disappearing launcher on construction finished, but I got Embrasures too, I'll try different load order then. Ty

ambivalence

 :-[

[Smarter_Food_Selection] Could not determine food preferability for 7 Defs. Are you using unsupported food mods ? (CannedVeggies ; SCMeat ; RawHolly ; RawPotatoes ; RawRice ; RawAgave ; RawCorn ; )

Garlic88

Hi. The food priorities mod looks amazing, I've been dreaming of such a mod for months. Just downloaded it but it didn't have a version attached? Got the message:

Incorrectly formatted target unknown. Its not working in game. Anyone else had this?

Wishmaster

Quote from: WoodyDaOcas on January 08, 2017, 12:00:41 PM
Hello :) First, thank you for your mods, great ideas ) Also, I encountered the error with disappearing launcher on construction finished, but I got Embrasures too, I'll try different load order then. Ty

Thank you and why is that happening is still a mystery. But it is definitely because of my Reuse pods.
You can still try to delete the mod PodLauncher Def in xml files. Perhaps this will fix the issue.
However you still need the landing controller get the mod to work.

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 ?

Quote from: Garlic88 on January 09, 2017, 05:45:47 AM
Hi. The food priorities mod looks amazing, I've been dreaming of such a mod for months. Just downloaded it but it didn't have a version attached? Got the message:

Incorrectly formatted target unknown. Its not working in game. Anyone else had this?

I have no idea. I just checked the both version and they have a correct target version. Did you extract all the folders ? (About, Assemblies)

Wellenbrecher

Quote from: Garlic88 on January 09, 2017, 05:45:47 AM
Hi. The food priorities mod looks amazing, I've been dreaming of such a mod for months. Just downloaded it but it didn't have a version attached? Got the message:

Incorrectly formatted target unknown. Its not working in game. Anyone else had this?
Check if you accidentally have another folder inside what you thought to be the mod :P
Sounds like you unpacked it into a named folder and the mod itself would be inside of that folder.