[Solved] Help a modding newbe

Started by Dr. Z, July 09, 2014, 12:22:26 PM

Previous topic - Next topic

Dr. Z

So I'm working on my very first mod: A bill added to the Crematorium to burn Clothes.
Because I have no clue how to actually create a bill, I copied the Recipes_Cremation.xml from the core mod, put it into my mod and edited it. This it how it looks right now:

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

  <RecipeDef>
    <defName>CremateCloth</defName>
    <label>Verbrenne Kleidung</label>
    <description>Verbrenne ein Kleidungsstück um es loszuwerden</description>
    <jobString>Cremating.</jobString>
    <workAmount>100</workAmount>
    <workEffect>CremateCorpse</workEffect>
    <sustainerSoundDef>Recipe_CremateCorpse</sustainerSoundDef>
    <ingredients>
      <li>
        <filter>
          <categories>
            <li>Apparel</li>
          </categories>
        </filter>
        <count>1</count>
      </li>
    </ingredients>
   
  </RecipeDef>



</RecipeDefs>


So here are my problems:
1.: Right now the game doesen't recognice the bill because it doesen't know <defName>CremateCloth</defName>, so nothing changes. But if I change it to<defName>CremateCorpse</defName> it replaces the original bill, so how do I tell the game that there are now two different bills?

2.: Even if I replace the Bill, the ingrediens tab is empty. But I haven't thought about this jet, I'm still at step one.

I really know almost nothing about modding, just started 2 hours ago and I've done the Basic Wiki tutorial for adding a simple object (and failed because of a spelling mistake I couldn't track down), but the recipie page on the Wiki doesen't provide the information I need, so it would also be nice if someone would know a better and more extensive modding tutorial.
Prasie the Squirrel!

Evul

#1
Hi!
Use the CremateCloth you made above.
Then open:
\Mods\Core\Defs\ThingDefs\Buildings_Production.xml
Look at line: 512
    <recipes>
      <li>CremateCorpse</li>
    </recipes>


Here add your CremateCloth to the list.
    <recipes>
      <li>CremateCorpse</li>
      <li>CremateCloth</li>
    </recipes>


It should now have 2 bills :)

Psyckosama

Well, for one you have to edit Cremate Clothes into the Crematorium's file so it knows to perform it.

Seriously, I'd suggest grabbing another crafting mod and then reverse engineering it to see what you need and do not need.

Evul

Quote from: Psyckosama on July 09, 2014, 01:36:25 PMSeriously, I'd suggest grabbing another crafting mod and then reverse engineering it to see what you need and do not need.

+1

Dr. Z

Wow, thank you for your quick responses. I will grab another crafting mod, thats a good idea.
Prasie the Squirrel!