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

    So, apparently, the new API operates thus currently:
    Code:
    Damage:
        - 'somenode':
            - 'somenestednode'
    Death: '' # Acceptable, since it's just an empty string.
    ProjectileHit: # UNACCEPTABLE, because this would result in a null value.
    
    [...]
    
    ...which is retarded. Null values are accepted by virtually every YAML parser known to man - why shouldn't Bukkit accept them?

    This means I get to stick with the old Config API. I've made another Git branch for just using the SnakeYAML library that Bukkit has included, so eventually I won't ever have to bugger with it. In the meantime, old configs should work the RC I'm hoping to put out later today. I have time to get stuff ready later, so be expectant in about three hours or so.
     
  3. Offline

    Brvtvs

    Sounds really hard and complicated, but I am coding illiterate mostly. What I gather is that the new RC is going to have working PEX. Which is going to be awesome, thanks a lot.
     
    KoryuObihiro likes this.
  4. Offline

    KoryuObihiro

    Well, wasn't able to finish (had a bunch of bugs I discovered), but I have a very long car ride's worth of time to get this stuff ironed out with nothing else to do, so I'll return with more news towards the end of the day.

    EDIT: Well, I've essentially finished with unit testing and some basic sanity-checking with test configs, but I just got out the car and am about to walk down the Las Vegas Strip. I'll check in when I'm going to upload - I've honestly got no idea when I'll have time for now.
     
  5. Offline

    KoryuObihiro

    ALRIGHT. The long awaited PEX fix and a few other features (including the basic tagging system!) is now here! However, I've also gotten around to finally getting everything set up with a Jenkins install, so now I can offer y'all continuous integration as I'm developing.

    What does this mean to you, though? For those of you familiar with the Recommended Builds system with Bukkit, I'll be able to offer the exact same functionality. I am now changing the thread to use the new system for Release Candidates (bleeding edge, but not necessarily stable) and for Recommended Builds (major, stable releases) in MD. Now I can focus more on just getting the work done, instead of messing with wrapping up a JAR to upload to Github manually every time I think something needs testing or is relatively stable.

    Check the thread header for the static links for both build sets!

    Promoted new build #92, because of a break discovered in config auto-generation and an incorrect use of Item aliases (needed to be "Material"). Thanks to p000ison for informing me of this!

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

    slimpyman

    Koryu, have you had a chance to try out a set modifier with a roll on top of the set damage? i still cant get it to work properly :(

    you still are a cool guy in my booK!
     
  7. Offline

    Brvtvs

    Glad this is working for PEX, I just have to find time now to figure out how to make damage reduction affect only fall damage, lava, pvp and arrows because some of my higher reductions were reducing things like hunger and damage from spiders to 0. Just a warning to someone looking to do something similar to what I did.
     
  8. Offline

    KoryuObihiro

    Uhhh...just filter them out? :p
     
  9. Offline

    Brvtvs

    You seem to think I know how this plugin works :p
    I have been so busy running my server I haven't learned the new config really.
     
  10. Offline

    KoryuObihiro

    Hehe, alright, well, show me your config and/or hop on the IRC, and help can be rendered. :)

    Promoted new build #94 for 0.9.6 RC. Fixes are as follows:
    • Changed aliases so that they can refer to any other aliases (instead of only if they were allocated before). This makes recursive Routine aliases possible.
    • Fixed Calculations not correctly setting the event value back after the nested routines calculated. Thanks @SinisteRing and @cr0ss!
    • Changed the Range routines so that they ADD, not SET.

    Promoted new build #95 for 0.9.6. Changes are as follows:
    • Optimized some alias lookups by changing their collection type to a hashset.
    • Fixed the Roll routine not behaving correctly when using the additive mode. Thanks @SinisteRing!
    • Renamed "binom" to "chance".
    • Renamed the "Item" aliasing to "Material"

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

    Do you changed something with aliases?
    Because it doesn't work anymore with RC 0.9.6 #95

    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
    Code:
    2011-10-23 11:31:06 [SEVERE]                     No matching Material alias or value "_sword"
    2011-10-23 11:31:06 [SEVERE]                 Error: bad statement "attacker.wielding._sword"
    2011-10-23 11:31:06 [SEVERE]                 Invalid Conditional "if attacker.wielding._sword"
    2011-10-23 11:31:06 [SEVERE]                     No matching Material alias or value "_axe"
    2011-10-23 11:31:06 [SEVERE]                 Error: bad statement "attacker.wielding._axe"
    2011-10-23 11:31:06 [SEVERE]                 Invalid Conditional "if attacker.wielding._axe"
    2011-10-23 11:31:06 [SEVERE]                     No matching Material alias or value "_pickaxe"
    2011-10-23 11:31:06 [SEVERE]                 Error: bad statement "attacker.wielding._pickaxe"
    2011-10-23 11:31:06 [SEVERE]                 Invalid Conditional "if attacker.wielding._pickaxe"
    2011-10-23 11:31:06 [SEVERE]                     No matching Material alias or value "_spade"
    2011-10-23 11:31:06 [SEVERE]                 Error: bad statement "attacker.wielding._spade"
    2011-10-23 11:31:06 [SEVERE]                 Invalid Conditional "if attacker.wielding._spade"
    2011-10-23 11:31:06 [SEVERE]                     No matching Material alias or value "_hoe"
    2011-10-23 11:31:06 [SEVERE]                 Error: bad statement "attacker.wielding._hoe"
    2011-10-23 11:31:06 [SEVERE]                 Invalid Conditional "if attacker.wielding._hoe"
     
  12. Offline

    KoryuObihiro

    Gah, yes I did. Material aliases are now rightfully known as "Material" aliases. Documenting that now - I'd put it into the changelog, but for some reason I never put it into the RC notes.

    Thanks for the heads-up.
     
  13. Offline

    KoryuObihiro

    Alright! I've added an automagic link for the IRC in my signature and the thread OP, so even if you know nothing about IRC it'll be easy to get live support for this plugin.

    Don't be afraid to click! I welcome any support questions you might have as an MD user.
     
  14. Offline

    Deide

    I clicked, but there was no one there, haha. I'll pop in a little later since this is one of the coolest and most flexible plugins on the bukkit scene :)

    Anyway, I still get that unhandled Death Event too! It doesn't seem to cause too much of a problem though. My real problem is trying to get my groups spawn with different health values. Here's my log:

    Code:
    2011-10-27 00:48:44 [INFO]         Spawn configuration:
    2011-10-27 00:48:44 [INFO]             Switch: "switch.group"
    2011-10-27 00:48:44 [WARNING]             String "switch" is not a valid entity reference.
    2011-10-27 00:48:44 [SEVERE]             Error: invalid Switch "switch.group"
    2011-10-27 00:48:44 [SEVERE]         Error in Spawn configuration.
    What am I doin' wrong here? XD I basically used the setup you find HERE.

    Am I right in assuming that my players would spawn with different health values with this? My concern is, though, if I used 'set.10' to have them spawn with half of their health, would they then be able to heal their way back up to 20? I have auto-health-regeneration disabled so they'd have to go pay to get to full health if that were the case.
     
  15. Offline

    KoryuObihiro

    Looks like you're not specifying the entity. The syntax for a switch is "switch.$entity.$property" - see where you're missing something? Try "target" or "attacker", based on what you want.

    In the meantime, sorry to hear I missed you! I woke up not ten minutes ago...It's 7AM here. :p

    EDIT: Just barely got on from my lappy, and I'm glad you posted. That was a documentation error - I added the appropriate entity label like with the advice I gave you. That's sloppy of me, sorry.

    It has come to my attention that Group Switches were inadvertently broken for the current Release Candidate - thanks to @Deide for helping me find this! I'll try to fix it as soon as possible.

    EDIT: I also fixed an issue @cr0ss and another user were experiencing with PEX and the Permission Evaluation routine - I wasn't using the Perms handler, since I'd written that routine before I had created it. Expect the fix with next RC.

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

    KoryuObihiro

    Promoted new build #97 for 0.9.6. Changes are as follows:
    • Fixed perms evaluations to use the API I'd written after its creation.
    • Fixed debug mode changes re-emitting YAML for the entire configuration, thus erasing any "nice" formatting the user may have had in their configuration. You can now change without fear!
    • Added parenthetical nesting for new arithmetic expressions and conditional statements! An example of usage would be like below. Keep in mind that there is no order of operations for arithmetic statements currently, and that at least one space between operators and terms is absolutely necessary.
    Code:
    Aliases:
        Routine:
            getfour:
                - 'set.-(-4) * (-1 / -1)'
    Damage:
        - 'if attacker.haspermission.admin.rage and (attacker.wielding.GOLD_SWORD or attacker.wielding.DIAMOND_SWORD or target.health.lessthan(attacker.health * 2))':
            - 'mult.2'
            - 'message.attacker':
                - '%attacker.name%'
                - '2 * 2 = %(2 * 2)%'
                - '3 / (9 * 2) + 2 - ((3 - 3) ^ 1) + 2 = %(3 / (9 * 2) + 2 - ((3 - 3) ^ 1) + 2)%'
                - '%((target.health - target.health) - (target.health - target.health))%'
    
     
  17. Offline

    Deide

    This is absolutely amaaaazing D:
    I'll be back to get this tomorrow, after some sleep. I take it you didn't implement knockback in this build?
    Not that I don't have a TON to mess around with already, haha.

    Great work, Koryu :p
     
    KoryuObihiro likes this.
  18. Offline

    KoryuObihiro

    Promoted new build #100 for 0.9.6. Changes are as follows:
    Promoted new build #101 for 0.9.6. Changes are as follows:
    • Fixed the several major breaks present in previous RC build #100 (sorry guys!).
    • HasItem conditional (uses Item sets)
    • Item manipulation routine (will document later)
    • Bukkit-agnostic config reloading. Auto-generated configs look nicer now!
    • Fixed ConMod exceptions with the tagging system. I haven't been able to find any bugs otherwise.
    • Refactored the routine-caching, and increased cache speed by a margin of a little over 20%. :D
    • Yes, MD got a considerably bigger. 'Tis the exchange for the speed above.
    • Fixed a regexing issue where leading negative symbols weren't getting picked up.

    Whoops! Found a few breaking bugs. Will try to fix this ASAP.
    Fixed.

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

    Brvtvs

    Awesome
     
  20. Offline

    DeanSlama

    I'm so so so lost. I'm using CB 1.8 #1337 for my Server
    i uploaded the RC .Jar into my Plugins folder. (i Read the Wiki and it said no Folder was to be auto created)
    so how do i config? :'(

    all i want to do, is make the Mobs (Skeletons/Pigmen/Spiders/Zombies) do Double the damage they currently are doing. How do i make such a small and minor Change? They hit like little babies on my Server.
    (Creepers are fine tho! Rofl)
     
  21. Offline

    lucent

    If I'm not mistaken, you're after something like this:

    Code:
    Damage:
        - 'if attacker.type.Skeleton or attacker.type.ZombiePigman or attacker.type.Spider or attacker.type.Zombie':
            - 'mult.2'
    
    Unless the syntax has changed in recent times. With work the way it's been, and with Minecraft in 'pre-release' mode, I've done next to nothing with server configs for quite a while now. Hope this helps.

    Edit: Err, I think you could also write it this way to be more of a blanket statement:

    Code:
    Damage:
        - 'if attacker.type.Mob and !attacker.type.Creeper':
            - 'mult.2'
    
     
    KoryuObihiro likes this.
  22. Offline

    DeanSlama

    my only problem is, where do i type all that? do i Create a Folder in the plugins directory named "???"
    and inside that Folder what .Yml filename do i name it?

    i'm just really confused since the .Jar didn't create a folder or any config files to edit, i dont know what folder name to make or config filename to make to enter those settings into......
     
  23. Offline

    KoryuObihiro

    No, a folder named ModDamage should have been created in your plugins directory, with another file called "config.yml" inside of it. Are you sure it's not there?
     
  24. Offline

    DeanSlama

    Weird, There's only the ModDamage.Jar in the plugins folder, along with like 15 other plugins that run fine.
    There was no created folder at all, I'll Re-download the .Jar tomorrow, making sure it's the correct one, and Replace it.
    I'll update with whatever results i get :)
     
  25. Offline

    KoryuObihiro

    What build are you using? It should tell you when it gets loaded.

    EDIT: I have reproduced the problem with the latest build. I shall be releasing another shortly.
     
  26. Offline

    KoryuObihiro

    Promoted new build #102 for 0.9.6. Changes are as follows:
    • Changed the Tagging routine back to it's original syntax.
    • Fixed config files not auto-generating.
     
  27. Offline

    Undectectable

    One of the most useful plugins ever, well done
     
  28. Offline

    Phat32

    I am using the 9.7 build and I can't get any status checks to work. Things like sneaking, onfire, drowning any of that. Did it change? I am using a copy and pasted example from the wiki:
    - 'if target.onfire':
    - 'mult.2'

    I keep getting this message:
    Bad content in Conditional "if target.onfire"
     
  29. Offline

    KoryuObihiro

    That message means something is wrong with what's nested underneath. Make sure that the nested routines are also valid!

    In the meantime, sorry to hear I missed you on the IRC - seems you got on around 5AM my time!

    Update on MD's development state!

    I've had a massive feature creep for this plugin, and it's essentially turned into a little domain-specific scripting language. I honestly had no idea that I would be implementing all the features I have, and as much as I'd love to continue it's been simply way too long since I've gotten serious about pushing another major release.

    So, here's the plan, my friends. Currently, I'm trying to get everything ready for Bukkit's 1.0 Recommended Build - and I need some testers if I want to be able to get everything done. I have prepared some instructions here for testers who are interested in helping move things along!

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

    Phat32

    I had that thought too.... However here is my working example:
    Code:
        - 'if target.type.human':
            - "message.target.FIRE HOT"
    Here is my broken example:
    Code:
        - 'if target.type.human and target.onfire':
            - "message.target.FIRE HOT"
    Am I just inputing it wrong? Now one thing I will say is I am using the 1337 build, but we were using it on a 1.0 dev craftbukkit server..... So I downloaded the latest BukkitDevAPI, your source from GIT and updated it so we could test it while we waited and thats the issue I have run into. All I had done was replaced the bukkit jar in /src/resource with the one I downloaded. I think thats all I had to do but I would be wrong so yeah. Just an FYI haha
     
  31. Offline

    KoryuObihiro

    Gah, sorry, just missed you - still here, if you need me. If you don't get back on soon, I'll take the time to reply in a bit.

    EDIT: Try "isonfire" - that's one of the breaking changes mentioned in the changelog.
     

Share This Page