Non-random Craftable neurotrainer

Started by Aristocat, June 07, 2016, 02:06:19 PM

Previous topic - Next topic

Aristocat


   <RecipeDef>
      <defName>CreateNT</defName>
      <label>Craft NT</label>
      <description>Use heat and strong electromagnets to combine gold, steel and plasteel.</description>
      <jobString>Crafting NT.</jobString>
      <workAmount>15000</workAmount>
      <recipeUsers>
         <li>TableMachining</li>
      </recipeUsers>
      <workSpeedStat>SmeltingSpeed</workSpeedStat>
      <effectWorking>Smelt</effectWorking>
      <soundWorking>Recipe_Smelt</soundWorking>
      <ingredients>
         <li>
            <filter>
               <thingDefs>
                  <li>Gold</li>
               </thingDefs>
            </filter>
            <count>3</count>
         </li>
         <li>
            <filter>
               <thingDefs>
                  <li>Steel</li>
               </thingDefs>
            </filter>
            <count>25</count>
         </li>
         <li>
            <filter>
               <thingDefs>
                  <li>Plasteel</li>
               </thingDefs>
            </filter>
            <count>50</count>
         </li>
      </ingredients>
      <products>
        <Neurotrainer>1</Neurotrainer>
      </products>
      <fixedIngredientFilter>
         <thingDefs>
            <li>Gold</li>
            <li>Steel</li>
            <li>Plasteel</li>
         </thingDefs>
      </fixedIngredientFilter>
      <skillRequirements>
         <li>
            <skill>Crafting</skill>
            <minLevel>8</minLevel>
         </li>
      </skillRequirements>
      <workSkill>Crafting</workSkill>
      <researchPrerequisite>MultiAnalyzer</researchPrerequisite>
   </RecipeDef>


Completely random neurotrainers crafted with this code, what's defname of individual neurotrainer?

1000101

Since you obviously know where to find the defs and xml, why not look in the core ThingDefs?
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Aristocat

Quote from: 1000101 on June 07, 2016, 04:41:09 PM
Since you obviously know where to find the defs and xml, why not look in the core ThingDefs?


  <ThingDef ParentName="ResourceBase">
    <defName>Neurotrainer</defName>
    <thingClass>Neurotrainer</thingClass>
    <label>neurotrainer</label>
    <description>A one-use nanotech trainer device. The neurotrainer is inserted through the orbit of the eye and releases nanomachines into the subject's brain, quickly improving their skills in a specific area.</description>
    <graphicData>
      <texPath>Things/Item/Special/Neurotrainer</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <resourceReadoutPriority>Middle</resourceReadoutPriority>
    <stackLimit>1</stackLimit>
    <tradeNeverStack>true</tradeNeverStack>
    <useHitPoints>true</useHitPoints>
    <statBases>
      <MarketValue>2000</MarketValue>
      <MaxHitPoints>80</MaxHitPoints>
    </statBases>
    <thingCategories>
      <li>Items</li>
    </thingCategories>
    <drawGUIOverlay>false</drawGUIOverlay>
    <tradeTags>
      <li>Exotic</li>
    </tradeTags>
  </ThingDef>
 


Sorry I might be stupid, but I really can't find other than this.

1000101

That's the one.  ;)

They are randomly assigned a skill on creation in code.

    public override void PostMake()
    {
      base.PostMake();
      this.skill = DefDatabase<SkillDef>.GetRandom();
    }
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By