Jump to content

[mod request/help] Give wooden spike traps 5000hp to make them last longer before breaking


Recommended Posts

I'm new to modding and have been trying different things for the past few hours to no avail. Here's what I've attempted so far:


  <set xpath="materials/material[@name='MtrapSpikesWood']/property[@name='Hardness']/@value">5000</set>
  <set xpath="materials/material[@name='MtrapSpikesWood']/property[@name='MaxDamage']/@value">5000</set>



<material id="MtrapSpikesWood">
    <property name="damage_category" value="wood"/>
    <property name="surface_category" value="wood"/>
    <property name="forge_category" value="wood"/>
    <property name="Hardness" type="float" value="1"/>
    <property name="stepsound" value="wood"/>
    <property name="stability_glue" value="20"/>
    <property name="Mass" type="int" value="5"/>
    <property name="MaxDamage" value="5000"/>
    <property name="movement_factor" value="0.18"/>
    <property name="Experience" value="2"/>



<block name="trapSpikesWoodDmg0">
    <property name="Extends" value="trapSpikesWoodMaster"/>
    <property name="CustomIcon" value="trapSpikesWoodMaster"/>
    <property name="MaxDamage" value="5000"/>
    <property class="UpgradeBlock">
        <property name="ToBlock" value="trapSpikesIronDmg0"/>
        <property name="Item" value="resourceForgedIron"/>
        <property name="ItemCount" value="4"/>
        <property name="UpgradeHitCount" value="4"/>

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

All you need to do is modify the master block shape in the blocks.xml file


<block name="trapSpikesWoodMaster">
    <property name="CreativeMode" value="None"/>
    <property name="Class" value="TrunkTip"/>
    <property name="BlockTag" value="Spike"/>
    <property name="Damage" value="33"/>
    <property name="Damage_received" value="33"/>
    <property name="Material" value="MtrapSpikesWood"/>
    <property name="MaxDamage" value="33"/>


Change MaxDamage to whatever value you want.  I changed it to 500 quickly and started up my game.  Put one wood spike down and each stage of the spike trap as I broke it down had 500 hp.

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...