Inactive [MECH/ADMN] ModDamage - Change damage mechanics on the fly!

Discussion in 'Inactive/Unsupported Plugins' started by KoryuObihiro, May 20, 2011.

  1. Offline

    KoryuObihiro

    ModDamage
    We've moved to BukkitDev!
     
  2. Offline

    teknogeek1300

    Ah, sorry. Super n00b on my part.

    Duhhh me :p


    This is what my bukkit server says:

    Code:
    151 recipes
    16 achievements
    22:47:45 [INFO] Starting minecraft server version Beta 1.7.3
    22:47:45 [INFO] Loading properties
    22:47:45 [INFO] Starting Minecraft server on *:1989
    22:47:45 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-945-
    g73697a4-b1000jnks (MC: 1.7.3)
    22:47:45 [INFO] Preparing level "world"
    22:47:45 [INFO] Preparing start region for level 0 (Seed: -9052401006613067924)
    22:47:46 [INFO] [ModDamage] 0.9.4.3 enabled [Permissions not found]
    22:47:46 [INFO] [ModDamage] Debugging active.
    22:47:46 [INFO] -Offensive:worlds:world:melee:fist[9999]
    22:47:46 [INFO] -Offensive:server:melee:fist[9999]
    22:47:46 [INFO] -Defensive:server:animal:Sheep[set.1]
    22:47:46 [INFO] Server permissions file permissions.yml is empty, ignoring it
    22:47:46 [INFO] Done (0.069s)! For help, type "help" or "?"
    >
    This should give me a one hit kill with a punch, I would think? (this is with a 1000 server)
     
  3. Offline

    Ranzear

    An RC would be nice just to get my core code working, then I can worry about Critical Hit notifications and "Oh shit that's a long drop" notifications :D

    Particularly with your wiki being written for x.x.5 and stackable armor effects on the table...

    The break between 1000 and 1060 for a lot of plugins (mcmmo, likely yours too) is:

    #1035 (Jul 28, 2011 6:38:18 AM)

    1. Retiring EntityDamageByProjectileEvent in favor of EntityDamageEvent. (commit: 65a55bae3ef5ab325ecad5439a0f974c087c1c02) — sunkid / githubweb
     
    KoryuObihiro likes this.
  4. Offline

    KoryuObihiro

    LOL, I know. I've been aware since sunkid made the request weeks ago. It's already been fixed in 0.9.5, and the patch will be pretty easy to apply to 0.9.4.x.
     
  5. Offline

    XXXtheGreat

    Hm. MobDisguise is replaced by ModDamage completely. Aliasing it didn't work, because it considers both /md's to be the same command. So, /md and /moddamage both do ModDamage. I can haz help?
     
  6. Offline

    KoryuObihiro

    Suggestion that desmin88 and I have worked out: map /mda to ModDamage, map /mdi to MobDisguise, or something similar.
     
  7. Offline

    Ranzear

    Jumping to 1060 today, mcmmo updated for the xp bars and everything. How does it look to have a RC out soon?

    My defensive tree stopped working with 0.9.3, though that could be because it was skeletons shooting me.
     
  8. Offline

    KoryuObihiro

    Trying my darndest to get everything tested. Not sure on the timeframe at this point, but I'm shooting to get 0.9.5 itself done by Saturday. Been doing tons of coding today. :p

    I'm sincerely sorry for anybody still using 0.9.3. ;)

    EDIT: **whew** Lots of testing and docs done today. Wasn't much to do at work...so plenty has been finished! I'd like to remind the public that any individual routine entries should be ignored unless you're a tester at this point - the syntax certainly doesn't apply to 0.9.4.x, and your time will be worse off for trying.

    EDIT 2: As of right now, just finished ArmorSet comparisons, which are now working like a charm so far as I can test. So close!

    EDIT 3: Completed Conditionals integration and documentation. :D Going to complete Switches soon.
     
  9. Offline

    KoryuObihiro

    Alriiiiiiiiiight. MD 0.9.5 RC2 is ready and compatible with CB 1060, after 60 wiki pages, 4 gists' worth of work, and a month of development! So. It's time to put in as much testing as you and I can before the weekend, and a new release of ModDamage!

    To be fair to those who are still using 0.9.4.x, I am leaving the tutorial and config reference as it is in the wiki for now - the new wiki content (which has yet to be completely finished, but should be functional) has been merged in to a single Gist located here. Don't be afraid to add comments or make modifications to it! I welcome any and all contribution to MD documentation, since it's the only thing left to do now.

    Alright. I officially loathe the popup editor. Just had to reformat the entire thread so it wouldn't do crazy stuff. ;_;

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  10. Offline

    teknogeek1300

    Which one would you recommend for 1000? The beta, or reg?
     
  11. Offline

    KoryuObihiro

    0.9.5 RC2 does NOT work for 1000 because projectile-damage events changed for build 1035, as @Ranzear was kind enough to point out - thus, the events interpretation algorithm for 1060 will not work with previous RBs. :\ If you want to update to 1060, though, I'd deeeefinitely go with RC2.
     
  12. Offline

    teknogeek1300

    Ok, I used the non beta and console returned this:

    Code:
    14:42:03 [SEVERE] Could not pass event ENTITY_DAMAGE to ModDamage
    java.lang.NullPointerException
            at com.KoryuObihiro.bukkit.ModDamage.Backend.DamageEventInfo.<init>(Dama
    geEventInfo.java:95)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamage.handleDamageEvent(ModDama
    ge.java:323)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDam
    age(ModDamageEntityListener.java:14)
            at org.bukkit.plugin.java.JavaPluginLoader$58.execute(JavaPluginLoader.j
    ava:649)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:332)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:550)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:858)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    >
    This was the start up report:
    Code:
    14:41:32 [INFO] [ModDamage] Debugging active.
    14:41:32 [INFO] -Offensive:server:melee:sword[999]
    Using 1000
     
  13. Offline

    KoryuObihiro

    ...you're SURE that it's 1000 running? Gimme the whole console blob plzthx.
     
  14. Offline

    teknogeek1300

    Code:
    151 recipes
    16 achievements
    15:03:02 [INFO] Starting minecraft server version Beta 1.7.3
    15:03:02 [INFO] Loading properties
    15:03:02 [INFO] Starting Minecraft server on *:1989
    15:03:02 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-945-
    g73697a4-b1000jnks (MC: 1.7.3)
    15:03:02 [INFO] Preparing level "0031keegonket"
    15:03:02 [INFO] Preparing start region for level 0 (Seed: 517468033)
    15:03:03 [INFO] [ModDamage] 0.9.4.3 enabled [Permissions not found]
    15:03:03 [INFO] [ModDamage] Debugging active.
    15:03:03 [INFO] -Offensive:server:melee:sword[999]
    15:03:03 [INFO] Server permissions file permissions.yml is empty, ignoring it
    15:03:03 [INFO] Done (0.073s)! For help, type "help" or "?"
    15:03:10 [INFO] teknogeek1300 [/192.168.6.6:49651] logged in with entity id 54 a
    t ([0031keegonket] -111.38207792702515, 71.0, 173.06026311613806)
    15:03:22 [SEVERE] Could not pass event ENTITY_DAMAGE to ModDamage
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
            at com.KoryuObihiro.bukkit.ModDamage.Backend.DamageEventInfo.<init>(Dama
    geEventInfo.java:94)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamage.handleDamageEvent(ModDama
    ge.java:323)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDam
    age(ModDamageEntityListener.java:14)
            at org.bukkit.plugin.java.JavaPluginLoader$58.execute(JavaPluginLoader.j
    ava:649)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:332)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:550)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:858)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.permissions.PermissionHa
    ndler
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:36)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:24)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 15 more
    15:03:24 [SEVERE] Could not pass event ENTITY_DAMAGE to ModDamage
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
            at com.KoryuObihiro.bukkit.ModDamage.Backend.DamageEventInfo.<init>(Dama
    geEventInfo.java:94)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamage.handleDamageEvent(ModDama
    ge.java:323)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDam
    age(ModDamageEntityListener.java:14)
            at org.bukkit.plugin.java.JavaPluginLoader$58.execute(JavaPluginLoader.j
    ava:649)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:332)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:550)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:858)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    >
    I struck a cow with the sword twice^
     
  15. Offline

    KoryuObihiro

    Oh. Crap. I'm not checking whether you've got Perms loaded, which you apparently don't. D:
     
  16. Offline

    teknogeek1300

    I did a fresh install just to make sure. I'm currently patching together other damage mods to compensate :(
     
  17. Offline

    KoryuObihiro

    Hmm...I wonder if this is fixed in 0.9.5...If not, I'll make absolute sure it is.
     
  18. Offline

    Ranzear

    1060/0.9.5

    Could be my config. Haven't touched it since grabbing RC2:

    Code:
    16:25:17 [SEVERE] Could not pass event ENTITY_DAMAGE to ModDamage
    java.lang.NullPointerException
            at com.KoryuObihiro.bukkit.ModDamage.Backend.AttackerEventInfo.<init>(At
    tackerEventInfo.java:38)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDam
    age(ModDamageEntityListener.java:42)
            at org.bukkit.plugin.java.JavaPluginLoader$59.execute(JavaPluginLoader.j
    ava:656)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:555)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:883)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :436)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    >
    Happens on every hit and ModDamage is having no effect (hitting things with items is supposed to do zero damage, etc).

    Code:
    16:31:45 [INFO] [ModDamage] 0.9.5 RC2 enabled [Permissions v2.7.7 active]
    16:31:45 [INFO] [ModDamage] Debugging active.
    16:31:45 [INFO] [ModDamage] No configuration loaded.
    Huh that could be why...
     
  19. Offline

    KoryuObihiro

    When an EventInfo class fails to initialize, MD's not gonna even touch it.

    That said, Why...**thinks** The code on the line mentioned is Perms related. What's your Perms setup?

    EDIT: Well, never really tested with 2.7 after I switched to 3.0+...this is good to know. :p

    **whew** Alright! I finished the syntax reference for the entire wiki for the routines thus far - added the links at the bottom for "See Also". I think that's enough work on MD for today.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  20. Offline

    Ranzear

    SuperPermsBridge is simulating perms 2.7, could probably blame them...

    After blowing through my whole config to get it into the new format:
    Code:
    2011-08-18 19:50:31 [SEVERE] Could not pass event ENTITY_DAMAGE to ModDamage
    java.lang.NullPointerException
        at com.KoryuObihiro.bukkit.ModDamage.Backend.TargetEventInfo.<init>(TargetEventInfo.java:52)
        at com.KoryuObihiro.bukkit.ModDamage.Backend.AttackerEventInfo.<init>(AttackerEventInfo.java:26)
        at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDamage(ModDamageEntityListener.java:36)
        at org.bukkit.plugin.java.JavaPluginLoader$59.execute(JavaPluginLoader.java:656)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.EntityLiving.a(EntityLiving.java:486)
        at net.minecraft.server.EntityHuman.a(EntityHuman.java:871)
        at net.minecraft.server.Entity.a(Entity.java:635)
        at net.minecraft.server.EntityPlayer.b(EntityPlayer.java:360)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:363)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:528)
        at net.minecraft.server.Packet10Flying.a(SourceFile:126)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:436)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    And ModDamage is non-functional. No errors in config.
     
  21. Offline

    KoryuObihiro

    Well, I'm not entirely certain the call for Perms 2.x is valid anyway. Hmm...PermsBridge-type plugins are always ew.

    Start from the top: gimme the entire console startup blob.

    EDIT: I can't find the plugin. Got a link?
     
  22. Offline

    Ranzear

    I think I've worked it out actually. SuperPermsBridge is supposed to be 3.0 style permissions but tells other plugins it's 2.7.7

    Hahaha, yup... exactly the problem!
     
  23. Offline

    KoryuObihiro

    That's...retarded. Need link. Must bug dev. Nao.
     
  24. Offline

    Ranzear

    Already done:

    http://forums.bukkit.org/threads/ad...-groups-plugin-1000.26785/page-31#post-592544

    Told you I'd drop my config here as soon as I had it all working. This should give a nice starting point but hasn't been fully tested for difficulty or balance (Zombies need more HP, etc).

    At the very least it demonstrates the methods I've found to get the behavior I want (Such as 'if a player takes damage, but it is reduced to zero or less, hit them for 1 damage anyway').

    Code:
    Aliases:
        Item:
            pickaxe:
            - WOOD_PICKAXE
            - STONE_PICKAXE
            - IRON_PICKAXE
            - GOLD_PICKAXE
            - DIAMOND_PICKAXE
            spade:
            - WOOD_SPADE
            - STONE_SPADE
            - IRON_SPADE
            - GOLD_SPADE
            - DIAMOND_SPADE
            hoe:
            - WOOD_HOE
            - STONE_HOE
            - IRON_HOE
            - GOLD_HOE
            - DIAMOND_HOE
            axe:
            - WOOD_AXE
            - STONE_AXE
            - IRON_AXE
            - GOLD_AXE
            - DIAMOND_AXE
            sword:
            - WOOD_SWORD
            - STONE_SWORD
            - IRON_SWORD
            - GOLD_SWORD
            - DIAMOND_SWORD
            other:
            - '!AIR'
    Damage:
        - 'switch.attacker.type':
            mob:
                - 'if Attacker.Y.lessthan.42':
                    - '2'
                - 'if target.wearing.GOLD_CHESTPLATE':
                    - 'if binom.60':
                        - 'attackereffect.setfireticks':
                            - '60'
                - 'if target.wearing.IRON_CHESTPLATE':
                    - '-2'
                - 'if target.wearing.LEATHER_CHESTPLATE':
                    - 'if binom.20':
                        - 'set.0'
                - 'if target.wearing.DIAMOND_CHESTPLATE':
                    - 'attackereffect.Hurt': '3'
            NPC:
                - 'if Attacker.Y.lessthan.42':
                    - '2'
                - 'if target.wearing.GOLD_CHESTPLATE':
                    - 'if binom.60':
                        - 'attackereffect.setfireticks':
                            - '60'
                - 'if target.wearing.IRON_CHESTPLATE':
                    - '-2'
                - 'if target.wearing.LEATHER_CHESTPLATE':
                    - 'if binom.20':
                        - 'set.0'
                - 'if target.wearing.DIAMOND_CHESTPLATE':
                    - 'attackereffect.Hurt': '3'
            Player:
                - '-5'
                - 'if attacker.wielding.AIR':
                    - '4'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman':
                        - '-3'
                        - 'roll.2'
                    - 'if target.type.Zombie':
                        - '-2'
                        - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '1'
                        - 'roll.2'
                - 'if attacker.wielding._sword':
                    - '4'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman':
                        - '3'
                        - 'roll.2'
                    - 'if target.type.Zombie':
                        - '3'
                        - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '-6'
                        - 'roll.2'
                - 'if attacker.wielding._axe':
                    - '3'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman':
                        - '-5'
                        - 'roll.2'
                    - 'if target.type.Zombie':
                        - '-4'
                        - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '3'
                        - 'roll.2'
                - 'if attacker.wielding.BOW':
                    - '-2'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman':
                        - '-1'
                        - 'roll.2'
                    - 'if target.type.Zombie':
                        - '-1'
                        - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '-4'
                        - 'roll.2'
                - 'if Target.Y.lessthan.42':
                    - '-2'
                - 'if target.wearing.GOLD_CHESTPLATE':
                    - 'if binom.60':
                        - 'attackereffect.setfireticks':
                            - '60'
                - 'if target.wearing.IRON_CHESTPLATE':
                    - '-2'
                - 'if target.wearing.LEATHER_CHESTPLATE':
                    - 'if binom.20':
                        - 'set.0'
                - 'if target.wearing.DIAMOND_CHESTPLATE':
                    - 'attackereffect.Hurt': '3'
                - 'if attacker.wielding._pickaxe':
                    - '3'
                    - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '-2'
                        - 'roll.2'
                - 'if attacker.wielding._spade':
                    - '2'
                - 'if attacker.wielding._hoe':
                    - '1'
                - 'if attacker.wielding.DIAMOND_AXE':
                    - 'if binom.40':
                        - 'roll.12'
                - 'if attacker.wielding.GOLD_AXE':
                    - 'if binom.50':
                        - 'targeteffect.explode': '1'
                - 'if attacker.wielding.DIAMOND_SWORD':
                    - 'if binom.30':
                        - 'roll.8'
                - 'if attacker.wielding.GOLD_SWORD':
                    - 'if binom.75':
                        - 'targeteffect.setfireticks':
                            - '60'
            animal:
                - 'if Attacker.Y.lessthan.40':
                    - '2'
                - 'if target.wearing.GOLD_CHESTPLATE':
                    - 'if binom.60':
                        - 'attackereffect.setfireticks':
                            - '60'
                - 'if target.wearing.IRON_CHESTPLATE':
                    - '-2'
                - 'if target.wearing.LEATHER_CHESTPLATE':
                    - 'if binom.20':
                        - 'set.0'
                - 'if target.wearing.DIAMOND_CHESTPLATE':
                    - 'attackereffect.Hurt': '3'
            lightning:
                - '-2'
                - 'roll.6'
            lava:
                - '2'
                - 'if target.wearing.DIAMOND_BOOTS':
                    - '-4'
                - 'if target.wearing.GOLD_BOOTS':
                    - '-6'
                - 'if target.wearing.IRON_BOOTS':
                    - '-2'
                - 'if target.wearing.LEATHER_BOOTS':
                    - '-1'
            explosion:
                - 'if target.wearing.DIAMOND_HELMET':
                    - 'div.2'
                    - '-3'
                - 'if target.wearing.GOLD_HELMET':
                    - 'div.2'
                    - '-4'
                - 'if target.wearing.IRON_HELMET':
                    - 'div.2'
                    - '-2'
                - 'if target.wearing.LEATHER_HELMET':
                    - 'div.2'
            fall:
                - 'if target.wearing.DIAMOND_BOOTS':
                    - '-2'
                - 'if target.wearing.GOLD_BOOTS':
                    - '-6'
                - 'if target.wearing.IRON_BOOTS':
                    - '-1'
                - 'if target.wearing.LEATHER_BOOTS':
                    - '-3'
            void:
                - 'set.20'
            burn:
                - 'if target.wearing.DIAMOND_LEGGINGS':
                    - '-3'
                - 'if target.wearing.GOLD_LEGGINGS':
                    - '-5'
                - 'if target.wearing.IRON_LEGGINGS':
                    - '-2'
                - 'if target.wearing.LEATHER_LEGGINGS':
                    - '-1'
                - '2'
            fire:
                - 'if target.wearing.DIAMOND_BOOTS':
                    - '-4'
                - 'if target.wearing.GOLD_BOOTS':
                    - '-6'
                - 'if target.wearing.IRON_BOOTS':
                    - '-2'
                - 'if target.wearing.LEATHER_BOOTS':
                    - '-1'
                - '2'
            drowning:
                - '3'
                - 'targeteffect.addairticks': '40'
            cactus:
                - '-2'
                - 'roll.3'
            ZombiePigman:
                - '2'
                - 'roll.6'
                - 'if event.environment.NETHER': '2'
            Creeper_Normal:
                - 'if target.wearing.DIAMOND_HELMET':
                    - 'div.2'
                    - '-3'
                - 'if target.wearing.GOLD_HELMET':
                    - 'div.2'
                    - '-4'
                - 'if target.wearing.IRON_HELMET':
                    - 'div.2'
                    - '-2'
                - 'if target.wearing.LEATHER_HELMET':
                    - 'div.2'
            Creeper_Charged:
                - 'targeteffect.explode': '2'
                - 'if target.wearing.DIAMOND_HELMET':
                    - 'div.2'
                    - '-3'
                - 'if target.wearing.GOLD_HELMET':
                    - 'div.2'
                    - '-4'
                - 'if target.wearing.IRON_HELMET':
                    - 'div.2'
                    - '-2'
                - 'if target.wearing.LEATHER_HELMET':
                    - 'div.2'
            Spider:
                - '-3'
                - 'roll.5'
            Giant:
                - 'roll.4'
            Zombie:
                - '2'
                - 'roll.2'
            Slime:
                - 'roll.8'
                - 'if event.value.greaterthan.7':
                    - 'attackereffect.setsize': '8'
                - '-4'
            Skeleton:
                - '-1'
                - 'roll.4'
            Ghast:
                - '2'
            Wolf_Wild:
                - '-2'
                - 'roll.4'
                - 'if event.environment.NETHER':
                    - 'targeteffect.setfireticks':
                        - '40'
            Wolf_Tame:
                - '-2'
                - 'roll.4'
        - 'if target.type.Spider':
            'if attacker.wielding.AIR':
                - 'attackereffect.Hurt': '1'
        - 'if target.type.Player':
            - 'if event.value.lessthanequals.0':
                - 'set.1'
                - 'if attacker.type.player':
                    - 'set.0'
        # mob:
        # armor:
        # ranged:
        # humans:
        # melee:
        # animal:
        # Creeper:
        # Spider:
        # Giant:
        # Slime:
        # Ghast:
        # snowball:
        # bow:
        # egg:
        # fireball:
        # other:
        # pickaxe:
        # AIR:
        # spade:
        # hoe:
        # axe:
        # sword:
    # animal:
        # Chicken:
        # Sheep:
        # Pig:
        # Squid:
        # Wolf:
        # Cow:
    Death:
    Food:
    debugging: normal
    Spawn:
        - 'switch.target.type':
            # Creeper:
            # Chicken:
            # Sheep:
            # Giant:
            # Slime:
            ZombiePigman:
                - 'range.32.36'
            Spider:
                - 'range.10.14'
            # Pig:
            # Squid:
            Wolf:
                - 'range.10.14'
            Zombie:
                - 'range.28.32'
            Cow:
                - '2'
            # Ghast:
            Skeleton:
                - 'range.7.9'
    
    Other neatness to note: Holding any item disables hitting things for damage. This is to encourage people leveling and making use of the mcmmo hand-to-hand skill as much as to catch people off guard with their hands full. It took me forever to figure out to use 'AIR' as an item for an empty hand.

    Punching Spiders with your bare fists just gets you bitten.

    Drowning happens in bigger hits but spaced longer apart by giving the player some air ticks back, so you take 1 1/2 hearts every 3 seconds or so instead of 1/2 heart every second.

    Helmets give explosive protection, boots give fire/lava exposure and fall damage protection, leggings give fire tick damage reduction, and bodies have a special effect that I may extend to each set as a theme with an extra bonus to that effect if wearing the whole set.

    Gold items have a fire affinity. Gold Chestplate sets attackers on fire while Gold Swords set their target on fire. Gold Axes just make things explode (which is surprisingly damaging to the target but the explosion is so small as to not hurt the attacker).

    Diamond set will reflect damage.

    Iron set reduces damage from all sources (but, per the function noted, you should always take at least half a heart from any source).

    Leather Set will give a straight chance to dodge any damage source.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  25. Offline

    KoryuObihiro

    Your first few conditionals might stand to use an AND operator but other than that... :D Wow. Awesome. This deserves a Hall-of-Fame type of thing. I think I might just make one on the Wiki.

    Insofar as technical stuff, I think I should make Range additive...not necessarily now, but eventually...

    EDIT: Just noticed: "!AIR". o_o That doesn't fail for you when the aliases are loading? It loads. Weird. That's a rather strange thing for Bukkit to do.
     
  26. Offline

    lucent

    Playing around a little, and here are some things I've noticed:
    • for Aliases, the "Item" node is case sensitive (though the wiki has it written as "item," and, notably, this configuration doesn't work. parserneeds.equalsIgnoreCase && binom.maybe?)
    • For those transitioning, it took me a while to notice that binom should now only be written in a conditional context (whereas before it was assumed)
    • Despite loading my environments fine, at the end of the damage configuration I get the message 'Error: invalid Switch "switch.environment"'
    • The link to the beta branch on github seems to be broken
    • I can't figure out how to catch ranged events. At first I was thinking event.hasrangedelement might be overloaded so that you could also write event.hasrangedelement.Arrow, but no... And nothing else I've tried has worked. Little help? :)
     
  27. Offline

    KoryuObihiro

    Oooh, that is sort of bad...**writes an issue for it**
    Duly noted, and changelog updated. Going to be changing "set" to have the same behavior as well, so this is good to know. :p I'm going to be renaming CEs to just "Calculations" to reduce semantic confusion.
    Erm...the syntax should be "switch.event.environment". Did you check here?

    Tutorial needs to be finished there, but the proper routine is here. Might want to use the Index I've made. :)
     
  28. Offline

    lucent

    Oh, how silly. I was searching the index for "Ranged," it just appears that I was glossing over the "Ranged element" after I saw "Has Ranged Element." Thanks :)

    Also, didn't realize about the environment switch... I was basing it on the example at the bottom of the wiki (like the lowercase "item," it uses 'switch.environment'). I'll be sure to double check the index for syntax from now on, rather than just shortcutting it from examples.

    EDIT: Actually, even when I use 'switch.event.environment,' it's still giving me the same error after the configuration loads.
     
    KoryuObihiro likes this.
  29. Offline

    Ranzear

    I don't actually use it. I was trying to use !AIR and !_sword and !_axe etc, but that errored like crazy so I dumped it and just put a -5 on all damage and a +5 on AIR and tools.

    That's just my first version. Next round mobs will be nastier and set effects will be working while partial sets will be less effective. Mixing and matching, like Iron Body over Gold boots for good fall damage reduction, will still work though.
     
    Terra-Network.org likes this.
  30. Offline

    KoryuObihiro

    0_O Are...you trying to invert aliases?
     
  31. Offline

    Ranzear

    Yeah, I realized it was a bit silly afterwards.

    Anyway, new problem is that ModDamage is intercepting all damage and scrubbing the 'type' from it somehow, so all deaths going to HeroicDeath are coming up as 'unknown' type.

    Edit: Okay, not all damage, but it's cropping up more often than it probably should...
     

Share This Page