[REQ]Autodetecting Anti-Ship Cannon

Discussion in 'Archived: Plugin Requests' started by Ikarirain, Aug 15, 2011.

  1. Offline


    Alright, I've done some extensive searching, and then browsed the forum further for good measure and haven't found anything related to what I'm about to request, so forgive me if I overlooked anything regarding this.

    The Request

    With the growing popularity of plugins like Movecraft and Autocraft, I've found a curious need for a plugin that provides cannons which can detect the movement of a craft up to a configurable distance and automatically fire a well-timed, although inaccurate, shot of TNT in the general direction.

    The Reason

    Oftentimes, player-created cities will find themselves under siege by enemies with cannons at their disposal, and in most cases these cities are undefended simply because no one of the city is online to defend it. So the question then is asked, "How do you let players defend a city from vessels of war while they are offline?" The only answer would be allowing the creation of anti-ship cannons that can detect incoming ships.

    The Functionality

    Similar to most current cannons, a dispenser would be used as the primary source for launching anti-ship TNT. The Dispenser would be identified as an anti-ship cannon with a sign nearby. The Ammunition, which would be configurable in number of items and amounts of each, would be stored in a chest directly behind or beside the dispenser, not in front.

    The cannon, once properly supplied, will fire a single TNT at any moving craft within a 90 degree firing range in front of it, up to a configurable distance. The plugin would take into account the necessary firing angle and projectile speed to properly explode the TNT in the general vicinity of the targeted craft, much like Anti-Air Flak Cannons are used. The cannon would be about 10% accurate, giving the defense a 1-in-10 chance of damaging the target, although raising or lowering the odds for balancing may be necessary.

    The request would require familiarity with the coding behind the more popular craft plugins, but essentially, this plugin would watch the movement of all piloted craft on the server. Once a craft comes within the defined range of a cannon, it would calculate the necessary numbers and fire at the targeted ship once per ship movement.

    The Result

    The ending result would be anti-ship cannons mounted as standard procedure on the walls of every important city to defend against invading warships, giving the residents of the town a surviving chance against aggressors, provided they keep the cannons supplied.

    Optional Features

    Optionally, the plugin could have the ability to interface with town-related plugins like Towny, and restrict the cannonade to allow craft piloted by town residents (or nation residents) to enter the firing range without fear of being blown away.

Share This Page