misticos
Powerful position generation tool with API

Supported Games
GameServerKingsGameServerKings

Power Spawn is a perfect tool for randomly generating points on the map that can be used by other plugins or just to respawn players without any lags.

Configuration

Default Configuration

{
  "Profiles": {
    "": {
      "Minimal Distance To Building": 16,
      "Minimal Distance To Collider": 8,
      "Raycast Distance Above": 20.0,
      "Number Of Attempts To Find A Position Per Frame": 160,
      "Number Of Positions Per Frame": 16,
      "Number Of Attempts To Find A Pregenerated Position": 400,
      "Pregenerated Positions Amount": 4000,
      "Pregenerated Amount Check Frequency (Seconds)": 90.0,
      "Biomes Threshold": {
        "Temperate": 0.5
      },
      "Topologies Allowed": [],
      "Topologies Blocked": []
    },
    "another profile": {
      "Minimal Distance To Building": 16,
      "Minimal Distance To Collider": 8,
      "Raycast Distance Above": 20.0,
      "Number Of Attempts To Find A Position Per Frame": 160,
      "Number Of Positions Per Frame": 16,
      "Number Of Attempts To Find A Pregenerated Position": 400,
      "Pregenerated Positions Amount": 4000,
      "Pregenerated Amount Check Frequency (Seconds)": 90.0,
      "Biomes Threshold": {
        "Temperate": 0.5
      },
      "Topologies Allowed": [],
      "Topologies Blocked": []
    }
  },
  "Respawn Profile": "",
  "Respawn Locations Group": -2,
  "Enable Respawn Locations Group": false,
  "Enable Respawn Management": true,
  "Location Management Commands": [
    "loc",
    "location",
    "ps"
  ]
}

Profiles - List of profiles to be used.

Minimal Distance To Building - Radius within which there should be no buildings.

Minimal Distance To Collider - Radius within which there should be no colliders.

Raycast Distance Above - Distance for a raycast above the spawnpoint to ensure we are not spawning players in rocks etc.

Number Of Attempts To Find A Position Per Frame - Maximum amount of attempts to find a position within one frame.

Number Of Positions Per Frame - Maximum amount of positions to find per frame.

Number Of Attempts To Find A Pregenerated Position - Maximum amount of attempts to find an already generated position, e.g. for respawns.

Pregenerated Positions Amount - Amount of positions to pregenerate.

Pregenerated Amount Check Frequency (Seconds) - How frequently the plugin should attempt to generate more positions in case there are not enough.

Biomes Threshold - List of biomes with their thresholds (minimum values) in order for a position to be valid. Can be empty to ignore the feature by setting the value to {}.

Topologies Allowed - List of topologies allowed (one of which is a must-have) for a position to be valid. Ignored when empty.

Topologies Blocked - List of topologies for a position to be invalid. Ignored when empty.

Biomes and Topologies

Biomes:

Arid, Temperate, Tundra and Arctic.

Topologies:

Field, Cliff, Summit, Beachside, Beach, Forest, Forestside, Ocean, Oceanside, Decor, Monument, Road, Roadside, Swamp, River, Riverside, Lake, Lakeside, Offshore, Powerline, Plain, Building, Cliffside, Mountain, Clutter, Alt, Tier0, Tier1, Tier2, Mainland and Hilltop.

Splats:

Dirt, Snow, Sand, Rock, Grass, Forest, Stones and Gravel.

Permissions

  • powerspawn.location - Use the plugin commands.

Localization

English

{
  "No Permission": "nope",
  "Location: Syntax": "Location Syntax:\nnew (Name) - Create a new location with a specified name\ndelete (ID) - Delete a location with the specified ID\nedit (ID) <Parameter 1> <Value> <...> - Edit a location with the specified ID\nupdate - Apply datafile changes\nlist - Get a list of locations\nvalidate (ID) <Profile Name> - Validate location for buildings and colliders\ndebug <Profile Name> - Print minor debug information\nshow <Profile Name> - Show all positions",
  "Location: Edit Syntax": "Location Edit Parameters:\nmove (x;y;z / here) - Move a location to the specified position\ngroup (ID / reset) - Set group of a location or reset the group",
  "Location: Debug": "Currently available pre-generated positions: {amount}",
  "Location: Unable To Parse Position": "Unable to parse the position",
  "Location: Unable To Parse Group": "Unable to parse the entered group",
  "Location: Format": "Location ID: {id}; Group: {group}; Position: {position}; Name: {name}",
  "Location: Not Found": "Location was not found.",
  "Location: Profile Not Found": "Profile was not found.",
  "Location: Edit Finished": "Edit was finished.",
  "Location: Removed": "Location was removed from our database.",
  "Location: Updated": "Datafile changes were applied.",
  "Location: Validation Format": "Buildings valid: {buildings}; Colliders valid: {colliders}; Raycast valid: {raycast}",
  "Location: Player Only": "This is available only to in-game players."
}

For Developers

API

Vector3? GetLocation(int id) // Get Vector3 or null by location ID
JObject GetGroupLocations(int group) // Get a JObject from IEnumerable<Location> with locations from the specified group
Vector3? GetPregeneratedLocation(string profile) // Get a pre-generated position from a profile.

MIT License


Copyright (c) 2019-2021 misticos


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.