• Visit Rebornbuddy
  • Yet Another Orderbot Flying Tag

    Discussion in 'Plugins' started by mistahmikey, Sep 8, 2015.

    1. mistahmikey

      mistahmikey New Member

      Joined:
      Jun 29, 2015
      Messages:
      161
      Likes Received:
      3
      Trophy Points:
      0
      Attached to this post you will find my cut at a flying tag, FlyParabolicArcTo, which I have been using for a while now and has been very reliable. It will fly a parabolic arc (surprise!) in the Y plane over the 3D line connecting your current 3D position and a specified 3D destination. The attributes of FlyParabolicArcTo are:

      XYZ = "<x>,<y>,<z>" - 3D coordinate of the termination of your flight
      Radius = "<distance>" - the flight ends when you arrive within the 3D Radius of XYZ (default: 2.0)
      MountId = "<mount id>" - the ID of the mount you wish to use to fly (default: 45 (black chocobo))
      MaxHeight = "<distance>" - the 2D Y height above the midpoint of the 3D line connecting your current position and XYZ, i.e, the apex of the parabola (default: 30)
      MinDistanceToFly = "<distance>" - the minimum 3D distance to travel in order for the toon to take flight - for anything less, will simply move the toon on the ground (default: 10)
      LandAtDestination = "<true/false>" - if "true", will request the toon to land when it arrives within Radius of XYZ (default: true)
      DismountAtDestination = "<true/false>" - if "true", will request the toon to dismount when it arrives within Radius of XYZ (if LandAtDestination = "false", this will be ignored if the toon is not prevented from flying due to MinDistanceToFly) (default: true)

      One problem that I was having with other flying tags that this one corrects is that the flight motion will not "stutter" between waypoints because it overshoots them - it ensures it will never "turn back" to a waypoint.

      You need to install this somewhere under your "Plugins" directory tree. For example, I have mine installed in the directory "Plugins/OrderbotTags".

      As a bonus, also attached is an Orderbot script that uses this tag to mine Hardsilver Ore/Wind Crystals. You will need to change line 135 to specify the equipment set your miner uses. The overall motion of this script is very botty (even though the flying parts are truly a thing of beauty), so beware, but I have run it overnight without incident. It does avoid one of the nodes to decrease the bottiness a bit, but not that much.

      I believe this tag could be used to "piece together" a multi-segment flight of parabolic bounces without landing (by setting LandAtDestination/DismountAtDestination to false for all segments but the last), but I haven't tried or tested it. So don't be shy - be a guinea pig!

      A final note: the flight path is not checked for any obstructions, nor does it try to avoid obstructions. It will gladly fly into whatever obstacle your parabola happens to intersect. So pick your start, XYZ and MaxHeight values appropriately if you have an obstacle-rich flight path.

      Have fun flying like an artillery shell :)
       

      Attached Files:

      Last edited: Sep 9, 2015
      Exmortem likes this.
    2. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Looks pretty interesting, good work!
       
    3. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      So the only problem I'm seeing after testing it out is that it's very prone to getting stuck due to obstacles. This might be a hard problem to solve considering there's no meshes for flight yet. However, I was thinking that maybe it would be possible to implement something like D* Lite on a particular "plane" mesh that gets created dynamically and cached. So instead of waiting for a full 3D mesh, we could perhaps create a 2D mesh at a certain altitude. The curve of the mesh could accompany the ground so as to always be X height from it. Perhaps.

      That aside, I really like the smooth parabolic movement you achieved with this.
       
    4. mistahmikey

      mistahmikey New Member

      Joined:
      Jun 29, 2015
      Messages:
      161
      Likes Received:
      3
      Trophy Points:
      0
      Yep, as I state in the initial post, you become an artillery shell. Boom! Off you go... :)

      I agree being able to navigate a mesh would be a considerable improvement, but in general, I have not found the lack of obstacle negotiation to be a show stopper. I have found it fairly easy to maneuver myself into a position where I can set MaxHeight and XYZ such that the parabola is problem free. In any case, I am unfamiliar with the mesh system, so I will leave that "little" enhancement to you, unless you can direct me to some information whereby I could educate myself about it. After using this quite a bit, I do think its flight capability is an evolutionary improvement of the first two tags I have used, so hopefully it provides folks an improved flight experience in the nonce, but YFMMV.
       
      Last edited: Sep 9, 2015
    5. Exmortem

      Exmortem Community Developer

      Joined:
      Mar 28, 2010
      Messages:
      799
      Likes Received:
      16
      Trophy Points:
      18
      Thank you, this is great.
       
    6. dayum12

      dayum12 Member

      Joined:
      Aug 22, 2015
      Messages:
      54
      Likes Received:
      1
      Trophy Points:
      8
      Develop this into a real real real thing, for EVERY HW profile and I'll love you until afterlife. <3
       

    Share This Page