Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - zassi12

#1
Help / Mod Help Adding new Plant
October 04, 2014, 07:07:26 PM
Hi this is my first post here im quite a fan of this game.
Im new to moding for this game i did some mods for other games before.
I have a problem i cant seem to resolve everytime i start the mod i made i get this error.
Exception reading IronweedPlant.xml as XML: Multiple document
My source.
<?xml version="1.0" encoding="utf-8" ?>
<Plants>


<ThingDef Name="PlantBase" Abstract="True">
    <eType>Plant</eType>
    <category>Plant</category>
    <thingClass>Plant</thingClass>
    <altitudeLayer>LowPlant</altitudeLayer>
    <useStandardHealth>True</useStandardHealth>
    <statBases>
      <Flammability>1.0</Flammability>
    </statBases>
    <tickerType>Rare</tickerType>
    <selectable>False</selectable>
    <neverMultiSelect>True</neverMultiSelect>
    <drawerType>MapMeshOnly</drawerType>
    <shaderType>CutoutPlant</shaderType>
    <plant>
      <harvestDestroys>true</harvestDestroys>
      <harvestingSound>Harvest_Standard</harvestingSound>
      <harvestFinishSound>Harvest_Standard_Finish</harvestFinishSound>
      <sowWork>150</sowWork>
      <fertilityMin>0.5</fertilityMin>
      <fertilityFactorGrowthRate>1.0</fertilityFactorGrowthRate>
      <topWindExposure>0.1</topWindExposure>
      <growthPer20kTicks>0.48</growthPer20kTicks>
      <growMinGlow>Overlit</growMinGlow>
      <lifeSpan>200000</lifeSpan>
      <seedShootMinGrowthPercent>0.6</seedShootMinGrowthPercent>
      <visualSizeRange>
        <min>0.3</min>
        <max>1.00</max>
      </visualSizeRange>
    </plant>
  </ThingDef>
 
   </Plants>

<!--=========================== Crops ==============================-->


  <ThingDef ParentName="PlantBase">
    <defName>Iron Crystal</defName>
    <label>Iron Crystal</label>
    <statBases>
      <MaxHealth>85</MaxHealth>
      <Beauty>32</Beauty>
    </statBases>
    <description>A very Precious Lifeform only found here on this planet it crystallizes iron ions from the surroundings and forms harvest able iron crystals.</description>
    <graphicPathFolderRandom>Things/Plant/IronWeed</graphicPathFolderRandom>
    <selectable>true</selectable>
    <pathCost>10</pathCost>
    <plant>
      <shootsSeeds>false</shootsSeeds>
      <harvestTag>Standard</harvestTag>
      <harvestedThingDef>Metal</harvestedThingDef>
      <harvestDestroys>true</harvestDestroys>
      <harvestYieldRange>
        <min>2</min>
        <max>5.5</max>
      </harvestYieldRange>
      <sowableGround>true</sowableGround>
      <sowableHydroponic>true</sowableHydroponic>
      <topWindExposure>0.1</topWindExposure>
      <growthPer20kTicks>0.48</growthPer20kTicks>
      <lifeSpan>2000000</lifeSpan>
      <fertilityFactorGrowthRate>0.2</fertilityFactorGrowthRate>
      <visualSizeRange>
        <min>0.3</min>
        <max>1.05</max>
      </visualSizeRange>
    </plant>
  </ThingDef>


I tried to work around that problem by checking how other mods implement things so i figured out i probably need to move the </Plants> tag to the very end of the code, like so.
<?xml version="1.0" encoding="utf-8" ?>
<Plants>


<ThingDef Name="PlantBase" Abstract="True">
    <eType>Plant</eType>
    <category>Plant</category>
    <thingClass>Plant</thingClass>
    <altitudeLayer>LowPlant</altitudeLayer>
    <useStandardHealth>True</useStandardHealth>
    <statBases>
      <Flammability>1.0</Flammability>
    </statBases>
    <tickerType>Rare</tickerType>
    <selectable>False</selectable>
    <neverMultiSelect>True</neverMultiSelect>
    <drawerType>MapMeshOnly</drawerType>
    <shaderType>CutoutPlant</shaderType>
    <plant>
      <harvestDestroys>true</harvestDestroys>
      <harvestingSound>Harvest_Standard</harvestingSound>
      <harvestFinishSound>Harvest_Standard_Finish</harvestFinishSound>
      <sowWork>150</sowWork>
      <fertilityMin>0.5</fertilityMin>
      <fertilityFactorGrowthRate>1.0</fertilityFactorGrowthRate>
      <topWindExposure>0.1</topWindExposure>
      <growthPer20kTicks>0.48</growthPer20kTicks>
      <growMinGlow>Overlit</growMinGlow>
      <lifeSpan>200000</lifeSpan>
      <seedShootMinGrowthPercent>0.6</seedShootMinGrowthPercent>
      <visualSizeRange>
        <min>0.3</min>
        <max>1.00</max>
      </visualSizeRange>
    </plant>
  </ThingDef>
 


<!--=========================== Crops ==============================-->


  <ThingDef ParentName="PlantBase">
    <defName>Iron Crystal</defName>
    <label>Iron Crystal</label>
    <statBases>
      <MaxHealth>85</MaxHealth>
      <Beauty>32</Beauty>
    </statBases>
    <description>A very Precious Lifeform only found here on this planet it crystallizes iron ions from the surroundings and forms harvest able iron crystals.</description>
    <graphicPathFolderRandom>Things/Plant/IronWeed</graphicPathFolderRandom>
    <selectable>true</selectable>
    <pathCost>10</pathCost>
    <plant>
      <shootsSeeds>false</shootsSeeds>
      <harvestTag>Standard</harvestTag>
      <harvestedThingDef>Metal</harvestedThingDef>
      <harvestDestroys>true</harvestDestroys>
      <harvestYieldRange>
        <min>2</min>
        <max>5.5</max>
      </harvestYieldRange>
      <sowableGround>true</sowableGround>
      <sowableHydroponic>true</sowableHydroponic>
      <topWindExposure>0.1</topWindExposure>
      <growthPer20kTicks>0.48</growthPer20kTicks>
      <lifeSpan>2000000</lifeSpan>
      <fertilityFactorGrowthRate>0.2</fertilityFactorGrowthRate>
      <visualSizeRange>
        <min>0.3</min>
        <max>1.05</max>
      </visualSizeRange>
    </plant>
  </ThingDef>

</Plants>


But this gives me a black screen if the mod is loaded and if i load the mod while game is running menue disappears but cursor stays and i cant click anything only force close gets me out.