What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

FlyTo Tag using postmessage and keybindings

iyake

Member
Joined
Oct 19, 2014
Messages
143
SimpleFlyTo Tag

Here's a straightforward flight implementation. This tag will:
  1. Mount if not already mounted using MountId. You're in charge of dismounting/using company chocobo if companion is summoned, etc.
  2. Orient you towards your target
  3. Take flight and ascend to Altitude. This is the 'Y' value of Vector3 objects (i.e. Core.Me.Location). Make sure this is high enough to clear all obstacles, otherwise you'll get pushed from the straight trajectory and the bot will never arrive and stop.
  4. Fly in a straight line to within Radius of XYZ
  5. Descend until it can't descend anymore.

Usage:

Code:
<SimpleFlyTo XYZ="460.0172, -51.1414, 54.38672" Altitude="-31.96687" MountId="45" Radius="1.0" LandAfter="False" />
<SimpleFlyTo XYZ="-225.302, 165.2225, 552.2371" />

Required:
  • XYZ - Where you want to end up. The Y parameter is ignored

Optional:
  • Altitude - The altitude to fly at - if omitted, no vertical movement will occur.
  • Radius - (Default: 3.0)
  • LandAfter - Will Land After arriving above the location. Default: True
  • MountId - The mount to use if not already mounted. 1: Company Chocobo. 45: Black Chocobo (Default: 1 - Company Chocobo)

View attachment SimpleFlyToTag-0.2.cs

Version 0.2
Code:
- Tag has been renamed to SimpleFlyTo to differentiate it from the eventual official release of a FlyTo. You'll have to find/replace all your old profiles.
- With RB v310 release, bot can now turn in midair for course corrections. API support also removes need for keybindings.
- Bot can now descend to specified Altitude if Altitude is below current location.
- Altitude now optional, omitting it will result in no vertical movement after taking off.
- LandAfter attribute added, defaults true to support initial release
- Tag will fail if not already mounted and in combat so we don't block CRs

Version 0.1
Code:
- Original release based on keybindings
 
Last edited:
Actionmanager.Dismount() should cause you to land
 
Code:
        public async Task<bool> SetFacing() 
        {
            float z = Location.Z - Core.Player.Location.Z;
            float x = Location.X - Core.Player.Location.X;
            // The Z axis goes from top to bottom for whatever reason, so for simplicity
            // take its inverse
            float angle = Convert.ToSingle(Math.Atan2(x, -z));

            MovementManager.SetFacing(PI - angle);

            await Coroutine.Sleep(500);

            return true;
        }

should be replaced with

Code:
Core.Player.Face(Location);
await Coroutine.Yield();
return true;
 
Oh, I was looking in movementmanager for a setfacing(vector3). sadly, that one doesn't work to change movement direction either while in flight.

Updated, thanks.
 
Have you tried changing your movement logic to:
Code:
            while (Distance2D(Core.Player.Location, Location) > Radius) {
                if (!moving) {
                    MovementManager.MoveForwardStart();
                    moving = true;
                    }
				while (Core.Player.IsFacing(Location))
				{
					await Coroutine.Yield();
				}
				if (!Core.Player.IsFacing(Location))
				{
					MovementManager.MoveForwardStop();
                                        moving = false;
					await SetFacing();
				}
            }

I think that should be able to compensate for any veering off course
 
Neither of the calls to change facing works in midair. they only change the camera angle for a second, but you keep moving forward on the original heading. That's why the tag orients you before taking flight.

I imagine the facing calls weren't originally written with flying in mind.
 
Thanks iyake, This works really well.

I created a profile that shows this in action so others can play around with it and see how it works.

Code:
Profile: [O] [BTN] Dark Chestnut Log - The Dravanian Forelands
Author: becto (this profile) and iyake (for flight)
Version: 1.0.0
Required Level: 54
Required Teleport Location:
	Falcon's Nest
Required User Interaction:
	None. AFKable.
	Do Not type in Chat while bot is running as it may interrupt flight.
	Do Not change Camera Angle or move as it may interrupt flight.
Required Setup:
	Acquire Falcon's Nest Aetheryte
	DO NOT START IN The Dravanian Forelands
	Copy FlyToTag.cs into the following folder: RebornBuddy\Plugins\OrderBotTags\ 
Item Collected:
	Dark Chestnut Log
WARNING:
	This looks like a bot, do not use without supervision. The intent is to show off the flight provided by iyake. Use at your own risk.

View attachment [O] [BTN] DarkChestnut Lumber (flight).xml
 
Thanks for the OrderBotTag, and the profile! It works really well and the only other one I've tried needs to fix the stealthing, making this a much more viable option!
It's really cool to see progress being made towards flight automation!
So, thanks guys!
 
GREAT work! Im not the best coder but.... If your facing, then flying to a direct path, why not have parts of reconfiguration of flying? Say you didnt get high enough and hit/got stuck on obstacle. Have bot resync facing location after you move from object? I know you could add a If function in there. Im currently going back into coding so i figure i can try and help as much as possible. MAybe a BOOLeon would work for this case? If path unhindered then use path, if path hindered then resync.

Is it possible for the CODE it write itself? Have code write more code if a such function pulls up? basicly self injects code that it might seem to work for the bot lol?
 
GREAT work! Im not the best coder but.... If your facing, then flying to a direct path, why not have parts of reconfiguration of flying? Say you didnt get high enough and hit/got stuck on obstacle. Have bot resync facing location after you move from object? I know you could add a If function in there. Im currently going back into coding so i figure i can try and help as much as possible. MAybe a BOOLeon would work for this case? If path unhindered then use path, if path hindered then resync.

Is it possible for the CODE it write itself? Have code write more code if a such function pulls up? basicly self injects code that it might seem to work for the bot lol?
While technically you can write code that writes code, and then injects, I can only assume it's a less than practical or viable option. :X

Now, I noticed that this performs much better when I change my camera orientation to directly behind my character. I imagine First person would also work. When I have my camera orientation top-down over my character, there's problems.
 
Nice! still i cant wait to get my money to get a new license! gotta start coding again!
 
No idea where OrderBotTags is located. But I stumbled into the truth by installing it under Plugins/FlyToTag/FlyToTag.cs. That seemed to work fine.
 
Doesn't matter which mountID I use it always uses the mount roulette? Why is that?

Edit: Making the default the black chocobo made it work, so I'm not sure what's going on there.

Edit2: This is a really good start. Thank you for your efforts!

I can see being able to collect collectibles with this. Is there any way to do collectibles right now?
 
Doesn't matter which mountID I use it always uses the mount roulette? Why is that?

Edit: Making the default the black chocobo made it work, so I'm not sure what's going on there.

Edit2: This is a really good start. Thank you for your efforts!

I can see being able to collect collectibles with this. Is there any way to do collectibles right now?

AFAIK, fish.cs does it. It's a YesOrNo, i think.
 
Tag has been renamed and updated to use the new 310 movementmanager methods.

Please replace <FlyTo with <SimpleFlyTo in all your profiles
 
See attached. I posted this over here, but the original format for such a file was lifted from FlyTo.cs.

Maybe you'll find the code useful. Maybe not. It seems to me it just needs to check the proposed path for obstacles (method implemented as "PathIsClear" but not utilized) and then some random sampling to find a way around the obstacle, rebuilding the _waypoints list as necessary.

View attachment FlightPathTo.cs
 
Good work on getting us up in the air! :)

I need some help though. I have tested two different version to be able to fly:

FlightPathTo.cs
SimpleFlyToTag-0.2.cs

The problem i face is that the "simpleflytotag" doesn't get me in the air (it jump normal but do not get in the air). I have tested two settings in FF14, one is automatic jump setting, and the second is manual with double jump and neither is working to get me in the air.

However, "FlightPathTo" is able to get me in the air and to my destination, but it fail to climb with a 90 degrees ange. The plugin has a "smooth" functionality built in that prohibit me to land safe at my destination in narrow valley mountains with many cliffs around.

How to make SimpleFlyToTag get me in the air? Or how to make FlightPathTo be able to climb vertically?

Appreciate any help on this.
 
Good work on getting us up in the air! :)

I need some help though. I have tested two different version to be able to fly:

FlightPathTo.cs
SimpleFlyToTag-0.2.cs

The problem i face is that the "simpleflytotag" doesn't get me in the air (it jump normal but do not get in the air). I have tested two settings in FF14, one is automatic jump setting, and the second is manual with double jump and neither is working to get me in the air.

However, "FlightPathTo" is able to get me in the air and to my destination, but it fail to climb with a 90 degrees ange. The plugin has a "smooth" functionality built in that prohibit me to land safe at my destination in narrow valley mountains with many cliffs around.

How to make SimpleFlyToTag get me in the air? Or how to make FlightPathTo be able to climb vertically?

Appreciate any help on this.

Have you tried splitting the fly tags for either profile up into two or three parts, with the first one using the current location but your desired elevation, then the second keeping the elevation high at the target location, then the third one using the target location but an elevation on the ground?

Example:
Code:
Current Location = "460.0172, -51.1414, 54.38672"
Destination = "420.3584, -62.6214, 33.9645"
Code:
<SimpleFlyTo XYZ="460.0172, --31.96687, 54.38672" Altitude="-31.96687" MountId="45" Radius="1.0" LandAfter="False" />
<SimpleFlyTo XYZ="420.3584, --31.96687, 33.9645" Altitude="-31.96687" MountId="45" Radius="1.0" LandAfter="False" />
<SimpleFlyTo XYZ="420.3584, -62.6214, 33.9645" Altitude="-62.6214" MountId="45" Radius="1.0" LandAfter="True" />
 
Back
Top