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

Messages - Alude

#1
Help / XML Autodoc for 1.2 and Royalty
November 12, 2020, 11:45:36 AM
Hello! I used a tool from one of the pinned threads to make autodocumentation. Enjoy!

1.2: https://mc-oofert.github.io/XML.html
Royalty:  https://mc-oofert.github.io/royalty.html

(May contain duplicates.)
#2
when i try to build my custom wall i get this error
Exception printing HiveWall39671 at (124, 0, 119): System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.Graphic_Appearances.MatSingleFor (Verse.Thing thing) [0x00007] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Graphic_Linked.LinkedDrawMatFrom (Verse.Thing parent, Verse.IntVec3 cell) [0x00039] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Graphic_Linked.Print (Verse.SectionLayer layer, Verse.Thing thing) [0x00008] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Graphic_LinkedCornerFiller.Print (Verse.SectionLayer layer, Verse.Thing thing) [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.Thing.Print (Verse.SectionLayer layer) [0x00006] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.ThingWithComps.Print (Verse.SectionLayer layer) [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
  at Verse.SectionLayer_ThingsGeneral.TakePrintFrom (Verse.Thing t) [0x00000] in <0ee2c524c4be441e9b7f8bfcb20aca6f>:0
Verse.Log:Error(String, Boolean)
Verse.SectionLayer_ThingsGeneral:TakePrintFrom(Thing)
Verse.SectionLayer_Things:Regenerate()
Verse.Section:RegenerateLayers(MapMeshFlag)
Verse.MapDrawer:TryUpdateSection(Section)
Verse.MapDrawer:MapMeshDrawerUpdate_First()
Verse.Map:MapUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

but the object is there but its invisible
my wall xml is
<ThingDef ParentName="BuildingBase" Name="HiveWallBase">
    <defName>HiveWall</defName>
    <label>Hivewall</label>
    <description>A hivewall made from biomaterials.Very weak.</description>
    <thingClass>Building</thingClass>
    <category>Building</category>
    <graphicData>
      <texPath>Things/Building/Linked/hivewallatlas</texPath>
      <graphicClass>Graphic_Appearances</graphicClass>
      <linkType>CornerFiller</linkType>
      <linkFlags>
        <li>Wall</li>
        <li>Rock</li>
      </linkFlags>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
        <edgeTop>Damage/Edge</edgeTop>
        <edgeBot>Damage/Edge</edgeBot>
        <edgeLeft>Damage/Edge</edgeLeft>
        <edgeRight>Damage/Edge</edgeRight>
      </damageData>
    </graphicData>
<costList>
      <Steel>1</Steel>
    </costList>
    <uiIconPath>hivewalluiicon</uiIconPath>
    <statBases>
      <MaxHitPoints>65</MaxHitPoints>
      <WorkToBuild>135</WorkToBuild>
      <Flammability>1.0</Flammability>
      <MeditationFocusStrength>0.22</MeditationFocusStrength>
    </statBases>
    <leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
    <altitudeLayer>Building</altitudeLayer>
    <passability>Impassable</passability>
    <blockWind>true</blockWind>
    <castEdgeShadows>true</castEdgeShadows>
    <fillPercent>1</fillPercent>
    <coversFloor>true</coversFloor>
    <placingDraggableDimensions>1</placingDraggableDimensions>
    <tickerType>Never</tickerType>
    <rotatable>false</rotatable>
    <selectable>true</selectable>
    <neverMultiSelect>true</neverMultiSelect>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded> <!-- Best affordance needed for stone -->
    <holdsRoof>true</holdsRoof>
    <designationCategory>Structure</designationCategory>
    <staticSunShadowHeight>1.0</staticSunShadowHeight>
    <blockLight>true</blockLight>
    <canOverlapZones>false</canOverlapZones>
    <fertility>0</fertility>
    <building>
      <isInert>true</isInert>
      <ai_chillDestination>false</ai_chillDestination>
      <blueprintGraphicData>
        <texPath>blueprintatlas</texPath>
      </blueprintGraphicData>
    </building>
    <comps>
      <li Class="CompProperties_MeditationFocus">
        <statDef>MeditationFocusStrength</statDef>
        <focusTypes>
          <li>Minimal</li>
        </focusTypes>
      </li>
    </comps>
    <damageMultipliers>
      <li>
        <damageDef>Bomb</damageDef>
        <multiplier>2</multiplier>
      </li>
    </damageMultipliers>
  </ThingDef>

how would i fix this?
#3
Help / ReflectionTypeLoadException
February 19, 2020, 11:36:23 AM
so i was trying to make a mod and got this error:
Fallback handler could not load library C:/Users/skyed/Desktop/Games/RimWorld x86/RimWorldWin_Data/Mono/data-108A4018.dll
Non platform assembly: data-108A5420 (this message is harmless)
Fallback handler could not load library C:/Users/skyed/Desktop/Games/RimWorld x86/RimWorldWin_Data/Mono/data-108A5420.dll
ReflectionTypeLoadException getting types in assembly System.ValueTuple: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
  at Verse.ModAssemblyHandler.AssemblyIsUsable (System.Reflection.Assembly asm) [0x00000] in <filename unknown>:0

Loader exceptions:
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
   => System.TypeLoadException: Could not load type 'System.Collections.IStructuralEquatable' from assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.

then also this:
Exception loading list from XML: System.InvalidCastException: Cannot cast from source type to destination type.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_object_castclass (object,intptr)
  at Verse.DirectXmlToObject.ObjectFromXml[CompProperties] (System.Xml.XmlNode xmlRoot, Boolean doPostLoad) [0x00000] in <filename unknown>:0
  at Verse.DirectXmlToObject.ListFromXml[CompProperties] (System.Xml.XmlNode listRootNode) [0x00000] in <filename unknown>:0
XML:
<comps><li Class="ExplosiveMining.CompMineMine"><ExplodeTicks>300</ExplodeTicks><ExplosionRadius>5</ExplosionRadius></li><li Class="CompProperties_Breakdownable" /></comps>
#4
so i was trying to do a mod and i think i somewhat did it
but there was this problem:
i tried to add a recipe for the surgery for a custom body part but when i start the game and try to find it its not there
any help on this?
RecipeDef:
<Defs>
  <RecipeDef Abstract="True" Name="teccopsurg">
    <effectWorking>Surgery</effectWorking>
    <soundWorking>Recipe_Surgery</soundWorking>
    <workSpeedStat>MedicalOperationSpeed</workSpeedStat>
    <workSkill>Medicine</workSkill>
    <workSkillLearnFactor>16</workSkillLearnFactor>
  </RecipeDef>
<RecipeDef ParentName="teccopsurg">
    <defName>installteccopleg</defName>
    <label>install a teccop leg</label>
    <description>Install a teccop leg.</description>
    <workerClass>Recipe_InstallArtificialBodyPart</workerClass>
    <jobString>Installing Teccop Leg.</jobString>
    <workAmount>3000</workAmount>
    <skillRequirements>
      <Medicine>7</Medicine>
    </skillRequirements>
    <ingredients>
      <li>
        <filter>
          <categories>
            <li>Medicine</li>
          </categories>
        </filter>
        <count>2</count>
      </li>
      <li>
        <filter>
          <thingDefs>
            <li>teccopleg</li>
          </thingDefs>
        </filter>
        <count>1</count>
      </li>
    </ingredients>
    <fixedIngredientFilter>
      <categories>
        <li>Medicine</li>
      </categories>
      <thingDefs>
        <li>teccopleg</li>
      </thingDefs>
    </fixedIngredientFilter>
    <appliedOnFixedBodyParts>
      <li>Leg</li>
    </appliedOnFixedBodyParts>
    <addsHediff>teccopleghediff</addsHediff>
  </RecipeDef>
</Defs>

Hediff Def:
<Defs>
  <HediffDef Name="addedbodypartmod1" Abstract="True">
    <hediffClass>Hediff_AddedPart</hediffClass>
<defaultLabelColor>(144,98,179)</defaultLabelColor>
    <isBad>false</isBad>
  </HediffDef>
  <HediffDef ParentName="addedbodypartmod1">
    <defName>teccopleghediff</defName>
    <label>teccop leg</label>
    <labelNoun>a teccop leg</labelNoun>
    <spawnThingOnRemoved>teccopleg</spawnThingOnRemoved>
    <addedPartProps>
      <solid>true</solid>
      <partEfficiency>2.1</partEfficiency>
    </addedPartProps>
  </HediffDef>
</Defs>

the def for the custom body part:
<Defs>
  <ThingDef Name="BodyPartTeccopBase" ParentName="BodyPartArchotechBase" Abstract="True">
    <graphicData>
      <texPath>Things/Item/Health/HealthItemTeccop</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>0.80</drawSize>
    </graphicData>
  </ThingDef>
  <ThingDef ParentName="BodyPartArchotechBase">
    <defName>teccopleg</defName>
    <label>teccop leg</label>
    <description>An artificial leg from the mysterious company Teccop.Its internal workings are a complete mystery,but who cares when you can run fast?</description>
    <techLevel>Archotech</techLevel>
    <thingSetMakerTags>
      <li>RewardSpecial</li>
    </thingSetMakerTags>
    <statBases>
      <MarketValue>4000</MarketValue>
      <Mass>9</Mass>
    </statBases>
  </ThingDef>
</Defs>
#5
Any help on this?
The xml file:
<Defs>
  <RecipeDef Abstract="True" Name="teccopsurg">
    <effectWorking>Surgery</effectWorking>
    <soundWorking>Recipe_Surgery</soundWorking>
    <workSpeedStat>MedicalOperationSpeed</workSpeedStat>
    <workSkill>Medicine</workSkill>
    <workSkillLearnFactor>16</workSkillLearnFactor>
  </RecipeDef>
<RecipeDef ParentName="teccopsurg">
    <defName>installteccopleg</defName>
    <label>install a teccop leg</label>
    <description>Install a teccop leg.</description>
    <workerClass>Recipe_InstallArtificialBodyPart</workerClass>
    <jobString>Installing Teccop Leg.</jobString>
    <workAmount>3000</workAmount>
    <skillRequirements>
      <Medicine>7</Medicine>
    </skillRequirements>
    <ingredients>
      <li>
        <filter>
          <categories>
            <li>Medicine</li>
          </categories>
        </filter>
        <count>2</count>
      </li>
      <li>
        <filter>
          <thingDefs>
            <li>teccopleg</li>
          </thingDefs>
        </filter>
        <count>1</count>
      </li>
    </ingredients>
    <fixedIngredientFilter>
      <categories>
        <li>Medicine</li>
      </categories>
      <thingDefs>
        <li>teccopleg</li>
      </thingDefs>
    </fixedIngredientFilter>
    <appliedOnFixedBodyParts>
      <li>Shoulder</li>
    </appliedOnFixedBodyParts>
    <addsHediff>teccopleg</addsHediff>
  </RecipeDef>
</Defs>
#6
Help / XML: unknown parse failure
December 27, 2019, 01:53:44 PM
So i was making a mod and so i uhhhh ran into a problem,this error:
C:\Users\skyed\Desktop\Games\RimWorld x86\Mods\expandedbatteries\Defs/Buildings_Powered.xml: unknown parse failure
my xml file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ThingDef ParentName="BuildingBase">
    <defName>BatteryArray</defName>
    <label>battery array</label>
    <description>A battery array,stores more than its lesser counterpart.Might explode when exposed to moisture.</description>
    <thingClass>Building_Battery</thingClass>
    <graphicData>
      <texPath>batteryarray1</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(2,3)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <blockWind>true</blockWind>
    <castEdgeShadows>true</castEdgeShadows>
    <fillPercent>0.40</fillPercent>
    <tickerType>Normal</tickerType>
    <minifiedDef>MinifiedThing</minifiedDef>
    <thingCategories>
      <li>BuildingsPower</li>
    </thingCategories>
    <statBases>
      <MaxHitPoints>200</MaxHitPoints>
      <WorkToBuild>900</WorkToBuild>
      <Mass>40</Mass>
      <Flammability>1.0</Flammability>
      <Beauty>-10</Beauty>
    </statBases>
    <size>(2,2)</size>
    <costList>
      <Steel>130</Steel>
      <ComponentIndustrial>2</ComponentIndustrial>
    </costList>
    <comps>
      <li Class="CompProperties_Battery">
        <storedEnergyMax>1200</storedEnergyMax>
        <efficiency>0.6</efficiency>
        <shortCircuitInRain>true</shortCircuitInRain>
        <transmitsPower>true</transmitsPower>
      </li>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <terrainAffordanceNeeded>Medium</terrainAffordanceNeeded>
    <designationCategory>Power</designationCategory>
    <staticSunShadowHeight>0.3</staticSunShadowHeight>
    <constructEffect>ConstructMetal</constructEffect>
    <designationHotKey>Misc4</designationHotKey>
    <canOverlapZones>false</canOverlapZones>
    <researchPrerequisites>
      <li>Batteries</li>
    </researchPrerequisites>
  </ThingDef>
  </Defs>

Any idea on how to fix this?