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

    This has been a common problem with 0.9.4.x. Try adding a dummy node to the server config like so:
    Code:
    Defensive:
        global:
            generic:
                nature:
                    - '0'
    
    Gah, I can't wait for 0.9.5 to become stable enough for release. :p

    Erm...have you read the tutorials? I wrote them with sample configuration analysis as the primary teaching method. If not, I'd encourage you to do so. If so...PM me. I'm still not sure what exactly the issue is.

    The problem with that sort of bonus is that the integers used in vanilla MC damage/health are so small that percentages like that are going to get truncated, unless you have values in excess of 50 and 25 respectively. Are you sure this is what you want?
     
  3. Offline

    hawianguy1189

    Yes I have read everything. My personaly dont understand it. I understand a few things but then I start getting lost later on. I could possibly go into deep detail but then when you explain it to me it will jsut be like the wiki. I rly just need someones config they set up so I can look at it and understand whats going on. I know you have some examples up but to me it kinda goes everywhere. But dont getme wrong it is a very nice tutorial and very detatiled im just being retaded and dont understand.
     
  4. Offline

    KoryuObihiro

    Well, two solutions: IRC, channel #bukkit-ModDamage, or PM. Pick your poison.
     
  5. Offline

    hawianguy1189

    Never used irc so just shoot me a pm plz
     
  6. Offline

    respetenudillos

    Thanks for the quick reply, that takes care of that issue... but I have a new one now :( I'm following the format that I'm supposed to (I think) but I can't get the nodes under groups to work at all.

    Code:
    Offensive:
        global:
            generic:
                nature:
                    - '0'
            groups:
                ddamage:
                    generic:
                        humans:
                            - 'mult.2'
    Defensive:
        global:
            generic:
                nature:
                    - '0'
            groups:
                ddefense:
                    generic:
                        humans:
                            - 'mult.2'
    debugging: normal
    MobHealth:
        global:
            Creeper:
            Chicken:
            Sheep:
            Giant:
            Slime:
            ZombiePigman:
            Spider:
            Pig:
            Squid:
            Wolf:
            Zombie:
            Cow:
            Ghast:
            Skeleton:
    
    Using "/md c" lists the two dummy nodes but I can't get the groups one to pass through. What am I doing wrong?
     
  7. Offline

    KoryuObihiro

    Another result of an incomplete testing of 0.9.4.x before release - groups don't work currently, and this is a programming error on my part. I'm still trying to decide whether or not to patch that, or hurry with 0.9.5 as fast as I can. Thoughts?
     
  8. Offline

    Tagz

    Getting this error:

    13:02:01 [SEVERE] Could not pass event ENTITY_DAMAGE to ModDamage
    java.lang.NullPointerException
    at com.KoryuObihiro.bukkit.ModDamage.Backend.Handlers.Handler.runRoutines(Handler.java:386)
    at com.KoryuObihiro.bukkit.ModDamage.Backend.Handlers.WorldHandler.doDamageCalculations(WorldHandler.java:249)
    at com.KoryuObihiro.bukkit.ModDamage.ModDamage.handleDamageEvent(ModDamage.java:325)
    at com.KoryuObihiro.bukkit.ModDamage.Backend.Handlers.ServerHandler.doDamageCalculations(ServerHandler.java:46)
    at com.KoryuObihiro.bukkit.ModDamage.ModDamageEntityListener.onEntityDamage(ModDamageEntityListener.java:14)
    at org.bukkit.plugin.java.JavaPluginLoader$58.execute(JavaPluginLoader.java:649)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:423)
    at net.minecraft.server.EntityMonster.a(EntityMonster.java:90)
    at net.minecraft.server.EntityCreature.c_(EntityCreature.java:64)
    at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:179)
    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.World.entityJoinedWorld(World.java:1198)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
    at net.minecraft.server.EntityMonster.m_(EntityMonster.java:30)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:447)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1180)
    at net.minecraft.server.World.cleanUp(World.java:1104)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    java.lang.NullPointerException

    I think its happening when a player is in the mob arena, which by the way for some reason isn't doing the same div.2 for Mob defense as the rest of the world is. Any ideas?
     
  9. Offline

    KoryuObihiro

    Bukkit build, MD version, and other plugins, if you will. ;) In regards to your config stuff, I'm not sure whether or not MA actually changes attack events...
     
  10. Offline

    Tagz

    I removed the div.2 for mob defense and instead just set mob health and it seems to be fine now. Oddly enough it seems the mob health effects the MA mobs as well, but the div.2 for defense didn't seem to have any impact on MA mobs.
     
  11. Offline

    KoryuObihiro

    Hmm....you say that it worked just fine outside of MA?
     
  12. Offline

    Tagz

    Yah, the div.2 was working on mobs outside of MA, only mobs spawned by MA seemed to not be effected by it. But they are effected by the MobHealth setting
     
  13. Offline

    KoryuObihiro

    Hmmm...I'll look at this code after work.
     
  14. Offline

    respetenudillos

    I fix would be great... but you should at least let people know that groups don't work before they play with it for hours :p
     
  15. Offline

    KoryuObihiro

    Duly noted and added to the Known Bugs list.

    Well, I think I'll get to working on this stuff tonight. I should be able to fix most of these issues immediately.

    EDIT: Working on them now. Keep an eye on the issue tracker for progress.

    EDIT 2:Worked out most of the issues, need to fix server-group loading and then I should be done.

    0.9.4.3 is now released: the most major obstacles to using 0.9.4.x are fixed now. See changelog for details.

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

    gsand

    It's the new permissions api.

    The error only happens if I use permissionsbukkit.
     
  17. Offline

    KoryuObihiro

    That's...rather strange. Want to post or PM your config?
     
  18. Offline

    gsand

    Ill reverted to permissions 3.1.6 last night.

    I tried different configs and the new beta, here is my beta config:

    Moddamage beta + bpermissions
    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:
        - 'if attackertype.Zombie':
            - 'set.0'
            - 'if targetgroup.Human':
                - 'set.2'
    debugging: normal
    Spawn:
        - 'switch.targettype':
            Wolf: 'set.6'
            Zombie: 'set.15'
    Code:
    2011-08-08 21:18:48 [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:43)
        at org.bukkit.plugin.java.JavaPluginLoader$58.execute(JavaPluginLoader.java:649)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:423)
        at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:179)
        at net.minecraft.server.EntityHuman.d(EntityHuman.java:561)
        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)
     
  19. Offline

    KoryuObihiro

    Oooh, this is with 0.9.5 RC1? EntityType conditionals are broken right now when you attempt to use aliases...I'll fix that quickly. You're aren't gonna see that problem here with the static Element values you're using, but all the same I'll be releasing another RC soon.

    I have just barely finished integration testing for all Base and CE routines, and will be tackling all of the Conditionals tomorrow. This category contains the greatest number of routines, and will probably be the most difficult to test - I'm planning on it taking a majority of my time after work.

    EDIT: Reviewing the stacktrace, it refers to a line of code that should only execute for older versions of Permissions (2.x)...want to post the rest of your console output? I don't mind wading through the whole thing - I want to make sure that MD is correctly identifying the version of Permissions it's grabbing.
     
  20. Offline

    gsand

    The new moddamage is awesome. it's super easy to set everything up.
     
  21. Offline

    KoryuObihiro

    Oh my gosh. I know, right? It's much more intuitive than the O/D paradigms. :) I just hope that I can get everything documented properly as I go.
     
  22. Offline

    respetenudillos

    I still can't get the following configuration to work for groups.

    Code:
    Offensive:
        global:
            generic:
                nature:
                    - '0'
            groups:
                ddamage:
                    generic:
                        humans:
                            - 'mult.2'
    Defensive:
        global:
            generic:
                nature:
                    - '0'
            groups:
                ddefense:
                    generic:
                        humans:
                            - 'mult.2'
    debugging: normal
    Using "/md c" lists the two dummy nodes but nothing about groups. I noticed in the changelogs that you added a checkgroup command, but using "/md checkgroup" doesn't do anything (it doesn't print out the error message). Is my syntax wrong?
     
  23. Offline

    KoryuObihiro

    Did you try using a group name when you used checkgroup?

    i.e., /md cg ddefense or /md cg ddamage

    EDIT: Just noticed. Groups NEVER go into the global node - they are semantically apart from it. Try starting your groups indentation on the same level as the server globals.
     
  24. Offline

    Dothackking

    I'm having trouble with the is.wearing.$armorset node.

    I want it to reduce your damage taken by x (lets say 2), if you're wearing (lets say iron armor)
    Show Spoiler

    Offensive:
    global:
    generic:
    nature:
    mob:
    armor:
    ranged:
    humans:
    - 'if.targetis.wearing.IRON'
    - '-200'
    melee:
    animal:


    Any help would be appreciated.
     
  25. Offline

    KoryuObihiro

    This sort of thing does not work in 0.9.4.x, as an ArmorSet currently requires an string with explicit Material usage for comparison - in plain English, you'd need something more along the lines of this:
    Code:
    Offensive:
        global:
            generic:
                humans:
                    - 'if.targetis.wearing.IRON_HELMET': #Don't forget the colon here.
                        - '-200'
                    - 'if.targetis.wearing.IRON_CHESTPLATE':
                        - '-200'
                    - 'if.targetis.wearing.IRON_LEGGINGS':
                        - '-200'
                    - 'if.targetis.wearing.IRON_BOOTS':
                        - '-200'
                    - 'if.targetis.wearing.IRON_HELMET*IRON_CHESTPLATE':
                        - '-200'
                    - 'if.targetis.wearing.IRON_HELMET*IRON_LEGGINGS':
                        - '-200'
                    - 'if.targetis.wearing.IRON_HELMET*IRON_BOOTS':
                        - '-200'
                    - 'if.targetis.wearing.IRON_HELMET*IRON_CHESTPLATE*IRON_LEGGINGS':
                        - '-200'
                    - 'if.targetis.wearing.IRON_HELMET*IRON_CHESTPLATE*IRON_BOOTS':
                        - '-200'
                    - 'if.targetis.wearing.IRON_HELMET*IRON_CHESTPLATE*IRON_LEGGINGS':
                        - '-200'
                    - 'if.targetis.wearing.IRON_HELMET*IRON_LEGGINGS*IRON_BOOTS':
                        - '-200'
    				[...etc...]
    
    Even then, I can't absolutely assure you it would work, because of my poor testing for 0.9.4.x. The situation is, to use a technical term, very very yucky. In 0.9.5, however, you should be able to use a config like this:
    Code:
    Damage:
        - 'if target.wearing._IronArmor': '-200' #Works now, because "wearing" is an inclusive comparison.
    Aliases:
        Armor:
            IronArmor:
                - 'IRON_HELMET'
                - 'IRON_CHESTPLATE'
                - 'IRON_LEGGINGS'
                - 'IRON_BOOTS'
    
    This is much more intuitive, no?

    I'm about to leave work and get to integrating and documenting the Conditional routines - this includes ArmorSet comparisons. When I'm done, I'll make the binaries available for the 0.9.5 release candidate 2. So, expect to be able to do this soon, if not in the next day or so.
     
  26. Offline

    Dothackking

    Thanks alot!
     
    KoryuObihiro likes this.
  27. Offline

    respetenudillos

    I see, it works now. :DI didn't see the command in the opening post so I was just guessing it. I had a couple additional questions for you though, if you don't mind.

    I couldn't seem to use the "generic" category as a blanket for what resides inside it:

    Code:
    Offensive:
        global:
        groups:
            ddamage:
                generic:
                    - 'mult.2'
    Defensive:
        global:
        groups:
            ddefense:
                generic:
                    - 'mult.2'
    This told me no groups were defined. Using this works, however:
    Code:
    Offensive:
        global:
        groups:
            ddamage:
                generic:
                    animal:
                        - 'mult.2'
                    humans:
                        - 'mult.2'
                    mob:
                        - 'mult.2'
    Defensive:
        global:
        groups:
            ddefense:
                generic:
                    animal:
                        - 'mult.2'
                    humans:
                        - 'mult.2'
                    melee:
                        - 'mult.2'
                    mob:
                        - 'mult.2'
                    nature:
                        - 'mult.2'
                    ranged:
                        - 'mult.2'
    I was just wondering if this was intentional or not.

    Secondly, using the above config file works (the expanded one), for some reason players of group "ddamage" do 8 (2*2*2?) damage with bows, but only to players (of any group). Mobs and animals take the normal 4 damage. Do you have any idea what's going on here?

    Thanks again for being so helpful, your plugin kicks ass. :)
     
    KoryuObihiro likes this.
  28. Offline

    KoryuObihiro

    First question: Yes, this is as purposeful as it is limited - this is part of the reason I rant about how much better 0.9.5 is. The generic nodes were created so you wouldn't have to create the same routines for blanket things, but this too is limited - it doesn't offer a granulated approach like I know users like myself would prefer. Hence, conditionally-driven Conditionals and aliasing makes things much nicer to read and write.

    As for your second topic...that's really, really, weird. :confused: How are you verifying that this is the case? Are you using Scan to identify this, or just guessing based on familiarity with vanilla MC health/damage?
     
  29. Offline

    respetenudillos

    Just by firing at each other. I don't have any health mods except for a slow regen. It's okay for the time being, it's not really a PVP server or anything.
     
  30. Offline

    Dothackking

    I have a bit of a bug with the most recent version.

    My players take ALOT extra damage from falls with the config blank.
    I had to remove the plugin because they were dying 1shot from 4 block falls.
     
  31. Offline

    KoryuObihiro

    As the programming party here, I have to contend that MD doesn't do anything when no config is found. Are you sure it's not finding anything? And are you sure it'd MD?
     

Share This Page