[WIP] Grill Tech [V1 Released]

Started by BaconBits, August 09, 2016, 02:52:36 PM

Previous topic - Next topic

Grogfeld

Quote from: BaconBits on August 21, 2016, 11:30:24 PM
Well, I hit the code again today. Took it all down to simplicity and so far not a single error. Now  it's testing time.  :) :)

Great. I wanted to tell you that you complicated to much in this mod but I see that you find it out already. It's actually a really good concept. More food types is always welcome. If only Rimworld had for every pawn a specific food preferences.

BaconBits

@Grogfeld:
LOL yeah i figured I over thought it so I reworked everything. Thanks for checking it out.
On a side note, hope you don't mind, I'm going to pm you, I have a favor to ask.

BaconBits

Well, Hit a code roadblock that' got my head spinning, so it's on hold.

kaptain_kavern


BaconBits

I have no idea where to start, and, I forgot all I've done. I set it aside to take care of life issues and I tried to get back into this and I'm stumped.

[attachment deleted by admin - too old]

kaptain_kavern

 8)

[attachment deleted by admin - too old]

BaconBits

Damn bud, I didn't expect you just to do it, Thank you. However, I would like to know what you did so I can learn from my mistakes.

kaptain_kavern

#37
I was coming to edit my post for explain  ;)

There was a <ThingDef> that wasn't closed in a files. So the game "wasn't understand anything". After I corrected this one I only got explicit and comprehensible error message.

There was some typos like : MealBBQ in recipeDef and BBQMeal in itemDef.

And some changes between A14 to A15 regarding Drugs and the way it's work. Some tags have changed <IsPleasureDrug> is no more (I only commented it in your code to let you see it), and there is a <JoyKind> tag to use now (added in your item Defs, "Gluttonous" or something similar - note that it could be more "elegant" to add it to the abstract def rather than to each meal like i've done ^^).   


I will extract the exact changes for you in a bit

kaptain_kavern

#38
This is the big one. Changes in Meals.xml
In red are deletions and green additions.

Quote--- C:\Games\RimWorld\Mods\Grill Tech V1.0\Defs\ThingDefs\Items\Meals.xml
+++ C:\Games\RimWorld\Mods\GrillTech\Defs\ThingDefs\Items\Meals.xml
Lines @@ -56,8 +62,9 @@
         <foodType>Meal, Processed</foodType>
         <nutrition>0.02</nutrition>
         <joy>0.10</joy>
-         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
-         <isPleasureDrug>true</isPleasureDrug>

+         <joyKind>Gluttonous</joyKind>
+         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
+         <!-- <isPleasureDrug>true</isPleasureDrug> -->

         <ingestEffect>EatVegetarian</ingestEffect>
         <ingestSound>Meal_Eat</ingestSound>
      </ingestible>
Lines @@ -85,8 +92,9 @@
         <foodType>Processed</foodType>
         <nutrition>0.85</nutrition>
         <joy>0.20</joy>
+         <joyKind>Gluttonous</joyKind>
         <maxNumToIngestAtOnce>1</maxNumToIngestAtOnce>
-         <isPleasureDrug>true</isPleasureDrug>
+         <!-- <isPleasureDrug>true</isPleasureDrug> -->
         <ingestEffect>EatVegetarian</ingestEffect>
         <ingestSound>Meal_Eat</ingestSound>
      </ingestible>
Lines @@ -112,8 +120,9 @@
         <foodType>Meal, Processed</foodType>
         <nutrition>0.5</nutrition>
         <joy>0.20</joy>
+         <joyKind>Gluttonous</joyKind>
         <maxNumToIngestAtOnce>1</maxNumToIngestAtOnce>
-         <isPleasureDrug>true</isPleasureDrug>
+         <!-- <isPleasureDrug>true</isPleasureDrug> -->
         <ingestEffect>EatVegetarian</ingestEffect>
         <ingestSound>Meal_Eat</ingestSound>
      </ingestible>
Lines @@ -137 +146 @@
         <foodType>Meal, Processed</foodType>
         <nutrition>0.09</nutrition>
         <joy>0.07</joy>
-         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
-         <isPleasureDrug>true</isPleasureDrug>

+         <joyKind>Gluttonous</joyKind>
+         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
+         <!-- <isPleasureDrug>true</isPleasureDrug> -->

         <ingestEffect>EatVegetarian</ingestEffect>
         <ingestSound>Meal_Eat</ingestSound>
      </ingestible>
Lines @@ -162 +172 @@
         <foodType>Meal, Processed</foodType>
         <nutrition>0.05</nutrition>
         <joy>0.07</joy>
-         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
-         <isPleasureDrug>true</isPleasureDrug>

+         <joyKind>Gluttonous</joyKind>
+         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
+         <!-- <isPleasureDrug>true</isPleasureDrug> -->

         <ingestEffect>EatVegetarian</ingestEffect>
         <ingestSound>Meal_Eat</ingestSound>
      </ingestible>
Lines @@ -189 +200 @@
         <foodType>Meal, Processed</foodType>
         <nutrition>0.05</nutrition>
         <joy>0.05</joy>
-         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
-         <isPleasureDrug>true</isPleasureDrug>

+         <joyKind>Gluttonous</joyKind>
+         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
+         <!-- <isPleasureDrug>true</isPleasureDrug> -->

         <ingestEffect>EatVegetarian</ingestEffect>
         <ingestSound>Meal_Eat</ingestSound>
      </ingestible>
Lines @@ -214 +226 @@
         <foodType>Meal, Processed</foodType>
         <nutrition>0.02</nutrition>
         <joy>0.05</joy>
-         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
-         <isPleasureDrug>true</isPleasureDrug>

+         <joyKind>Gluttonous</joyKind>
+         <maxNumToIngestAtOnce>4</maxNumToIngestAtOnce>
+         <!-- <isPleasureDrug>true</isPleasureDrug> -->

         <ingestEffect>EatVegetarian</ingestEffect>
         <ingestSound>Meal_Eat</ingestSound>
      </ingestible>

The rest was in RecipeDef files :

Quote--- C:\Games\RimWorld\Mods\Grill Tech V1.0\Defs\RecipeDefs\Recipes_BBQFoods.xml
+++ C:\Games\RimWorld\Mods\GrillTech\Defs\RecipeDefs\Recipes_BBQFoods.xml
@@ -33,7 +33,7 @@
         </li>
      </ingredients>
      <products>
-         <RibsBBQ>1</RibsBBQ>
+         <BBQRibs>1</BBQRibs>
      </products>
      <fixedIngredientFilter>
         <categories>
@@ -84,7 +84,7 @@
         </li>
      </ingredients>
      <products>
-         <SausageBBQ>1</SausageBBQ>
+         <BBQSausage>1</BBQSausage>
      </products>
      <fixedIngredientFilter>
         <categories>
@@ -129,7 +129,7 @@
         </li>
      </ingredients>
      <products>
-         <HotDogBBQ>1</HotDogBBQ>
+         <BBQHotDog>1</BBQHotDog>
      </products>
      <fixedIngredientFilter>
         <categories>
@@ -176,7 +176,7 @@
         </li>
      </ingredients>
      <products>
-         <PotatoesBBQ>1</PotatoesBBQ>
+         <BBQPotatoes>1</BBQPotatoes>
      </products>
      <fixedIngredientFilter>
         <categories>
@@ -220,7 +220,7 @@
         </li>
      </ingredients>
      <products>
-         <CornBBQ>1</CornBBQ>
+         <BBQCorn>1</BBQCorn>
      </products>
      <fixedIngredientFilter>
         <categories>

Quote--- C:\Games\RimWorld\Mods\GrillTech\Defs\RecipeDefs\Recipes_BBQMeals.xml
+++ C:\Games\RimWorld\Mods\Grill Tech V1.0\Defs\RecipeDefs\Recipes_BBQMeals.xml
@@ -41,7 +41,7 @@
         </li>
      </ingredients>
      <products>
-         <BBQMeal>1</BBQMeal>
+         <MealBBQ>1</MealBBQ>
      </products>
      <fixedIngredientFilter>
         <categories>
--- C:\Games\RimWorld\Mods\Grill Tech V1.0\Defs\RecipeDefs\Recipes_Foods.xml
+++ C:\Games\RimWorld\Mods\GrillTech\Defs\RecipeDefs\Recipes_Foods.xml
@@ -24,7 +24,7 @@
         </li>
      </ingredients>
      <products>
-         <BaconCooked>1</BaconCooked>
+         <CookedBacon>1</CookedBacon>
      </products>
      <fixedIngredientFilter>
         <categories>
@@ -80,7 +80,7 @@
         </specialFiltersToDisallow>
      </fixedIngredientFilter>
      <products>
-         <SauceBBQ>4</SauceBBQ>
+         <BBQSauce>4</BBQSauce>
      </products>
      <recipeUsers>
         <li>ElectricStove</li>

BaconBits

#39
Nice. Yeah the rearranging of the words; <RibsBBQ>1</RibsBBQ>/<BBQRibs>1</BBQRibs> was something I was trying out of desperation. I got so frustrated with all the errors that I confused myself so much, I forgot all the changes I had made. Ultimately, I just ended up making things worse. I had intended to get back into it after A15c came out, but I didn't have A15c till now. Thank you for all you help on this. Now I need do some tweaking here and there. 

BaconBits

Thanks to kaptain_kavern, I am now in the testing stage.

kaptain_kavern

Man I was "forced" to, remember : I want my BBQ

Seriously you have good ideas, I want you to stick here and continue to mod ^^
So I just give a hand where I can, like others have done with me :p

Keep up the good job

BaconBits

The issues with mod would not have made me stop modding. But again, thank you bud. I appreciate it very much.

BaconBits

Ok, so after some testing, I found a mod conflict. If I have any mods that use a cooking station, (such as: Vegetable Garden, T-ExpandedCrops, Fireplace, and Grill Tech) the last in the mod order overwrites the others as far being able to cook at those stations. Is there a way to fix this without C#?

kaptain_kavern

#44
In the xml code, is all those stations use the same Abstract Parent?

edit : Nevermind I was thinking maybe all those abstract def with the same names could overwrite each other but I saw your "<ThingDef Name="BBQGrillBase" ParentName="BenchBase" Abstract="True">".

Maybe all those mod use overwrite each other workgiver def too ?  ???
I can find how but that really looks like something related to workgiver