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

    KoryuObihiro

    Impossible. Aside from Calculation/Effect routines, the only thing MD changes is the event's damage value.

    HOW are things...dying...?

    Currently, the Hurt routine doesn't specify the attacker...it's possible to insert a LivingEntity as the attacker, but aside from that it's impossible to specify a damage type for entity.damage().
     
  3. Offline

    Ranzear

    That's probably it. People dying from punching spiders because it Hurts them back. I think the starvation damage from Hunger is throwing unknown types too. Anything else from a creature comes out okay. Probably not losing the damage type so much as I'm throwing around tons of tire ticks and Hurt effect that I only really notice when one gets screwed up.
     
  4. Offline

    KoryuObihiro

    I agree with this sentiment. :p
     
  5. Offline

    varinyc

    Code:
    [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 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 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)
    Version: 0.9.5 RC2
    RB: 1060
    Plugins: (CommandBook, Multiverse 2.0 (all 3 parts), PermissionsBukkit 1.1 & Superpermsbridge, WorldEdit, and PheonixTerrainMod)

    And the only line I've put in to the config is:
    Code:
    Damage:
        - 'if target.group.admin': 'set.0'
    This was caused by me testing by Jumping.
    Have I done this wrong? or is one of my plugins conflicting o.0?
    I have admin Defined through the PermissionsBukkit Plugin.

    Edit: Changing the whole group conditional to ('if target.falling': 'set.0') produces same results.
     
  6. Offline

    MJE

    I've gotten the RC to run fine but I was wondering how to make mobs (health and damage) different in multiple worlds (world = 1 set and world2 = another set). I want to base it on world name not on biome's or environment.

    Thanks!
     
  7. Offline

    KoryuObihiro

    @Ranzear and I are currently bothering SpaceManiac about the incompatibility that PermissionsBukkit has with Perms 3.0/2.0 behavior - the problem is that it uses a 3.0 API, while it declares itself to be effectively 2.7.7 in the JAR version. I think the best that can be done at this point is to bug SpaceManiac yourself, and let him know that this is a problem - it might get things moving faster.

    You'd use a world Switch or Conditional. See here and/or here.
     
  8. Offline

    Ranzear

    I noticed you have a 'death' section now. Should probably make sure this isn't conflicting with things like HeroicDeath or Death and Rebirth. Got a lot of issue with the latter I'm trying to track down.

    Gives me an idea though. If you can determine if a player is killed by a certain entity using the 'death' section, I want to be able to spawn another entity where that player was.

    In short: I want to be able to make a ModDamage entry that will spawn a zombie where a player was killed by a zombie.

    Edit: Ohmigosh! I'm totally adding a half-heart regen to zombies when they hit a player... I'm so evil.
     
  9. Offline

    KoryuObihiro

    Sure, that could work. As for issues, there shouldn't be any - it's impossible to cancel an EntityDeath event, only act upon an event. But as usual, that's theoretical and up for scrutiny.

    Spawning = peesacake. I'll add that for 0.9.5, since I'm STILL not yet done with tutorials. **sigh** When the fall semester is here, I'll have a lot more time to distract spend with plugin development. I don't want to establish any sort of "Valve time" thing here. XD
     
  10. Offline

    Ranzear

    Not to feed you more features to delay release, but I'm sure this one is easy:

    • Comparisons of height
    (target above/below, shooting or swinging 'up' should do less damage than 'down', y1-y2)
    • Distance to target
    (Just total distance, x1-x2+y1-yz+z1-z2, specifically for ranged attack distance like 'arrow falloff')

    I'll have a new version of my example/hardcore config up in a little bit too.
     
  11. Offline

    KoryuObihiro

    This will be addressed in 0.9.6, where I'll be introducing variables. I'll get into more detail as I start to implement it.

    EDIT: Just finished implementing case-insensitivity. :) One more issue, then I can work on tuts again!
     
  12. Offline

    Ranzear

    I just wanted boolean comparisons with distance above/below/absolute for now...
     
  13. Offline

    KoryuObihiro

    I don't mind doing this, and it'd probably be nice just as a convenience routine anyway (like Drowning/Airticks and OnFire/FireTicks). I'll make an implementation, but remember that right now the priority is releasing 0.9.5.
     
  14. Offline

    Ranzear

    Here's my latest config, for 0.9.5 RC2 if it isn't obvious. I even commented it up!:

    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
    Damage:
        - 'switch.attacker.type': #Begin major Offensive tree
            mob: #Let's make everything nastier with this first number. 2 is decent, 4-6 is pushing past 'hard mode'.
                - '2'
                - 'if Attacker.Y.lessthan.42': #Get deep, take extra damage
                    - 'roll.3'
                - 'if event.hasrangedelement': #This handles skeletons because I think I had some weirdness with contact damage.
                    - '-1'
                    - 'roll.4'
            NPC:
                - 'if Attacker.Y.lessthan.42': #Just in case HeroBrine shows up.
                    - '2'
            Player: #Flatten all damage, recant some portion of it per Tool or AIR (bare fist).
                - '-5'
                - 'if attacker.wielding.AIR':
                    - '4'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman': #Compensate blunt/slashing damage, etc
                        - 'div.2'
                        - '-2'
                        - 'roll.2'
                    - 'if target.type.Zombie and target.fireticks.lessthan.20':
                        - 'div.2'
                        - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '1'
                        - 'roll.2'
                - 'if attacker.wielding._sword':
                    - '6'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman':
                        - '3'
                        - 'roll.2'
                    - 'if target.type.Zombie':
                        - '3'
                        - 'roll.2'
                        - 'if target.fireticks.greaterthan.1':
                            - '3'
                    - 'if target.type.Skeleton':
                        - 'div.2'
                        - '-6'
                        - 'roll.2'
                - 'if attacker.wielding._axe': #Let's make these useful since mcMMO has some neat axe effects and a melee skill that never gets used.
                    - '8'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman': #I quantify axes as 'blunt damage', just for balance purposes so they can be crazy player slayers but not so good against zombies.
                        - 'div.2'
                        - '-5'
                        - 'roll.2'
                    - 'if target.type.Zombie and target.fireticks.lessthan.20':
                        - 'div.2'
                        - '-4'
                        - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '3'
                        - 'roll.2'
                - 'if attacker.wielding.BOW': #A little randomization for player arrows.
                    - '-2'
                    - 'roll.4'
                    - 'if target.type.ZombiePigman': #and some reduction for 'piercing' types, but more just a down-randomizer.
                        - '-2'
                        - 'roll.2'
                    - 'if target.type.Zombie and target.fireticks.lessthan.20':
                        - '-2'
                        - 'roll.2'
                    - 'if target.type.Skeleton': #Except skeletons, who laugh at your arrows going right through them.
                        - 'div.2'
                        - '-2'
                        - 'roll.2'
                - 'if Target.Y.lessthan.42': #Players do less damage when 'deep' as well
                    - '-2'
                - 'if attacker.wielding._pickaxe': #Covering the rest of the tools, picks do 'piercing' like arrows, so get an extra hitch against skellies.
                    - '3'
                    - 'roll.2'
                    - 'if target.type.Skeleton':
                        - '-4'
                        - 'roll.2'
                - 'if attacker.wielding._spade': #Shovels suck. Use it to dig your own grave!
                    - '2'
                - 'if attacker.wielding._hoe': #This makes more sense with my server's texture pack, hoes look like scythes!
                    - 'roll.4'
                    - 'if target.type.Skeleton':
                        - '-2'
                    - 'if target.type.ZombiePigman':
                        - 'roll.6'
                    - 'if target.type.Zombie':
                        - 'roll.8'
                - 'if attacker.wielding.DIAMOND_AXE': #High Crit!
                    - 'if binom.40':
                        - 'roll.12'
                        - "message.attacker.Critical Hit!"
                        - "message.target.You've been critically hit!"
                - 'if attacker.wielding.DIAMOND_SWORD': #Crit!
                    - 'if binom.30':
                        - 'roll.8'
                        - "message.attacker.Critical Hit!"
                        - "message.target.You've been critically hit!"
                - 'if attacker.wielding.IRON_AXE': #Less Crit!
                    - 'if binom.20':
                        - 'roll.6'
                        - "message.attacker.Critical Hit!"
                        - "message.target.You've been critically hit!"
                - 'if attacker.wielding.IRON_SWORD': #Bitty Crit!
                    - 'if binom.15':
                        - 'roll.4'
                        - "message.attacker.Critical Hit!"
                        - "message.target.You've been critically hit!"
                - 'if attacker.wielding.GOLD_SWORD': #FIRE! Gold stuff is magical btw.
                    - 'if binom.60 and target.fireticks.lessthan.20':
                        - 'targeteffect.addfireticks':
                            - '60'
                    - 'if binom.100 and target.fireticks.greaterthanequals.20':
                        - 'targeteffect.addfireticks':
                            - '20'
                - 'if attacker.wielding.GOLD_AXE': #Magic or just insane, idk.
                    - 'if binom.50':
                        - 'targeteffect.explode': '2'
                - 'if attacker.falldistance.greaterthanequals.1 and !event.hasrangedelement': #High ground has advantage in melee? Why not.
                    - '3'
                    - "message.attacker.Leap Attack!"
                    - "message.target.You've been sundered by a Leap Attack!"
                - 'if attacker.wielding.DIAMOND_HOE': #Now we just need cloaks and skull masks...
                    - 'if binom.3':
                        - '10'
                        - 'roll.20'
                        - "message.attacker.Reaped!"
                        - "message.target.You've been reaped!"
                - 'if attacker.wielding.GOLD_HOE': #Higher rate because of stupid low durability, but does slightly less insane damage.
                    - 'if binom.5':
                        - 'roll.30'
                        - "message.attacker.Reaped!"
                        - "message.target.You've been reaped!"
                - 'if attacker.wielding.IRON_HOE': #Just to keep the trend
                    - 'if binom.1':
                        - 'roll.18'
                        - "message.attacker.Reaped!"
                        - "message.target.You've been reaped!"
                - 'if attacker.wielding.WOOD_HOE': #Keep this our little secret!
                    - 'if binom.1':
                        - 'if binom.10':
                            - 'targeteffect.explode': '2'
                            - 'roll.60'
                            - "message.attacker.SUPER REAPED!"
                            - "message.target.You've been SUPER REAPED!"
                - 'if attacker.wearing.LEATHER_CHESTPLATE': #Deal less damage if wearing armor!
                    - '-1'
                #- 'if attacker.wearing.LEATHER_HELMET': Just gonna negate these trivial pieces
                - 'if attacker.wearing.LEATHER_LEGGINGS':
                    - '-1'
                #- 'if attacker.wearing.LEATHER_BOOTS':
                - 'if attacker.wearingonly.LEATHER_HELMET*LEATHER_CHESTPLATE*LEATHER_LEGGINGS*LEATHER_BOOTS': #Leather switches to a teeny damage bonus if wearing full set, larger bonus if shooting a bow or even if throwing eggs or snowballs!
                    - '3'
                    - 'if event.hasrangedelement':
                        - '3'
                        - 'roll.2'
                - 'if attacker.wearing.IRON_CHESTPLATE': #Iron really slows you down if you want that damage reduction...
                    - '-2'
                - 'if attacker.wearing.IRON_HELMET':
                    - '-1'
                    - 'roll.1'
                - 'if attacker.wearing.IRON_LEGGINGS':
                    - '-2'
                    - 'roll.1'
                - 'if attacker.wearing.IRON_BOOTS':
                    - '-1'
                    - 'roll.1'
                - 'if attacker.wearingonly.IRON_HELMET*IRON_CHESTPLATE*IRON_LEGGINGS*IRON_BOOTS': #Wearing whole set negates a little penalty
                    - '2'
                - 'if attacker.wearing.GOLD_CHESTPLATE': #Gold breaks the mould! Random damage bonus!
                    - 'roll.3'
                - 'if attacker.wearing.GOLD_HELMET':
                    - 'roll.1'
                - 'if attacker.wearing.GOLD_LEGGINGS':
                    - 'roll.2'
                - 'if attacker.wearing.GOLD_BOOTS':
                    - 'roll.1'
                - 'if attacker.wearingonly.GOLD_HELMET*GOLD_CHESTPLATE*GOLD_LEGGINGS*GOLD_BOOTS': #and a little guaranteed bonus with full set, with a chance of fire damage with any weapon!
                    - '2'
                    - 'if binom.10':
                        - 'targeteffect.addfireticks': '20'
                - 'if attacker.wearing.DIAMOND_CHESTPLATE': #Diamond's pieces will randomly negate the penalty
                    - '-2'
                    - 'if binom.50':
                        - '2'
                - 'if attacker.wearing.DIAMOND_HELMET':
                    - '-1'
                    - 'if binom.50':
                        - '1'
                - 'if attacker.wearing.DIAMOND_LEGGINGS':
                    - '-2'
                    - 'if binom.50':
                        - '2'
                - 'if attacker.wearing.DIAMOND_BOOTS':
                    - '-1'
                    - 'if binom.50':
                        - '1'
                - 'if attacker.wearingonly.DIAMOND_HELMET*DIAMOND_CHESTPLATE*DIAMOND_LEGGINGS*DIAMOND_BOOTS': #Full set gives a little random life leech.
                    - 'attackereffect.heal': 'roll.2'
            animal: #Same 'deep' thing, but on wolves if they get down there...
                - 'if Attacker.Y.lessthan.40':
                    - '2'
            lightning: #Boosh!
                - '-2'
                - 'roll.6'
            lava: #I'd rather the lava kill me than the fire ticks afterward
                - '2'
                - 'if target.wearing.DIAMOND_BOOTS': #Direct exposure reduction. Could probably wade through lava for a short time with gold boots and iron damage reduction... which is AWESOME!
                    - '-4'
                - 'if target.wearing.GOLD_BOOTS':
                    - '-6'
                - 'if target.wearing.IRON_BOOTS':
                    - '-2'
                - 'if target.wearing.LEATHER_BOOTS':
                    - '-1'
            explosion: #Helmets reduce this. Gold is extra good of course.
                - 'if target.wearing.DIAMOND_HELMET':
                    - '-3'
                - 'if target.wearing.GOLD_HELMET':
                    - 'div.2'
                - 'if target.wearing.IRON_HELMET':
                    - '-2'
                - 'if target.wearing.LEATHER_HELMET':
                    - '-1'
            fall: #Boots reduce fall damage. Not by too much though...
                - '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: #Get on with it!
                - 'set.20'
            burn: #Tick damage reduction. Gold practically negates.
                - '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: #Direct exposure reduction.
                - '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: #Changes drowning dynamic. Won't get stuck underwater because of constant damage taken, but still drown just as fast.
                - '3'
                - 'targeteffect.addairticks': '40'
            cactus: #This is more to reduce damage to mobs. Player's armor handles the rest.
                - '-2'
                - 'roll.3'
            ZombiePigman:
                - '2'
                - 'roll.4'
                - 'if event.environment.NETHER': #Make em extra nasty!
                    - '2'
                    - 'targeteffect.addfireticks': '20'
            Creeper_Normal: #Damage reduced when wearing a helmet, gold is extra good.
                - 'if target.wearing.DIAMOND_HELMET':
                    - '-3'
                - 'if target.wearing.GOLD_HELMET':
                    - 'div.2'
                - 'if target.wearing.IRON_HELMET':
                    - '-2'
                - 'if target.wearing.LEATHER_HELMET':
                    - '-1'
            Creeper_Charged: #Creeper cluster bombs?
                - '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: #Spiders are less hax but will always do a half heart (You'll see later in this config).
                - '-3'
                - 'roll.7'
            Giant:
                - 'roll.4'
            Zombie: #Zombies heal by biting things!
                - '2'
                - 'roll.2'
                - 'attackereffect.heal': '3'
            Slime:
                - 'roll.8'
                - 'if event.value.greaterthan.7':
                    - 'attackereffect.setsize': '8'
                - '-4'
            #Skeleton: Handled earlier cause I'm lazy.
            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': #Player defensive tree
            - 'if event.value.lessthanequals.0': #Always take at least half a heart to apply armor damage.
                - 'set.1'
                - 'if attacker.type.player': #Unless it's a player punching us with an item maybe
                    - 'set.0'
                    - 'if attacker.wielding.AIR': #So we'll check for fists and tools too! Tried an 'or' statement but didn't seem to work...
                        - 'set.1'
                    - 'if attacker.wielding._sword':
                        - 'set.1'
                    - 'if attacker.wielding._axe':
                        - 'set.1'
                    - 'if attacker.wielding.BOW':
                        - 'set.1'
                    - 'if attacker.wielding._pickaxe':
                        - 'set.1'
                    - 'if attacker.wielding._spade':
                        - 'set.1'
                    - 'if attacker.wielding._hoe':
                        - 'set.1'
            - 'if target.wearing.LEATHER_CHESTPLATE': #Leather makes you dodge
                - 'if binom.6':
                    - 'set.0'
                    - "message.target.Dodged!"
                    - "message.attacker.Your attack was dodged!"
            - 'if target.wearing.LEATHER_HELMET':
                - 'if binom.2':
                    - 'set.0'
                    - "message.target.Dodged!"
                    - "message.attacker.Your attack was dodged!"
            - 'if target.wearing.LEATHER_LEGGINGS':
                - 'if binom.3':
                    - 'set.0'
                    - "message.target.Dodged!"
                    - "message.attacker.Your attack was dodged!"
            - 'if target.wearing.LEATHER_BOOTS':
                - 'if binom.2':
                    - 'set.0'
                    - "message.target.Dodged!"
                    - "message.attacker.Your attack was dodged!"
            - 'if target.wearingonly.LEATHER_HELMET*LEATHER_CHESTPLATE*LEATHER_LEGGINGS*LEATHER_BOOTS': #Set bonus totals out to ~30% dodge rate
                - 'if binom.20':
                    - 'set.0'
                    - "message.target.Dodged!"
                    - "message.attacker.Your attack was dodged!"
            - 'if target.wearing.IRON_CHESTPLATE': #Iron gives straight damage reduction chance
                - 'if binom.25':
                    - '-3'
            - 'if target.wearing.IRON_HELMET':
                - 'if binom.10':
                    - '-1'
            - 'if target.wearing.IRON_LEGGINGS':
                - 'if binom.15':
                    - '-2'
            - 'if target.wearing.IRON_BOOTS':
                - 'if binom.10':
                    - '-1'
            - 'if target.wearingonly.IRON_HELMET*IRON_CHESTPLATE*IRON_LEGGINGS*IRON_BOOTS':  #Set bonus is ~60% total chance to reduce an average of ~4 hearts of damage
                - 'if binom.20':
                    - '-2'
            - 'if target.wearing.GOLD_CHESTPLATE': #Gold set is like gold weapons, sets attackers ON FIRE!
                - 'if binom.30':
                    - 'attackereffect.addfireticks':
                        - '60'
            - 'if target.wearing.GOLD_HELMET':
                - 'if binom.10':
                    - 'attackereffect.addfireticks':
                        - '20'
            - 'if target.wearing.GOLD_LEGGINGS':
                - 'if binom.20':
                    - 'attackereffect.addfireticks':
                        - '40'
            - 'if target.wearing.GOLD_BOOTS':
                - 'if binom.10':
                    - 'attackereffect.addfireticks':
                        - '20'
            - 'if target.wearingonly.GOLD_HELMET*GOLD_CHESTPLATE*GOLD_LEGGINGS*GOLD_BOOTS': #Even more fire duration, with a chance of a little extra 'kick'!
                - 'attackereffect.addfireticks':
                    - '80'
                - 'if binom.10':
                    - 'attackereffect.explode': '1'
            - 'if target.wearing.DIAMOND_CHESTPLATE': #Diamond reflects damage back at the attacker.
                - 'if binom.30':
                    - 'attackereffect.Hurt': '3'
            - 'if target.wearing.DIAMOND_HELMET':
                - 'if binom.10':
                    - 'attackereffect.Hurt': '1'
            - 'if target.wearing.DIAMOND_LEGGINGS':
                - 'if binom.20':
                    - 'attackereffect.Hurt': '2'
            - 'if target.wearing.DIAMOND_BOOTS':
                - 'if binom.10':
                    - 'attackereffect.Hurt': '1'
            - 'if target.wearingonly.DIAMOND_HELMET*DIAMOND_CHESTPLATE*DIAMOND_LEGGINGS*DIAMOND_BOOTS': #Guaranteed damage to attacker with full set, and should average 3.5 hearts reflected.
                - 'attackereffect.Hurt': '2'
            - 'if target.light.lessthanequals.5': #Players take extra damage in the darkness!
                - 'roll.4'
        # 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': #A little extra health for animals too because of lethality running rampant. Underground spawns get bonus health.
            Creeper:
                - 'if !target.exposedtosky and target.Y.lessthanequals.64':
                    - 'roll.4'
            Chicken:
                - '2'
            Sheep:
                - '6'
            # Giant:
            Slime:
                - '2'
            ZombiePigman:
                - 'range.44.50'
            Spider:
                - 'range.14.16'
                - 'if !target.exposedtosky and target.Y.lessthanequals.64':
                    - 'roll.8'
            Pig:
                '3'
            # Squid:
            Wolf:
                - 'range.16.18'
                - 'if !target.exposedtosky and target.Y.lessthanequals.64': #Never a natural spawn underground, only AngryWolves spawns which are hostile, so let's make this consistent!
                    - '4'
                    - 'roll.2'
            Zombie:
                - 'range.36.40'
                - 'if !target.exposedtosky and target.Y.lessthanequals.64':
                    - 'roll.12'
            Cow: #Bovines are tough mofos!
                - '8'
            Ghast: #Because I hate them SO MUCH... and arrows kinda suck now.
                - '-4'
            Skeleton:
                - 'range.12.18'
    
    I should probably explain that I run AngryWolves to replace a percentage of creeper spawns with aggressive wolves, hence their entries even for underground spawns which wouldn't happen otherwise. It will also do the same to a percentage of Pig Zombies in the nether but instead makes them flaming hellhounds, hence the fire tick damage added!

    I'll probably alias Tools+Fist to shorten the 'always do half a heart of damage pvp if holding a tool or air' section (I was rushed, 'or' operators weren't behaving) and alias each armor set for other uses.
     
  15. Offline

    KoryuObihiro

    :D I love it. How's the performance?
     
  16. Where is your "Donate"-Button? :D
    Keep working on it, it's brilliant!
     
  17. Offline

    KoryuObihiro

    I think now's a good time to announce the MD Hall of Fame - this can be found at the wiki. Any notable configs will be placed there - I'd advise against trying to put your own entries there, though.

    With this build, I'm also considering holding a contest - the server with the most impressive and fun use of MD will get a bit of advertising space on the MD OP. How does THAT sound, everybody?
     
    Terra-Network.org likes this.
  18. Offline

    Ranzear

    Anyone else will be hard-pressed to find concepts I haven't covered. I literally did a command-by-command breakdown of 'what can I do with this'.

    I realize I could probably be advertising my server in my sig though. I think I'll do that.
     
  19. Offline

    KoryuObihiro

    If you want to, you could always publish your ideas into the Examples section of the routine entries. Just sayin'.
     
  20. Offline

    Ranzear

    But it takes me an hour and twenty four minutes just to write a signature! D:

    That's what happens when you have 38 plugins to summarize...
     
  21. Offline

    KoryuObihiro

    Ranzear, y u no use link to info. ;)
     
  22. Offline

    Ranzear

    What info? DRKCraft.DynDns.org is the server, default port.

    Unless you mean server stats, which I'll have a webserver on the same box spitting out info soon enough...
     
  23. Offline

    lucent

    So I've nearly converted my old config from 0.9.4 to 0.9.5. Will post it, for kicks and giggles, once I've double checked that it's working as per my intentions. I did, however, want to mention some things I've noticed so far:
    • I'm getting NPE thrown for onEntityDeath. It seems to fire with the attackereffect.hurt routine, but I'll play with it more this evening after work, and report back if I can figure out more details.
    • targeteffect.explode seems to be acting wonky... I have skeletons firing the occasional explosive arrow, and I have a class that can throw eggs to make targets explode. However, the explosions don't destroy any landscape, I don't see any of the smoke sprites, and when I hit an entity, they don't get knocked back - they just hesitate for about 1-2 seconds, and then die. No output to server log. I'll continue playing with this, too.
    Also, to follow up with my previous issue with switch.event.environment: I'm an idiot. I realized, after quite some head-scratching, that environment != world.
     
  24. Offline

    KoryuObihiro

    The only way I'd think this could happen is if the attacker was to be removed somehow between the last Damage event and the Death event itself...I'll see if I can't reproduce this one. Adding to the tracker.

    I've had this exact same issue, and it seems to be a Bukkit bug - weird, weird stuff goes on with generated explosions (which are, for some reason, BLOCK_EXPLOSIONs) and occasionally normal explosions. I'm still figuring out what exactly the deal is, but it seems to perform better right now with small stuff.


    lulz. :p
     
  25. Offline

    lucent

    Here's the config snippit related to the NPE, in case it helps (or maybe you can identify if it's actually my fault):

    Code:
                    Exterminator:
                        - 'if attacker.type.Spider':
                            - '-2'
                            - 'if binom.40':
                                - 'attackereffect.hurt':
                                    - '20'
                                    - 'message.target.The spider bites in, but you lash back!'
    
    Note that it's embedded in a group switch, hence the offset in the indentation.
     
  26. Offline

    KoryuObihiro

    Got the stacktrace?
     
  27. Offline

    lucent

    Not sure if it's exactly the same, but I think so. Here's what I just generated on my work computer (ssh, don't tell!), using that config:

    Code:
    2011-08-23 13:33:07 [SEVERE] Could not pass event ENTITY_DEATH to ModDamage
    java.lang.NullPointerException
        at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDeath(ModDamageEntityListener.java:67)
        at org.bukkit.plugin.java.JavaPluginLoader$60.execute(JavaPluginLoader.java:663)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.EntityLiving.q(EntityLiving.java:467)
        at net.minecraft.server.EntityLiving.die(EntityLiving.java:447)
        at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:391)
        at net.minecraft.server.EntityMonster.damageEntity(EntityMonster.java:43)
        at org.bukkit.craftbukkit.entity.CraftLivingEntity.damage(CraftLivingEntity.java:177)
        at com.KoryuObihiro.bukkit.ModDamage.RoutineObjects.CalculatedEffect.EntityHurt.applyEffect(EntityHurt.java:19)
        at com.KoryuObihiro.bukkit.ModDamage.RoutineObjects.CalculatedEffect.EntityHurt.applyEffect(EntityHurt.java:1)
        at com.KoryuObihiro.bukkit.ModDamage.RoutineObjects.CalculatedEffectRoutine.run(CalculatedEffectRoutine.java:25)
        at com.KoryuObihiro.bukkit.ModDamage.RoutineObjects.ConditionalRoutine.run(ConditionalRoutine.java:38)
        at com.KoryuObihiro.bukkit.ModDamage.RoutineObjects.ConditionalRoutine.run(ConditionalRoutine.java:38)
        at com.KoryuObihiro.bukkit.ModDamage.RoutineObjects.SwitchRoutine.run(SwitchRoutine.java:50)
        at com.KoryuObihiro.bukkit.ModDamage.RoutineObjects.SwitchRoutine.run(SwitchRoutine.java:50)
        at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDamage(ModDamageEntityListener.java:49)
        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.EntityHuman.damageEntity(EntityHuman.java:427)
        at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:180)
        at net.minecraft.server.EntityMonster.a(EntityMonster.java:90)
        at net.minecraft.server.EntitySpider.a(EntitySpider.java:78)
        at net.minecraft.server.EntityCreature.c_(EntityCreature.java:64)
        at net.minecraft.server.EntityLiving.v(EntityLiving.java:685)
        at net.minecraft.server.EntityMonster.v(EntityMonster.java:26)
        at net.minecraft.server.EntityLiving.m_(EntityLiving.java:218)
        at net.minecraft.server.EntityMonster.m_(EntityMonster.java:30)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1212)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1194)
        at net.minecraft.server.World.cleanUp(World.java:1110)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:450)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  28. Offline

    KoryuObihiro

    So, how the Death information gathering works is that it grabs the last EntityDamage event (stored with the target object) - ostensibly Hurt could be causing null EntityDamage events, but I don't think so. I'll test for this as well - I think I'll have enough time tonight to actually do this stuff. (Don't tell - I'm at work too. :p)
     
  29. Offline

    Moromillas

    Wow, this plugin is just so convolutedamazing! And so very time consuming? configurable!
    lol, no seriously, it looks nice.

    Ok, so, only integer calculations, and integer results right? Now, damage/hp condition and calculation. Can that be a child of any of the parents in the tree? Or does it NEED need to be a child of the parents child's child's child's child in the tree? For example could I add damage/hp to global?

    So if I wanted to give monsters more damage and damage resistance at night (Dracula's curse) would it be something like:

    Code:
    Offensive:
        global:
            generic:
                mob:
                    - if event.time.>.12000: mult.2
    Defensive:
        global:
            generic:
                mob:
                    - if event.time.>.12000: div.2
    That's right isn't it? Please tell me I'm close.
     
  30. Offline

    KoryuObihiro

    :) A newcomer! Err...so, pretty much everything that's not nested under a Calculation/Effect routine will be used to affect the value of the event itself. As for where you need to actually place the calculations in 0.9.4.x, I'm rather sad to say that you HAVE to place into the most nested node, because that's where that version of MD looks. This is why MD 0.9.5. is much, much better!

    In regards to the config you've provided that sounds pretty much right - 2x attack and 1/2 resistance from and to mobs, respectively. Soon, we'll be transitioning to 0.9.5 (whenever I actually have time to write the new set of tutorials). Here's what the same config would look like with the new 0.9.5 syntax:
    Code:
    Damage:
        - 'if event.time.greaterthan.12000':
            - 'if target.type.mob': div.2
            - 'if attacker.type.mob': mult.2
    
    Much cleaner and easier to read, no? If you're using RB 1060, I'd suggest you switch over soon - I'll be dropping support for 0.9.4.x (which is horribly, horribly untested) as soon as I get the new wiki content completed to my satisfaction. Which is hopefully soon, but right now I have no idea - a new semester's coming up, and I've got a lot of paperwork and last-minute stuff changing to that from a full-time job.

    Whatever the case, thanks for using MD! I hope it's as useful for you as the other regulars that post here with their creative configurations.
     

Share This Page