Skip to content

Instantly share code, notes, and snippets.

@TerrorBite
Created November 24, 2012 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TerrorBite/4138024 to your computer and use it in GitHub Desktop.
Save TerrorBite/4138024 to your computer and use it in GitHub Desktop.
Planning document for the HuntContest plugin

HuntContest

This plugin was heavily inspired by Matejdro's MonsterHunt plugin. It is a complete rewrite from the ground up, introducing a fairer and more advanced style of play that hopefully brings more fun.

Features

There are 3 play modes, depending how many players joined:

  • Singleplayer - Beat your high score to win!
    • This gamemode is activated if only one player is signed up for a hunt.
    • A major prize is only given if a player beats their own personal best.
  • VS Mode - Beat {player}'s score to win!
    • This game mode is activated if only two hunters sign up.
    • Only the winner gets the big prize.
    • Both players must actively compete in the hunt, otherwise the mode reverts to Singleplayer as the hunt ends. This avoids a player getting a guaranteed prize by asking a friend to type the join command without competing.
  • Multiplayer - Win prizes based on final rank!
    • This game mode is activated if three or more players sign up before the hunt begins.
    • Prizes are awarded to the three players who score the most points.

The main feature, and the one that sets it apart from its inspiration MonsterHunt, is a hit-based scoring system that awards points based on damage dealt, not just on final kill! This system is designed to be fairer, and allows for players to hunt as a team and share the points obtained for killing a mob - there's even an assist bonus!

It also features:

  • Achievements! That's right, there's many fun achievements to be earned while hunting, and most of them give bonus points!

  • Optional boss fight support! (Both of these can be disabled separately)

    • Spawning a Wither will trigger a Wither Hunt to begin, where players are scored based on damage dealt to the Wither. Any player who comes within 50 blocks of the Wither automatically joins the hunt! The winner gets the Nether Star, and other prizes can be given as well!
    • A player entering The End for the first time starts the Dragon Hunt, which ends only when the dragon dies. This hunt can only happen once, unless an admin resets it! In addition to damaging the Dragon, points are scored for destroying End Crystals. Any player entering The End during the hunt will automatically join.
    • Both of these hunts run independently from any other hunts that may be occurring at the same time.
  • Flexible rewards system (similar to MonsterHunt's system):

    • Rewards can scale with points. Get more points, earn more loot!
    • Combine static rewards with scaled ones, allowing you to guarantee a minimum reward.
    • Randomly select different rewards with a configurable chance - you could have a 2% chance of a special rare reward, or add extra loot to the standard prize 10% of the time.
    • Easier to configure!
  • Multi-dimensional: Run the same hunt across all worlds on your server simultaneously, or only across the main world and its Nether and End, or restrict it to a single world - or make up your own configurations.

  • Arena support via WorldGuard: No more messing with coordinates in a config file! You can restrict the hunt to occur in a predefined WorldGuard region, which means your arena can be any shape that WorldGuard supports! Optionally you can allow signed-up players to teleport to the area. The teleport arrival point is also set via WorldGuard, by setting the "teleport" flag on the region.

  • Leaderboard: Each player's high score is saved, along with their unlocked achievements, and they can view their rank on the leaderboard.

Scoring System

Each mob type has a configurable base score. This is the hypothetical score that a player will receive for killing this mob entirely by themselves. In reality the score received by a player when the mob dies depends on a number of multipliers and other factors, including weapon used, damage dealt from other sources, etc (explained below).

The base score may differ depending on dimension, which allows scores to be adjusted for rarity (Endermen are relatively uncommon in the Overworld but are highly common in The End, etc).

When a player deals damage to a mob, a point value for that hit is calculated as follows:

  • The base score for that hit is the mob's base score multiplied by the damage dealt divided by the mob's total health capacity. For example, a hit that does 3 hearts of damage to a zombie (10 hearts health, base score 10 points) will be worth 3 points, and a hit that does 3 hearts of damage to a spider (8 hearts health, base score 12 points) will be worth 4.5 points.

    • Base scores may differ per-world. This allows scores to be adjusted for rarity. For example, by default pig zombies are worth more in the Overworld, while Endermen have a heavily reduced base score in the End as they are very common there.
  • A multiplier is then applied to the base hit score depending on the weapon used. The default multipliers are: Fists 1.5, wooden sword 1.4, golden sword 1.3, stone sword 1.2, iron sword 1.0, diamond sword 0.8, bow 0.6

  • An additional multiplier may be optionally applied to the hit score depending on weapon enchantments (e.g. penalty for Sharpness) or other conditions (critical hit bonus, etc).

  • A further multiplier may be optionally applied depending on any potion effects on the player or the mob. E.g. a player may be penalized slightly for hitting a mob that is Weakened or Poisoned, or receive less points for using a Strength potion that makes it easier to kill mobs. Conversely, the player may be given more points for fighting in a weakened state themselves, or for fighting against mobs that are enhanced by potion effects.

The final score for that hit is then recorded against that mob on a per-player basis. Further hits are calculated the same way and added on.

When a mob dies during a hunt for whatever reason, and hits have been recorded against it, then the following occurs:

  • Individual hit scores are tallied together for each player that hit the mob. This is the player's base score for this kill.

  • Multipliers are then applied on top of this. Here are some example multipliers:

    • 1.2x multiplier for dealing the killing blow against the mob. If the mob died from other causes, nobody will get this multiplier. If the mob dies from damage inflicted by a player's splash potion (e.g. Instant Damage), then this multiplier is still given.
    • 1.4x multiplier for getting an assist. If player A deals the killing blow but player B dealt the second-to-last hit, then player B gets an assist. This gives players decent compensation against kill-stealing by other players.
    • Armor multiplier, which scales according to the player's armor bar, from 1.4 with no armor to 0.8 with full diamond. This helps players without any armor compete against those with full diamond.
    • Grinder multiplier. This is normally 1.0 but will drop towards 0.0 if the player appears to be using a mob grinder to generate mobs to kill. [This is calculated by recording the position of the last 5 mobs killed by a player, and the position of the player when they killed them. The variation in the 5 mob positions is analyzed, as is the variation in player positions. The grinder multiplier scales directly with these two variations, but is capped at 1.0.]

The player's score is stored internally as a floating-point number. After all multipliers are applied, the final step is to round this score upwards to the next integer. This means that a player will always score at least 1 point even if they kill a low-value or low-health mob (e.g. tiny slime) in such a way that the multipliers heavily penalizes them.

Finally, the points are awarded to the player(s).

There is also additional scoring. Certain actions may result in bonus points for the player which are given separately, for example:

  • If a creeper is killed by a skeleton arrow during a hunt (which drops a record), then a 25 point bonus is awarded to the player whom the skeleton is targeting.
  • A creeper explosion that deals damage to surrounding mobs will give an instant bonus score to the player based on the total damage dealt to those mobs (not including damage dealt to the player themself), with a 1.2x multiplier on a mob if the creeper kills it.

Achievements will also grant the player bonus points (see below).

Achievements

A player may get "Hunt Achievements", most of which grant a fixed point bonus when achieved, and announces the achievement get in chat. Achievements may only be obtained once, unless the player resets their high score which also resets all achievements. Here is the list so far:

No points (achievement obtained after results are announced):

  • So Close...: Come second by 10 points or less
  • Huntsman: Score over 1000 points in a single Hunt
  • Champion Hunter: Score over 2000 points in a single Hunt
  • Ragequit: Quit Minecraft right after dying in the Hunt [under 30 seconds after dying]

10 point achievements:

  • And My Axe: Kill a hostile mob with an axe
  • Interdimensional: Travel between worlds during a Hunt
  • You Monster: Kill a Villager during a Hunt
  • Ooh, Free Loot: Obtain a rare drop during a Hunt
  • Gravity Sucks: Die from fall damage during a Hunt

25 point achievements:

  • Musical Death: Get a record during a hunt
  • Bomb Squad: Kill 20 creepers during a Hunt [die from
  • Pest Control: Kill 20 spiders during a Hunt
  • Thriller: Kill 30 zombies during a Hunt
  • Doctor Bones: Kill 30 skeletons during a Hunt
  • Slaughter of the Innocents: Kill 20 passive mobs during a Hunt
  • I Will End You: Kill 5 Endermen during a Hunt
  • Strategic Blast: Kill 2 mobs with a creeper explosion
  • Survivor: Complete 5 Hunts in a row without dying
  • Well, This Sucks: Die 3 times during the same Hunt
  • No Contest: Be abandoned by all other Hunt competitors in a Multiplayer match
  • Spartan Rage: Knock a monster over a fatal precipice
  • Leeroy Jenkins: Eat cooked chicken after dying in a Hunt
  • Ranger: Only use a bow for an entire Hunt
  • Knockout: Slay a hostile mob with only your fists
  • Bounty Hunter: Slay a rival Hunter during the Hunt

50 point achievements:

  • Bane of Ender: Kill 20 Endermen during a Hunt
  • Can't Catch Me: Remain in the lead for the entire Hunt
  • Winning Streak: Win 3 Hunts in a row
  • Nice Comeback: Win the Hunt even though you died
  • Start a Fight: Start a Wither Hunt by building the Wither
  • Withering Experience: Wither away during a Hunt
  • Yoink!: Obtain the lead with less than 5 seconds left
  • Grassy Knoll: Kill a mob from over 50 blocks away

100 point achievements:

  • Astra Morior: Kill the Wither and obtain the star
  • Dragon Hunter: Participate in the Ender Dragon hunt (Awarded at the end)
  • Draconis Interemptor: Score the killing blow against the Ender Dragon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment