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
@ArchmageInc
I see, well better add an option then to use existing chunks as my worlds get pre chunk generated and have nothing one them when I first gen it it pre fills world in a circle with chunks.
so really id want it to do its thing like that. This would need to hook in factions so it does generate in faction owned territory as well I think.
All,
Sorry I have not responded to the comments here. It was not my intention to use this as a replacement to the already existing structure generation (i.e. Villages and Strongholds). It was designed to merely supplement that system.
I am not familiar with terrain control, though terrain generating plugins are usually processed before any of this takes effect. Because of that, this system will use the terrain that is generated in order to determine the eligibility of structure placements. This is also how the system will incorporate not overwriting existing structures.
With that said, I can certainly see instances where there is enough flat surface on a player built structure where one of these encounters could take place. I have been battling back and forth on if this should only run on newly generated chunks, or if it should examine existing chunks. If it were only newly generated chunks, then there would be no worry about houses spawning on top of towers, or anything like that, but would reduce the overall variety of encounters.
I could defiantly use some help in developing this, as it is pretty vast in scope. Unfortunately, the amount of time I have to spend on plugin development is limited at the moment. I will do my very best to pick this back up once I get the next beta release of my other plugin out.
Thank you all for your support.
Same Here, I have a suggestion though.
Would it be possible to replace existing strongholds and Villages with this ?, and how well would this work with custom terrain generating plugins like Terrain Control ?
No pressure but, bookmarked! Looking forwards to this ;)
what prevents this from causing an existing structure to be lost when it is loaded and an event is triggered?