Add ARR PLD quests
authorLiza Carvelli <liza@carvel.li>
Sun, 22 Dec 2024 17:04:23 +0000 (18:04 +0100)
committerLiza Carvelli <liza@carvel.li>
Sun, 22 Dec 2024 17:05:27 +0000 (18:05 +0100)
QuestPathGenerator/RoslynElements/ComplexCombatDataExtensions.cs
QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1056_Honor Lost.json [new file with mode: 0644]
QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1057_Power Struggles.json [new file with mode: 0644]
QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1058_Poisoned Hearts.json [new file with mode: 0644]
QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1059_Parley in the Sagolii.json [new file with mode: 0644]
QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1060_Keeping the Oath.json [new file with mode: 0644]
QuestPaths/quest-v1.json
Questionable.Model/Questing/ComplexCombatData.cs
Questionable/Controller/CombatController.cs
Questionable/Controller/CombatModules/ItemUseModule.cs
Questionable/Windows/QuestComponents/CreationUtilsComponent.cs

index f683890f859e120ced6c471562057a6c1f0e5849..05afb26cc8780176cfee8a46aded04f8304e46ee 100644 (file)
@@ -21,6 +21,9 @@ internal static class ComplexCombatDataExtensions
                             Assignment(nameof(ComplexCombatData.DataId), complexCombatData.DataId,
                                     emptyData.DataId)
                                 .AsSyntaxNodeOrToken(),
+                            Assignment(nameof(ComplexCombatData.NameId), complexCombatData.NameId,
+                                    emptyData.NameId)
+                                .AsSyntaxNodeOrToken(),
                             Assignment(nameof(ComplexCombatData.MinimumKillCount),
                                     complexCombatData.MinimumKillCount, emptyData.MinimumKillCount)
                                 .AsSyntaxNodeOrToken(),
diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1056_Honor Lost.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1056_Honor Lost.json
new file mode 100644 (file)
index 0000000..b51fe2c
--- /dev/null
@@ -0,0 +1,114 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+  "Author": "liza",
+  "QuestSequence": [
+    {
+      "Sequence": 0,
+      "Steps": [
+        {
+          "TerritoryId": 137,
+          "InteractionType": "EquipItem",
+          "ItemId": 4542,
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "InSameTerritory": true,
+              "InTerritory": [
+                131
+              ]
+            }
+          }
+        },
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "AcceptQuest"
+        }
+      ]
+    },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "Position": {
+            "X": -259.72705,
+            "Y": 67.23717,
+            "Z": -293.5509
+          },
+          "TerritoryId": 180,
+          "InteractionType": "WalkTo",
+          "AetheryteShortcut": "Outer La Noscea - Camp Overlook",
+          "Fly": true,
+          "SkipConditions": {
+            "StepIf": {
+              "Flying": "Locked"
+            }
+          }
+        },
+        {
+          "Position": {
+            "X": -355.4327,
+            "Y": 63.813503,
+            "Z": -382.56308
+          },
+          "TerritoryId": 180,
+          "InteractionType": "WalkTo",
+          "Fly": true,
+          "SkipConditions": {
+            "StepIf": {
+              "Flying": "Locked"
+            }
+          }
+        },
+        {
+          "DataId": 2002346,
+          "Position": {
+            "X": -312.27594,
+            "Y": 32.547485,
+            "Z": -444.9989
+          },
+          "TerritoryId": 180,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "AfterInteraction",
+          "ComplexCombatData": [
+            {
+              "DataId": 6,
+              "NameId": 2020
+            }
+          ],
+          "Fly": true
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "CompleteQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "NextQuestId": 1057
+        }
+      ]
+    }
+  ]
+}
diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1057_Power Struggles.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1057_Power Struggles.json
new file mode 100644 (file)
index 0000000..2ac204b
--- /dev/null
@@ -0,0 +1,75 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+  "Author": "liza",
+  "QuestSequence": [
+    {
+      "Sequence": 0,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "AcceptQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "InSameTerritory": true,
+              "InTerritory": [
+                131
+              ]
+            }
+          }
+        }
+      ]
+    },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "DataId": 2002347,
+          "Position": {
+            "X": 175.82971,
+            "Y": -10.452454,
+            "Z": 84.91638
+          },
+          "TerritoryId": 145,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "AfterInteraction",
+          "KillEnemyDataIds": [
+            383
+          ],
+          "Fly": true
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "CompleteQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "NextQuestId": 1058
+        }
+      ]
+    }
+  ]
+}
diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1058_Poisoned Hearts.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1058_Poisoned Hearts.json
new file mode 100644 (file)
index 0000000..c8861e5
--- /dev/null
@@ -0,0 +1,259 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+  "Author": "liza",
+  "QuestSequence": [
+    {
+      "Sequence": 0,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "AcceptQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "InSameTerritory": true,
+              "InTerritory": [
+                131
+              ]
+            }
+          }
+        }
+      ]
+    },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "Position": {
+            "X": -97.65164,
+            "Y": 14.866778,
+            "Z": -189.99821
+          },
+          "StopDistance": 0.5,
+          "TerritoryId": 146,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "AutoOnEnterArea",
+          "KillEnemyDataIds": [
+            1923,
+            1924
+          ],
+          "AetheryteShortcut": "Southern Thanalan - Little Ala Mhigo",
+          "Fly": true,
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "InSameTerritory": true
+            },
+            "StepIf": {
+              "CompletionQuestVariablesFlags": [
+                null,
+                null,
+                null,
+                null,
+                null,
+                64
+              ]
+            }
+          }
+        },
+        {
+          "DataId": 2002349,
+          "Position": {
+            "X": -97.39838,
+            "Y": 14.846985,
+            "Z": -188.2201
+          },
+          "TerritoryId": 146,
+          "InteractionType": "Interact",
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            64
+          ]
+        },
+        {
+          "Position": {
+            "X": -97.35628,
+            "Y": -14.397484,
+            "Z": -176.70825
+          },
+          "StopDistance": 0.5,
+          "TerritoryId": 146,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "AutoOnEnterArea",
+          "KillEnemyDataIds": [
+            1923,
+            1924
+          ],
+          "Fly": true,
+          "SkipConditions": {
+            "StepIf": {
+              "CompletionQuestVariablesFlags": [
+                null,
+                null,
+                null,
+                null,
+                null,
+                128
+              ]
+            }
+          }
+        },
+        {
+          "DataId": 2002348,
+          "Position": {
+            "X": -99.4126,
+            "Y": -14.4198,
+            "Z": -179.46143
+          },
+          "TerritoryId": 146,
+          "InteractionType": "Interact",
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            128
+          ]
+        },
+        {
+          "Position": {
+            "X": 137.78966,
+            "Y": 10.371678,
+            "Z": -427.8172
+          },
+          "StopDistance": 0.5,
+          "TerritoryId": 146,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "AutoOnEnterArea",
+          "KillEnemyDataIds": [
+            1923,
+            1924
+          ],
+          "SkipConditions": {
+            "StepIf": {
+              "CompletionQuestVariablesFlags": [
+                null,
+                null,
+                null,
+                null,
+                null,
+                16
+              ]
+            }
+          }
+        },
+        {
+          "Position": {
+            "X": 137.78966,
+            "Y": 10.371678,
+            "Z": -427.8172
+          },
+          "StopDistance": 0.5,
+          "TerritoryId": 146,
+          "InteractionType": "WalkTo",
+          "SkipConditions": {
+            "StepIf": {
+              "CompletionQuestVariablesFlags": [
+                null,
+                null,
+                null,
+                null,
+                null,
+                16
+              ]
+            }
+          }
+        },
+        {
+          "DataId": 2002351,
+          "Position": {
+            "X": 137.74304,
+            "Y": 10.60498,
+            "Z": -420.5539
+          },
+          "TerritoryId": 146,
+          "InteractionType": "Interact",
+          "DisableNavmesh": true,
+          "CompletionQuestVariablesFlags": [
+            null,
+            null,
+            null,
+            null,
+            null,
+            16
+          ]
+        },
+        {
+          "Position": {
+            "X": 137.70113,
+            "Y": 10.371678,
+            "Z": -427.45047
+          },
+          "TerritoryId": 146,
+          "InteractionType": "WalkTo",
+          "DisableNavmesh": true
+        },
+        {
+          "Position": {
+            "X": 116.208305,
+            "Y": 11.091853,
+            "Z": -475.35126
+          },
+          "StopDistance": 0.5,
+          "TerritoryId": 146,
+          "InteractionType": "Combat",
+          "EnemySpawnType": "AutoOnEnterArea",
+          "KillEnemyDataIds": [
+            1923,
+            1924
+          ]
+        },
+        {
+          "DataId": 2002350,
+          "Position": {
+            "X": 115.983765,
+            "Y": 11.184814,
+            "Z": -482.7802
+          },
+          "TerritoryId": 146,
+          "InteractionType": "Interact"
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "CompleteQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "NextQuestId": 1059
+        }
+      ]
+    }
+  ]
+}
diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1059_Parley in the Sagolii.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1059_Parley in the Sagolii.json
new file mode 100644 (file)
index 0000000..2f013d5
--- /dev/null
@@ -0,0 +1,72 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+  "Author": "liza",
+  "QuestSequence": [
+    {
+      "Sequence": 0,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "AcceptQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "InSameTerritory": true,
+              "InTerritory": [
+                131
+              ]
+            }
+          }
+        }
+      ]
+    },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "DataId": 2002356,
+          "Position": {
+            "X": -407.4312,
+            "Y": 7.156433,
+            "Z": 525.6886
+          },
+          "TerritoryId": 146,
+          "InteractionType": "SinglePlayerDuty",
+          "AetheryteShortcut": "Southern Thanalan - Forgotten Springs",
+          "Fly": true
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "CompleteQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "NextQuestId": 1060
+        }
+      ]
+    }
+  ]
+}
diff --git a/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1060_Keeping the Oath.json b/QuestPaths/2.x - A Realm Reborn/Class Quests/PLD/1060_Keeping the Oath.json
new file mode 100644 (file)
index 0000000..e9f2519
--- /dev/null
@@ -0,0 +1,100 @@
+{
+  "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+  "Author": "liza",
+  "QuestSequence": [
+    {
+      "Sequence": 0,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "AcceptQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "SkipConditions": {
+            "AetheryteShortcutIf": {
+              "InSameTerritory": true,
+              "InTerritory": [
+                131
+              ]
+            }
+          }
+        }
+      ]
+    },
+    {
+      "Sequence": 1,
+      "Steps": [
+        {
+          "DataId": 1007829,
+          "Position": {
+            "X": 26.932129,
+            "Y": 13,
+            "Z": 44.418945
+          },
+          "TerritoryId": 141,
+          "InteractionType": "Interact",
+          "AetheryteShortcut": "Central Thanalan - Black Brush Station",
+          "Fly": true
+        }
+      ]
+    },
+    {
+      "Sequence": 2,
+      "Steps": [
+        {
+          "Position": {
+            "X": -775.4471,
+            "Y": 224.95006,
+            "Z": 29.04266
+          },
+          "StopDistance": 0.5,
+          "TerritoryId": 155,
+          "InteractionType": "WalkTo",
+          "AetheryteShortcut": "Coerthas Central Highlands - Camp Dragonhead",
+          "Fly": true
+        },
+        {
+          "Position": {
+            "X": -775.4471,
+            "Y": 224.95006,
+            "Z": 29.04266
+          },
+          "StopDistance": 0.5,
+          "TerritoryId": 155,
+          "InteractionType": "SinglePlayerDuty",
+          "Mount": false
+        }
+      ]
+    },
+    {
+      "Sequence": 255,
+      "Steps": [
+        {
+          "DataId": 1006747,
+          "Position": {
+            "X": -20.828613,
+            "Y": 29.999964,
+            "Z": -2.4262085
+          },
+          "TerritoryId": 131,
+          "InteractionType": "CompleteQuest",
+          "AetheryteShortcut": "Ul'dah",
+          "AethernetShortcut": [
+            "[Ul'dah] Aetheryte Plaza",
+            "[Ul'dah] The Chamber of Rule"
+          ],
+          "NextQuestId": 2032
+        }
+      ]
+    }
+  ]
+}
index 3596940748b0af93611f322e05491102a59559d1..7013ea2dcbf89a4ebf3f8cb155d2a8bfd6e856a3 100644 (file)
                       "description": "The enemy data id which is supposed to be killed",
                       "type": "integer"
                     },
+                    "NameId": {
+                      "description": "Name id of the enemy which is supposed to be killed, helpful if multiple nearby enemies share the same DataId",
+                      "type": "integer"
+                    },
                     "MinimumKillCount": {
                       "description": "Overworld mobs: If this number of mobs has been killed, will wait a bit before attempting to pull another mob to see if the quest progresses",
                       "type": "integer"
index 5f85c24334fce0ba75d4330c0acbec3921164c8a..adc80f4a9b7003a2a6aae138ae405534b32ec33c 100644 (file)
@@ -5,6 +5,7 @@ namespace Questionable.Model.Questing;
 public sealed class ComplexCombatData
 {
     public uint DataId { get; set; }
+    public uint? NameId { get; set; }
 
     // TODO Use this
     public uint? MinimumKillCount { get; set; }
index 91eca6c1437b0bfa8e0942d390067b1c15ea6b4f..d7ca7fde79a63319f91d552fe96f3b28ff2cb5ad 100644 (file)
@@ -242,7 +242,8 @@ internal sealed class CombatController : IDisposable
                     if (_currentFight.Data.CompletedComplexDatas.Contains(i))
                         continue;
 
-                    if (complexCombatData[i].DataId == battleNpc.DataId)
+                    if (complexCombatData[i].DataId == battleNpc.DataId &&
+                        (complexCombatData[i].NameId == null || complexCombatData[i].NameId == battleNpc.NameId))
                         return 100;
                 }
             }
@@ -261,7 +262,9 @@ internal sealed class CombatController : IDisposable
                 if (gameObjectStruct->NamePlateIconId is 60093 or 60732)
                     return 0;
 
-                var enemyData = _currentFight.Data.ComplexCombatDatas.FirstOrDefault(x => x.DataId == battleNpc.DataId);
+                var enemyData = _currentFight.Data.ComplexCombatDatas
+                    .FirstOrDefault(x => x.DataId == battleNpc.DataId &&
+                                         (x.NameId == null || x.NameId == battleNpc.NameId));
                 if (enemyData is { IgnoreQuestMarker: true })
                 {
                     if (battleNpc.StatusFlags.HasFlag(StatusFlags.InCombat))
index 56da033faa61a99cf4a2e6c33cfc238e4b784136..65f829a1736e3decfc75d178322f7e8276f8e3d2 100644 (file)
@@ -86,7 +86,8 @@ internal sealed class ItemUseModule : ICombatModule
         }
 
         if (_combatData.KillEnemyDataIds.Contains(nextTarget.DataId) ||
-            _combatData.ComplexCombatDatas.Any(x => x.DataId == nextTarget.DataId))
+            _combatData.ComplexCombatDatas.Any(x => x.DataId == nextTarget.DataId &&
+                                                    (x.NameId == null || (nextTarget is ICharacter character && x.NameId == character.NameId))))
         {
             if (_isDoingRotation)
             {
index 8fc03bb42057054605818d724033d85772c5406e..be6f31c197f87e0b0b92083c9245871a0dfec6ea 100644 (file)
@@ -11,6 +11,7 @@ using Dalamud.Interface.Colors;
 using Dalamud.Interface.Components;
 using Dalamud.Plugin.Services;
 using FFXIVClientStructs.FFXIV.Client.Game;
+using FFXIVClientStructs.FFXIV.Client.Game.Character;
 using FFXIVClientStructs.FFXIV.Client.Game.Control;
 using FFXIVClientStructs.FFXIV.Client.Game.Event;
 using FFXIVClientStructs.FFXIV.Client.Game.Object;
@@ -199,9 +200,13 @@ internal sealed class CreationUtilsComponent
 
     private unsafe void DrawTargetDetails(IGameObject target)
     {
+        string nameId = string.Empty;
+        if (target is ICharacter character)
+            nameId = $"; n={character.NameId}";
+
         ImGui.Separator();
         ImGui.Text(string.Create(CultureInfo.InvariantCulture,
-            $"Target: {target.Name}  ({target.ObjectKind}; {target.DataId})"));
+            $"Target: {target.Name}  ({target.ObjectKind}; {target.DataId}{nameId})"));
 
         if (_clientState.LocalPlayer != null)
         {