Announcement

Collapse
No announcement yet.

quick question on zomies\animals damage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    quick question on zomies\animals damage

    How\where do i change how much damage a zombie\animal does to a player\block? I am probably just missing it, but can't seem to find it. I know I will feel really stupid when I find out.

    thanks

    #2
    You'll find the entries you're looking for in items.xml, starting with <item name="meleeHandZombie01">.

    Comment


      #3
      Awesome. Thanks. Would not have looked there. I will look ar that later today.

      Comment


        #4
        Ok. ran into another snag. I don't know why I am getting an error on the items.xml.

        Error:
        2020-02-27T09:40:16 29.777 EXC Attribute 'material' missing on item 'meleeHandAnimalBabyBoar'
        Exception: Attribute 'material' missing on item 'meleeHandAnimalBabyBoar'
        at ItemClassesFromXml.parseItem (System.Xml.XmlElement _node) [0x003c1] in <abc1cae220c641248ccf17f83a8861d4>:0
        at ItemClassesFromXml+<CreateItems>d__1.MoveNext () [0x0014e] in <abc1cae220c641248ccf17f83a8861d4>:0
        at ThreadManager+<CoroutineWrapperWithExceptionCallba ck>d__40.MoveNext () [0x00044] in <abc1cae220c641248ccf17f83a8861d4>:0

        Items.xml file:
        <?xml version="1.0" encoding="UTF-8"?>

        <configs>
        <append xpath="/items">

        <!-- Baby Boar Damage -->
        <item name="meleeHandAnimalBabyBoar" extends="meleeHandAnimalWolf">
        <property name="DamageEntity" value="10"/>
        <property name="DamageBlock" value="12"/>
        </item>

        </append>
        </configs>

        All I want to do is change the damage done. I thought this would give me all of the properties of meleeHandAnimalWolf, but change those 2 properties to what I want.

        Again, any help appreciated.

        Comment


          #5
          Originally posted by mlburgoon View Post
          Ok. ran into another snag. I don't know why I am getting an error on the items.xml.

          Error:
          2020-02-27T09:40:16 29.777 EXC Attribute 'material' missing on item 'meleeHandAnimalBabyBoar'
          Exception: Attribute 'material' missing on item 'meleeHandAnimalBabyBoar'
          at ItemClassesFromXml.parseItem (System.Xml.XmlElement _node) [0x003c1] in <abc1cae220c641248ccf17f83a8861d4>:0
          at ItemClassesFromXml+<CreateItems>d__1.MoveNext () [0x0014e] in <abc1cae220c641248ccf17f83a8861d4>:0
          at ThreadManager+<CoroutineWrapperWithExceptionCallba ck>d__40.MoveNext () [0x00044] in <abc1cae220c641248ccf17f83a8861d4>:0

          Items.xml file:
          <?xml version="1.0" encoding="UTF-8"?>

          <configs>
          <append xpath="/items">

          <!-- Baby Boar Damage -->
          <item name="meleeHandAnimalBabyBoar" extends="meleeHandAnimalWolf">
          <property name="DamageEntity" value="10"/>
          <property name="DamageBlock" value="12"/>
          </item>

          </append>
          </configs>

          All I want to do is change the damage done. I thought this would give me all of the properties of meleeHandAnimalWolf, but change those 2 properties to what I want.

          Again, any help appreciated.
          I'm pretty sure you need to have the DamageEntity and DamageBlock under a action0 property. I think there was a minor syntax mistake with the extend function as well. This should work (theoretically):

          Code:
          <configs>
          <append xpath="/items">
          
          <!-- Baby Boar Damage -->
          <item name="meleeHandAnimalBabyBoar">
          <property name="Extends" value="meleeHandAnimalWolf"/>
          <property class="Action0">
          <property name="DamageEntity" value="10"/>
          <property name="DamageBlock" value="12"/>
          </property>
          </item>
          </append>
          </configs>

          Comment


            #6
            hmm... nope. getting a different error with your code.

            error is now:
            2020-02-27T10:12:24 20.378 ERR XML loader: Loading XML patch file 'items.xml' from mod 'IceBurg - Baby Animals' failed:
            2020-02-27T10:12:24 20.379 EXC The 'append' start tag on line 4 position 2 does not match the end tag of 'item'. Line 11, position 3.
            XmlException: The 'append' start tag on line 4 position 2 does not match the end tag of 'item'. Line 11, position 3.

            items.xml:
            <?xml version="1.0" encoding="UTF-8"?>

            <configs>
            <append xpath="/items">

            <item name="meleeHandAnimalBabyBoar" extends="meleeHandAnimalWolf"/>
            <property class="Action0">
            <property name="DamageEntity" value="10"/>
            <property name="DamageBlock" value="12"/>
            </property>
            </item>
            </append>
            </configs>

            Comment


              #7
              Originally posted by mlburgoon View Post
              hmm... nope. getting a different error with your code.

              error is now:
              2020-02-27T10:12:24 20.378 ERR XML loader: Loading XML patch file 'items.xml' from mod 'IceBurg - Baby Animals' failed:
              2020-02-27T10:12:24 20.379 EXC The 'append' start tag on line 4 position 2 does not match the end tag of 'item'. Line 11, position 3.
              XmlException: The 'append' start tag on line 4 position 2 does not match the end tag of 'item'. Line 11, position 3.

              items.xml:
              <?xml version="1.0" encoding="UTF-8"?>

              <configs>
              <append xpath="/items">

              <item name="meleeHandAnimalBabyBoar" extends="meleeHandAnimalWolf"/>
              <property class="Action0">
              <property name="DamageEntity" value="10"/>
              <property name="DamageBlock" value="12"/>
              </property>
              </item>
              </append>
              </configs>
              Forgot to remove the / at the end of the first line, I think. Try this:

              Code:
              <configs>
              <append xpath="/items">
              
              <item name="meleeHandAnimalBabyBoar" extends="meleeHandAnimalWolf">
              <property class="Action0">
              <property name="DamageEntity" value="10"/>
              <property name="DamageBlock" value="12"/>
              </property>
              </item>
              </append>
              </configs>

              Comment


                #8
                Ok. Got it working!

                with this code:
                <configs>
                <append xpath="/items">

                <!-- Baby Boar Damage -->
                <item name="meleeHandAnimalBabyBoar">
                <property name="Extends" value="meleeHandAnimalWolf">
                <property class="Action0">
                <property name="DamageEntity" value="10"/>
                <property name="DamageBlock" value="12"/>
                </property>
                </property>
                </item>
                </append>
                </configs>

                I had to add in an extra </property> tag to close out the 2 damage properties under the property class "action0"

                thanks for the help.

                Comment


                  #9
                  ok. So the game loads with no errors, but the baby boar does the same damage as the regular boar. What am I doing wrong? I am stumped I thought I could just extend the "meleeHand" that the regular boar uses and make the changes like I have below. But it does not work. damage to blocks and entity is the same for both boar and baby boar.

                  entityclasses.xml:
                  <configs>
                  <append xpath="/entity_classes">
                  <!-- Baby Boar -->
                  <entity_class name="animalBabyBoar" extends="animalBoar">
                  <property name="Mass" value="120"/>
                  <property name="SizeScale" value="0.6"/>
                  <property name="ExperienceGain" value="135"/>
                  <property name="DeadBodyHitPoints" value="130"/>
                  <property name="HandItem" value="meleeHandAnimalBabyBoar"/>
                  <property name="HasRagdoll" value="false"/>
                  <effect_group name="Base Effects">
                  <passive_effect name="HealthMax" operation="base_set" value="130"/>
                  <passive_effect name="HealthMax" operation="perc_add" value="0"/>
                  </effect_group>
                  <drop event="Harvest" name="foodRawMeat" count="0" tool_category="Butcher"/>
                  <drop event="Harvest" name="foodRawMeat" tag="butcherHarvest" count="15"/>
                  <drop event="Harvest" name="resourceLeather" tag="butcherHarvest" count="3"/>
                  <drop event="Harvest" name="resourceAnimalFat" tag="butcherHarvest" count="2"/>
                  <drop event="Harvest" name="resourceBone" tag="butcherHarvest" count="7"/>
                  <drop event="Harvest" name="resourceBone" tag="allToolsHarvest" count="3"/>
                  <drop event="Harvest" name="foodRawMeat" count="1" tag="WasteTreasuresCompleteHarvest"/>
                  <drop event="Harvest" name="resourceLeather" count="1" tag="WasteTreasuresCompleteHarvest"/>
                  <drop event="Harvest" name="resourceBone" count="1" tag="WasteTreasuresCompleteHarvest"/>
                  </entity_class>
                  </append>
                  </configs>


                  items.xml:
                  <configs>
                  <append xpath="/items">

                  <!-- Baby Boar Damage -->
                  <item name="meleeHandAnimalBabyBoar">
                  <property name="Extends" value="meleeHandAnimalWolf">
                  <property class="Action0">
                  <property name="DamageEntity" value="10"/>
                  <property name="DamageBlock" value="12"/>
                  </property>
                  </property>
                  </item>
                  </append>
                  </configs>

                  Any help appreciated.
                  Last edited by mlburgoon; 4 weeks ago.

                  Comment

                  Working...
                  X