• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

I want to make a degradation of a repair only tool

Robeloto

Refugee
I want to make an item that degrades when repairing. Still I cannot figure out how to do that, and if it is possible. Seems like it only degrades when you have the class melee. I was testing out Irrigation Mod by Eihwaz. A farming mod. He have a watering can in the mod to hydrate the plants. But it doesn't degrade (run out of water. I tried making it degrade so you have to repair/fill it up with water again like this:

Code:
<item name="bucketWatering">
<property name="Tags" value="tool,attFortitude,perkLivingOffTheLand,canHaveCosmetic"/>
<property name="DisplayType" value="meleeRepairTool"/>
<property name="CustomIcon" value="wateringCan"/>
<property name="HoldType" value="50"/>
<property name="Meshfile" value="Items/Crafting/Metal/IronBucketWaterPrefab"/>
<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>
<property name="Material" value="Mmetal"/>
<property name="Weight" value="10"/>	
<property name="DegradationBreaksAfter" value="true"/>
<property name="RepairTools" value="resourceWaterKit"/>	
<property name="SoundJammed" value="ItemNeedsRepair"/>	
<property name="SoundDestroy" value="metaldestroy1"/>	
<property name="Stacknumber" value="1"/>
<property name="ShowQuality" value="true"/>	
	<property class="Action0">
	<property name="Class" value="Repair"/>
	<property name="Delay" value="1"/> 
	<property name="Repair_amount" value="100"/>
	<property name="Upgrade_hit_offset" value="-2"/>
	<property name="Upgrade_action_sound" value="bucketbail_water"/>
	<property name="Allowed_upgrade_items" value="bucketWatering"/>
</property>
<property name="Group" value="Tools/Traps"/>
<property name="PickupJournalEntry" value="farmingTip"/>
<property name="RepairExpMultiplier" value="5.5"/>	
<property name="EconomicValue" value="100"/>		
<effect_group name="bucketWatering" tiered="false">
	<passive_effect name="MaxRange" operation="base_set" value="2"/>
	<passive_effect name="DegradationMax" operation="base_set" value="100" />
	<passive_effect name="DegradationPerUse" operation="base_set" value="5" />
	<passive_effect name="ModSlots" operation="base_set" value="0"/>	
</effect_group>
</item>
The repairing works, but it doesn't degrade. Only on Class:Melee, but not on Class:Repair. Anyone who knows how to make it degrade on repair only?

Edit: Maybe a different approach could be made, just like with the filled water bucket, but for several uses and not only once and then it's empty.

Edit2: Could be made if you make several versions of the water can, like 20 versions, and the last one can't be used and you need to upgrade it with water to get it refilled to the first version of the water can. But I wish there were a simpler way.

Edit3: I solved it by editing blocks and make the watering can use a custom water refill item I made. Not how I wanted, but it works. Could also just make it so it use waterbottles, but that is a bit too expensive. So I made the recipe for 5 waterbottles = 20 custom water refill item to use.

 
Last edited by a moderator:
Back
Top