Fix quest chain logic

arr-p5
Liza 2024-07-11 13:11:50 +02:00
parent ba33cdce4b
commit 8c808c8fde
Signed by: liza
GPG Key ID: 7199F8D727D55F67
12 changed files with 368 additions and 10 deletions

View File

@ -83,7 +83,7 @@
"Y": -14.999356,
"Z": 204.42505
},
"StopDistance": 5,
"StopDistance": 7,
"TerritoryId": 1185,
"InteractionType": "CompleteQuest"
}

View File

@ -44,7 +44,8 @@
"Z": 618.2803
},
"TerritoryId": 957,
"InteractionType": "Interact"
"InteractionType": "Interact",
"AetheryteShortcut": "Thavnair - Yedlihmad"
}
]
},

View File

@ -0,0 +1,98 @@
{
"$schema": "https://carvel.li/questionable/quest-1.0",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1051434,
"Position": {
"X": 28.580078,
"Y": -14,
"Z": 75.66943
},
"TerritoryId": 1185,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1051435,
"Position": {
"X": 383.1692,
"Y": -17.700003,
"Z": -771.3283
},
"TerritoryId": 1190,
"InteractionType": "Interact",
"AetheryteShortcut": "Shaaloani - Mehwahhetsoan",
"Fly": true
}
]
},
{
"Sequence": 2,
"Steps": [
{
"TerritoryId": 1190,
"InteractionType": "Duty",
"ContentFinderConditionId": 834
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 1051435,
"Position": {
"X": 383.1692,
"Y": -17.700003,
"Z": -771.3283
},
"TerritoryId": 1190,
"InteractionType": "Interact",
"AetheryteShortcut": "Shaaloani - Mehwahhetsoan",
"SkipIf": [
"AetheryteShortcutIfInSameTerritory"
]
}
]
},
{
"Sequence": 4,
"Steps": [
{
"DataId": 1051436,
"Position": {
"X": 476.73767,
"Y": 114.935,
"Z": 661.6769
},
"TerritoryId": 1187,
"InteractionType": "Interact",
"AetheryteShortcut": "Urqopacha - Worlar's Echo"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1051438,
"Position": {
"X": -498.7717,
"Y": 59.21188,
"Z": 145.00647
},
"TerritoryId": 1187,
"InteractionType": "CompleteQuest"
}
]
}
]
}

View File

@ -0,0 +1,37 @@
{
"$schema": "https://carvel.li/questionable/quest-1.0",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1051413,
"Position": {
"X": -75.21173,
"Y": -10.00001,
"Z": 138.8418
},
"TerritoryId": 1185,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1048541,
"Position": {
"X": 23.5141,
"Y": -14,
"Z": 137.40747
},
"TerritoryId": 1185,
"InteractionType": "CompleteQuest",
"NextQuestId": 5010
}
]
}
]
}

View File

@ -0,0 +1,52 @@
{
"$schema": "https://carvel.li/questionable/quest-1.0",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1048541,
"Position": {
"X": 23.5141,
"Y": -14,
"Z": 137.40747
},
"TerritoryId": 1185,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1051414,
"Position": {
"X": -90.348694,
"Y": -19.6019,
"Z": 212.54285
},
"TerritoryId": 1185,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1048541,
"Position": {
"X": 23.5141,
"Y": -14,
"Z": 137.40747
},
"TerritoryId": 1185,
"InteractionType": "CompleteQuest",
"NextQuestId": 5011
}
]
}
]
}

View File

@ -0,0 +1,106 @@
{
"$schema": "https://carvel.li/questionable/quest-1.0",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1048541,
"Position": {
"X": 23.5141,
"Y": -14,
"Z": 137.40747
},
"TerritoryId": 1185,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1049457,
"Position": {
"X": -223.92621,
"Y": 30,
"Z": -603.11285
},
"TerritoryId": 1191,
"InteractionType": "Interact",
"AetheryteShortcut": "Heritage Found - The Outskirts"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": -65.20557,
"Y": 38.80659,
"Z": -459.1674
},
"TerritoryId": 1186,
"InteractionType": "WalkTo",
"AetheryteShortcut": "Solution Nine",
"AethernetShortcut": [
"[Solution Nine] Aetheryte Plaza",
"[Solution Nine] Resolution"
]
},
{
"DataId": 1049180,
"Position": {
"X": -67.27704,
"Y": 38.80659,
"Z": -459.22028
},
"TerritoryId": 1186,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 1051415,
"Position": {
"X": -400.351,
"Y": 14.029996,
"Z": 112.26062
},
"TerritoryId": 1186,
"InteractionType": "Interact",
"AethernetShortcut": [
"[Solution Nine] Resolution",
"[Solution Nine] Residential Sector"
]
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1048541,
"Position": {
"X": 23.5141,
"Y": -14,
"Z": 137.40747
},
"TerritoryId": 1185,
"InteractionType": "CompleteQuest",
"AetheryteShortcut": "Tuliyollal",
"AethernetShortcut": [
"[Tuliyollal] Aetheryte Plaza",
"[Tuliyollal] Bayside Bevy Marketplace"
],
"NextQuestId": 5012
}
]
}
]
}

View File

@ -0,0 +1,61 @@
{
"$schema": "https://carvel.li/questionable/quest-1.0",
"Author": "liza",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1048541,
"Position": {
"X": 23.5141,
"Y": -14,
"Z": 137.40747
},
"TerritoryId": 1185,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1051415,
"Position": {
"X": -400.351,
"Y": 14.029996,
"Z": 112.26062
},
"TerritoryId": 1186,
"InteractionType": "Interact",
"AetheryteShortcut": "Solution Nine",
"AethernetShortcut": [
"[Solution Nine] Aetheryte Plaza",
"[Solution Nine] Residential Sector"
]
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1048541,
"Position": {
"X": 23.5141,
"Y": -14,
"Z": 137.40747
},
"TerritoryId": 1185,
"InteractionType": "CompleteQuest",
"AetheryteShortcut": "Tuliyollal",
"AethernetShortcut": [
"[Tuliyollal] Aetheryte Plaza",
"[Tuliyollal] Bayside Bevy Marketplace"
]
}
]
}
]
}

View File

@ -93,10 +93,10 @@ internal sealed class CommandHandler : IDisposable
if (arguments.Length >= 1 && ushort.TryParse(arguments[0], out ushort questId))
{
if (_questRegistry.IsKnownQuest(questId))
if (_questRegistry.TryGetQuest(questId, out Quest? quest))
{
_debugOverlay.HighlightedQuest = questId;
_chatGui.Print($"[Questionable] Set highlighted quest to {questId}.");
_chatGui.Print($"[Questionable] Set highlighted quest to {questId} ({quest.Info.Name}).");
}
else
_chatGui.PrintError($"[Questionable] Unknown quest {questId}.");
@ -115,7 +115,7 @@ internal sealed class CommandHandler : IDisposable
if (_questRegistry.TryGetQuest(questId, out Quest? quest))
{
_questController.SetNextQuest(quest);
_chatGui.Print($"[Questionable] Set next quest to {questId}.");
_chatGui.Print($"[Questionable] Set next quest to {questId} ({quest.Info.Name}).");
}
else
{
@ -136,7 +136,7 @@ internal sealed class CommandHandler : IDisposable
if (_questRegistry.TryGetQuest(questId, out Quest? quest))
{
_questController.SimulateQuest(quest);
_chatGui.Print($"[Questionable] Simulating quest {questId}.");
_chatGui.Print($"[Questionable] Simulating quest {questId} ({quest.Info.Name}).");
}
else
_chatGui.PrintError($"[Questionable] Unknown quest {questId}.");

View File

@ -78,6 +78,8 @@ internal sealed class QuestController
{
lock (_lock)
{
_logger.LogInformation("Reload, resetting curent quest progress");
_startedQuest = null;
_nextQuest = null;
_simulatedQuest = null;
@ -328,10 +330,9 @@ internal sealed class QuestController
{
_logger.LogInformation("Stopping automatic questing");
_automatic = false;
}
_nextQuest = null;
}
}
public void SimulateQuest(Quest? quest)
{

View File

@ -50,5 +50,7 @@ internal static class NextQuest
}
public ETaskResult Update() => ETaskResult.TaskComplete;
public override string ToString() => $"SetNextQuest({NextQuestId})";
}
}

View File

@ -1,6 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/9.0.2">
<PropertyGroup>
<Version>1.3</Version>
<Version>1.4</Version>
<OutputPath>dist</OutputPath>
<PathMap Condition="$(SolutionDir) != ''">$(SolutionDir)=X:\</PathMap>
</PropertyGroup>

View File

@ -87,6 +87,7 @@ public sealed class QuestionablePlugin : IDalamudPlugin
serviceCollection.AddTaskWithFactory<Move.Factory, Move.MoveInternal, Move.ExpectToBeNearDataId>();
serviceCollection.AddTransient<Move.MoveBuilder>();
serviceCollection.AddTaskWithFactory<NextQuest.Factory, NextQuest.SetQuest>();
serviceCollection.AddTaskWithFactory<AetherCurrent.Factory, AetherCurrent.DoAttune>();
serviceCollection.AddTaskWithFactory<AethernetShard.Factory, AethernetShard.DoAttune>();
serviceCollection.AddTaskWithFactory<Aetheryte.Factory, Aetheryte.DoAttune>();
@ -111,7 +112,6 @@ public sealed class QuestionablePlugin : IDalamudPlugin
WaitAtEnd.WaitObjectAtPosition>();
serviceCollection.AddTransient<WaitAtEnd.WaitQuestAccepted>();
serviceCollection.AddTransient<WaitAtEnd.WaitQuestCompleted>();
serviceCollection.AddTaskWithFactory<NextQuest.Factory, NextQuest.SetQuest>();
serviceCollection.AddSingleton<MovementController>();
serviceCollection.AddSingleton<QuestRegistry>();