Overhauls RC drone collision damage so it's more intuitive

Supported Games
GameServerKingsGameServerKings
works with

Features

  • Overhauls RC drone collision damage so it's more intuitive
  • Avoids collision damage when landing the drone
  • Avoids collision damage with dropped items and timed explosives
  • Prevents drone automatic descent when colliding with dropped items

Configuration

Default configuration:

{
  "MinCollisionVelocity": 3.0,
  "MinTimeBetweenImpacts": 0.25,
  "CollisionDamageMultiplier": 1.0
}
  • MinCollisionVelocity -- Minimum collision velocity required to apply damage.
    • When the collision velocity is lower than this amount, the collision is ignored and no damage is applied.
  • MinTimeBetweenImpacts -- Minimum time in seconds between drone collision impacts.
    • If the drone collides multiple times in this time frame above the velocity threshold, only the first collision will count. This mechanic is very useful for larger drones since it prevents them from taking unreasonable damage when colliding with multiple objects at once.
  • CollisionDamageMultiplier -- Damage multiplier to apply to each collision impact above the velocity threshold.
    • When using a value of 1.0, the damage dealt will match the collision velocity.

Recommended compatible plugins

Drone balance:

  • Drone Settings -- Allows changing speed, toughness and other properties of RC drones.
  • Targetable Drones -- Allows RC drones to be targeted by Auto Turrets and SAM Sites.
  • Limited Drone Range -- Limits how far RC drones can be controlled from computer stations.

Drone fixes and improvements:

  • Better Drone Collision (This plugin) -- Overhauls RC drone collision damage so it's more intuitive.
  • Auto Flip Drones -- Auto flips upside-down RC drones when a player takes control.
  • Drone Hover -- Allows RC drones to hover in place while not being controlled.

Drone attachments:

  • Drone Lights -- Adds controllable search lights to RC drones.
  • Drone Turrets -- Allows players to deploy auto turrets to RC drones.
  • Drone Storage -- Allows players to deploy a small stash to RC drones.
  • Ridable Drones -- Allows players to ride RC drones by standing on them or mounting a chair.

Developer Hooks

OnDroneCollisionReplace

object OnDroneCollisionReplace(Drone drone)
  • Called when this plugin is about to alter a drone to replace its collision behavior
    • This happens when drones spawn, and for existing drones when the plugin loads
  • Returning false will prevent the the drone from being altered
  • Returning null will result in the default behavior

OnDroneCollisionImpact

void OnDroneCollisionImpact(Drone drone, Collision collision)
  • Called when a drone collision occurs above the velocity threshold
  • No return behavior
MIT License

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.