"Homing" Cannonballs #49


  • Started
  • Enhancment
Open
Assigned to derpavlov
  • _ForgeUser10299688 created this issue Dec 31, 2013

    What is the enhancement in mind? How should it look and feel?

    Before anyone gets their hopes up, I put "Homing" in quotes for a reason. I myself, wouldn't believe in homing cannonball projectiles as they don't make sense and they're simply overpowered. You might as well find a plugin that just explodes the nearest player on the spot.

    I mean "Homing" with a qualification. Here's how it would work. The cannonball gets fired out of the cannon. After "x" seconds (definable per cannonball type), the cannonball will get the location of the nearest target. How the cannonball will know an entity is a target or not - I'm not sure how to implement. I'm sure the developer can think of something *wink wink*. (The issue is not with mobs, but with PvP in conjunction with a plugin like Factions; you'd need a way to distinguish ally and enemy.)

    Once the cannonball gets the target's location, it will stop its current trajectory/velocity/everything-physics-related, and instead, beeline straight toward the location it got (when it starts traveling in a straight line, the velocity should also be configurable per cannonball-type). Note that this location might be "outdated" and won't necessarily hit the target's most recent location - that is intended. If the target is running, it will most likely hit behind the target - the desired effect. If the target stays still or is slow (like most mobs), well...

    The idea behind this is to create a cannonball that will intimidate players. Emphasis on intimidate, not kill. My current observations on toying with the default cannonball types was that cannons were great for destroying all kinds of block-based defenses... but were terrible (absolutely horrible) at killing even zombies. I probably know cannons weren't originally intended to kill footsoldiers on the battlefield, but it would be a rather nice feature if it had the potential to do so.

    If you really wanted to make an effective, soldier-slaughtering cannon, you could set the "beeline velocity" to very high, so that it will locate and hit its target in a near instant. That, and make the damage powerful.

    Please provide any additional information below.

    An idea for how to determine if entity is a target or not:
    Perhaps this can be worked out on a per-cannon basis; e.g. the ability to configure each individual cannon to shoot homing cannonballs that will target only "x" type of entity. Be sure not to confuse this with the cannon itself autotargeting and firing at entities - that would also be overpowered anyway, and would defeat the purpose of aiming. The issue of storing the "target-list" in a cannonball-type, or a cannon-type, is that you'd need a LOT of cannonball or cannon types, and would only lead to confusion and mass hysteria, along with too much redundancy and waste. So storing "target lists" per cannon makes more sense.

    So what is this target list? You can add any type of "group" in this list. For example, if you add "Creeper", all homing cannonballs will lock on the nearest creeper they find. If your list is empty, the homing cannonball behaves like a plain one. Apart from using mob names, you might be wondering, "What about people from enemy factions?" Or something like that. We can use a variable like "Faction:<factionname>", and the cannon will fire homing cannonballs that will target the nearest faction member of the specified faction. Too many factions being created every single day? You could have an option for the cannon to fire homing cannonballs that will target anyone who is a member of any faction, except for those specified on the cannon's "ignore list".

    In fact, Sentry (A Citizens addon plugin) has a system like that already. See "targets" under this page for details on all the target types they currently support:
    http://wiki.citizensnpcs.co/Sentry

  • _ForgeUser10299688 added the tags New Enhancment Dec 31, 2013
  • DerPavlov posted a comment Jan 1, 2014

    I really like the idea of "homing" cannonball from the mathematical point of view. I did some research and I think I can do that. But the movement of the cannonball might look choppy, because it is only a sever-side mod and the location is updated for the client. The snowball will therefore jump to its new location every few seconds.

    When the cannonball is fired then there is a slight delay, so the cannonball does not turn around to eliminate the gunner. Bukkit offers a method to get all nearby entities in a certain box. Iterate over all this entities and target one with the small change of the trajectory. There will be also a maximum acceptance angle and turning speed of the cannonball.
    On miss we could blow up the projectile if it is close to the entity or target the next one.

    Friend/foe detection is very difficult. If there is an API available which gives me this information for all different types of plugins (Factions, Towny, ...) we can talk about it. But for the first try I will make it without detection - so don't stand in front of a cannon.
    It will be also possible to target only a certain type of creatures (mobs, peaceful, player,...) or all of them. I like the way the sentry plugin implements this, but it takes time for implementation. The best solution would be a Sentry Gunner placed behind a cannon. I have to talk to the Sentry developers maybe it is possible to assign a Gunner to a cannon.

    I would avoid changing the trajectory of the cannonball if possible. Better would be an autoaiming for the cannon. You select an entity which will be tracked by the cannon. However if the entity changes the moving direction after firing the projectile will miss. So there is not 100% chance to kill a player.

    As a sidenote: You can also load your cannon with "canister shot" which gives you multiple projectiles like a giant shotgun. If you set a higher number of bullets per projectile it should be easier to hit.
    Alternative I can also make a projectile which explodes if it is close to an entity. On explosion it will spawn several deadly projectiles.


    Edited Jan 1, 2014
  • DerPavlov removed a tag New Jan 1, 2014
  • DerPavlov added a tag Waiting Jan 1, 2014
  • _ForgeUser10299688 posted a comment Jan 1, 2014

    @DerPavlov: Go

    For the homing cannonball, is it not possible to turn it into a "Ghast Fireball" and have it behave as such when it starts to beeline toward its target? (The only differences would be velocity, the effects of the explosion, and the fact that you shouldn't be able to play baseball with it.)

    Also, I just used Sentry as an example. But your idea of using them as gunners, is actually a really ingenious solution.

    The thing about autoaiming with a cannon, is that it defeats the entire purpose of having a homing cannonball-type to begin with. The idea is that you can fire "normal" cannonballs and "homing" cannonballs from any cannon, instead of having cannons that either manually aim, or automatically aim. Autoaiming cannons just feels like a less-flexible, and slightly overpowered alternative... or so I think. You can always prove me wrong on this. :)

    I'm aware canister shots were designed for anti-personnel use, but when I was talking about the fact that cannons are bad against small, non-block targets, I was speaking in relative terms. As in, it's easier to snipe someone (and kill them) with a bow, than with a cannon. It's far more difficult, even with canister shots, to kill a single foe. A group of foes on the other hand, you have a fair point. "Homing" cannonballs are not meant to solve this "problem" (it's not really a problem), and I don't see it as a problem to begin with. Just an observation.

    I'm pretty sure in history (pre-WW1), cannons were used to destroy ships and fortifications, rather than blow up people.

    Also, I thought "Cluster Shots" (blowing up, and spawning more projectiles) were already implemented into the plugin? If they weren't, I would've suggested it a long time ago... If you want, I can make a separate ticket for this, although the idea should be pretty simple.

    Upon the main "Cluster Shot" exploding, you spawn "a-b" amount of projectiles (everything is a range, not a single value - projectiles are arrows) with a velocity-range of "b-c" (some travel faster, some slower), each projectile having a knockback-power of "d-e", and dealing "f-g" damage. Can optionally explode on impact with "h" power (more power = more radius, knockback, and damage), set fire (both blocks and mobs) on impact with "i" duration, and pierce armour when hitting a foe (deal damage as if no armour was there). These values should all be configurable under the "Projectiles" config. The option for whether a cannonball-type should be "Cluster" or not, should be a boolean value. Potentially, you can make both a cluster AND a canister shot, which sounds fun.

    Side note and unrelated to anything, but shouldn't "doesPenetrationDamage: true" also pierce armour, should the projectile hit a player or any mob with armour? Intuitively, it would make sense for a cannonball that does penetration damage, to also ignore entity armour.

  • _ForgeUser10299688 removed a tag Waiting Jan 1, 2014
  • _ForgeUser10299688 added a tag Replied Jan 1, 2014
  • DerPavlov posted a comment Jan 1, 2014

    I will start first with a proximity fuze to blow up the cannonball if it is closer than a given distance. If this is too less I will add the homing feature.

    I implemented the ClusterShot a few days ago but it is still under approval. There is a new firework projectile which splits into many different projectiles. Each new projectile has its on YAML file with new properties. To fire the firework you have to load '401:0' - a normal rocket. You can test it here:
    https://dl.dropboxusercontent.com/u/16404245/Beta/Cannons.jar

    I added also a 'rapid' firing feature, which fires several projectiles with a small time delay. I used 1s and 10 projectiles - very devastating. And you can also aim while firing.

    Since I am too lazy to craft armour I didn't thought about that. I implemented it now.


    Edited Jan 2, 2014
  • _ForgeUser10299688 posted a comment Jan 3, 2014

    @DerPavlov: Go

    Sorry for not responding sooner... somewhat busy with other stuff.

    Anyway, I'm not sure what I was supposed to be testing. Was I supposed to be testing for cluster-cannonballs? If so, awesome, because that's what I tested for.

    So, the cluster explosion looked cool and all, but for the purposes of a cluster bomb, I'm slightly concerned. About half of the cluster-projectiles exploded in midair - which is good, if you're thinking of doing an airburst-type bomb, but most cluster bombs have it where all the projectiles are released, and explode only in the ground. Personally, I think it would be nice to have both "types" of cluster bombs - an airburst, and a groundburst cluster bomb, because they serve different purposes.

    In my testing, I suspect the "cluster-explosives" explode in midair, because they're exploding prematurely, due to a short "fuse time". (I haven't looked too closely at the .yml files of each of the firework projectiles.) So when I mention the two "types" of cluster bombs above, the real difference is probably the fuse-time of the cluster-projectiles (they aren't actually two distinct types).

  • DerPavlov removed a tag Replied Apr 27, 2014
  • DerPavlov added a tag Started Apr 27, 2014

To post a comment, please login or register a new account.