完成済
XMLの位置
7 Days To Die/Data/Config/recipes.xml
概要
items.xmlとblocks.xmlで定義した物のクラフト素材を定義します。
必要に応じて、レシピごとのクラフト時間や経験値、クラフト場所を定義することが可能です。
なお、IronやClothなどの材質ごとのスクラップが可能かどうかもここで定義します。
(例えば、Glass類はデフォルトではスクラップ化できませんが、ここで定義してやればスクラップできるようになります。)
<recipes>
<recipe name="stoneAxe" count="1" scrapable="False">
<ingredient name="rockSmall" count="2"/>
<ingredient name="yukkaFibers" count="2"/>
<ingredient name="wood" count="2"/>
</recipe>
</recipes>
注意
レシピを追加する際は必ず<recipes>~</recipes>の間の行に入っていることを確認していること、
最後に/(スラッシュ)を付けるのか付けないのかを確認しましょう。
recipes.xmlはエラーを返さなくても、間違った要素を含む場合、全てが動きません。
recipe属性
recipe行にはそのレシピで作成するアイテムについて次の属性が記述できます。
name 必須
「文字列」
クラフトで作成するアイテムを選択します。
ゲーム内表記ではなくitems.xml、blocks.xmlで定義したnameに従って表記しましょう。
完全一致なので、大文字・小文字・記号に注意しましょう。
記述例
name="stoneAxe"
count
「整数値」
そのレシピで作成した場合の作成数を設定します。
2以上にすることも可能ですが、現在のUIにはクラフト時作成数が表示されないため、親切な方法ではありません。
何も設定しない場合は1となります。
記述例
<recipe name="cloth" count="1">
<ingredient name="plantedCotton3Harvest" count="2"/>
</recipe>
<recipe name="cloth" count="2" craft_area="workbench">
<ingredient name="plantedCotton3Harvest" count="3"/>
</recipe>
scrapable
「論理値」
以前の名残。
書かなくても問題ありませんが、通例Falseにしておきます。
craft_area
「文字列」
そのレシピでクラフトできるWorkstationを指定します。
この属性を設定するためには、前もってblock.xmlで対応する"Workstation"の"CraftingAreaRecipes"に同じ名称を設定する必要があります。(完全一致)
未設定の場合、手元のクラフトとなります。
一つだけ例外として、値を"assembly"にするとpartsの組み立て画面でクラフトを行います。
この場合はrecipe行で必ずcount="1"にしてください。
記述例
<recipe name="sand" count="1" scrapable="False"
craft_area="cementMixer"><ingredient name="crushedSand" count="12"/>
</recipe>
<recipe name="gunPistol" count="1" craft_area="assembly">
<ingredient name="flashlight02" count="0"/>
<ingredient name="partsPistol_parts" count="1"/>
<ingredient name="partsPistol_barrel" count="1"/>
<ingredient name="partsPistol_receiver" count="1"/>
<ingredient name="partsPistol_grip" count="1"/>
</recipe>
この場合のingredient行のcount="0"は無くても完成品にできる、attachmentのpartsにのみ設定します。
craft_tool
「文字列」
そのレシピでクラフトする場合に必要になるToolsを選択します。
ゲーム内表記ではなくitems.xml、blocks.xmlで定義したnameに従って表記しましょう。(完全一致)
記述例
<recipe name="bottledWater" craft_area="campfire" craft_tool="cookingPot">
<ingredient name="bottledRiverWater" count="1"/>
</recipe>
material_based
「論理値」
そのレシピが、Workstationに溶かした素材を使ってクラフトするかどうかを指定します。
通常はcraft_area="forge"の時にTrueにします。
未設定の場合、Falseでインベントリのアイテムを消費します。
記述例
<recipe name="forgedIron" count="1" scrapable="False"
craft_area="forge" material_based="true"><ingredient name="unit_iron" count="10"/>
<ingredient name="unit_clay" count="5"/>
</recipe>
craft_exp_gain
「整数値」
そのレシピでクラフトした場合、一つ当たり完成品のCraftSkillに与えられる経験値を設定します。
この設定はCraftIngredientExpに優先します。
craft_time
「整数・小数値」
そのレシピでクラフトした場合、完成品一つ当たりにかかる時間を設定します。
この設定はCraftIngredientTimeに優先します。
Ingredient属性
ingredient行は<recipe>行~</recipe>行の間に記述し、クラフト素材と追加素材の以下の属性を指定します。
現在のUIではクラフト素材枠が5つ、assembly枠が6つの設定なのでそれ以上の数にすると表示されません。
name 必須
「文字列」
そのレシピでクラフトした場合のクラフト素材を選択します。
ゲーム内表記ではなくitems.xml、blocks.xmlで定義したnameに従って表記しましょう。
完全一致なので、大文字・小文字・記号に注意しましょう。
count
「整数値」
そのレシピで作成した場合の素材の必要数を設定します。
何も設定しない場合は1となります。
craft_areaがassemblyの場合、この値が0の部品は追加素材であることを明示できます。
記述例
<recipe name="gunPumpShotgun" count="1" scrapable="True"
craft_area="assembly"><ingredient name="flashlight02" count="0"/>
<ingredient name="partsPumpShotgun_barrel" count="1"/>
<ingredient name="partsPumpShotgun_receiver" count="1"/>
<ingredient name="partsPumpShotgun_parts" count="1"/>
<ingredient name="partsPumpShotgun_stock" count="1"/>
</recipe>
wildcard_forge_category 例外
ingredient行を書かずにこれ単体で行にした場合、完成品と同じforge_category(materials.xmlで指定)を持つアイテムすべてを、完成品にスクラップすることができます。
記述例
<recipe name="scrapIron" count="1" scrapable="False" tooltip="ttScrapMetalIron">
<wildcard_forge_category />
</recipe>