diff --git a/QuestPathGenerator/QuestSourceGenerator.cs b/QuestPathGenerator/QuestSourceGenerator.cs index 9a647cf4..aa68436b 100644 --- a/QuestPathGenerator/QuestSourceGenerator.cs +++ b/QuestPathGenerator/QuestSourceGenerator.cs @@ -291,6 +291,9 @@ public class QuestSourceGenerator : ISourceGenerator Assignment(nameof(QuestStep.StopDistance), step.StopDistance, emptyStep.StopDistance) .AsSyntaxNodeOrToken(), + Assignment(nameof(QuestStep.NpcWaitDistance), step.NpcWaitDistance, + emptyStep.NpcWaitDistance) + .AsSyntaxNodeOrToken(), Assignment(nameof(QuestStep.TargetTerritoryId), step.TargetTerritoryId, emptyStep.TargetTerritoryId) .AsSyntaxNodeOrToken(), diff --git a/QuestPaths/Endwalker/AetherCurrents/Garlemald/4232_Children Are Our Future.json b/QuestPaths/Endwalker/AetherCurrents/Garlemald/4232_Children Are Our Future.json index 9e895ffc..e8773178 100644 --- a/QuestPaths/Endwalker/AetherCurrents/Garlemald/4232_Children Are Our Future.json +++ b/QuestPaths/Endwalker/AetherCurrents/Garlemald/4232_Children Are Our Future.json @@ -43,7 +43,7 @@ "Z": -668.9708 }, "TerritoryId": 958, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Instruction", "Comment": "Follow Azure-haired Boy" }, { diff --git a/QuestPaths/Endwalker/MSQ/A-Thavnair1-Labyrinthos1/4361_A Labyrinthine Descent.json b/QuestPaths/Endwalker/MSQ/A-Thavnair1-Labyrinthos1/4361_A Labyrinthine Descent.json index fd83a9b7..f32f1c1a 100644 --- a/QuestPaths/Endwalker/MSQ/A-Thavnair1-Labyrinthos1/4361_A Labyrinthine Descent.json +++ b/QuestPaths/Endwalker/MSQ/A-Thavnair1-Labyrinthos1/4361_A Labyrinthine Descent.json @@ -47,8 +47,65 @@ "Z": -27.054321 }, "TerritoryId": 962, - "InteractionType": "WaitForManualProgress", - "Comment": "Follow Alisaie" + "InteractionType": "Interact" + }, + { + "DataId": 1038753, + "Position": { + "X": -202.6663, + "Y": 13.470648, + "Z": -49.497906 + }, + "TerritoryId": 962, + "InteractionType": "WaitForNpcAtPosition", + "NpcWaitDistance": 1, + "Sprint": false + }, + { + "DataId": 1038753, + "Position": { + "X": -138.0897, + "Y": 21.879826, + "Z": -144.57791 + }, + "TerritoryId": 962, + "InteractionType": "WaitForNpcAtPosition", + "NpcWaitDistance": 1, + "Sprint": false + }, + { + "DataId": 1038753, + "Position": { + "X": -89.6808, + "Y": 24.953402, + "Z": -138.54071 + }, + "TerritoryId": 962, + "InteractionType": "WaitForNpcAtPosition", + "NpcWaitDistance": 1, + "Sprint": false + }, + { + "DataId": 1038753, + "Position": { + "X": -16.652283, + "Y": 41.37599, + "Z": -145.70506 + }, + "TerritoryId": 962, + "InteractionType": "WaitForNpcAtPosition", + "NpcWaitDistance": 1, + "Sprint": false + }, + { + "DataId": 1038753, + "Position": { + "X": -77.90129, + "Y": 41.37599, + "Z": -209.40958 + }, + "TerritoryId": 962, + "InteractionType": "Interact" } ] }, diff --git a/QuestPaths/Endwalker/MSQ/B-Garlemald/4384_Tracks in the Snow.json b/QuestPaths/Endwalker/MSQ/B-Garlemald/4384_Tracks in the Snow.json index da5e62cb..ce1c7980 100644 --- a/QuestPaths/Endwalker/MSQ/B-Garlemald/4384_Tracks in the Snow.json +++ b/QuestPaths/Endwalker/MSQ/B-Garlemald/4384_Tracks in the Snow.json @@ -144,7 +144,7 @@ "Z": 390.46313 }, "TerritoryId": 958, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Instruction", "Comment": "Follow Girl in Green" } ] diff --git a/QuestPaths/Endwalker/MSQ/B-Garlemald/4387_A Way Forward.json b/QuestPaths/Endwalker/MSQ/B-Garlemald/4387_A Way Forward.json index 6e96c3c5..9d343a9d 100644 --- a/QuestPaths/Endwalker/MSQ/B-Garlemald/4387_A Way Forward.json +++ b/QuestPaths/Endwalker/MSQ/B-Garlemald/4387_A Way Forward.json @@ -77,7 +77,7 @@ "Z": 365.7129 }, "TerritoryId": 958, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Instruction", "Comment": "Follow Alphinaud and Alisaie", "DialogueChoices": [ { @@ -92,6 +92,44 @@ { "Sequence": 5, "Steps": [ + { + "DataId": 1039882, + "Position": { + "X": -286.71664, + "Y": 5.6315875, + "Z": 264.1926 + }, + "TerritoryId": 958, + "InteractionType": "WaitForNpcAtPosition", + "NpcWaitDistance": 5, + "Mount": false, + "Sprint": false + }, + { + "DataId": 1039882, + "Position": { + "X": -126.2175, + "Y": 0.18809877, + "Z": 233.39058 + }, + "TerritoryId": 958, + "InteractionType": "WaitForNpcAtPosition", + "NpcWaitDistance": 5, + "Mount": false, + "Sprint": false + }, + { + "DataId": 1039882, + "Position": { + "X": 67.2465, + "Y": 0.33215836, + "Z": 149.8282 + }, + "TerritoryId": 958, + "InteractionType": "WalkTo", + "Mount": false, + "Sprint": false + }, { "DataId": 1039880, "Position": { @@ -101,8 +139,7 @@ }, "StopDistance": 1, "TerritoryId": 958, - "InteractionType": "Interact", - "Comment": "Follow Alphinaud and Alisaie" + "InteractionType": "Interact" } ] }, diff --git a/QuestPaths/Endwalker/MSQ/B-Garlemald/4389_Personae non Gratae.json b/QuestPaths/Endwalker/MSQ/B-Garlemald/4389_Personae non Gratae.json index fb628bc4..fd3cc73e 100644 --- a/QuestPaths/Endwalker/MSQ/B-Garlemald/4389_Personae non Gratae.json +++ b/QuestPaths/Endwalker/MSQ/B-Garlemald/4389_Personae non Gratae.json @@ -204,6 +204,16 @@ "TerritoryId": 958, "InteractionType": "WalkTo" }, + { + "Position": { + "X": 549.7444, + "Y": -36.61608, + "Z": -225.64955 + }, + "TerritoryId": 958, + "InteractionType": "WalkTo", + "DisableNavmesh": true + }, { "DataId": 1039899, "Position": { diff --git a/QuestPaths/Endwalker/MSQ/B-Garlemald/4397_Sea of Sorrow.json b/QuestPaths/Endwalker/MSQ/B-Garlemald/4397_Sea of Sorrow.json index f6f1d860..a5c0d5ed 100644 --- a/QuestPaths/Endwalker/MSQ/B-Garlemald/4397_Sea of Sorrow.json +++ b/QuestPaths/Endwalker/MSQ/B-Garlemald/4397_Sea of Sorrow.json @@ -89,7 +89,7 @@ "Z": 419.7605 }, "TerritoryId": 959, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Instruction", "Comment": "Follow Argos" }, { @@ -148,7 +148,7 @@ "Z": 523.5217 }, "TerritoryId": 959, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Instruction", "Comment": "Follow Argos" }, { diff --git a/QuestPaths/Endwalker/MSQ/C-MareLamentorum/4405_Back to Old Tricks.json b/QuestPaths/Endwalker/MSQ/C-MareLamentorum/4405_Back to Old Tricks.json index 419959b5..8bd5f018 100644 --- a/QuestPaths/Endwalker/MSQ/C-MareLamentorum/4405_Back to Old Tricks.json +++ b/QuestPaths/Endwalker/MSQ/C-MareLamentorum/4405_Back to Old Tricks.json @@ -45,7 +45,7 @@ "Z": -269.24548 }, "TerritoryId": 959, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Instruction", "Comment": "Follow Urianger" } ] @@ -61,7 +61,7 @@ "Z": -269.24548 }, "TerritoryId": 959, - "InteractionType": "WaitForManualProgress", + "InteractionType": "Instruction", "Comment": "Follow Urianger" } ] diff --git a/QuestPaths/quest-v1.json b/QuestPaths/quest-v1.json index ac01f715..e019e2f7 100644 --- a/QuestPaths/quest-v1.json +++ b/QuestPaths/quest-v1.json @@ -810,6 +810,23 @@ "ContentFinderConditionId" ] } + }, + { + "if": { + "properties": { + "InteractionType": { + "const": "WaitForNpcAtPosition" + } + } + }, + "then": { + "properties": { + "NpcWaitDistance": { + "type": "number", + "exclusiveMinimum": 0 + } + } + } } ] } diff --git a/Questionable.Model/V1/QuestStep.cs b/Questionable.Model/V1/QuestStep.cs index 029060e7..d265df6d 100644 --- a/Questionable.Model/V1/QuestStep.cs +++ b/Questionable.Model/V1/QuestStep.cs @@ -17,6 +17,7 @@ public sealed class QuestStep public Vector3? Position { get; set; } public float? StopDistance { get; set; } + public float? NpcWaitDistance { get; set; } public ushort TerritoryId { get; set; } public ushort? TargetTerritoryId { get; set; } diff --git a/Questionable/GameFunctions.cs b/Questionable/GameFunctions.cs index 4c923806..c3118697 100644 --- a/Questionable/GameFunctions.cs +++ b/Questionable/GameFunctions.cs @@ -468,10 +468,10 @@ internal sealed unsafe class GameFunctions ExecuteCommand($"{_emoteCommands[emote]} motion"); } - public bool IsObjectAtPosition(uint dataId, Vector3 position) + public bool IsObjectAtPosition(uint dataId, Vector3 position, float distance) { GameObject? gameObject = FindObjectByDataId(dataId); - return gameObject != null && (gameObject.Position - position).Length() < 0.05f; + return gameObject != null && (gameObject.Position - position).Length() < distance; } public bool HasStatusPreventingMount()