Electric Smelter - Increased production rate based on skill of worker

Started by dj bnw, April 10, 2015, 11:35:02 PM

Previous topic - Next topic

dj bnw

So I want to make a simple mod to make the smelter take in more chunks of slag for a slightly increased worktime needed , then produce a certain mount of steel , with a multiplier using the skill of the worker

I took a look at the recipe and it says it creates a special product called "Smelted" , instead of defining a fixed value of "steel" produced.

For now I have written a fixed value given to me from the recipe , but I would like to get the "value x skill multiplier thing"

I need help with:
1)Modifying the variable amount of steel produced
2)Automating the smelting

Can anyone help me? Thanks!

My xml below ,I would have put it in "code" tags but it looked too small plus it isn't that long.
Red is what I edited/added , the Teal is what I removed and what I am talking about.


<?xml version="1.0" encoding="utf-8" ?>
<RecipeDefs>

  <RecipeDef>
    <defName>ExtractMetalFromSlag</defName>
    <label>smelt metal from slag</label>
    <description>Use heat and strong electromagnets to separate useful metal from slag chunks.</description>
    <jobString>Smelting metal from slag.</jobString>
    <workAmount>2000</workAmount>
    <workSpeedStat>SmeltingSpeed</workSpeedStat>
    <effectWorking>Smelt</effectWorking>
    <soundWorking>Recipe_Smelt</soundWorking>
    <ingredients>
      <li>
        <filter>
          <thingDefs>
            <li>ChunkSlagSteel</li>
          </thingDefs>
        </filter>
        <count>5</count>
      </li>
    </ingredients>
    <products>
      <li>
        <thingDef>Steel</thingDef>
        <count>25</count>
      </li>
    </products>

     <specialProducts>
        <li>Smelted</li>
     </specialProducts>

    <fixedIngredientFilter>
      <thingDefs>
        <li>ChunkSlagSteel</li>
      </thingDefs>
    </fixedIngredientFilter>
  </RecipeDef>



</RecipeDefs>

skullywag

for xp from a recipe you need:

<workSkill>Crafting</workSkill>
    <workSkillLearnFactor>0.25</workSkillLearnFactor>

change values as appropriate.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

soltysek

Rewrite for me exacly whot you mean mayby i will help you , BTW "craftings" product amount are base on skill under 10 will lower base over 10 will rise base.