Editing what can be grown in growing zones

Started by Goo Poni, August 31, 2014, 07:10:28 AM

Previous topic - Next topic

Goo Poni

How might on go about accomplishing that.
TechTreeMinami allows the creation of medicine through several steps but one of the first steps requires Agave and you'll never see a single Agave in a forest map. Adding it to things that can be grown from hydroponics or a growing zone would alleviate that almost immediately, though and then I could sell excess medicine.

mjones1052

#1
I used this mod earlier today and you can change what is growing in a growing spot already.   Agave is a selection when using TTM.  I had several patches of it earlier.  Do you mean just in general so you can do it yourself?  Because I haven't seen many modders make a mod that adds a plant without the ability to grow it.

Unless I'm misunderstanding you completely.

However, just looked and the defs for it are in /core/Defs/ThingDefs/Plants_Cultivated.xml

In there is an entry for each vanilla growable plant.  I imagine TTM has them as well for each of their plants.  I just noticed I used Superior Crafting as well and that might be where my Agave came from.   But here is the Agave def for  Superior Crafting, you can see if TTM will use it as well because I think they just look for name but I could be wrong.

EDIT: I just looked and I think you have your mods mixed up.  Superior Crafting uses Agave while TTM uses the green, red and yellow herbs, which are all growable.  The recipe for a medicine for TTM going by their XML file is
"<description>Create (3)Medicine. Ingredients: (1)MedicalSupplies, (2)RedHerb, (2)YellowHerb, (2)GreenHerb</description>"

While Superior Crafting mod's medkit recipe calls for
"<description>Make a medkit from Julia's Glory, raw agave, and cloth</description>"

<ThingDef ParentName="PlantBase">
<defName>PlantAgaveCultivated</defName>
<label>Agave plant</label>
<maxHealth>120</maxHealth>
<description>A cultivated version of the Agave plantthat can be grown in fields or the hydroponics basin.</description>
<beauty>Neutral</beauty>
<textureFolderPath>Things/Plant/Agave</textureFolderPath>
<selectable>true</selectable>
<pathCost>10</pathCost>
<food>
<quality>Plant</quality>
<nutrition>40</nutrition>
</food>
<plant>
<shootsSeeds>false</shootsSeeds>
<harvestTag>Food</harvestTag>
<harvestedThingDef>RawAgave</harvestedThingDef>
<harvestDestroys>false</harvestDestroys>
<harvestYieldRange>
<min>2</min>
<max>4</max>
</harvestYieldRange>
<sowableGround>false</sowableGround>
<sowableHydroponic>false</sowableHydroponic>
<topWindExposure>0.1</topWindExposure>
<growthPer20kTicks>0.3</growthPer20kTicks>
<lifeSpan>200000</lifeSpan>
<fertilityFactorGrowthRate>0.4</fertilityFactorGrowthRate>
<visualSizeRange>
<min>0.3</min>
<max>1.05</max>
</visualSizeRange>
</plant>
</ThingDef>


minami26

Hello you can try this:

Go to your Rimworld Folder => Mods => TTM => Defs => ThingDefs :
Look for TTM_Plants_Cultivated and open it on NotePad or any TextEditor.
Go to the bottom and copy & paste this code before the end </Plants> code, then save! it should now be growable on growing zones and hydroponics basin.


<!--===========================  Growable Agave  ==============================-->


  <ThingDef ParentName="PlantBase">
    <defName>PlantAgave</defName>
    <label>Agave</label>
    <maxHealth>120</maxHealth>
    <description>Large-leafed desert plant with edible flowers and stalks.</description>
    <beauty>Neutral</beauty>
    <textureFolderPath>Things/Plant/Agave</textureFolderPath>
    <selectable>true</selectable>
    <sunShadowInfo>
      <baseWidth>0.2</baseWidth>
      <baseHeight>0.2</baseHeight>
      <tallness>0.6</tallness>
    </sunShadowInfo>
    <fillPercent>0.25</fillPercent>
    <pathCost>30</pathCost>
    <food>
      <quality>Plant</quality>
      <nutrition>40</nutrition>
    </food>
    <plant>
      <harvestTag>Food</harvestTag>
      <harvestDestroys>true</harvestDestroys>
      <harvestedThingDef>RawAgave</harvestedThingDef>
      <harvestYieldRange>
        <min>2</min>
        <max>6</max>
      </harvestYieldRange>
      <fertilityMin>0.3</fertilityMin>
       <visualSizeRange>
        <min>0.7</min>
        <max>1.1</max>
      </visualSizeRange>
      <growthPer20kTicks>0.45</growthPer20kTicks>
      <topWindExposure>0.3</topWindExposure>
      <lifeSpan>800000</lifeSpan>
      <fertilityFactorGrowthRate>0.5</fertilityFactorGrowthRate>
     <sowableGround>true</sowableGround>
      <sowableHydroponic>true</sowableHydroponic>
    </plant>
  </ThingDef>


mjones1052

Quote from: minami26 on September 01, 2014, 02:30:04 AM
Hello you can try this:

Go to your Rimworld Folder => Mods => TTM => Defs => ThingDefs :
Look for TTM_Plants_Cultivated and open it on NotePad or any TextEditor.
Go to the bottom and copy & paste this code before the end </Plants> code, then save! it should now be growable on growing zones and hydroponics basin.


<!--===========================  Growable Agave  ==============================-->


  <ThingDef ParentName="PlantBase">
    <defName>PlantAgave</defName>
    <label>Agave</label>
    <maxHealth>120</maxHealth>
    <description>Large-leafed desert plant with edible flowers and stalks.</description>
    <beauty>Neutral</beauty>
    <textureFolderPath>Things/Plant/Agave</textureFolderPath>
    <selectable>true</selectable>
    <sunShadowInfo>
      <baseWidth>0.2</baseWidth>
      <baseHeight>0.2</baseHeight>
      <tallness>0.6</tallness>
    </sunShadowInfo>
    <fillPercent>0.25</fillPercent>
    <pathCost>30</pathCost>
    <food>
      <quality>Plant</quality>
      <nutrition>40</nutrition>
    </food>
    <plant>
      <harvestTag>Food</harvestTag>
      <harvestDestroys>true</harvestDestroys>
      <harvestedThingDef>RawAgave</harvestedThingDef>
      <harvestYieldRange>
        <min>2</min>
        <max>6</max>
      </harvestYieldRange>
      <fertilityMin>0.3</fertilityMin>
       <visualSizeRange>
        <min>0.7</min>
        <max>1.1</max>
      </visualSizeRange>
      <growthPer20kTicks>0.45</growthPer20kTicks>
      <topWindExposure>0.3</topWindExposure>
      <lifeSpan>800000</lifeSpan>
      <fertilityFactorGrowthRate>0.5</fertilityFactorGrowthRate>
     <sowableGround>true</sowableGround>
      <sowableHydroponic>true</sowableHydroponic>
    </plant>
  </ThingDef>


Well nevermind my post then, there you go.

Did you originally use Agave Minami?  Did I pull the wrong def?

minami26

no i ddnt use agave, its from Superior Crafting if you already have it :)

Goo Poni

Quote from: mjones1052 on September 01, 2014, 02:14:13 AM
-long quote snip-

Mm, the three colours of herb are used, yes, but the medical supplies that are also used to produce medicine need to be created elsewhere and those require agave, planks and I think some metal as well.

Quote from: minami26 on September 01, 2014, 02:30:04 AM
-quote snip-

I did end up doing it myself, just transplanting the code for agave plants from the core files into the file that controls growth of herbs and such in TTM. They might be a little overpowered in that the agave still produces as much as it would in the wild, which is a silly amount of food but I'm using medicine as a resource sink and selling excess medicine to traders when items are needed. Thank you for the help though, maybe someone else will get some use out of it. Do you plan to allow cultivation of agave in TTM with your next update, minami?

Reaper

Quote from: Goo Poni on September 05, 2014, 09:40:12 AM
Quote from: mjones1052 on September 01, 2014, 02:14:13 AM
-long quote snip-

Mm, the three colours of herb are used, yes, but the medical supplies that are also used to produce medicine need to be created elsewhere and those require agave, planks and I think some metal as well.

Quote from: minami26 on September 01, 2014, 02:30:04 AM
-quote snip-

I did end up doing it myself, just transplanting the code for agave plants from the core files into the file that controls growth of herbs and such in TTM. They might be a little overpowered in that the agave still produces as much as it would in the wild, which is a silly amount of food but I'm using medicine as a resource sink and selling excess medicine to traders when items are needed. Thank you for the help though, maybe someone else will get some use out of it. Do you plan to allow cultivation of agave in TTM with your next update, minami?

YES PLEASE DO

Stalker102

You can make anything grow in growing zones between silver to ore are the simple part to grow but you can make meal packs grow first aid kits grow weapons grow its how much you honestly want to script right and test possibilities are endless honestly.
Life has many Bridges. Don't burn the ones you crossed

jamieg

did you figure it out?? I made a mod called more edibles in alpha 3 http://ludeon.com/forums/index.php?topic=3001.0 which added new growables and food into the game I lso added more grow/food in something called everybodys mod which sadly didnt get finished and in UW my full conersion that was discontinued when i left the rimworld scene had basically non of the original left in it :) I can help if this is still a problem
YES! Its true! im updating The BIG BANG mod pack check it out here: https://www.youtube.com/watch?v=orzLZbECR20&list=UUr1sEPUEhFqy01q16zGisIg

Stalker102

Here is one, for ya a simple one harvestable (Coins/Silver) its simple and doesn't clash with other (Silver/Coins) on the map also can be grown on tables.

<ThingDef ParentName="PlantBase">
    <defName>PlantSilver</defName>
    <label>Silver Plant</label>
    <maxHealth>120</maxHealth>
    <description>Lets grow some Riches.</description>
    <beauty>Neutral</beauty>
    <textureFolderPath>Things/Item/Resource/Silver</textureFolderPath>
    <selectable>true</selectable>
    <sunShadowInfo>
      <baseWidth>0.2</baseWidth>
      <baseHeight>0.2</baseHeight>
      <tallness>0.6</tallness>
    </sunShadowInfo>
    <fillPercent>0.25</fillPercent>
    <pathCost>30</pathCost>
    <food>
      <quality>Plant</quality>
      <nutrition>40</nutrition>
    </food>
    <plant>
      <harvestTag>Food</harvestTag>
      <harvestDestroys>true</harvestDestroys>
      <harvestedThingDef>Silver</harvestedThingDef>
      <harvestYieldRange>
        <min>40</min>
        <max>60</max>
      </harvestYieldRange>
      <fertilityMin>0.3</fertilityMin>
       <visualSizeRange>
        <min>0.7</min>
        <max>1.1</max>
      </visualSizeRange>
      <growthPer20kTicks>0.45</growthPer20kTicks>
      <topWindExposure>0.3</topWindExposure>
      <lifeSpan>100000</lifeSpan>
      <fertilityFactorGrowthRate>0.5</fertilityFactorGrowthRate>
     <sowableGround>true</sowableGround>
      <sowableHydroponic>true</sowableHydroponic>
    </plant>
  </ThingDef>
Life has many Bridges. Don't burn the ones you crossed