Editing Modding Tutorials/Smelter

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{BackToTutorials}}
+
<small>< [[Modding Tutorials]]</small>
 
 
 
 
== '''This tutorial is out of date, however there is still some useful information here.
 
''' ==
 
  
 
This tutorial introduces how to make an interactive building. Currently, only work benches can be fully modified using .xml. The Comms console and Nutrient paste dispenser have hard-coded elements. So here we will set out to make a building that follows the work bench pattern.
 
This tutorial introduces how to make an interactive building. Currently, only work benches can be fully modified using .xml. The Comms console and Nutrient paste dispenser have hard-coded elements. So here we will set out to make a building that follows the work bench pattern.
Line 28: Line 24:
 
<author>Your Name Here!</author>
 
<author>Your Name Here!</author>
 
<url>http://rimworldwiki.com/Modding_Tutorials/Smelter</url>
 
<url>http://rimworldwiki.com/Modding_Tutorials/Smelter</url>
<targetVersion>Alpha 6</targetVersion>
+
<targetVersion>Alpha 3</targetVersion>
 
<description>Tutorial mod for recipes and interactive buildings.</description>
 
<description>Tutorial mod for recipes and interactive buildings.</description>
 
</ModMetaData>
 
</ModMetaData>
Line 61: Line 57:
 
     <ThingClass>Building</ThingClass>
 
     <ThingClass>Building</ThingClass>
 
     <Description>A large, hot furnace used to produce metal from ore.</Description>
 
     <Description>A large, hot furnace used to produce metal from ore.</Description>
     <TexturePath>Things/Building/Production/TableStonecutter</TexturePath>
+
     <TexturePath>Things/Building/TableStonecutter</TexturePath>
 
     <CostList>
 
     <CostList>
 
       <li>
 
       <li>
Line 73: Line 69:
 
     <Size>(3,2)</Size>
 
     <Size>(3,2)</Size>
 
     <surfaceNeeded>Heavy</surfaceNeeded>
 
     <surfaceNeeded>Heavy</surfaceNeeded>
     <DesignationCategory>Production</DesignationCategory>
+
     <DesignationCategory>Building</DesignationCategory>
 
     <Passability>Impassable</Passability>
 
     <Passability>Impassable</Passability>
 
   </ThingDef>
 
   </ThingDef>
Line 88: Line 84:
 
</source>
 
</source>
  
The first tag, "hasInteractionSquare" tells the game that this building has an interaction square. It's phrased sort of like a question: "The Smelter has an interaction square?" and then answers the question "Yes, that's true." The second tag, "interactionSquareOffset" tells the game where that square is. The three values refer to the x, y, and z coordinates in the game. This is a bit confusing unless you are intimately aware of how the Unity engine works. Basically, since Unity is used for 3d games, x, y, and z are mandatory. But Rimworld is 2d so only the x and z coordinates matter. Wait, x and z?! Yes, because in Unity, the y coordinate refers to the vertical space. This value is always 0 because Rimworld is flat. It may be easier to just ignore all this and think of the value as "x, 0, y" instead. The offset is measured as distance from the origin of the object. The smelter is 3 units wide by 2 units tall. It's interaction square will be 2 units above its origin.
+
The first tag, "hasInteractionSquare" tells the game that this building has an interaction square. It's phrased sort of like a question: "The Smelter has an interaction square?" and then answers the question "Yes, that's true." The second tag, "interactionSquareOffset" tells the game where that square is. The three values refer to the x, y, and z coordinates in the game. This is a bit confusing unless you are are intimately aware of how the Unity engine works. Basically, since Unity is used for 3d games, x, y, and z are mandatory. But Rimworld is 2d so only the x and z coordinates matter. Wait, x and z?! Yes, because in Unity, the y coordinate refers to the vertical space. This value is always 0 because Rimworld is flat. It may be easier to just ignore all this and think of the value as "x, 0, y" instead. The offset is measured as distance from the origin of the object. The smelter is 3 units wide by 2 units tall. It's interaction square will be 2 units above its origin.
  
 
<source lang="xml">
 
<source lang="xml">
Line 112: Line 108:
 
<source lang="xml">
 
<source lang="xml">
 
  <inspectorTabs>
 
  <inspectorTabs>
   <li>ITab_Bills</li>
+
   <li>UI.ITab_Bills</li>
 
  </inspectorTabs>
 
  </inspectorTabs>
 
</source>
 
</source>
Line 218: Line 214:
 
<author>Your Name</author>
 
<author>Your Name</author>
 
<url>http://http://rimworldwiki.com/</url>
 
<url>http://http://rimworldwiki.com/</url>
<targetVersion>Alpha 6</targetVersion>
+
<targetVersion>Alpha 3</targetVersion>
 
<description>Tutorial mod for recipes and interactive buildings.</description>
 
<description>Tutorial mod for recipes and interactive buildings.</description>
 
</ModMetaData>
 
</ModMetaData>
Line 248: Line 244:
 
     <ThingClass>Building_WorkTable</ThingClass>
 
     <ThingClass>Building_WorkTable</ThingClass>
 
     <Description>A large, hot furnace used to produce metal from ore. The heat required consumes a great deal of electricity so it's best to turn it off when not in use.</Description>
 
     <Description>A large, hot furnace used to produce metal from ore. The heat required consumes a great deal of electricity so it's best to turn it off when not in use.</Description>
     <TexturePath>Things/Building/Production/TableStonecutter</TexturePath>
+
     <TexturePath>Things/Building/TableStonecutter</TexturePath>
 
     <CostList>
 
     <CostList>
 
       <li>
 
       <li>
Line 260: Line 256:
 
     <Size>(3,2)</Size>
 
     <Size>(3,2)</Size>
 
     <surfaceNeeded>Heavy</surfaceNeeded>
 
     <surfaceNeeded>Heavy</surfaceNeeded>
     <DesignationCategory>Production</DesignationCategory>
+
     <DesignationCategory>Building</DesignationCategory>
 
     <Passability>Impassable</Passability>
 
     <Passability>Impassable</Passability>
 
     <hasInteractionSquare>True</hasInteractionSquare>
 
     <hasInteractionSquare>True</hasInteractionSquare>
Line 331: Line 327:
 
* '''Add skill.''' Award experience points to your colonists for smelting and have their skill affect their performance by writing a SkillNeedDef.
 
* '''Add skill.''' Award experience points to your colonists for smelting and have their skill affect their performance by writing a SkillNeedDef.
 
* '''Add art.''' Make your own image to use in the game for the smelter. Add special effects to the colonists as they work. Add a shadow to the building.
 
* '''Add art.''' Make your own image to use in the game for the smelter. Add special effects to the colonists as they work. Add a shadow to the building.
 
[[Category:Modding tutorials]]
 

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page:

This page is a member of 1 hidden category: