emoose / MBINCompiler

Now maintained by monkeyman192: https://github.com/monkeyman192/MBINCompiler
Other
43 stars 69 forks source link

GcCreatureSpawnData #94

Open theFisher86 opened 8 years ago

theFisher86 commented 8 years ago

So there are no files in game that actually use the GcCreatureSpawnData Template but I noticed it was on here and that it is referenced in the /METADATA/SIMULATION/SOLARSYSTEM/BIOMES/DEAD/DEADOBJECTSDEAD.MBIN (or any other biome type for that matter).

We tried filling it in but MBINCompiler doesn't compile. Hoping that maybe emoose can get this working or shed some light as if we can add Creatures to those files we'll be able to specify which creatures show up in which Biome types and improve the game greatly.

Here's the code we added in the Creatures Property in DEADOBJECTSDEAD.mbin

    <Property name="Creatures">
      <Property value="GcCreatureSpawnData.xml">
        <Property name="Resource" value="GcResourceElement.xml">
            <Property name="Filename" value="MODELS/PLANETS/CREATURES/SMALLBIRD/BIRD.SCENE.MBIN" />
            <Property name="GenerationSeed" template="GcSeed.xml">
              <Property name="Seed" value="0" />
              <Property name="UseSeedValue" value="False" />
            </Property>
        </Property>
        <Property name="FemaleResource" value="GcResourceElement.xml">
            <Property name="Filename" value="MODELS/PLANETS/CREATURES/SMALLBIRD/BIRD.SCENE.MBIN" />
            <Property name="GenerationSeed" template="GcSeed.xml">
              <Property name="Seed" value="0" />
              <Property name="UseSeedValue" value="False" />
            </Property>
        </Property>
        <Property name="PlacementTileType" value="GcTerrainTileType.xml">
            <Property name="TileType" value="Base" />
        </Property>
        <Property name="SwapPrimaryForSecondaryColour" value="False" />
        <Property name="SwapPrimaryForRandomColour" value="False" />
        <Property name="PositioningMinScale" value="0.7" />
        <Property name="PositioningMaxScale" value="1.1" />
        <Property name="CreatureID" value="BIRD" />
        <Property name="CreatureType" value="GcCreatureTypes.xml">
            <Property name="CreatureType" value="None" />
        </Property>
        <Property name="CreatureRole" value="GcCreatureRoles.xml">
            <Property name="CreatureRole" value="Bird" />
        </Property>
        <Property name="CreatureMinGroupSize" value="2" />
        <Property name="CreatureMaxGroupSize" value="10" />
        <Property name="CreatureGroupsPerSquareKm" value="20" />
        <Property name="CreatureSpawnDistance" value="5" />
        <Property name="CreatureDespawnDistance" value="10" />
        <Property name="CreatureActiveInDayChance" value="1" />
        <Property name="CreatureActiveInNightChance" value="0" />
        <Property name="RoleDataIndex" value="1" />
      </Property>
    </Property>

And here's the error:


Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at MBINCompiler.Models.NMSTemplate.DeserializeEXml(EXmlBase xmlData) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Models\NMSTemplate.cs:line 852
   at MBINCompiler.Models.NMSTemplate.DeserializeEXml(EXmlBase xmlData) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Models\NMSTemplate.cs:line 873
   at MBINCompiler.Models.NMSTemplate.DeserializeEXml(EXmlBase xmlData) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Models\NMSTemplate.cs:line 873
   at MBINCompiler.Models.NMSTemplate.DeserializeEXmlValue(NMSTemplate template, Type fieldType, FieldInfo field, EXmlProperty xmlProperty, Type templateType, NMSAttribute settings) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Models\NMSTemplate.cs:line 795
   at MBINCompiler.Models.NMSTemplate.DeserializeEXml(EXmlBase xmlData) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Models\NMSTemplate.cs:line 879
   at MBINCompiler.Models.NMSTemplate.DeserializeEXml(EXmlBase xmlData) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Models\NMSTemplate.cs:line 873
   at MBINCompiler.EXmlFile.ReadTemplateFromXmlReader(XmlReader reader) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\EXmlFile.cs:line 52
   at MBINCompiler.EXmlFile.ReadTemplateFromStream(Stream input) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\EXmlFile.cs:line 43
   at MBINCompiler.EXmlFile.ReadTemplate(String filePath) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\EXmlFile.cs:line 19
   at MBINCompiler.Program.CompileFile(String input, String output) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Program.cs:line 60
   at MBINCompiler.Program.Main(String[] args) in S:\Game Mods\No Mans Sky\Tools\emoose\MBINCompiler\MBINCompiler\Program.cs:line 188

Any help would be greatly appreciated.