Rough update for EW_B ('Sound the Bell' until 'Strange Bedfellows')

This commit is contained in:
Liza 2024-05-27 23:51:11 +02:00
parent f542135c89
commit d485e72818
Signed by: liza
GPG Key ID: 7199F8D727D55F67
18 changed files with 303 additions and 28 deletions

View File

@ -51,10 +51,20 @@ internal sealed class MovementController : IDisposable
$"Pathfinding complete, route: [{string.Join(" ", _pathfindTask.Result.Select(x => x.ToString()))}]"));
var navPoints = _pathfindTask.Result.Skip(1).ToList();
if (!IsFlying && !_condition[ConditionFlag.Mounted] && navPoints.Count > 0 &&
!_gameFunctions.HasStatusPreventingSprintOrMount())
Vector3 start = _clientState.LocalPlayer?.Position ?? navPoints[0];
if (IsFlying && !_condition[ConditionFlag.InFlight] && _condition[ConditionFlag.Mounted])
{
if (IsOnFlightPath(start) || navPoints.Any(IsOnFlightPath))
{
unsafe
{
ActionManager.Instance()->UseAction(ActionType.GeneralAction, 2);
}
}
}
else if (!IsFlying && !_condition[ConditionFlag.Mounted] && navPoints.Count > 0 &&
!_gameFunctions.HasStatusPreventingSprintOrMount())
{
Vector3 start = _clientState.LocalPlayer?.Position ?? navPoints[0];
float actualDistance = 0;
foreach (Vector3 end in navPoints)
{
@ -88,11 +98,18 @@ internal sealed class MovementController : IDisposable
if (IsPathRunning && Destination != null)
{
Vector3 localPlayerPosition = _clientState.LocalPlayer?.Position ?? Vector3.Zero;
if ((localPlayerPosition - Destination.Value).Length() < StopDistance)
if ((localPlayerPosition - Destination.Value).Length() < StopDistance &&
Math.Abs(localPlayerPosition.Y - Destination.Value.Y) < 1.95f) // target is too far below you
Stop();
}
}
private bool IsOnFlightPath(Vector3 p)
{
Vector3? pointOnFloor = _navmeshIpc.GetPointOnFloor(p);
return pointOnFloor != null && Math.Abs(pointOnFloor.Value.Y - p.Y) > 0.5f;
}
private void PrepareNavigation(EMovementType type, Vector3 to, bool fly, float? stopDistance)
{
ResetPathfinding();

View File

@ -341,6 +341,7 @@ internal sealed class QuestController
else
distance = step.StopDistance ?? MovementController.DefaultStopDistance;
_pluginLog.Information($"Stop dist: {distance}");
var position = _clientState.LocalPlayer?.Position ?? new Vector3();
float actualDistance = (position - step.Position.Value).Length();
@ -375,7 +376,7 @@ internal sealed class QuestController
if (actualDistance > distance)
{
_movementController.NavigateTo(EMovementType.Quest, step.Position.Value,
_gameFunctions.IsFlyingUnlocked(_clientState.TerritoryType), distance);
step.Fly && _gameFunctions.IsFlyingUnlocked(_clientState.TerritoryType), distance);
return;
}
}
@ -384,7 +385,7 @@ internal sealed class QuestController
if (actualDistance > distance)
{
_movementController.NavigateTo(EMovementType.Quest, [step.Position.Value],
_gameFunctions.IsFlyingUnlocked(_clientState.TerritoryType), distance);
step.Fly && _gameFunctions.IsFlyingUnlocked(_clientState.TerritoryType), distance);
return;
}
}

View File

@ -17,6 +17,7 @@ internal sealed class NavmeshIpc
private readonly ICallGateSubscriber<bool> _pathIsRunning;
private readonly ICallGateSubscriber<float> _pathGetTolerance;
private readonly ICallGateSubscriber<float, object> _pathSetTolerance;
private readonly ICallGateSubscriber<Vector3, bool, float, Vector3?> _queryPointOnFloor;
public NavmeshIpc(DalamudPluginInterface pluginInterface)
{
@ -29,6 +30,7 @@ internal sealed class NavmeshIpc
_pathIsRunning = pluginInterface.GetIpcSubscriber<bool>("vnavmesh.Path.IsRunning");
_pathGetTolerance = pluginInterface.GetIpcSubscriber<float>("vnavmesh.Path.GetTolerance");
_pathSetTolerance = pluginInterface.GetIpcSubscriber<float, object>("vnavmesh.Path.SetTolerance");
_queryPointOnFloor = pluginInterface.GetIpcSubscriber<Vector3, bool, float, Vector3?>("vnavmesh.Query.Mesh.PointOnFloor");
}
public bool IsReady
@ -63,4 +65,7 @@ internal sealed class NavmeshIpc
_pathMoveTo.InvokeAction(position, false);
}
public Vector3? GetPointOnFloor(Vector3 position)
=> _queryPointOnFloor.InvokeFunc(position, true, 1);
}

View File

@ -20,6 +20,7 @@ public class QuestStep
public bool Disabled { get; set; }
public bool DisableNavmesh { get; set; }
public bool? Mount { get; set; }
public bool Fly { get; set; }
public string? Comment { get; set; }
[JsonConverter(typeof(AetheryteConverter))]

View File

@ -43,7 +43,11 @@
"Z": -67.36859
},
"TerritoryId": 962,
"InteractionType": "Interact"
"InteractionType": "Interact",
"AethernetShortcut": [
"[Old Sharlayan] The Baldesion Annex",
"[Old Sharlayan] The Studium"
]
}
]
},
@ -72,6 +76,7 @@
"Y": 21.84602,
"Z": -91.32526
},
"StopDistance": 5,
"TerritoryId": 962,
"InteractionType": "Interact"
}

View File

@ -57,7 +57,8 @@
"Z": -15.213318
},
"TerritoryId": 129,
"InteractionType": "Interact"
"InteractionType": "Interact",
"AetheryteShortcut": "Limsa Lominsa"
}
]
},
@ -72,7 +73,9 @@
"Z": 525.2003
},
"TerritoryId": 621,
"InteractionType": "Interact"
"InteractionType": "Interact",
"AetheryteShortcut": "Lochs - Ala Mhigan Quarter",
"Fly": true
}
]
}

View File

@ -27,6 +27,7 @@
"Y": 70.139626,
"Z": 522.88086
},
"StopDistance": 5,
"TerritoryId": 621,
"InteractionType": "Interact"
}
@ -57,6 +58,7 @@
"Y": 122,
"Z": -362.96637
},
"StopDistance": 7,
"TerritoryId": 737,
"InteractionType": "Interact",
"Comment": "A-Ruhn-Senna"
@ -68,6 +70,7 @@
"Y": 122,
"Z": -366.47595
},
"StopDistance": 7,
"TerritoryId": 737,
"InteractionType": "Interact",
"Comment": "Sicard"
@ -79,6 +82,7 @@
"Y": 122,
"Z": -366.84216
},
"StopDistance": 7,
"TerritoryId": 737,
"InteractionType": "Interact",
"Comment": "Lyse"
@ -90,6 +94,7 @@
"Y": 122,
"Z": -363.9124
},
"StopDistance": 7,
"TerritoryId": 737,
"InteractionType": "Interact",
"Comment": "Lucia"
@ -101,6 +106,7 @@
"Y": 122,
"Z": -352.34613
},
"StopDistance": 7,
"TerritoryId": 737,
"InteractionType": "Interact",
"Comment": "Cirina"
@ -117,6 +123,7 @@
"Y": 122,
"Z": -364.9806
},
"StopDistance": 7,
"TerritoryId": 737,
"InteractionType": "Interact"
}
@ -132,6 +139,7 @@
"Y": 69.9999,
"Z": 534.3251
},
"StopDistance": 7,
"TerritoryId": 621,
"InteractionType": "Interact"
}

View File

@ -46,6 +46,7 @@
"Y": 24.18463,
"Z": 479.9764
},
"StopDistance": 7,
"TerritoryId": 958,
"InteractionType": "AttuneAetheryte"
},
@ -101,6 +102,7 @@
"Y": 23.803606,
"Z": 404.65393
},
"StopDistance": 7,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -116,6 +118,7 @@
"Y": 22.717295,
"Z": 435.62976
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}

View File

@ -12,6 +12,7 @@
"Y": 22.738518,
"Z": 435.56873
},
"StopDistance": 7,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -20,6 +21,15 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -210.6673,
"Y": 15.799101,
"Z": 451.78333
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"DataId": 2012000,
"Position": {
@ -27,8 +37,22 @@
"Y": 31.937134,
"Z": 423.6056
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent"
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818344,
"DisableNavmesh": true
},
{
"Position": {
"X": -188.58397,
"Y": 20.625948,
"Z": 408.3002
},
"TerritoryId": 958,
"InteractionType": "WalkTo",
"DisableNavmesh": true,
"Mount": true
},
{
"DataId": 1038840,
@ -45,6 +69,26 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": -135.94785,
"Y": 3.426586,
"Z": 360.1115
},
"TerritoryId": 958,
"InteractionType": "WalkTo",
"DisableNavmesh": true,
"Mount": true
},
{
"Position": {
"X": -48.166317,
"Y": -0.8113563,
"Z": 374.09103
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"DataId": 2012076,
"Position": {

View File

@ -12,6 +12,7 @@
"Y": 32.318867,
"Z": 150.04187
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -42,6 +43,7 @@
"Y": 38.372063,
"Z": 217.54773
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -57,6 +59,7 @@
"Y": 38.372063,
"Z": 214.55713
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -72,6 +75,7 @@
"Y": 38.372063,
"Z": 216.05249
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -95,6 +99,15 @@
{
"Sequence": 6,
"Steps": [
{
"Position": {
"X": 398.44858,
"Y": 5.094846,
"Z": 231.72844
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"Position": {
"X": 393.71204,
@ -103,6 +116,7 @@
},
"TerritoryId": 958,
"InteractionType": "ManualAction",
"DisableNavmesh": true,
"Comment": "Jump on Pipeline and move near the Aether Current"
},
{
@ -113,7 +127,18 @@
"Z": 520.31726
},
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent"
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818347
},
{
"Position": {
"X": 379.2122,
"Y": -18.622318,
"Z": 530.3423
},
"TerritoryId": 958,
"InteractionType": "WalkTo",
"DisableNavmesh": true
},
{
"DataId": 2012001,
@ -123,7 +148,8 @@
"Z": 644.28174
},
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent"
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818345
},
{
"DataId": 1038853,
@ -148,7 +174,8 @@
"Z": 650.26306
},
"TerritoryId": 958,
"InteractionType": "Interact"
"InteractionType": "Interact",
"Mount": false
}
]
},

View File

@ -27,8 +27,10 @@
"Y": 23.803606,
"Z": 405.2644
},
"StopDistance": 7,
"TerritoryId": 958,
"InteractionType": "Interact"
"InteractionType": "Interact",
"AetheryteShortcut": "Garlemald - Camp Broken Glass"
}
]
},
@ -57,6 +59,7 @@
"Y": 22.071072,
"Z": 434.01233
},
"StopDistance": 6,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -88,8 +91,10 @@
"Y": -0.13689682,
"Z": 150.48564
},
"StopDistance": 1,
"TerritoryId": 958,
"InteractionType": "Interact"
"InteractionType": "Interact",
"Comment": "Follow Alphinaud and Alisaie"
}
]
},

View File

@ -28,7 +28,8 @@
"Z": 102.00659
},
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent"
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818346
},
{
"Position": {
@ -36,8 +37,10 @@
"Y": 0.96746624,
"Z": 103.04115
},
"StopDistance": 1,
"TerritoryId": 958,
"InteractionType": "Combat",
"EnemySpawnType": "AutoOnEnterArea",
"KillEnemyDataIds": [
14083,
14084
@ -55,6 +58,7 @@
"Y": 0.99992824,
"Z": 105.82129
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -69,8 +73,10 @@
"Y": 5.506278,
"Z": 78.14653
},
"StopDistance": 1,
"TerritoryId": 958,
"InteractionType": "Combat",
"EnemySpawnType": "AutoOnEnterArea",
"KillEnemyDataIds": [
14082
]
@ -87,6 +93,7 @@
"Y": 5.5300293,
"Z": 76.67651
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -116,7 +123,9 @@
"Y": 14.620869,
"Z": -164.97536
},
"StopDistance": 1,
"TerritoryId": 958,
"EnemySpawnType": "AutoOnEnterArea",
"InteractionType": "Combat",
"KillEnemyDataIds": [
14081
@ -134,6 +143,7 @@
"Y": 14.616225,
"Z": -162.85956
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}

View File

@ -42,6 +42,15 @@
"InteractionType": "Interact",
"Comment": "Octavia"
},
{
"Position": {
"X": 502.34732,
"Y": -36.65,
"Z": -178.38684
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"DataId": 1037715,
"Position": {
@ -95,6 +104,25 @@
{
"Sequence": 3,
"Steps": [
{
"Position": {
"X": 548.01605,
"Y": -36.61611,
"Z": -237.499
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"Position": {
"X": 547.66595,
"Y": -36.616203,
"Z": -244.51854
},
"TerritoryId": 958,
"InteractionType": "WalkTo",
"DisableNavmesh": true
},
{
"DataId": 1037719,
"Position": {
@ -110,6 +138,15 @@
{
"Sequence": 4,
"Steps": [
{
"Position": {
"X": 547.021,
"Y": -36.616203,
"Z": -244.6051
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"DataId": 1039899,
"Position": {
@ -118,7 +155,8 @@
"Z": -216.84601
},
"TerritoryId": 958,
"InteractionType": "Interact"
"InteractionType": "Interact",
"DisableNavmesh": true
}
]
},

View File

@ -20,6 +20,15 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": 531.7644,
"Y": -36.650005,
"Z": -228.76685
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"DataId": 1039901,
"Position": {
@ -54,7 +63,8 @@
},
"TerritoryId": 958,
"InteractionType": "Interact",
"Comment": "Map"
"Comment": "Map",
"Mount": true
},
{
"DataId": 2012005,
@ -64,7 +74,8 @@
"Z": -482.20038
},
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent"
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818349
},
{
"DataId": 2012095,
@ -134,6 +145,21 @@
"InteractionType": "Interact"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1039906,
"Position": {
"X": 432.2423,
"Y": 15.558166,
"Z": -611.90204
},
"TerritoryId": 958,
"InteractionType": "Interact"
}
]
}
]
}

View File

@ -12,6 +12,7 @@
"Y": 16.102577,
"Z": -578.4848
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}
@ -43,7 +44,8 @@
"Z": -579.7666
},
"TerritoryId": 958,
"InteractionType": "Interact"
"InteractionType": "UseItem",
"ItemId": 2003229
}
]
},
@ -87,6 +89,7 @@
"Y": -36.65,
"Z": -233.87512
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}

View File

@ -12,6 +12,7 @@
"Y": -36.65,
"Z": -233.87512
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "Interact"
}

View File

@ -27,8 +27,50 @@
"Y": 14.389221,
"Z": -172.25916
},
"StopDistance": 5,
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent"
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818352
},
{
"Position": {
"X": -141.20903,
"Y": 11.389334,
"Z": -399.3773
},
"TerritoryId": 958,
"InteractionType": "WalkTo"
},
{
"Position": {
"X": -153.54558,
"Y": 11.389343,
"Z": -402.64487
},
"TerritoryId": 958,
"InteractionType": "ManualAction",
"Comment": "Jump to Aether Current"
},
{
"DataId": 2012009,
"Position": {
"X": -144.9455,
"Y": 17.56311,
"Z": -420.52344
},
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818353
},
{
"Position": {
"X": -145.6724,
"Y": 11.389343,
"Z": -398.82806
},
"TerritoryId": 958,
"InteractionType": "ManualAction",
"Comment": "Leave the Aether Current location"
},
{
"Position": {
@ -48,7 +90,18 @@
"Z": -518.2117
},
"TerritoryId": 958,
"InteractionType": "AttuneAetherCurrent"
"InteractionType": "AttuneAetherCurrent",
"AetherCurrentId": 2818351
},
{
"Position": {
"X": 76.583664,
"Y": 10.5,
"Z": -538.34607
},
"TerritoryId": 958,
"InteractionType": "WalkTo",
"DisableNavmesh": true
},
{
"DataId": 1039917,
@ -87,8 +140,10 @@
"Y": -35.324707,
"Z": -178.36273
},
"StopDistance": 7,
"TerritoryId": 958,
"InteractionType": "AttuneAetheryte"
"InteractionType": "AttuneAetheryte",
"DisableNavmesh": true
},
{
"DataId": 1037716,
@ -135,6 +190,17 @@
{
"Sequence": 6,
"Steps": [
{
"Position": {
"X": 539.89374,
"Y": -36.65,
"Z": -193.11551
},
"TerritoryId": 958,
"InteractionType": "WalkTo",
"Mount": true,
"DisableNavmesh": true
},
{
"DataId": 2012111,
"Position": {
@ -144,6 +210,7 @@
},
"TerritoryId": 958,
"InteractionType": "Combat",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
14078
]
@ -156,11 +223,14 @@
"Z": 94.77368
},
"TerritoryId": 958,
"InteractionType": "Combat",
"InteractionType": "ManualAction",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
14079
],
"Comment": "TODO Needs item use?"
"Comment": "TODO Needs item use?",
"ItemId": 2003231,
"ItemUseHealthMaxPercent": 10
},
{
"DataId": 2012108,
@ -170,7 +240,8 @@
"Z": 153.24634
},
"TerritoryId": 958,
"InteractionType": "Interact"
"InteractionType": "Interact",
"Comment": "TODO Maybe move the train station aether current interaction before this"
},
{
"DataId": 2012110,
@ -180,11 +251,14 @@
"Z": 396.96338
},
"TerritoryId": 958,
"InteractionType": "Interact",
"InteractionType": "ManualAction",
"EnemySpawnType": "AfterInteraction",
"KillEnemyDataIds": [
14080
],
"Comment": "TODO Needs item use?"
"Comment": "TODO Needs item use?",
"ItemId": 2003231,
"ItemUseHealthMaxPercent": 10
}
]
},

View File

@ -108,6 +108,10 @@
"type": ["boolean", "null"],
"description": "If true, will mount regardless of distance to position. If false, will unmount."
},
"Fly": {
"type": "boolean",
"description": "If true and flying is unlocked in a zone, will use a flight path"
},
"AetheryteShortcut": {
"type": "string",
"description": "The Aetheryte to teleport to (before moving)",