Jump to content

Custom tool preventing game startup?


Recommended Posts

I'm attempting to add a shovel which will dig a 5x5 section at a time. I used the stock shovels as a template, but something is wrong. Adding this prevents the server from starting.

<item id="1663" name="Ditch Digger">
<property name="CustomIcon" value="shovelIron"/>
<property name="CustomIconTint" value="173,0,0"/>
<property name="Degradation" value="500" param1="false"/>
<property name="DegradationBreaksAfter" value="false"/>
<property name="Stacknumber" value="1"/>
<property name="Meshfile" value="Items/Tools/shovel_steelPrefab"/>
<property name="Material" value="metal"/>
<property name="RepairTools" value="forgedSteel"/>
<property name="HoldType" value="18"/>
<property name="Weight" value="1"/>
<property class="Action0">
	<property name="Class" value="Melee"/>
	<property name="Delay" value="0.5"/>
	<property name="Range" value="5"/>
	<property name="Sphere" value="5.0"/>
	<property name="SupportHarvesting" value="true"/>
	<property name="ToolCategory.Butcher" value="0" />
</property>
<property class="Attributes">
	<property name="DegradationRate" value="0.0"/>
</property
</item>

I've checked my XML syntac and it appears good to me. Have I left something critical out?

Link to comment
Share on other sites

That got it in-game, but I must be doing something wrong. I am trying to clear a five-wide, five-long path of terrain. The current setup does absolutely no damage or anything. It just does the animation. I am sure I am not understanding something, but what is it?

<item id="1663" name="Ditch Digger">
<property name="CustomIcon" value="shovelIron"/>
<property name="CustomIconTint" value="173,0,0"/>
<property name="Degradation" value="500" param1="false"/>
<property name="DegradationBreaksAfter" value="false"/>
<property name="Stacknumber" value="1"/>
<property name="Meshfile" value="Items/Tools/shovel_steelPrefab"/>
<property name="Material" value="metal"/>
<property name="RepairTools" value="forgedSteel"/>
<property name="HoldType" value="18"/>
<property name="Weight" value="1"/>
<property class="Action0">
	<property name="Class" value="Melee"/>
	<property name="Delay" value="1.1"/>
	<property name="Range" value="3"/>
	<property name="Sphere" value="3.0"/>
	<property name="Block_range" value="4"/>
	<property name="Sound_start" value="swoosh"/>
	<property name="DamageEntity" value="500000" />
	<property name="DamageBlock" value="500000" />
</property>
<property class="Attributes">
	<property name="DegradationRate" value="0.0"/>
</property>
</item>

I have it set to do both entity and block damage. Is there a third type for terrain? Also, since I am experimenting with this I am currently using a sphere of three blocks.

Link to comment
Share on other sites

I am not the best with scripting, but it seems like you're missing a few properties. I pulled this from Iron Shovel:

 

 

 

	<property class="Action0"> <!-- AttackAction -->
	<property name="Class" value="Melee"/>
	<property name="Delay" value="1.1"/>
	<property name="Range" value="2"/>
	<property name="Sphere" value="0.2"/>
	<property name="Block_range" value="4"/>
	<property name="Sound_start" value="swoosh"/>
	<property name="Stamina_usage" value="4.8"/>
	<property name="DamageBonus.earth" value="2"/>
	<property name="DamageBonus.glass" value="0.5"/>
	<property name="DamageBonus.head" value="4"/>
	<property name="DamageBonus.wood" value="0.3"/>
	<property name="DamageBonus.stone" value="0.5"/>
	<property name="DamageBonus.metal" value="0.25"/>
	<property name="DamageBonus.organic" value="0.7"/>
	<property name="ToolCategory.harvestingTools" value="0.7" param1="1"/>
	<property name="ToolCategory.Butcher" value="0" param1="10"/>
	<property name="ActionExp" value="3"/>
</property>
<property class="Attributes">
	<property name="EntityDamage" value="4,12"/>
	<property name="BlockDamage" value="15,19.7"/>
	<property name="DegradationMax" value="60,600"/>
	<property name="DegradationRate" value="1,1"/>
</property>

 

Maybe add some of them? And it seems your damage block/entity are a bit high, could be out of range? Looks like you need the damage to earth and etc

Link to comment
Share on other sites

Alright, I figured out that the "Sphere" value apparently has nothing to do with a sphere. It seems to make the tool hit at an offset of some kind. In other words, though the shovel is in-game now, it does not and as far as I can tell, can not clear five-wide at once. I have removed it for now and should the sphere value every actually be a sphere, I will try again. Thanks for the help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...