Attempt 'simple' follow mechanics (where you don't have to hide)
authorLiza Carvelli <liza@carvel.li>
Sun, 16 Jun 2024 16:27:07 +0000 (18:27 +0200)
committerLiza Carvelli <liza@carvel.li>
Sun, 16 Jun 2024 16:27:07 +0000 (18:27 +0200)
QuestPathGenerator/QuestSourceGenerator.cs
QuestPaths/Endwalker/AetherCurrents/Garlemald/4232_Children Are Our Future.json
QuestPaths/Endwalker/MSQ/A-Thavnair1-Labyrinthos1/4361_A Labyrinthine Descent.json
QuestPaths/Endwalker/MSQ/B-Garlemald/4384_Tracks in the Snow.json
QuestPaths/Endwalker/MSQ/B-Garlemald/4387_A Way Forward.json
QuestPaths/Endwalker/MSQ/B-Garlemald/4389_Personae non Gratae.json
QuestPaths/Endwalker/MSQ/B-Garlemald/4397_Sea of Sorrow.json
QuestPaths/Endwalker/MSQ/C-MareLamentorum/4405_Back to Old Tricks.json
QuestPaths/quest-v1.json
Questionable.Model/V1/QuestStep.cs
Questionable/GameFunctions.cs

index 9a647cf449da09ac8357f0c3262e51a82b6529bf..aa68436b15973ea22cf78aa8dd90221333ef8ae8 100644 (file)
@@ -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(),
index 9e895ffcf71bf6867142d787db67f5f5626b8005..e877317863fa2cfa5b06dd732c89a705b0b03da9 100644 (file)
@@ -43,7 +43,7 @@
             "Z": -668.9708
           },
           "TerritoryId": 958,
-          "InteractionType": "WaitForManualProgress",
+          "InteractionType": "Instruction",
           "Comment": "Follow Azure-haired Boy"
         },
         {
index fd83a9b702b074bc8bbbe15a708c02ee59e929c8..f32f1c1a6d37319226f82aa5831412331650de58 100644 (file)
             "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"
         }
       ]
     },
index da5e62cba9839fa89e87c10b0dc03e7e0795d8b9..ce1c7980c2d5da05d36edf5e49209609a97ebf19 100644 (file)
             "Z": 390.46313
           },
           "TerritoryId": 958,
-          "InteractionType": "WaitForManualProgress",
+          "InteractionType": "Instruction",
           "Comment": "Follow Girl in Green"
         }
       ]
index 6e96c3c5542ce5f43ecae9f852f7aa50e708b566..9d343a9dc3a21d11b507527bc552bf1fea24822c 100644 (file)
@@ -77,7 +77,7 @@
             "Z": 365.7129
           },
           "TerritoryId": 958,
-          "InteractionType": "WaitForManualProgress",
+          "InteractionType": "Instruction",
           "Comment": "Follow Alphinaud and Alisaie",
           "DialogueChoices": [
             {
     {
       "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": {
           },
           "StopDistance": 1,
           "TerritoryId": 958,
-          "InteractionType": "Interact",
-          "Comment": "Follow Alphinaud and Alisaie"
+          "InteractionType": "Interact"
         }
       ]
     },
index fb628bc45de98e0a49ab9a86aa06f92af7243561..fd3cc73e21044a6497289737795af50731dce600 100644 (file)
           "TerritoryId": 958,
           "InteractionType": "WalkTo"
         },
+        {
+          "Position": {
+            "X": 549.7444,
+            "Y": -36.61608,
+            "Z": -225.64955
+          },
+          "TerritoryId": 958,
+          "InteractionType": "WalkTo",
+          "DisableNavmesh": true
+        },
         {
           "DataId": 1039899,
           "Position": {
index f6f1d860ffcc94700c606f3356f85f323381ef29..a5c0d5edc4b8ba81504749513b3049796fd164d5 100644 (file)
@@ -89,7 +89,7 @@
             "Z": 419.7605
           },
           "TerritoryId": 959,
-          "InteractionType": "WaitForManualProgress",
+          "InteractionType": "Instruction",
           "Comment": "Follow Argos"
         },
         {
             "Z": 523.5217
           },
           "TerritoryId": 959,
-          "InteractionType": "WaitForManualProgress",
+          "InteractionType": "Instruction",
           "Comment": "Follow Argos"
         },
         {
index 419959b53e0d2ca0f70b387565ea1e931440120d..8bd5f0181cc9f628be84e8797cc537d8451fe30e 100644 (file)
@@ -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"
         }
       ]
index ac01f7151b3877fd06be6154dbecaa9573e23220..e019e2f7502989089f1350d95ddd523b505025aa 100644 (file)
                       "ContentFinderConditionId"
                     ]
                   }
+                },
+                {
+                  "if": {
+                    "properties": {
+                      "InteractionType": {
+                        "const": "WaitForNpcAtPosition"
+                      }
+                    }
+                  },
+                  "then": {
+                    "properties": {
+                      "NpcWaitDistance": {
+                        "type": "number",
+                        "exclusiveMinimum": 0
+                      }
+                    }
+                  }
                 }
               ]
             }
index 029060e79e15d08324f7835d7f630764a453d0c8..d265df6da98d9890c290ac84e5918941b153d54c 100644 (file)
@@ -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; }
 
index 4c9238062682d17e28d9a90ad48951730abd2f6c..c311869764f417e81d977a3860177cbb325e813c 100644 (file)
@@ -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()