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

    @embty Chainmail's not added to the armor listings at the moment - if you want me to add it, I could.
    @Deolin Thanks for having that information ready for me! Huh, that's weird. I'll have to test that in a bit. TESTED. Bugged, trying to figure out the problem right now.

    I'll admit openly that I'm still learning how to be a good coder, so I can only apologize for getting your hopes up and presenting a bad product - even if this is indev. I'll see if I can't fix this right away.

    EDIT: It's not the 'set' string that seems to be bugged, but simple adding and subtracting - I changed how it handled the original event damage, and looks like I didn't change it. Whoops. :p
     
  3. Offline

    embty

    This is the config I made for Chainmail to have a chance of 99% to return dmg to the attacker right after installing the plugin server kept restarting itself over and over. Using bukkit 818

    Code:
    debugging: normal  # "quiet", "normal", and "verbose", for the differing stages a tinkerer will need for
                      #   comfortable console use with this plugin:
                      #   quiet - represses all but critical console outputs - no reload/startup spam.
                      #   normal - Prints recognized configuration elements to the console
                      #   verbose - For those who like wading through a lot of text to find a
                      #       frustratingly useless amount of information. Only use this if you're afraid of wikis,
                      #       are a tester, or just don't want to talk to the dev.
    
    disableDefaultDamage: false # When true, add some simplicity to your calculations by disabling the default damage
                                #   This effectively makes all event damage zero when it is passed, so
                                #   don't forget to define your damage nodes if you set this to false.
    
    disableDefaultHealth: false # When true, only mobs with defined MobHealth nodes will spawn.
    
    negativeHeal: false         # When true, negative damage results will heal the target
    
    ##########################################
    # Damage modification config reference
    ##########################################
    #
    # ALL damage modification strings are LEAF NODES. For example:
    # branch:
    #     - 'leaf'
    #     - 'leaf'
    #     - 'leaf'
    #     - 'leaf'
    #
    #  Simple damage buff: add a value to the damage event
    #
    #  - '#value'
    #
    #   ex., - '3' adds 3 to the specified buff
    #
    #---------------------------------------------
    #
    #  Damage setting: set event damage to a specified amount
    #
    #  - 'set.#value'
    #
    #   ex., - 'set.15' sets the event damage to 15, regardless of the event's previous damage value
    #
    #---------------------------------------------
    #
    #  Binomial (on/off) calculation: #value percent chance of executing $function,
    #   or in the case that $function is not defined, has #value percent chance of "hitting".
    #
    #   NOTE: You cannot use another binom function for this.
    #
    #  - 'binom.#chance[*($function)]'
    #
    #   ex., - 'binom.68' means that 68 out of 100 times the current damage count will NOT be set to 0
    #        - 'binom.69*3' means a 69% chance of applying a value of 3 to the specified buff
    #
    #---------------------------------------------
    #
    #  Attack roll calculation: Equal chance for all integer values < input
    #
    #  - 'roll[.#value]'
    #
    #   ex., - 'roll' for a current damage count of 15 gives equal chances of 0, 1, 2, 3, 4, ... 15
    #        - 'roll.4' means 20% chance for "rolling" to add a value of 0, 1, 2, 3, or 4
    #        - 'roll.6' means 1/7 chance for "rolling" to add a value of 0, 1, 2, 3, 4, 5, or 6
    #
    #---------------------------------------------
    #
    #  Simple multiplication of accumulated damage
    #
    #  - 'mult.#factor'
    #
    #   ex., - 'mult.3' at a point where the damage is 3 means the result is 6
    #
    #---------------------------------------------
    #
    #  Simple division of accumulated damage
    #
    #  - 'div.#factor'
    #
    #   ex., - 'div.3' at a point where the damage is 27 means the result is 9
    #
    #---------------------------------------------
    #
    #  Divide and add to total damage
    #
    #  - 'div_add.#factor'
    #
    #   ex., - 'div_add.4' for 12 would be (12 + 12/4) = 15
    #
    #---------------------------------------------
    Offensive:
        world:  # This should be the name of the world you want to configure - NOT "worldName",
                    #   unless...that's the name. :P
            global: # settings applied regardless of group
                generic:
                armor:
                    CHAINMAIL_HELMET.CHAINMAIL_CHESTPLATE:
                        - 'binom.99*3'
                    CHAINMAIL_LEGGINGS.CHAINMAIL_BOOTS:
                        - 'binom.99*3'
                        
    And this is the error in logs:

    Code:
    2011-06-07 15:35:42 [SEVERE] Could not load 'plugins\ModDamage.jar' in folder 'plugins':
    while scanning for the next token
    found character     '\t' that cannot start any token
     in "<reader>", line 99, column 1:
    
        ^
    
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockSequenceEntry.produce(ParserImpl.java:510)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockSequenceFirstEntry.produce(ParserImpl.java:502)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
        at org.yaml.snakeyaml.composer.Composer.composeSequenceNode(Composer.java:203)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:158)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
        at org.bukkit.util.config.Configuration.load(Configuration.java:74)
        at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:156)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:174)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:194)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:117)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:103)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    Oh that explains it all I was using chainmail :p

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

    KoryuObihiro

    @embty Looks like your config was wrong - '\t' is a tab character in Java. Did you accidentally push tab, or something? Whenever you have a problem with snakeyaml, it's a yaml issue, not a plugin issue.

    @Deolin Looks like the problem of simple addition is fixed, but the fact that that bug HEALED something is...not good. I'm gonna make sure that the negativeHeal mechanic is working properly now by repeating the bug.

    Thanks for everyone's input! This is precisely why I've disclaimed this sort of thing as "INDEV". :p
     
  5. Offline

    Deolin

    i'm follow you work ^^
    Staying for 0.9.3 ;)
    If you need i can test it for you.
     
    KoryuObihiro likes this.
  6. Offline

    embty

    Im using notepad++ isnt it suppose to like skip tabs or somthing ? ;p
    and was there somthing wrong I did in the config? or was it ok?
     
  7. Offline

    KoryuObihiro

    Gaaaaaah, documentation error on my part.

    The delimiting character for armor sets is supposed to be '*' (an asterisk), not '.' - this is because the SnakeYAML library interprets commands like "getNode("asdf.lolwut")" as a reference to this type of structure:
    Code:
    asdf:
        lolwut:
    
    As opposed to:
    Code:
    asdf.lolwut:
    
    So, right now, don't use chainmail - but try using "GOLD_HELMET*GOLD_LEGGINGS" or something, and let me know how it works.
     
  8. Offline

    Cobrand

    Hey, it's me again. THis time i'm on 819 build and i haven't any error as you can see here :
    Code:
    18:07:35 [INFO] [ModDamage] 0.9.1 enabled [Permissions v3.1.2 active]
    18:07:36 [INFO] [ModDamage] Debugging active.
    18:07:36 [INFO] [ModDamage] Default damage enabled.
    18:07:36 [INFO] [ModDamage] Default health enabled.
    18:07:36 [INFO] [ModDamage] Negative-damage healing is not enabled.
    18:07:36 [INFO] {Found global specific Offensive animal node for world "world"}
    18:07:36 [INFO] {Found global specific Offensive melee node for world "world"}
    18:07:36 [INFO] {Found global specific Offensive ranged node for world "world"}
    18:07:36 [INFO] {Found global specific Offensive mob node for world "world"}
    18:07:36 [INFO] {Found global specific Offensive nature node for world "world"}
    18:07:36 [INFO] Loading Offensive armor routines
    18:07:36 [INFO] [ModDamage] Global configuration for world "world" initialized!
    18:07:36 [INFO] -world:MobHealth:Creeper [20]
    18:07:36 [INFO] -world:MobHealth:Ghast [20]
    18:07:36 [INFO] -world:MobHealth:ZombiePigman [24]
    18:07:36 [INFO] -world:MobHealth:Skeleton [24]
    18:07:36 [INFO] -world:MobHealth:Spider [16]
    18:07:36 [INFO] -world:MobHealth:Zombie [40]
    18:07:36 [INFO] {Found global specific Offensive animal node for world "world_ne
    ther"}
    18:07:36 [INFO] {Found global specific Offensive melee node for world "world_net
    her"}
    18:07:36 [INFO] {Found global specific Offensive ranged node for world "world_ne
    ther"}
    18:07:36 [INFO] {Found global specific Offensive mob node for world "world_nethe
    r"}
    18:07:36 [INFO] {Found global specific Offensive nature node for world "world_ne
    ther"}
    18:07:36 [INFO] Loading Offensive armor routines
    18:07:36 [INFO] [ModDamage] Global configuration for world "world_nether" initia
    lized!
    18:07:36 [INFO] -world_nether:MobHealth:Creeper [20]
    18:07:36 [INFO] -world_nether:MobHealth:Ghast [20]
    18:07:36 [INFO] -world_nether:MobHealth:ZombiePigman [24]
    18:07:36 [INFO] -world_nether:MobHealth:Skeleton [24]
    18:07:36 [INFO] -world_nether:MobHealth:Spider [16]
    18:07:36 [INFO] -world_nether:MobHealth:Zombie [40]
    But still, it doesn't work ! Zombies still got 10 hearts instead of 30 and spiders still do a half heart damage !
    I don't understand at all ... No error, config.yml nicely done and made, but it doesn't work ...
    If you want I can send you my config.yml but I guess this isn't the problem ...
     
  9. Offline

    KoryuObihiro

    @Cobrand I'd like to see that config - it seems like you're not actually defining any instructions for the Spider Offensive node in Global Mob - try:
    Code:
    world:
        global:
            mob:
                Spider:
                    - 'set.2'
    
    As for your health nodes, I'm not sure what the issue is - why don't you try using Scan items to determine their health ingame? I'll try testing myself in a bit.

    Finally, I can't discount the fact you're using 819 - try doing this on build 818.

    EDIT: Works just fine for me...I'm using the following setup:
    Code:
    Scan:
        world:
            global:
                - 'sword' #
    MobHealth:
        world:
            Creeper: '20'
            Ghast: '20'
            ZombiePigman: '24'
            Skeleton: '24'
            Spider: '16'
            Zombie: '40'
        world_nether:
            Creeper: '20'
            Ghast: '20'
            ZombiePigman: '24'
            Skeleton: '24'
            Spider: '16'
            Zombie: '40'
    
    So, at the very least, this next release should work - I'm using 1.9.3 code right now. :p

    0.9.3 is out! :D Lots of fixes and additions this time.

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

    embty

    Was the config file I posted ok? Is it configured in the right way for chainmail to return dmg and act as a thornmail?
     
  11. Offline

    KoryuObihiro

    Err
    depends
    with your current setup, anybody attacking while wearing one of those chainmail sets would get that bonus. That what you wanted?

    Also, it should be worth noting that armor sets do not stack. If you want "cumulative" bonuses, you'll have to make armor sets for combinations, too - that's currently just how it works.
     
  12. Offline

    embty

    This is exactly how my config file looks like. When I use /md check its says not worlds are configered. Yes my world name is world lol

    Code:
    debugging: normal  # "quiet", "normal", and "verbose", for the differing stages a tinkerer will need for
                      #   comfortable console use with this plugin:
                      #   quiet - represses all but critical console outputs - no reload/startup spam.
                      #   normal - Prints recognized configuration elements to the console
                      #   verbose - For those who like wading through a lot of text to find a
                      #       frustratingly useless amount of information. Only use this if you're afraid of wikis,
                      #       are a tester, or just don't want to talk to the dev.
    
    disableDefaultDamage: false # When true, add some simplicity to your calculations by disabling the default damage
                                #   This effectively makes all event damage zero when it is passed, so
                                #   don't forget to define your damage nodes if you set this to false.
    
    disableDefaultHealth: false # When true, only mobs with defined MobHealth nodes will spawn.
    
    negativeHeal: false         # When true, negative damage results will heal the target
    
    ##########################################
    # Damage modification config reference
    ##########################################
    #
    # ALL damage modification strings are LEAF NODES. For example:
    # branch:
    #     - 'leaf'
    #     - 'leaf'
    #     - 'leaf'
    #     - 'leaf'
    #
    #  Simple damage buff: add a value to the damage event
    #
    #  - '#value'
    #
    #   ex., - '3' adds 3 to the specified buff
    #
    #---------------------------------------------
    #
    #  Damage setting: set event damage to a specified amount
    #
    #  - 'set.#value'
    #
    #   ex., - 'set.15' sets the event damage to 15, regardless of the event's previous damage value
    #
    #---------------------------------------------
    #
    #  Binomial (on/off) calculation: #value percent chance of executing $function,
    #   or in the case that $function is not defined, has #value percent chance of "hitting".
    #
    #   NOTE: You cannot use another binom function for this.
    #
    #  - 'binom.#chance[*($function)]'
    #
    #   ex., - 'binom.68' means that 68 out of 100 times the current damage count will NOT be set to 0
    #        - 'binom.69*3' means a 69% chance of applying a value of 3 to the specified buff
    #
    #---------------------------------------------
    #
    #  Attack roll calculation: Equal chance for all integer values < input
    #
    #  - 'roll[.#value]'
    #
    #   ex., - 'roll' for a current damage count of 15 gives equal chances of 0, 1, 2, 3, 4, ... 15
    #        - 'roll.4' means 20% chance for "rolling" to add a value of 0, 1, 2, 3, or 4
    #        - 'roll.6' means 1/7 chance for "rolling" to add a value of 0, 1, 2, 3, 4, 5, or 6
    #
    #---------------------------------------------
    #
    #  Simple multiplication of accumulated damage
    #
    #  - 'mult.#factor'
    #
    #   ex., - 'mult.3' at a point where the damage is 3 means the result is 6
    #
    #---------------------------------------------
    #
    #  Simple division of accumulated damage
    #
    #  - 'div.#factor'
    #
    #   ex., - 'div.3' at a point where the damage is 27 means the result is 9
    #
    #---------------------------------------------
    #
    #  Divide and add to total damage
    #
    #  - 'div_add.#factor'
    #
    #   ex., - 'div_add.4' for 12 would be (12 + 12/4) = 15
    #
    #---------------------------------------------
    Defensive:
        world:
            global:
                generic:
                    armor:
                    CHAINMAIL_HELMET.CHAINMAIL_CHESTPLATE:
                        - 'binom.99*3'
                    CHAINMAIL_LEGGINGS.CHAINMAIL_BOOTS:
                        - 'binom.99*3'
        # Same format as the Offensive node...except since the world can't take damage
        # you probably don't want to clutter up things with a global "nature" node.
    
    #############################
    # MobHealth config reference
    #
    #    In contrast to damage modification, there is only ONE MobHealth
    #    definition string permitted, and that is as a property of the tree node
    #    in config. For example:
    #
    #    $mobname: 'range.2.14'
    #
    #    Leaf nodes will only get ignored.
    #    *Remember*, 200 is the max for any given mob health.
    #
    #---------------------------------
    #
    #  Integer setting: use an integer to always set a spawned mob's health to #value
    #   ex., $mobname: '3'
    #
    #---------------------------------
    #
    #  Simple range equation (base - range) <= health on spawn <= (base + range)
    #
    #  - 'range.#lower.#upper'
    #
    #    ex., $mobname: 'range.14.62' means 14 <= mob health on spawn <= 62
    #
    #---------------------------------
    #
    #  Interval-based range equation (base - (interval * factor)) <= health on spawn <= (base + (interval * factor))
    #   ...where factor is calculated in a similar fashion to the Attack Roll in DamageCalculator.
    #
    #  - 'range_int.#base.#interval.#range'
    #
    #    ex., possible outputs for - 'range_int.12.2.3' would be 6, 8, 10, 12, 14, 16, 18.
    #---------------------------------
    
     
  13. Offline

    Cobrand


    Oh, oh ... I think I see what is the problem. I guess I must not leave blanks ? Because i've done like that and i think this is the problem ...

    Code:
    MobHealth:
        world:
            Chicken:
            Creeper: '20'
            Cow:
            Ghast: '20'
            Giant:
            Pig:
            Sheep:
            Skeleton: '24'
            Slime:
            Spider: '16'
            Wolf:
            Zombie: '40'
            ZombiePigman: '24'
        world_nether:
            Chicken:
            Creeper: '20'
            Cow:
            Ghast: '20'
            Giant:
            Pig:
            Sheep:
            Skeleton: '24'
            Slime:
            Spider: '16'
            Wolf:
            Zombie: '40'
            ZombiePigman: '24'
    That is why this doesn't work : I leave some blanks. I'm going to test without

    Another question ... When there is for example
    Code:
            Creeper: '20'
    This means Creeper have 20 hearts more or 20 HALF-hearts more ?
     
  14. Offline

    KoryuObihiro

    Technically blanks fields shouldn't affect anything - your next question is much more pertinent:
    I think addition in the MobHealth node would just be plain confusing - right now, if you use an integer value, it'll SET it to that value (in terms of half-hearts, like everything else), not add it. So...a good question to ask. :p

    @embty You're trying to specify a set of armor in the generics node - which is different from a category-specific node, as follows:
    Code:
    WORLDNAME:
        global:
            generic:
                armor:
                    - 'SOME.STRING'
            armor:
                SOME_LEGGINGS*SOME_BOOTS*SOME_CHESTPLATE:
                    - 'SOME.STRING'
    
    See the difference? When you define a string under the generic "armor" node, it'll apply itself whenever the person is wearing any recognized bit of armor - as opposed to the specific "armor" node, immediately indented from the "global" node (not the "generic" node).

    Generics are useful for when you want to make blanket decisions with your damage categories - for instance, if you want to just make all mobs do zero damage, you just use:
    Code:
    Offensive:
        WORLDNAME:
            global:
                generic:
                    mob:
                        - 'set.0'
    
    As opposed to:
    Code:
    Offensive:
        WORLDNAME:
            global:
                mob:
                    Creeper:
                        - 'set.0'
                    Ghast:
                        - 'set.0'
                    Giant:
                        - 'set.0'
                    PigZombie:
                        - 'set.0'
                    Skeleton:
                        - 'set.0'
                    Slime:
                        - 'set.0'
                    Spider:
                        - 'set.0'
                    Zombie:
                        - 'set.0'
    
    I hope this is making sense. :) I guess I should write some more in the wiki, huh?

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

    embty

    I understand how mobs dmg works but not the armor part and ur wiki is graet but it doesnt mention anything about armors since its new :p
     
  16. Offline

    KoryuObihiro

    @embty Yeah, understood - I hope my explanation will be sufficient for now. Actually, a basic example is in the file configuration reference right now...
     
  17. Offline

    Kainzo

    On one of the newest non-RB's there will be some changes to how this is being handled - you'll have to make adjustments accordingly.
     
    KoryuObihiro likes this.
  18. Offline

    KoryuObihiro

    Thanks for the heads-up! I'll check it out.
     
  19. Offline

    Shigan

    Hey, I'm having some difficulty with this plugin. Many things do not work for me, but the example I will use it the diamond_sword.

    Code:
              humans:
                        - set.0
                    melee:
                        - set.2
                    ranged:
                        - set.6
                    armor:
                        - set.0
                    mob:
                        - set.0
                animal:
                    Chicken:
                        - set.-2
                    Cow:
                        - set.0
                    Pig:
                        - set.0
                    Sheep:
                        - set.0
                    Wolf:
                        - set.5
                melee:
                    axe:
                        - set.4
                    hoe:
                        - set.2
                    pickaxe:
                        - set.2
                    spade:
                        - set.5
                    sword:
                        - set.1
                    Diamond_Sword:
                        - set.5
    For some reason, the diamond sword still deals the default damage. It should be dealing only 4 full hearts of damage, but it is still dealing the default 5 and a half hearts.

    Plugin list:
    Code:
    Permissions, PlugMan, Logblock, EmoteSystem, HeroChat, WorldEdit, FenceDoor, FenceStack,
    BananaChunk, ExactSpawn, NoCheat,
    FalseBookCart, Voxel Sniper, Cookbook, iConomy, p2Aliases, SimpleSave, LocalShops, SpawnMob,
    FalseBookIC, FalseBookBlock, MobRider, NoSpawn, Stackable, HeroBounty, FalseBookCore,
    BorderGuard, ChairCraft, NoFarm, PermissionsPlus, ecoCreature,
    Towny, Whitelist, VanishNoPickup, MagicSpells, Essentials, WorldGuard, FalseBookExtra
    The rest of the configuration
    Show Spoiler

    Code:
    Offensive:
        world:  # This should be the name of the world you want to configure - NOT "worldName",
                    #   unless...that's the name. :P
            global: # settings applied regardless of group
                generic:
                    animal:
                        - set.0
                    humans:
                        - set.0
                    melee:
                        - set.2
                    ranged:
                        - set.6
                    armor:
                        - set.0
                    mob:
                        - set.0
                animal:
                    Chicken:
                        - set.-2
                    Cow:
                        - set.0
                    Pig:
                        - set.0
                    Sheep:
                        - set.0
                    Wolf:
                        - set.5
                melee:
                    axe:
                        - set.4
                    hoe:
                        - set.2
                    pickaxe:
                        - set.2
                    spade:
                        - set.5
                    sword:
                        - set.1
                    Diamond_Sword:
                        - set.5
                ranged:
                    bow:
                        - set.0
                    egg:
                        - set.-5
                    snowball:
                        - set.-5
                armor:
                    Diamond_Helmet*Diamond_Leggings*Diamond_Chestplate*Diamond_Boots:
                        - set.200
                mob:
                    Creeper:
                        - set.199
                    Ghast:
                        - set.50
                    Giant:
                        - set.200
                    Skeleton:
                        - set.6
                    Slime:
                        - set.4
                    Spider:
                        - set.8
                    Zombie:
                        - set.7
                    ZombiePigman:
                        - set.14
                nature:
                    blockexplosion:
                        - set.50
                    burn:
                        - set.4
                    cactus:
                        - set.1
                    drowning:
                        - set.7
                    explosion:
                        - set.10
                    fall:
                        - set.5
                    fire:
                        - set.6
                    lava:
                        - set.7
                    lightning:
                        - set.200
                    suffocation:
                        - set.4
                    void:
                        - set.1
            groups:
                Settler:          # MUST match up with the name in Permissions
                    generic:        # This pretty much follows the global configuration, so specific
                                 #   nodes have been omitted here in favor of readability.
                    animal:
                    melee:
                    ranged:
                    armor:
                    mob:
                    nature:
                    groups:
                        Citizen:
                             - set.0
        world_nether:
                    #   unless...that's the name. :P
            global: # settings applied regardless of group
                generic:
                    animal:
                        - set.0
                    humans:
                        - set.3
                    melee:
                        - set.8
                    ranged:
                        - set.2
                    armor:
                        - set.10
                    mob:
                        - set.5
                animal:
                    Chicken:
                        - set.-2
                    Cow:
                        - set.0
                    Pig:
                        - set.0
                    Sheep:
                        - set.0
                    Wolf:
                        - set.5
                melee:
                    axe:
                        - set.10
                    hoe:
                        - set.2
                    pickaxe:
                        - set.2
                    spade:
                        - set.5
                    sword:
                        - set.1
                    stick:
                        - set.3
                ranged:
                    bow:
                        - set.0
                    egg:
                        - set.-5
                    snowball:
                        - set.-5
                armor:
                    Diamond_Helmet*Diamond_Leggings*Diamond_Chestplate*Diamond_Boots:
                        - set.200
                mob:
                    Creeper:
                        - set.199
                    Ghast:
                        - set.50
                    Giant:
                        - set.200
                    Skeleton:
                        - set.6
                    Slime:
                        - set.4
                    Spider:
                        - set.8
                    Zombie:
                        - set.7
                    ZombiePigman:
                        - set.14
                nature:
                    blockexplosion:
                        - set.50
                    burn:
                        - set.4
                    cactus:
                        - set.1
                    drowning:
                        - set.7
                    explosion:
                        - set.10
                    fall:
                        - set.5
                    fire:
                        - set.6
                    lava:
                        - set.7
                    lightning:
                        - set.200
                    suffocation:
                        - set.4
                    void:
                        - set.1
            groups:
                Settler:          # MUST match up with the name in Permissions
                    generic:        # This pretty much follows the global configuration, so specific
                                 #   nodes have been omitted here in favor of readability.
                    animal:
                    melee:
                    ranged:
                    armor:
                    mob:
                    nature:
                    groups:
                        Citizen:
                             - set.0    # Some other valid world name.
    Defensive:
        world:  # This should be the name of the world you want to configure - NOT "worldName",
                    #   unless...that's the name. :P
            global: # settings applied regardless of group
                generic:
                    animal:
                        - set.0
                    humans:
                        - set.0
                    melee:
                        - set.0
                    ranged:
                        - set.0
                    armor:
                        - set.0
                    mob:
                        - set.0
                animal:
                    Chicken:
                        - set.
                    Cow:
                        - set.0
                    Pig:
                        - set.0
                    Sheep:
                        - set.0
                    Wolf:
                        - set.0
                melee:
                    axe:
                        - set.0
                    hoe:
                        - set.0
                    pickaxe:
                        - set.0
                    spade:
                        - set.0
                    sword:
                        - set.0
                    Diamond_Sword:
                        - set.0
                ranged:
                    bow:
                        - set.0
                    egg:
                        - set.0
                    snowball:
                        - set.0
                armor:
                    Diamond_Helmet*Diamond_Leggings*Diamond_Chestplate*Diamond_Boots:
                        - set.
                mob:
                    Creeper:
                        - set.0
                    Ghast:
                        - set.
                    Giant:
                        - set.0
                    Skeleton:
                        - set.6
                    Slime:
                        - set.4
                    Spider:
                        - set.8
                    Zombie:
                        - set.7
                    ZombiePigman:
                        - set.14
            groups:
                Settler:          # MUST match up with the name in Permissions
                    generic:        # This pretty much follows the global configuration, so specific
                                 #   nodes have been omitted here in favor of readability.
                    animal:
                    melee:
                    ranged:
                    armor:
                    mob:
                    nature:
                    groups:
                        Citizen:
                             - set.0
        world_nether:
                    #   unless...that's the name. :P
            global: # settings applied regardless of group
                generic:
                    animal:
                        - set.0
                    humans:
                        - set.0
                    melee:
                        - set.0
                    ranged:
                        - set.0
                    armor:
                        - set.0
                    mob:
                        - set.0
                animal:
                    Chicken:
                        - set.0
                    Cow:
                        - set.0
                    Pig:
                        - set.0
                    Sheep:
                        - set.0
                    Wolf:
                        - set.0
                melee:
                    axe:
                        - set.0
                    hoe:
                        - set.0
                    pickaxe:
                        - set.0
                    spade:
                        - set.0
                    sword:
                        - set.0
                    stick:
                        - set.0
                ranged:
                    bow:
                        - set.0
                    egg:
                        - set.0
                    snowball:
                        - set.0
                armor:
                    Diamond_Helmet*Diamond_Leggings*Diamond_Chestplate*Diamond_Boots:
                        - set.0
                mob:
                    Creeper:
                        - set.0
                    Ghast:
                        - set.0
                    Giant:
                        - set.0
                    Skeleton:
                        - set.0
                    Slime:
                        - set.0
                    Spider:
                        - set.0
                    Zombie:
                        - set.0
                    ZombiePigman:
                        - set.0
        # Same format as the Offensive node...except since the world can't take damage
        # you probably don't want to clutter up things with a global "nature" node.
    
    #############################
    # MobHealth config reference
    #
    #    In contrast to damage modification, there is only ONE MobHealth
    #    definition string permitted, and that is as a property of the tree node
    #    in config. For example:
    #
    #    $mobname: 'range.2.14'
    #
    #    Leaf nodes will only get ignored.
    #    *Remember*, 200 is the max for any given mob health.
    #
    #---------------------------------
    #
    #  Integer setting: use an integer to always set a spawned mob's health to #value
    #   ex., $mobname: '3'
    #
    #---------------------------------
    #
    #  Simple range equation (base - range) <= health on spawn <= (base + range)
    #
    #  - 'range.#lower.#upper'
    #
    #    ex., $mobname: 'range.14.62' means 14 <= mob health on spawn <= 62
    #
    #---------------------------------
    #
    #  Interval-based range equation (base - (interval * factor)) <= health on spawn <= (base + (interval * factor))
    #   ...where factor is calculated in a similar fashion to the Attack Roll in DamageCalculator.
    #
    #  - 'range_int.#base.#interval.#range'
    #
    #    ex., possible outputs for - 'range_int.12.2.3' would be 6, 8, 10, 12, 14, 16, 18.
    #---------------------------------
    
    MobHealth:
        world:
            Chicken:
              - range.2.12
            Creeper:
              - range.8.20
            Cow:
              - range.10.25
            Ghast:
              - range.5.50
            Giant:
              - range.120.200
            Pig:
              - range.2.15
            Sheep:
              - set.5
            Skeleton:
              - range.15.25
            Slime:
              - range.25.30
            Spider:
              - range.10.25
            Wolf:
              - range.7.45
            Zombie:
              - range.20.50
            ZombiePigman:
              - range.35.70
        world_nether:
            Chicken:
              - range.2.12
            Creeper:
              - range.8.20
            Cow:
              - range.10.25
            Ghast:
              - range.5.50
            Giant:
              - range.120.200
            Pig:
              - range.2.15
            Sheep:
              - set.5
            Skeleton:
              - range.15.25
            Slime:
              - range.25.30
            Spider:
              - range.10.25
            Wolf:
              - range.7.45
            Zombie:
              - range.20.50
            ZombiePigman:
              - range.100.200
    
    Scan:
        worldName:
            global:
                - 'SOMEITEM'
            groups:
                groupname:
                    - 'SOMEITEM'
        worldName2:
     
  20. Offline

    KoryuObihiro

    Next time you report a problem, please state your Bukkit build - I'm assuming you're using 818, but that's an abstraction I'd rather not be at the mercy of.

    Anyway, I can immediately see that the casing for your items isn't right - in the Bukkit enum, everything's in caps: i.e., DIAMOND_SWORD, DIAMOND_HELMET, etc. I intend on removing this unnecessary irritation in due time, but for now that needs to be changed.

    By default, "normal" debugging is activated and should inform you of every valid configuration node it finds, so if you can't see it on the console...something is wrong. Console output should go in an order akin to:
    Code:
    A. Offensive globals, then groups - repeat for Defensive
        1. Globals (world-specific)
            a. Generics/predefined nodes (not necessarily the order listed here):
                1) Humans (no specifics - groups used)
                2) Animals
                3) Melee
                4) Ranged
                5) Armor
            b. Specific Armor nodes
            c. Specific Melee/item nodes
        2. Groups (load same structure as globals)
    B. MobHealth settings
    C. Scan items
        1. Globals (world-specific)
        2. Groups (also world-specific)
    
     
  21. Offline

    Rpa;otj

    What would this look like under Defensive if I want to make creepers do 0 damage ONLY if you have a chain chestplate equipped? I have a huge range of other customizations done thanks to your plugin but I cannot find anything in the wiki or on this thread about reducing damage from a specific source while having a certain item equipped. Group changing is not a possibility in my situation as it is for a minigame that is in place on my server. I want 1 of my 6 classes within this activity to spawn with chain armor equipped and to not take any damage at all from creepers.

    Would this be right?

    Defensive:
    ____worldnameblahblahblah:
    ________global:
    ____________armor:
    ________________CHAIN_CHESTPLATE:
    ____________________mob:
    ________________________creeper:
    ____________________________- 'set.0'

    ***EDIT*** From defensive down everything is progressively spaced 4 spaces right in comparison to each previous line.
     
  22. Offline

    KoryuObihiro

    Right now, group configuration's the only way to change that - the complexity of your problem can be described as follows:

    Code:
    (apply world settings)
    Handle group "BLEH"
    - if(attacker is Creeper) then (apply Group-Creeper settings)
    <MD damage complexity has already ended here. :( >
        - if(equipment contains CHAIN_CHESTPLATE)  then set.0
    
    A conditional like that currently isn't compatible with the ModDamage calculation algorithm and configuration structure - I'm not allowing for it in file configuration, and I've not much interest in refactoring it unless a really crazy idea strikes me.

    However...there IS a reasonable idea that comes to mind...refactoring the calculation algorithm so it has access to attacker/target information would allow a much wider variety of calculation strings. I'm already planning on adding a "if-else"-etc. calculation strings that will require similar refactoring, so let me ask you this:

    What if you had an "if.armor.contains.[armorSet]*SOME.STRING" type of calculation string? The only considerations for something like this in relation to old versions is that currently the string-separation and item-separation characters are the same ('*') - an easy problem to communicate - and performance. Damage modification at that complexity is great, but I don't know what sort of effect passing this information that many more times will do to a server's speed.

    I guess the only way to find out is to try - but first I'm gonna iron out the ingame-command feature creep I'm experiencing right now. :p
     
  23. Offline

    Rpa;otj

    Ok thanks for answering...And, I somehow broke my plugin atm to where I no longer can reload or do anything via in-game commands and also all my custom damage settings and everything are no longer in effect. Yay for me! What I was attempting to do was to add a new monk class to MobArena that wears chain armor and fights bare-handed. Creepers deal no damage to him and he has a 70% chance when hit to take 20% less damage, and can run faster, jump higher, and dodge attacks sometimes. I have gotten everything working great except for making him immune to creeper explosions. I cannot do it by group because I don't want that ability to leave the activity and be carried over into the normal game.
     
  24. Offline

    KoryuObihiro

    Sorry, my reply was hideously mutilated by the BBCode editor - fixed it.

    Glancing at your config again, I must comment...you realize you can disable default damage in the game, right? You don't have to clutter up everything with 'set.0'.

    Couldn't you get a group-manipulating plugin, or something like CommandSigns with signs that'll change group and warp them out?

    1) Armor sets DO NOT accumulate - as is, your configuration will only grant positive buffs to players who are wearing either chain leggings or a chestplate, but not both. It's a semantic mistake I won't fault you for - it'll have to be documented better on the wiki before having the rights to scream. I'll fix it for you in the example below.

    2) All nodes are case-sensitive - in this case, everything is lowercase. I noticed that in some places, you had this:
    Code:
    Defensive:
        Roalith:
           Global:          # Nuuuuuuuuuuuuuuu
                armor:
                    CHAINMAIL_CHESTPLATE:
                        - '8'
                    CHAINMAIL_LEGGINGS:
                        - 'binom.70*div.5'
                    CHAINMAIL_LEGGINGS*CHAINMAIL_CHESTPLATE:
                        - 'binom.70*div.5' # Dunno if this is the order you want it in, but meh. [/FONT]
                        - '8'
                nature:
                    burn:
                        - 'set.0'
                    lightning:
                        - 'set.0'
                    fire:
                        - 'set.0'
        Roalith_nether:
            Global:          # Nuuuuuuuuuuuuuuu
                armor:
                    CHAINMAIL_CHESTPLATE:
                        - '8'
                    CHAINMAIL_LEGGINGS:
                        - 'binom.70*div.5'
                    CHAINMAIL_LEGGINGS*CHAINMAIL_CHESTPLATE:
                        - 'binom.70*div.5'
                        - '8'
                nature:
                    burn:
                        - 'set.0'
                    lightning:
                        - 'set.0'
                    fire:
                        - 'set.0'
    
    Again, this isn't something to fault you for, but it is something that you need to fix - change the commented lines to read as "global", instead of "Global".

    3) Global nature nodes will have NO effect in the Defensive configuration - this is because elements of nature can't take damage (an explosion entity was killed!...lolwut?) If you want to change how much damage an element of nature gives, then define it in the Offensive node - they're the things causing the damage.

    4) I'm kidding - there's no other problems I can see. :p Looking at your configuration, I might actually like to try it out myself! Good to see this plugin getting put to good use.

    Ohgawl, I hate this editor. Let me fix this, just a second...
    Fixed.
    o_o Delete post FTW?

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

    Rpa;otj

    I've messed something up somewhere though...I cannot use the commands, my item damage values are all defaulted regardless of what I put in on ModDamage, and my chain legs NEVER reduce damage. Also my chain chest piece still has me taking the same damage as if I am wearing nothing. Annoying considering everything worked great last night. I did indeed put the nature settings under offense. Someone told me it should be CHAIN_ and not CHAINMAIL_ but on your item list link it shows as CHAINMAIL. I am starting to be at a loss after spending so much time on my server this week. Sword nerf, hoe boost, egg damage, axe boost all worked last night in MobArena and with mcMMO, now it's all working as if I don't even have ModDamage installed! I've got a good 60 hours in and was hoping to just enjoy the weekend...

    *EDIT* Yeah sorry about the deleted post, but while I was typing it you had already replied by the time I posted and some of your reply addressed some of my new post, so deleted and tried your suggestions, now posting back again!
     
  26. Offline

    KoryuObihiro

    Ach, I know how that feels. ;)

    In all seriousness, I don't mind helping you with the problem, so perhaps you'd like to work this out with me privately?
     
  27. Offline

    Rpa;otj

    Yes I would, I added to our conversation if you get a minute to check!
     
  28. Offline

    Shigan

    Sorry about that, yes we are using 818. I will make all of the nodes in caps and try this again.
     
  29. Offline

    TheKingdomsMC

    Hey, it's Shigan again. I'm having some difficulty with simply enabling it now. I have disabled all of my plugins except for essentials, permissions, and moddamage, so it isn't a conflicting plugin issue I hope. While enabling the plugin during startup, I get this error
    Code:
    02:57:40 [SEVERE] Error occurred while enabling ModDamage v0.9.3 (Is it up to date?): java.lang.Integer cannot be cast to java.lang.String
    java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
            at com.KoryuObihiro.bukkit.ModDamage.Handling.WorldHandler.loadMobHealth(WorldHandler.java:393)
            at com.KoryuObihiro.bukkit.ModDamage.Handling.WorldHandler.reload(WorldHandler.java:83)
            at com.KoryuObihiro.bukkit.ModDamage.Handling.WorldHandler.<init>(WorldHandler.java:68)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamage.loadConfig(ModDamage.java:674)
            at com.KoryuObihiro.bukkit.ModDamage.ModDamage.onEnable(ModDamage.java:96)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:750)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:134)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:112)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    There are no other errors.

    Here is my testing configuration


    Code:
    debugging: verbose  # "quiet", "normal", and "verbose", for the differing stages a tinkerer will need for
    
                      #   comfortable console use with this plugin:
    
                      #   quiet - represses all but critical console outputs - no reload/startup spam.
    
                      #   normal - Prints recognized configuration elements to the console
    
                      #   verbose - For those who like wading through a lot of text to find a
    
                      #       frustratingly useless amount of information. Only use this if you're afraid of wikis,
    
                      #       are a tester, or just don't want to talk to the dev.
      
    disableDefaultDamage: true # When true, add some simplicity to your calculations by disabling the default damage
    
                                #   This effectively makes all event damage zero when it is passed, so
    
                                #   don't forget to define your damage nodes if you set this to false.
      
    disableDefaultHealth: false # When true, only mobs with defined MobHealth nodes will spawn.
      
    negativeHeal: true         # When true, negative damage results will heal the target
      
    ##########################################
    
    # Damage modification config reference
    
    ##########################################
    
    #
    
    # ALL damage modification strings are LEAF NODES. For example:
    
    # branch:
    
    #     - 'leaf'
    
    #     - 'leaf'
    
    #     - 'leaf'
    
    #     - 'leaf'
    
    #
    
    #  Simple damage buff: add a value to the damage event
    
    #
    
    #  - '#value'
    
    #
    
    #   ex., - '3' adds 3 to the specified buff
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Damage setting: set event damage to a specified amount
    
    #
    
    #  - 'set.#value'
    
    #
    
    #   ex., - 'set.15' sets the event damage to 15, regardless of the event's previous damage value
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Binomial (on/off) calculation: #value percent chance of executing $function,
    
    #   or in the case that $function is not defined, has #value percent chance of "hitting".
    
    #
    
    #   NOTE: You cannot use another binom function for this.
    
    #
    
    #  - 'binom.#chance[*($function)]'
    
    #
    
    #   ex., - 'binom.68' means that 68 out of 100 times the current damage count will NOT be set to 0
    
    #        - 'binom.69*3' means a 69% chance of applying a value of 3 to the specified buff
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Attack roll calculation: Equal chance for all integer values < input
    
    #
    
    #  - 'roll[.#value]'
    
    #
    
    #   ex., - 'roll' for a current damage count of 15 gives equal chances of 0, 1, 2, 3, 4, ... 15
    
    #        - 'roll.4' means 20% chance for "rolling" to add a value of 0, 1, 2, 3, or 4
    
    #        - 'roll.6' means 1/7 chance for "rolling" to add a value of 0, 1, 2, 3, 4, 5, or 6
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Simple multiplication of accumulated damage
    
    #
    
    #  - 'mult.#factor'
    
    #
    
    #   ex., - 'mult.3' at a point where the damage is 3 means the result is 6
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Simple division of accumulated damage
    
    #
    
    #  - 'div.#factor'
    
    #
    
    #   ex., - 'div.3' at a point where the damage is 27 means the result is 9
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Divide and add to total damage
    
    #
    
    #  - 'div_add.#factor'
    
    #
    
    #   ex., - 'div_add.4' for 12 would be (12 + 12/4) = 15
    
    #
    
    #---------------------------------------------
    
    Offensive:
    
        world:  # This should be the name of the world you want to configure - NOT "worldName",
    
                    #   unless...that's the name. :P
    
            global: # settings applied regardless of group
    
                generic:
    
                    animal:
    
                        - 1
    
                    humans:
    
                        - 1
    
                    melee:
    
                        - 1
    
                    ranged:
    
                        - 1
    
                    armor:  # Applied whenever...something...is equipped
    
                    mob:
    
                        - 100
    
                animal:
    
                    Chicken:
    
                    Cow:
    
                    Pig:
    
                    Sheep:
    
                    Wolf:
    
                melee:
    
                    axe:
    
                    hoe:
    
                    pickaxe:
    
                    spade:
    
                    sword:
    
                        - 1
    
                ranged:
    
                    bow:
    
                    egg:
    
                    snowball:
    
                        - 1
    
                armor:
    
                mob:
    
                    Creeper:
    
                    Ghast:
    
                    Giant:
    
                    Skeleton:
    
                    Slime:
    
                    Spider:
    
                    Zombie:
    
                    ZombiePigman:
    
                nature:
    
                    blockexplosion:
    
                        - 1
    
                    burn:
    
                        - 1
    
                    cactus:
    
                        - 1
    
                    drowning:
    
                        - 1
    
                    explosion:
    
                        - 1
    
                    fall:
    
                        - 1
    
                    fire:
    
                        - 1 # "fire" is exposure to a fire block, "burn" is damage taken
    
                                 #   after you survive that exposure.
    
                    lava:
    
                        - 1
    
                    lightning:
    
                        - 1
    
                    suffocation:
    
                        - 1    # Suffocation from blocks, not water - see "drowning"
    
                    void:
    
                        - 1         # "void" is damage from falling through the world
    
            groups:
    
                Settler:          # MUST match up with the name in Permissions
    
                    generic:        # This pretty much follows the global configuration, so specific
    
                                 #   nodes have been omitted here in favor of readability.
    
                    animal:
    
                    melee:
    
                    ranged:
    
                    armor:
    
                    mob:
    
                    nature:
    
                    groups:         # this changes PvP damage so group relationships are possible
    
                        Citizen: # Again, this needs to be a valid group in Permissions
    
        world_nether: # Some other valid world name.  # This should be the name of the world you want to configure - NOT "worldName",
    
                    #   unless...that's the name. :P
    
            global: # settings applied regardless of group
    
                generic:
    
                    animal:
    
                        - 0
    
                    humans:
    
                        - 1
    
                    melee:
    
                        - 1
    
                    ranged:
    
                        - 1
    
                    armor:  # Applied whenever...something...is equipped
    
                    mob:
    
                        - 100
    
                animal:
    
                    Chicken:
    
                    Cow:
    
                    Pig:
    
                    Sheep:
    
                    Wolf:
    
                melee:
    
                    axe:
    
                    hoe:
    
                    pickaxe:
    
                    spade:
    
                    sword:
    
                        - 1
    
                ranged:
    
                    bow:
    
                    egg:
    
                    snowball:
    
                        - 1
    
                armor:
    
                mob:
    
                    Creeper:
    
                    Ghast:
    
                    Giant:
    
                    Skeleton:
    
                    Slime:
    
                    Spider:
    
                    Zombie:
    
                    ZombiePigman:
    
                nature:
    
                    blockexplosion:
    
                        - 1
    
                    burn:
    
                        - 1
    
                    cactus:
    
                        - 1
    
                    drowning:
    
                        - 1
    
                    explosion:
    
                        - 1
    
                    fall:
    
                        - 1
    
                    fire:
    
                        - 1 # "fire" is exposure to a fire block, "burn" is damage taken
    
                                 #   after you survive that exposure.
    
                    lava:
    
                        - 1
    
                    lightning:
    
                        - 1
    
                    suffocation:
    
                        - 1    # Suffocation from blocks, not water - see "drowning"
    
                    void:
    
                        - 1         # "void" is damage from falling through the world
    
            groups:
    
                Settler:          # MUST match up with the name in Permissions
    
                    generic:        # This pretty much follows the global configuration, so specific
    
                                 #   nodes have been omitted here in favor of readability.
    
                    animal:
    
                    melee:
    
                    ranged:
    
                    armor:
    
                    mob:
    
                    nature:
    
                    groups:         # this changes PvP damage so group relationships are possible
    
                        Citizen: # Again, this needs to be a valid group in Permissions
    
    Defensive:
    
        worldName:
    
        # Same format as the Offensive node...except since the world can't take damage
    
        # you probably don't want to clutter up things with a global "nature" node.
      
    #############################
    
    # MobHealth config reference
    
    #
    
    #    In contrast to damage modification, there is only ONE MobHealth
    
    #    definition string permitted, and that is as a property of the tree node
    
    #    in config. For example:
    
    #
    
    #    $mobname: 'range.2.14'
    
    #
    
    #    Leaf nodes will only get ignored.
    
    #    *Remember*, 200 is the max for any given mob health.
    
    #
    
    #---------------------------------
    
    #
    
    #  Integer setting: use an integer to always set a spawned mob's health to #value
    
    #   ex., $mobname: '3'
    
    #
    
    #---------------------------------
    
    #
    
    #  Simple range equation (base - range) <= health on spawn <= (base + range)
    
    #
    
    #  - 'range.#lower.#upper'
    
    #
    
    #    ex., $mobname: 'range.14.62' means 14 <= mob health on spawn <= 62
    
    #
    
    #---------------------------------
    
    #
    
    #  Interval-based range equation (base - (interval * factor)) <= health on spawn <= (base + (interval * factor))
    
    #   ...where factor is calculated in a similar fashion to the Attack Roll in DamageCalculator.
    
    #
    
    #  - 'range_int.#base.#interval.#range'
    
    #
    
    #    ex., possible outputs for - 'range_int.12.2.3' would be 6, 8, 10, 12, 14, 16, 18.
    
    #---------------------------------
      
    MobHealth:
    
        world:
    
            Chicken: 40
    
            Creeper: 1
    
            Cow: 1
    
            Ghast: 1
    
            Giant: 1
    
            Pig: 100
    
            Sheep: 100
    
            Skeleton: 1
    
            Slime: 1
    
            Spider: 1
    
            Wolf: 1
    
            Zombie: 1
    
            ZombiePigman: 1
    
        world_nether:
    
            Chicken: 40
    
            Creeper: 1
    
            Cow: 1
    
            Ghast: 1
    
            Giant: 1
    
            Pig: 100
    
            Sheep: 100
    
            Skeleton: 1
    
            Slime: 1
    
            Spider: 1
    
            Wolf: 1
    
            Zombie: 1
    
            ZombiePigman: 1
    
    I also had this same error pop up with my old config file

    Code:
    debugging: normal  # "quiet", "normal", and "verbose", for the differing stages a tinkerer will need for
    
                      #   comfortable console use with this plugin:
    
                      #   quiet - represses all but critical console outputs - no reload/startup spam.
    
                      #   normal - Prints recognized configuration elements to the console
    
                      #   verbose - For those who like wading through a lot of text to find a
    
                      #       frustratingly useless amount of information. Only use this if you're afraid of wikis,
    
                      #       are a tester, or just don't want to talk to the dev.
      
    disableDefaultDamage: true # When true, add some simplicity to your calculations by disabling the default damage
    
                                #   This effectively makes all event damage zero when it is passed, so
    
                                #   don't forget to define your damage nodes if you set this to false.
      
    disableDefaultHealth: false # When true, only mobs with defined MobHealth nodes will spawn.
      
    negativeHeal: true         # When true, negative damage results will heal the target
      
    ##########################################
    
    # Damage modification config reference
    
    ##########################################
    
    #
    
    # ALL damage modification strings are LEAF NODES. For example:
    
    # branch:
    
    #     - 'leaf'
    
    #     - 'leaf'
    
    #     - 'leaf'
    
    #     - 'leaf'
    
    #
    
    #  Simple damage buff: add a value to the damage event
    
    #
    
    #  - '#value'
    
    #
    
    #   ex., - '3' adds 3 to the specified buff
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Damage setting: set event damage to a specified amount
    
    #
    
    #  - 'set.#value'
    
    #
    
    #   ex., - 'set.15' sets the event damage to 15, regardless of the event's previous damage value
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Binomial (on/off) calculation: #value percent chance of executing $function,
    
    #   or in the case that $function is not defined, has #value percent chance of "hitting".
    
    #
    
    #   NOTE: You cannot use another binom function for this.
    
    #
    
    #  - 'binom.#chance[*($function)]'
    
    #
    
    #   ex., - 'binom.68' means that 68 out of 100 times the current damage count will NOT be set to 0
    
    #        - 'binom.69*3' means a 69% chance of applying a value of 3 to the specified buff
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Attack roll calculation: Equal chance for all integer values < input
    
    #
    
    #  - 'roll[.#value]'
    
    #
    
    #   ex., - 'roll' for a current damage count of 15 gives equal chances of 0, 1, 2, 3, 4, ... 15
    
    #        - 'roll.4' means 20% chance for "rolling" to add a value of 0, 1, 2, 3, or 4
    
    #        - 'roll.6' means 1/7 chance for "rolling" to add a value of 0, 1, 2, 3, 4, 5, or 6
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Simple multiplication of accumulated damage
    
    #
    
    #  - 'mult.#factor'
    
    #
    
    #   ex., - 'mult.3' at a point where the damage is 3 means the result is 6
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Simple division of accumulated damage
    
    #
    
    #  - 'div.#factor'
    
    #
    
    #   ex., - 'div.3' at a point where the damage is 27 means the result is 9
    
    #
    
    #---------------------------------------------
    
    #
    
    #  Divide and add to total damage
    
    #
    
    #  - 'div_add.#factor'
    
    #
    
    #   ex., - 'div_add.4' for 12 would be (12 + 12/4) = 15
    
    #
    
    #---------------------------------------------
    
    Offensive:
    
        world:
    
            global: # settings applied regardless of group
    
                generic:
    
                    animal:
    
                        - set.0
    
                    humans:
    
                        - set.0
    
                    melee:
    
                        - set.2
    
                    ranged:
    
                        - set.6
    
                    armor:
    
                        - set.0
    
                    mob:
    
                        - set.0
    
                animal:
    
                    Chicken:
    
                        - set.-2
    
                    Cow:
    
                        - set.0
    
                    Pig:
    
                        - set.0
    
                    Sheep:
    
                        - set.0
    
                    Wolf:
    
                        - set.5
    
                melee:
    
                    axe:
    
                        - set.4
    
                    hoe:
    
                        - set.2
    
                    pickaxe:
    
                        - set.2
    
                    spade:
    
                        - set.5
    
                    sword:
    
                        - set.1
    
                    DIAMOND_SWORD:
    
                        - set.5
    
                ranged:
    
                    bow:
    
                        - set.0
    
                    egg:
    
                        - set.-5
    
                    snowball:
    
                        - set.-5
    
                armor:
    
                    DIAMOND_HELMET*DIAMOND_LEGGINGS*DIAMOND_CHESTPLATE*DIAMOND_BOOTS:
    
                        - set.200
    
                mob:
    
                    Creeper:
    
                        - set.199
    
                    Ghast:
    
                        - set.50
    
                    Giant:
    
                        - set.200
    
                    Skeleton:
    
                        - set.6
    
                    Slime:
    
                        - set.4
    
                    Spider:
    
                        - set.8
    
                    Zombie:
    
                        - set.7
    
                    ZombiePigman:
    
                        - set.14
    
                nature:
    
                    blockexplosion:
    
                        - set.50
    
                    burn:
    
                        - set.4
    
                    cactus:
    
                        - set.1
    
                    drowning:
    
                        - set.7
    
                    explosion:
    
                        - set.10
    
                    fall:
    
                        - set.5
    
                    fire:
    
                        - set.6
    
                    lava:
    
                        - set.7
    
                    lightning:
    
                        - set.200
    
                    suffocation:
    
                        - set.4
    
                    void:
    
                        - set.1
    
            groups:
    
                Settler:          # MUST match up with the name in Permissions
    
                    generic:        # This pretty much follows the global configuration, so specific
    
                                 #   nodes have been omitted here in favor of readability.
    
                    animal:
    
                    melee:
    
                    ranged:
    
                    armor:
    
                    mob:
    
                    nature:
    
                    groups:
    
                        Citizen:
    
                             - set.0
    
        world_nether:
    
                    #   unless...that's the name. :P
    
            global: # settings applied regardless of group
    
                generic:
    
                    animal:
    
                        - set.0
    
                    humans:
    
                        - set.3
    
                    melee:
    
                        - set.8
    
                    ranged:
    
                        - set.2
    
                    armor:
    
                        - set.10
    
                    mob:
    
                        - set.5
    
                animal:
    
                    Chicken:
    
                        - set.-2
    
                    Cow:
    
                        - set.0
    
                    Pig:
    
                        - set.0
    
                    Sheep:
    
                        - set.0
    
                    Wolf:
    
                        - set.5
    
                melee:
    
                    axe:
    
                        - set.10
    
                    hoe:
    
                        - set.2
    
                    pickaxe:
    
                        - set.2
    
                    spade:
    
                        - set.5
    
                    sword:
    
                        - set.1
    
                    stick:
    
                        - set.3
    
                ranged:
    
                    bow:
    
                        - set.0
    
                    egg:
    
                        - set.-5
    
                    snowball:
    
                        - set.-5
    
                armor:
    
                    DIAMOND_HELMET*DIAMOND_LEGGINGS*DIAMOND_CHESTPLATE*DIAMOND_BOOTS:
    
                        - set.200
    
                mob:
    
                    Creeper:
    
                        - set.199
    
                    Ghast:
    
                        - set.50
    
                    Giant:
    
                        - set.200
    
                    Skeleton:
    
                        - set.6
    
                    Slime:
    
                        - set.4
    
                    Spider:
    
                        - set.8
    
                    Zombie:
    
                        - set.7
    
                    ZombiePigman:
    
                        - set.14
    
                nature:
    
                    blockexplosion:
    
                        - set.50
    
                    burn:
    
                        - set.4
    
                    cactus:
    
                        - set.1
    
                    drowning:
    
                        - set.7
    
                    explosion:
    
                        - set.10
    
                    fall:
    
                        - set.5
    
                    fire:
    
                        - set.6
    
                    lava:
    
                        - set.7
    
                    lightning:
    
                        - set.200
    
                    suffocation:
    
                        - set.4
    
                    void:
    
                        - set.1
    
            groups:
    
                Settler:          # MUST match up with the name in Permissions
    
                    generic:        # This pretty much follows the global configuration, so specific
    
                                 #   nodes have been omitted here in favor of readability.
    
                    animal:
    
                    melee:
    
                    ranged:
    
                    armor:
    
                    mob:
    
                    nature:
    
                    groups:
    
                        Citizen:
    
                             - set.0    # Some other valid world name.
    
    Defensive:
    
        world:  # This should be the name of the world you want to configure - NOT "worldName",
    
                    #   unless...that's the name. :P
    
            global: # settings applied regardless of group
    
                generic:
    
                    animal:
    
                        - set.0
    
                    humans:
    
                        - set.0
    
                    melee:
    
                        - set.0
    
                    ranged:
    
                        - set.0
    
                    armor:
    
                        - set.0
    
                    mob:
    
                        - set.0
    
                animal:
    
                    Chicken:
    
                        - set.0
    
                    Cow:
    
                        - set.0
    
                    Pig:
    
                        - set.0
    
                    Sheep:
    
                        - set.0
    
                    Wolf:
    
                        - set.0
    
                melee:
    
                    axe:
    
                        - set.0
    
                    hoe:
    
                        - set.0
    
                    pickaxe:
    
                        - set.0
    
                    spade:
    
                        - set.0
    
                    sword:
    
                        - set.0
    
                    DIAMOND_SWORD:
    
                        - set.0
    
                ranged:
    
                    bow:
    
                        - set.0
    
                    egg:
    
                        - set.0
    
                    snowball:
    
                        - set.0
    
                armor:
    
                mob:
    
                    Creeper:
    
                        - set.0
    
                    Ghast:
    
                        - set.0
    
                    Giant:
    
                        - set.0
    
                    Skeleton:
    
                        - set.6
    
                    Slime:
    
                        - set.4
    
                    Spider:
    
                        - set.8
    
                    Zombie:
    
                        - set.7
    
                    ZombiePigman:
    
                        - set.14
    
            groups:
    
                Settler:          # MUST match up with the name in Permissions
    
                    generic:        # This pretty much follows the global configuration, so specific
    
                                 #   nodes have been omitted here in favor of readability.
    
                    animal:
    
                    melee:
    
                    ranged:
    
                    armor:
    
                    mob:
    
                    nature:
    
                    groups:
    
                        Citizen:
    
                             - set.0
    
        world_nether:
    
                    #   unless...that's the name. :P
    
            global: # settings applied regardless of group
    
                generic:
    
                    animal:
    
                        - set.0
    
                    humans:
    
                        - set.0
    
                    melee:
    
                        - set.0
    
                    ranged:
    
                        - set.0
    
                    armor:
    
                        - set.0
    
                    mob:
    
                        - set.0
    
                animal:
    
                    Chicken:
    
                        - set.0
    
                    Cow:
    
                        - set.0
    
                    Pig:
    
                        - set.0
    
                    Sheep:
    
                        - set.0
    
                    Wolf:
    
                        - set.0
    
                melee:
    
                    axe:
    
                        - set.0
    
                    hoe:
    
                        - set.0
    
                    pickaxe:
    
                        - set.0
    
                    spade:
    
                        - set.0
    
                    sword:
    
                        - set.0
    
                    stick:
    
                        - set.0
    
                ranged:
    
                    bow:
    
                        - set.0
    
                    egg:
    
                        - set.0
    
                    snowball:
    
                        - set.0
    
                armor:
    
                mob:
    
                    Creeper:
    
                        - set.0
    
                    Ghast:
    
                        - set.0
    
                    Giant:
    
                        - set.0
    
                    Skeleton:
    
                        - set.0
    
                    Slime:
    
                        - set.0
    
                    Spider:
    
                        - set.0
    
                    Zombie:
    
                        - set.0
    
                    ZombiePigman:
    
                        - set.0
    
        # Same format as the Offensive node...except since the world can't take damage
    
        # you probably don't want to clutter up things with a global "nature" node.
      
    #############################
    
    # MobHealth config reference
    
    #
    
    #    In contrast to damage modification, there is only ONE MobHealth
    
    #    definition string permitted, and that is as a property of the tree node
    
    #    in config. For example:
    
    #
    
    #    $mobname: 'range.2.14'
    
    #
    
    #    Leaf nodes will only get ignored.
    
    #    *Remember*, 200 is the max for any given mob health.
    
    #
    
    #---------------------------------
    
    #
    
    #  Integer setting: use an integer to always set a spawned mob's health to #value
    
    #   ex., $mobname: '3'
    
    #
    
    #---------------------------------
    
    #
    
    #  Simple range equation (base - range) <= health on spawn <= (base + range)
    
    #
    
    #  - 'range.#lower.#upper'
    
    #
    
    #    ex., $mobname: 'range.14.62' means 14 <= mob health on spawn <= 62
    
    #
    
    #---------------------------------
    
    #
    
    #  Interval-based range equation (base - (interval * factor)) <= health on spawn <= (base + (interval * factor))
    
    #   ...where factor is calculated in a similar fashion to the Attack Roll in DamageCalculator.
    
    #
    
    #  - 'range_int.#base.#interval.#range'
    
    #
    
    #    ex., possible outputs for - 'range_int.12.2.3' would be 6, 8, 10, 12, 14, 16, 18.
    
    #---------------------------------
      
    MobHealth:
    
        world:
    
            Chicken:
    
              - range.2.12
    
            Creeper:
    
              - range.8.20
    
            Cow:
    
              - range.10.25
    
            Ghast:
    
              - range.5.50
    
            Giant:
    
              - range.120.200
    
            Pig:
    
              - range.2.15
    
            Sheep:
    
              - set.5
    
            Skeleton:
    
              - range.15.25
    
            Slime:
    
              - range.25.30
    
            Spider:
    
              - range.10.25
    
            Wolf:
    
              - range.7.45
    
            Zombie:
    
              - range.20.50
    
            ZombiePigman:
    
              - range.35.70
    
        world_nether:
    
            Chicken:
    
              - range.2.12
    
            Creeper:
    
              - range.8.20
    
            Cow:
    
              - range.10.25
    
            Ghast:
    
              - range.5.50
    
            Giant:
    
              - range.120.200
    
            Pig:
    
              - range.2.15
    
            Sheep:
    
              - set.5
    
            Skeleton:
    
              - range.15.25
    
            Slime:
    
              - range.25.30
    
            Spider:
    
              - range.10.25
    
            Wolf:
    
              - range.7.45
    
            Zombie:
    
              - range.20.50
    
            ZombiePigman:
    
              - range.100.200
      
    Scan:
    
        world:
    
            global:
    
                - GOLDEN_APPLE
    
            groups:
    
                Wizard:
    
                    - STICK
    
        world_nether:
    
            global:
    
                - GOLDEN_APPLE
    
            groups:
    
                Wizard:
    
                    - STICK
    
    Once again, I am still running 818 and I have tried both of these configs with only those two plugins running (Essentials and Permissions) Maybe you could send me a config that you know works and I could try it out? Another option would be to email me @ [email protected]

    One last option would be to use a TeamViewer type program to manually work with it. (I have teamviewer for my compuer and I access the admin computer through a VNC, so if you watch my computer the vnc would be a bit laggy.)
     
  30. Offline

    KoryuObihiro

    The solution is simple: you don't have your calculation strings surrounded with single quotes. In the wiki and the tutorial, you might have noticed that every leaf node is surrounded in single quotes - this is to make sure that everything can be casted directly to a String in Java.

    I'd go more into detail, but it's 12:14AM here and I'm dying. I'll have to get back with you tomorrow.
     
  31. Offline

    embty

    I really love the mod even thought I still cant make it work for me. But the whole idea is great all it needs is more simple configs :p
     

Share This Page