RandomEncounters

3.4k Downloads

RandomEncounters

Overview

Tired of seeing the same old villages? Wish there was a way to add configurable encounters to the world? This is the problem Random Encounters aims to fix. From portal temples on the overworld with their Blaze leader and a horde of mad zombie pigmen gated in from the nether to common farms. Each encounter is configurable including the probability of the encounter, to the encounters eventual expansion, to the probability of each treasure item in chests or on the mobs.

Features

  • Add encounters to the minecraft world
  • Configure hostile mobs
  • Configure encounter treasure
  • Configure encounter growth
  • No more are there just plain old villages
  • Allows the placement of large structures without lagging the server

Dependencies

Configuration

Plugin Configuration

debug

The Debug section is designed to help developers in identifying how the plugin is operating to aid in-game verification and help troubleshoot the plugin during development.
  • midas [Boolean] (default: false) King Midas was known for turning everything he touched into gold. This debug mode turns the surface area checked into gold to spot invalid encounter placement areas
  • loglevel [Integer] (default: 0) This debug option tells the plugin how much information to output.

maxLockTime

[Integer] (default: 10) This is the maximum number of milliseconds any task will lock the server for processing.

structureConfig

The structureConfig option is a string of the file name containing the structure configurations in JSON format. The default value is structures.json.
{
  "structures": [
    {
      "name":    "(String) Unique structure name",
      "file":    "(String) Schematic file name including directories",
      "minY":    "(Integer) Minimum Y coordinate to place the structure",
      "maxY":    "(Integer) Maximum Y coordinate to place the structure",
      "trump":	[
	"(String) MaterialName of over writable material",
      ],
      "invalid":	[
	"(String) MaterialName of invalid foundation material",
      ]
    },
  ],
}

mobConfig

The mobConfig option is a string of the file name containing the mob / creature configurations in JSON format. The default value is mobs.json. For more information on the mobs.json visit: Mob Configuration Options

treasureConfig

The treasureConfig option is a string of the file name containing the treasure / item configurations in JSON format. The default value is treasures.json.
{
  "treasures":[
    {
      "name":        "(Sring) Unique treasure name",
      "material":    "(String) MaterialName",
      "tagName":     "(String) Item Name",
      "min":         "(Integer) Minimum",
      "max":	     "(Integer) Maximum",
      "probability": "(Double) Probability",
      "treasureGroups":  [
          {
              "name": "(String) Treasure name for group",
              "min":  "(Integer) Minimum number to generate",
              "max":  "(Integer) Maximum number to generate",
              "probability":  "(Double) Probability of additional groups"
          }
      ],
      "enchantments":	[
	{
	  "enchantment":    "(String) EnchantmentName",
	  "probability":    "(Double) Probability",
	  "level":          "(Integer) EnchantmentLevel"
	},
      ]
    },
  ],
}

encounterConfig

The encounterConfig option is a string of the file name containing the encounter configurations in JSON format. The default value is encounters.json. The encounter configuration file is what ties Structures, Mobs, and Treasure all together.
{
"encounters": [
    {
      "name":       "(String) Unique Encounter Name",
      "enabled":    "(Boolean) should new encounters be generated",
      "probability":"(Double) probability of occurrence",
      "structure":  "(String) Structure name from defined structures",
      "mobs":		[
	"(String) Mob name from defined mobs",
      ],
      "validBiomes":	[
	"(String) Biome name",
      ],
      "invalidBiomes":	[
	"(String) Biome name",
      ],
      "treasures":	[
	 "(String) Treasure name from defined treasures",
      ],
      "expansions":	[
       {
	"encounter":   "(String) defined Encounter name",
	"probability": "(Double) probability of expansion",
	"duration":    "(Integer) Duration in minutes to check ",
	"max":         "(Integer) maximum number of expansions",
	"distance":    "(Integer) maximum distance in chunks"
	},
      ]
    },
  ]
}

Commands

re reload

Reloads the JSON configuration files. Keep an eye on the console for errors

re place <encounter> [<world> <x> <y> <z>]

Forces an encounter to be placed at the player's current location or the location specified. This does not perform terrain checks. The console command must specify the coordinates

re check <encounter> [<world> <x> <y> <z>]

Forces the system to check the current chunk, or the chunk containing the specified location to place an encounter. This performs terrain checks and places the encounter if a suitable location is found. The console command must specify the coordinates

re radius <encounter> <radius> [<world> <x> <z>]

Forces the system to check all chunks in a specified radius of chunks from the current player location or the location given by the specified chunk coordinates. The console command must specify the chunk coordinates

Installation

  • To install the plugin, extract the contents of the zip file into your plugins directory.
  • Default encounters are included in the RandomEncounters folder.

Bugs / Known Limitations

Because of the vast nature of this plugin, please use the GitHub Issue tracking system to submit bugs, issues, and feature requests. GitHub Issue Tracking

Structure Contributors