Jump to content

How to make items scrappable?


Taien

Recommended Posts

I'm having a lot of trouble figuring out how to make the new items I've added be scrappable by the player.  The main goal of this is for these items to be able to be melted in the forge to a new material that I've created.  But for the life of me, I can't figure out how it is done.  I've seen in recipes.xml that there are lines near the top defining a scrap recipe for each basic material, for example iron:
 


<recipe name="resourceScrapIron" count="1" tooltip="ttScrapMetalIron" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe>

 

I've added my own metal in this fashion:
 

<recipe name="resourceMythrilPowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe>
<recipe name="resourceAdamantitePowder" count="1" tooltip="ttScrapMetalBrass" always_unlocked="true" tags="salvageScrap"> <wildcard_forge_category /> </recipe>

 

I've also added materials to represent the powder forms of each ore, or 1 unit in the forge:
 

        <material id="Mmythril">
            <property name="damage_category" value="metal"/>
            <property name="surface_category" value="metal"/>
            <property name="forge_category" value="mythril"/>
            <property name="Hardness" type="float" value="1"/>
            <property name="stepsound" value="metal"/>
            <property name="stability_glue" value="300"/>
            <property name="Mass" type="int" value="1"/>
            <property name="MaxDamage" value="300"/>
            <property name="Experience" value="6"/>
        </material>
        <material id="Madamantite">
            <property name="damage_category" value="metal"/>
            <property name="surface_category" value="metal"/>
            <property name="forge_category" value="adamantite"/>
            <property name="Hardness" type="float" value="1"/>
            <property name="stepsound" value="metal"/>
            <property name="stability_glue" value="300"/>
            <property name="Mass" type="int" value="1"/>
            <property name="MaxDamage" value="300"/>
            <property name="Experience" value="6"/>
        </material>

 

Here's the items.xml for the powders:
 

        <item name="resourceMythrilPowder">
            <property name="HoldType" value="45"/>
            <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
            <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
            <property name="CustomIcon" value="resourceCrushedSand"/>
            <property name="CustomIconTint" value="64FDBA"/>
            <property name="TintColor" value="100,253,186"/>
            <property name="Material" value="Mmythril"/> <property name="Weight" value="1"/> 
            <property name="Stacknumber" value="10000"/> 
            <property name="EconomicValue" value="200"/>
            <property name="EconomicBundleSize" value="1"/>
            <property name="Group" value="Resources"/>
            <property name="UnlockedBy" value="resourceMythrilSchematic"/>
        </item>
        <item name="resourceAdamantitePowder">
            <property name="HoldType" value="45"/>
            <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
            <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
            <property name="CustomIcon" value="resourceCrushedSand"/>
            <property name="CustomIconTint" value="9E70BB"/>
            <property name="TintColor" value="158,112,187"/>
            <property name="Material" value="Madamantite"/> <property name="Weight" value="1"/> 
            <property name="Stacknumber" value="10000"/> 
            <property name="EconomicValue" value="200"/>
            <property name="EconomicBundleSize" value="1"/>
            <property name="Group" value="Resources"/>
            <property name="UnlockedBy" value="resourceAdamantiteSchematic"/>
        </item>

 

I also added items for the units in the forge, just as they were made in the base game files for unit_iron, etc:

 

        <item name="unit_mythril">
            <property name="HoldType" value="45"/>
            <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
            <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
            <property name="CustomIcon" value="resourceCrushedSand"/>
            <property name="CustomIconTint" value="64FDBA"/>
            <property name="TintColor" value="100,253,186"/>
            <property name="Material" value="Mmythril"/>
            <property name="Stacknumber" value="30000"/>
            <property name="Weight" value="1"/>
            <property name="Group" value="Resources"/>
            <property name="ResourceUnit" value="true"/>
            <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time -->
            <property name="UserHidden" value="true"/>
            <property name="CraftingIngredientTime" value=".5"/>
            <property name="CreativeMode" value="None"/>
        </item>
        <item name="unit_adamantite">
            <property name="HoldType" value="45"/>
            <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
            <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
            <property name="CustomIcon" value="resourceCrushedSand"/>
            <property name="CustomIconTint" value="9E70BB"/>
            <property name="TintColor" value="158,112,187"/>
            <property name="Material" value="Madamantite"/>
            <property name="Stacknumber" value="30000"/>
            <property name="Weight" value="1"/>
            <property name="Group" value="Resources"/>
            <property name="ResourceUnit" value="true"/>
            <property name="MeltTimePerUnit" value=".25"/> <!-- forge smelting time -->
            <property name="UserHidden" value="true"/>
            <property name="CraftingIngredientTime" value=".5"/>
            <property name="CreativeMode" value="None"/>
        </item>

 

But no matter what I do, I cannot make items scrappable into Mythril Powder.  And I can't get the Mythril Powder to melt in the forge into the new forge material I added (unit_mythril).

Does anyone have a simple way to explain to me how to make an item scrappable and how to define what it scraps/melts into?  Or know of a tutorial that does so?  I have searched youtube and google...

 

Link to comment
Share on other sites

Ok turns out I do have it right and items which have a weight greater than 1 can be scrapped into mythril powder as intended (because of the game only giving you 3/4 of material back).  The game's just not allowing them to melt in the forge for some reason.  The forge has been altered to have mythril and adamantite as units as well, but for some reason I can't get the powder (or any mythril item) to melt in the forge.  They count down as if they would melt, but then nothing happens.  It's very confusing.  I've seen this working on other servers so I'm certain there's a way to do it.

Edited by Taien (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...