Repository navigation
Configuration Reference
-
Before You Read
-
ModDamage-specific Elements
-
Event elements
-
Ranged elements
-
-
Section A: Events reference - "What Damage-related Events Can I Change With ModDamage?"
-
Section B: Routines - "How do I tinker with these damage events?"
-
[B.01]: Base calculation strings
-
[B.02]: Conditional calculation strings
-
[B.03]: Effect calculation strings
-
[B.04]: Routines: Exhaustively Listed Here
-
-
Section C: Miscellaneous Config and FAQs (Coming soon!)
For any MD config, you can verify that your YAML is valid here. This is helpful for people new to YAML, and a must for bug reporting.
Some of the syntax in individual routine entries may not necessarily be intuitive - it is necessary, then, to clarify what certain parts of MD routine syntax mean. An exhaustive list is as follows:
-
$armorsetalias - an armor/equipment set interpreted by ModDamage, or an alias comprised of armorsets. See the [second tutorial][*1] for more information.
-
$biomealias - a valid Biome according to the Bukkit enum, or an alias comprised of these.
-
$comparison - a comparison operator for a conditional. Possible values are:
-
equals
-
greaterthan
-
greaterthanequals
-
lessthan
-
lessthanequals
-
notequals
-
-
$elementalias - a valid string that corresponds to a type of entity in ModDamage. See the first tutorial and FAQ: What are aliases? for more information.
-
$environment - a valid Environment according to the Bukkit enum.
-
$groupalias - a group defined in a Permissions implementation outside of ModDamage, or a group alias comprised of these. Currently, only support for Permissions 2.0 and higher exists - perhaps you could suggest your preferred plugin on the Bukkit thread?
-
$itemalias - a valid Material according to the * Bukkit enum.
-
$logical - a logical operator for a conditional. Possible values are:
-
and
-
nand
-
nor
-
or
-
xor
-
-
$messagealias - a valid Message alias reference, or a single message string. If using the latter, it's recommended to use double-quotes instead of single quotes around your Message routine to ensure that your message is read properly.
-
$worldalias - a valid world name in your Bukkit server, or an alias comprised of these.
-
Living
-
Animal - Animals are all creatures that serve to benefit the player by either slaughter or taming.
-
Chicken
-
Cow
-
Pig
-
Sheep
-
**SnowGolem
-
Wolf - These have several states that can be used.
-
Wolf_Angry - AKA "hostile" Wolves. The ones complete with all-new growling and red-eye features.
-
Wolf_Tame - A Wolf whose loyalty has been declared to a player (with the "soft" eyes).
-
Wolf_Wild - Wolves. As nature built them.
-
-
-
Human - Your favorite pink squishies.
-
NPC - These are "monster" type humans that are spawned in some plugins. Most MC players don't ever see them.
-
Player - What does it sound like?
-
Villager - We could nickname them "The Schozzbournes".
-
-
Mob
-
Blaze
-
CaveSpider
-
Creeper - Lovable suicidal shrubs. These have two states.
-
Creeper_Charged - A Creeper that's activating its Limit Attack?!...err...no. Charged Creepers have been struck by lightning, and have a blue glow effect surrounding them.
-
Creeper_Normal - Just an ordinary Creeper.
-
-
Enderman
-
Ghast
-
Giant
-
MagmaCube
-
Mooshroom
-
Skeleton
-
Silverfish
-
Slime
-
Slime_Small
-
Slime_Medium
-
Slime_Large
-
Slime_Huge
-
Slime_Other - Anything larger than the above, produced by a plugin.
-
-
Spider
-
Spider_Jockey - SKELETON CAVALRY! D:
-
Spider_Riderless - A bareback Spider.
-
-
Zombie
-
ZombiePigman
-
-
-
Nonliving
-
Nature - These can be delightfully confusing, and shall be annotated.
-
Burn - See "fire". And maybe Webster's for "screwed".
-
Cactus - Pokey pokey.
-
Drowning - Swimming along, you run out of air...is it all over?
-
Explosion - Works for TNT, not entirely sure about something like fireballs.
-
Explosion_Block - The only time this seems to be used as of build 1060 is when an explosion is directly generated by a plugin.
-
Explosion_Entity - Used basically everywhere else.
-
-
Fall - ModDamage - 9001, Gravity - 0
-
Fire - "fire" is exposure to a fire block..."burn" is damage taken after you survive that exposure.
-
Lava - Lava's a different story altogether. But still blocky.
-
Lightning - crackBOOOOOM. It should be noted that a lot of fire damage is associated with lightning strikes.
-
Starvation
-
Suffocation - Differs from drowning because this is block-based (sand/gravel)
-
Suicide
-
Void - Bottomless pits are so original.
-
-
Trap
- Dispenser
-
Projectile
-
Arrow - fired by a Skeleton or a human.
-
Egg - thrown by a human.
-
Fireball - Usually seen being spat by a Ghast.
-
FishingRod - the "hook" of a fishing rod?
-
Snowball - self-explanatory, I hope.
-
-
A.01 - Damage
Damage is an event fired whenever...well...whenever something living takes damage! Manipulating this event is simple. Use routines to alter the event's value. Valid entities for this event are Attacker, Projectile (if it exists), and Target.
Damage events are demonstrated from the very beginning of the MD tutorials.
A.02 - Death
Death routines are also self-explanatory. Unlike the Damage event, there's no way to change the outcome of this event - the entity's going to die, no matter what value-manipulation routines you use. The most useful routines here will likely be Message or Calculation routines that do something interesting to the last attacker or the event's world. Valid entities are the same as in Damage - Attacker, Projectile (if it exists), and Target.
A.03 - Food
Food routines are fired whenever a player is healed from being satiated. The event value is manipulable, like the Spawn and Damage event. The Target is the only valid entity in this event. Resulting values less than or equal to 0 cancel the event.
A.04 - ProjectileHit
Eat routines are fired whenever a player uses a food item to heal themselves. The event value is manipulable, like the Spawn and Damage event. Resulting values less than or equal to 0 cancel the event. Valid entities for this event are Projectile and Target, which refers to the shooter (if it's alive).
A.05 - Spawn
Spawn routines are fired when a living creature spawns - animals, mobs, or humans. This event value is manipulable, and resulting values of 0 or less will cancel the event. The only entity in this event is the Target.
A.06 - Tame
Tame routines are fired whenever a Wolf gets tamed. Set the event value to a nonpositive integer to cancel it.
Uses a value calculated from nested routines to do something. Keep in mind that event values are preserved, so if you need a static value you should use a Set routine at the beginning.
- 'targeteffect.explode': 'set.9001' #Don't actually do this.All value-manipulating routines do NOT affect the event's value if they are nested under a Calculation routine.
The primary control branch in ModDamage. Use Conditionals to control whether or not the nested routines will execute. See the [second tutorial] for more information on Conditionals.
- 'if condition':
- 'routine'
- 'if another.condition':
- 'another.routine'
- 'if_not firstcondition and secondcondition': #If_not inverts the entire conditional.
- 'yet.another.routine'
- 'if condition_one or condition_two or !condition_three': #Condition_three is inverted.
- 'umpteenth.routine'Similar to switches in Java, these are used for more refined control branching than simple conditionals. With Switches, cases are checked sequentially until either a match has been found, or there are no cases left to evaluate. Only the matched case's routines are executed.
- 'switch.something':
CaseOne: 'single.routine'
CaseTwo:
- 'nested.routine'
[...]
LastCase:
- 'another.routine'
- 'yet.another.routine'Some switches uses aliases as cases - see below for more details.
###Routines by Category
Event Value
-
Change Property - for use with Dynamic Number References
-
Property Comparison - for use with Dynamic Number References
Entity/Mob
-
Change Property - for use with Dynamic Number References
-
Property Comparison - for use with Dynamic Number References
Player
-
Change Property - for use with Dynamic Number References
-
Property Comparison - for use with Dynamic Number References
World
-
Change Property - for use with Dynamic Number References
-
Property Comparison - for use with Dynamic Number References
Server
###Routines by Type
Base
Calculated Effect
-
Change Property - for use with Dynamic Number References
Conditional
-
Property Comparison - for use with Dynamic Number References
Switch
This briefly describes each of the single-property configurations in ModDamage.
-
"debugging" changes how verbose your console output when using ModDamage (primarily for loading/reloading information). There are three modes:
-
"verbose" is for people who don't want to talk to ModDamage's very active dev, or like wading through lots of probably useless information. By the same token, if you're truly determined to figure out what's going wrong with your configuration without external support, this is the way to go.
-
"normal" prints out each valid configuration node that is found upon load/reload. This is on by default, since new users that have not configured this will likely want to be able to see this input (i.e., they have an unrecognized node name)
-
"quiet" suppresses all but critical errors and warnings that ModDamage might be thrown. When you're sure you've got the configuration you want on your server, it's suggested you use this to stop spamming your console with information that you already know.
-
-
"negativeHeal" is far and away the least likely configuration an admin might use, and is currently being considered for removal. Any negatively-resulting damage events will heal the target when this is enabled.