Most likely a very common error

Started by KnucklyDuck, February 24, 2015, 04:12:15 AM

Previous topic - Next topic

KnucklyDuck

Following the tutorial listed on the wiki i received the errors in the screenshot that's attached.

My About.xml
Quote<?xml version="1.0" encoding="utf-8"?>
<ModMetaData>
  <name>Simple Block</name>
  <author>Your name here!</author>
  <url>about:blank</url>
  <targetVersion>Alpha 3</targetVersion>
  <description>A very simple block for a tutorial.</description>
</ModMetaData>

My Buildings_Structure_SimpleBlock.xml
Quote<?xml version="1.0" encoding="utf-8"?>
<Buildings>

   <ThingDef Name="BuildingBase" Abstract="True">
      <category>Building</category>
      <soundBulletHit>BulletImpactMetal</soundBulletHit>
      <selectable>true</selectable>
      <drawerType>MapMeshAndRealTime</drawerType>
      <surfaceNeeded>Light</surfaceNeeded>
      <constructionEffect>ConstructMetal</constructionEffect>
      <repairEffect>Repair</repairEffect>
   </ThingDef>

   <ThingDef ParentName="BuildingBase">
      <eType>BuildingComplex</eType>
      <thingClass>Building</thingClass>
      <altitudeLayer>BuildingTall</altitudeLayer>
      <passability>Impassable</passability>
      <castEdgeShadows>true</castEdgeShadows>
      <fillPercent>1</fillPercent>
      <placingDraggableDimensions>0</placingDraggableDimensions>
      <tickerType>Never</tickerType>
      <rotatable>true</rotatable>
      <neverMultiSelect>true</neverMultiSelect>
      <holdsRoof>false</holdsRoof>
      <Overdraw>false</Overdraw>
      <designationCategory>Structure</designationCategory>
      <staticSunShadowHeight>0.5</staticSunShadowHeight>
      <blockLight>true</blockLight>

      <defName>SimpleBlock</defName>
      <label>Simple block</label>
      <description>An ugly thing.</description>
      <texturePath>Things/Building/SimpleBlock_Atlas</texturePath>
      <uiIconPath>Things/Building/SimpleBlock_MenuIcon</uiIconPath>
      <maxHealth>50</maxHealth>
      <flammability>0.1</flammability>
      <workToBuild>100</workToBuild>
      <mineable>false</mineable>
      <size>(1,1)</size>
      <CostList>
         <li>
            <thingDef>Metal</thingDef>
            <ThingCount>7</ThingCount>
         </li>
      </CostList>
      <filthLeavings>
         <li>
            <thingDef>SlagRubble</thingDef>
            <count>2</count>
         </li>
      </filthLeavings>
      <designationHotKey>Z</designationHotKey>
   </ThingDef>

</Buildings>

I'm not new to programming, have a good bit of experience in Obj Oriented languages however I'm brand new to using XMLs.

Any help is appreciated, cheers.

[attachment deleted due to age]
Why do Java programmers have glasses?
.
.
Because they can't C#.

skullywag

The wiki is waaay out of date. Start by copying the core defs and changing the bits you want. Ignore the wiki For now, dl other mods and learn from them.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

aWtO2

#2
Here is problem... :D
<CostList>
         <li>
            <thingDef>Metal</thingDef>
            <ThingCount>7</ThingCount>
         </li>
      </CostList>

Thats right
<costList>
      <Steel>35</Steel>
    </costList>


And Problem whith the name of graphic file name... Set the same name of graphic in Def

skullywag

Theres way more issues than that. Some of those xml flags dont exist anymore and havent for a few alphas.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

aWtO2

Quote from: skullywag on February 24, 2015, 04:22:57 AM
Theres way more issues than that. Some of those xml flags dont exist anymore and havent for a few alphas.

Thats right i start on the wiki tutorial but on the end i copy the core Defs :P

KnucklyDuck

Okay I did that, and I think I placed the block, but this happened (see attachment) the bottom error had it's occurance number ROCKETING up.

[attachment deleted due to age]
Why do Java programmers have glasses?
.
.
Because they can't C#.

KnucklyDuck

Quote from: KnucklyDuck on February 24, 2015, 04:31:34 AM
Okay I did that, and I think I placed the block, but this happened (see attachment) the bottom error had it's occurance number ROCKETING up.

Also I forgot to attach the new code.
<?xml version="1.0" encoding="utf-8"?>
<Buildings>

<ThingDef Name="BuildingBase" Abstract="True">
<category>Building</category>
<selectable>true</selectable>
<drawerType>MapMeshAndRealTime</drawerType>
<repairEffect>Repair</repairEffect>
</ThingDef>

<ThingDef ParentName="BuildingBase">
<eType>BuildingComplex</eType>
<thingClass>Building</thingClass>
<altitudeLayer>BuildingTall</altitudeLayer>
<passability>Impassable</passability>
<castEdgeShadows>true</castEdgeShadows>
<fillPercent>1</fillPercent>
<placingDraggableDimensions>0</placingDraggableDimensions>
<tickerType>Never</tickerType>
<rotatable>true</rotatable>
<neverMultiSelect>true</neverMultiSelect>
<holdsRoof>false</holdsRoof>
<designationCategory>Structure</designationCategory>
<staticSunShadowHeight>0.5</staticSunShadowHeight>
<blockLight>true</blockLight>

<defName>SimpleBlock</defName>
<label>Simple block</label>
<description>An ugly thing.</description>
<uiIconPath>Things/Building/SimpleBlock_MenuIcon</uiIconPath>
<mineable>false</mineable>
<size>(1,1)</size>
<costList>
<Steel>35</Steel>
</costList>
<designationHotKey>Z</designationHotKey>
</ThingDef>

</Buildings>
Why do Java programmers have glasses?
.
.
Because they can't C#.

KnucklyDuck

This is what it looks like as soon as you click down with the block selected.

[attachment deleted due to age]
Why do Java programmers have glasses?
.
.
Because they can't C#.

skullywag

you havent put a ui image in the right place, but thats what the pink and black item in the menu is, the reason it broke is cuz you still havent copied a building def correctly, open core mod go to defs/thingdefs and open one of the building files, take the top building base and 1 of the ones below it (dont forget to close the file with the </buildings>. Change that. Also make sure youre copying it out to your own mod folders thingdefs folder.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

KnucklyDuck

Quote from: skullywag on February 24, 2015, 03:02:24 PM
you havent put a ui image in the right place, but thats what the pink and black item in the menu is, the reason it broke is cuz you still havent copied a building def correctly, open core mod go to defs/thingdefs and open one of the building files, take the top building base and 1 of the ones below it (dont forget to close the file with the </buildings>. Change that. Also make sure youre copying it out to your own mod folders thingdefs folder.

Thanks man, after I got this sorted I forgot to reply. Also would you be able to check your inbox I PMed you a question or two about an issue I'm having.
Why do Java programmers have glasses?
.
.
Because they can't C#.