Supported Games
Features
- Allows changing speed, toughness and other properties of RC drones
- Allows multiple settings profiles based on permissions
- Allows other plugins to dynamically change a drone's profile based on attachments or other circumstances
Note: By default, this plugin changes the settings of all drones since they aren't very balanced in vanilla. If you aren't content with the plugin's defaults, you can of course configure them to your liking.
How it works
There are multiple types of drones.
BaseDrone-- Normal drones with no attachmentsDroneBoombox-- Drones that have an attached boombox from the Drone Boombox pluginDroneChair-- Drones that have an attached chair from the Ridable Drones pluginDroneSign-- Drones that have an attached wooden sign from the Ridable Drones pluginDroneStorage-- Drones that have an attached stash container from the Drone Storage pluginDroneTurrets-- Drones that have an attached turret from the Drone Turrets pluginMegaDrones-- Drones created by the Mega Drones plugin
Each drone type has a default profile which determines the speed, toughness and other properties for drones of that type. Each drone type can also have unlimited permission-based profiles which will override the default depending on the drone owner's permissions.
Configuration
Default configuration:
{
"DroneTypePriority": [
"DroneTurrets",
"DroneChair",
"DroneStorage"
],
"SettingsByDroneType": {
"BaseDrone": {
"DefaultProfile": {
"DroneProperties": {
"KillInWater": true,
"DisableWhenHurtChance": 25.0,
"MovementAcceleration": 10.0,
"AltitudeAcceleration": 10.0,
"LeanWeight": 0.025
},
"DamageScale": {
"Generic": 0.1,
"Heat": 0.2,
"Bullet": 0.2,
"AntiVehicle": 0.25
}
},
"ProfilesRequiringPermission": [
{
"PermissionSuffix": "god",
"DroneProperties": {
"KillInWater": false,
"DisableWhenHurtChance": 0.0,
"MovementAcceleration": 30.0,
"AltitudeAcceleration": 20.0,
"LeanWeight": 0.0
},
"DamageScale": {
"AntiVehicle": 0.0,
"Arrow": 0.0,
"Bite": 0.0,
"Bleeding": 0.0,
"Blunt": 0.0,
"Bullet": 0.0,
"Cold": 0.0,
"ColdExposure": 0.0,
"Collision": 0.0,
"Decay": 0.0,
"Drowned": 0.0,
"ElectricShock": 0.0,
"Explosion": 0.0,
"Fall": 0.0,
"Fun_Water": 0.0,
"Generic": 0.0,
"Heat": 0.0,
"Hunger": 0.0,
"Poison": 0.0,
"Radiation": 0.0,
"RadiationExposure": 0.0,
"Slash": 0.0,
"Stab": 0.0,
"Suicide": 0.0,
"Thirst": 0.0
}
}
]
},
"DroneBoombox": {
"DefaultProfile": {
"DroneProperties": {
"KillInWater": true,
"DisableWhenHurtChance": 25.0,
"MovementAcceleration": 7.5,
"AltitudeAcceleration": 7.5,
"LeanWeight": 0.025
},
"DamageScale": {
"Generic": 0.1,
"Heat": 0.1,
"Bullet": 0.1,
"AntiVehicle": 0.1
}
},
"ProfilesRequiringPermission": []
},
"DroneStorage": {
"DefaultProfile": {
"DroneProperties": {
"KillInWater": true,
"DisableWhenHurtChance": 25.0,
"MovementAcceleration": 7.5,
"AltitudeAcceleration": 7.5,
"LeanWeight": 0.025
},
"DamageScale": {
"Generic": 0.1,
"Heat": 0.1,
"Bullet": 0.1,
"AntiVehicle": 0.1
}
},
"ProfilesRequiringPermission": []
},
"DroneTurrets": {
"DefaultProfile": {
"DroneProperties": {
"KillInWater": true,
"DisableWhenHurtChance": 25.0,
"MovementAcceleration": 5.0,
"AltitudeAcceleration": 5.0,
"LeanWeight": 0.025
},
"DamageScale": {
"Generic": 0.1,
"Heat": 0.1,
"Bullet": 0.1,
"AntiVehicle": 0.1,
"Explosion": 0.75,
"Blunt": 0.75
}
},
"ProfilesRequiringPermission": []
},
"MegaDrones": {
"DefaultProfile": {
"DroneProperties": {
"KillInWater": false,
"DisableWhenHurtChance": 0.0,
"MovementAcceleration": 20.0,
"AltitudeAcceleration": 20.0,
"LeanWeight": 0.1
},
"DamageScale": {
"Generic": 0.1,
"Heat": 0.05,
"Bullet": 0.05,
"AntiVehicle": 0.1,
"Explosion": 0.1,
"Blunt": 0.25
}
},
"ProfilesRequiringPermission": []
},
"RidableDrones": {
"DefaultProfile": {
"DroneProperties": {
"KillInWater": true,
"DisableWhenHurtChance": 25.0,
"MovementAcceleration": 7.5,
"AltitudeAcceleration": 7.5,
"LeanWeight": 0.025
},
"DamageScale": {
"Generic": 0.1,
"Heat": 0.1,
"Bullet": 0.1,
"AntiVehicle": 0.1
}
},
"ProfilesRequiringPermission": []
}
}
}
DroneTypePriority allows you to define the priority of drone types, in case a drone has multiple types (due to having multiple attachments). For example, if a drone has both a stash (DroneStorage) and a chair (RidableDrones), this plugin would apply a "DroneChair" settings profile instead of "DroneStorage" since "DroneChair" appears in the list first (in the default configuration of the plugin).
Each drone type has the following options.
DefaultProfile-- Applies to all drones of this type, except for drones owned by players with permission to a profile underProfilesRequiringPermissionfor this drone type.ProfilesRequiringPermission-- List of profiles that require permission. Each profile will generate a permission of the formatdronesettings.<type>.<suffix>(e.g.,dronesettings.basedrone.god). Granting that permission to a player will cause any drones they deploy to have that profile instead ofDefaultProfile. Granting multiple profiles to a player will cause only the last one to apply, based on the order in the config.
Each profile has the following options.
PermissionSuffix-- This determines the generated permission of formatdronesettings.<type>.<suffix>.DronePropertiesKillInWater(default:true) -- Whiletrue, the drone will be destroyed when it enters water. Whilefalsethe drone can enter water without issue.- Tip: While controlling a drone that is underwater, for some reason, you can see better if wearing a diving mask.
DisableWhenHurtChance(default:25.0) -- This determines the chance that movement controls of the drone will be briefly interrupted when the drone is damaged.MovementAcceleration(default:10.0) -- This determines the drone's horizontal movement speed (forward, backward, sideways).AltitudeAcceleration(default:10.0) -- This determines the drone's vertical movement speed (up, down).LeanWeight(vanilla:0.25) -- This determines how much the drone leans while moving, as well as how much altitude is lost while moving.- Set to
0.0for no lean or altitude loss.- Useful when using the Drone Lights plugin since it prevents the beam from unintentionally moving as the drone leans.
- Useful when flying in locations where the altitude does not change, such as in the underground train tunnels.
- Set to
DamageScale(each0.0to1.0) -- These options determine how much damage the drone will take, per damage type. If you want to use vanilla damage scaling, simply remove theDamageScalesection from the profile.- Set a damage type to
1.0to take full damage. This is the default for any damage type not defined in this section. - Set a damage type to
0.0to block all damage of that type. - Note: In vanilla, drone collision causes
Falldamage. When the Better Drone Collision plugin is installed, drone collision causesCollisiondamage.
- Set a damage type to
Recommended compatible plugins
Drone balance:
- Drone Settings (This plugin) -- 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 -- 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 API
API_RefreshDroneProfile
void API_RefreshDroneProfile(Drone drone)
- Attempts to apply the drone's most appropriate profile
- Useful for changing a drone's profile after an attachment has been added or removed
- This calls the
OnDroneTypeDeterminehook call so that other plugins can respond with the profile name they think is appropriate
Developer Hooks
OnDroneTypeDetermine
string OnDroneTypeDetermine(Drone drone, List<string> droneTypes)
- Called when this plugin is determining which profile type to apply to a particular drone
- (Deprecated) Returning a
stringindicates that the drone is special and should use the specified profile type - Adding a
string(recommend your plugin'sName) to thedroneTypeslist indicates that the drone should use the specified string as the profile type- If multiple entries are added to
droneTypes(most likely due to the drone having multiple attachments), the drone type will be selected according to theDroneTypePriorityconfiguration option or alphabetical order if none of the provided types are inDroneTypePriority
- If multiple entries are added to
- If
droneTypesis empty and all plugins returnnull(or usevoidreturn type), the drone will be assumed to be of type"BaseDrone"
OnDroneSettingsChange
object OnDroneSettingsChange(Drone drone)
- Called when this plugin is about to alter a drone
- Returning
falsewill prevent the the drone from being altered - Returning
nullwill result in the default behavior
OnDroneSettingsChanged
void OnDroneSettingsChanged(Drone drone)
- Called after this plugin has altered a drone
- No return behavior
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.

