--- /dev/null
+{
+ "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+ "Author": "liza",
+ "QuestSequence": [
+ {
+ "Sequence": 0,
+ "Steps": [
+ {
+ "DataId": 1031781,
+ "Position": {
+ "X": 24.246582,
+ "Y": 82.78206,
+ "Z": 25.77246
+ },
+ "TerritoryId": 820,
+ "InteractionType": "AcceptQuest",
+ "AetheryteShortcut": "Eulmore",
+ "SkipConditions": {
+ "AetheryteShortcutIf": {
+ "InSameTerritory": true
+ }
+ },
+ "DialogueChoices": [
+ {
+ "Type": "List",
+ "Prompt": "TEXT_SUBCTS640_03729_Q1_000_000",
+ "Answer": "TEXT_SUBCTS640_03729_A1_000_002"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "Sequence": 1,
+ "Steps": [
+ {
+ "DataId": 2010842,
+ "Position": {
+ "X": 27.450928,
+ "Y": 82.6886,
+ "Z": -45.456665
+ },
+ "TerritoryId": 820,
+ "InteractionType": "Interact"
+ }
+ ]
+ },
+ {
+ "Sequence": 255,
+ "Steps": [
+ {
+ "DataId": 1031801,
+ "Position": {
+ "X": 52.8114,
+ "Y": 83.001076,
+ "Z": -65.38495
+ },
+ "TerritoryId": 820,
+ "InteractionType": "CompleteQuest"
+ }
+ ]
+ }
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+ "Author": "liza",
+ "QuestSequence": [
+ {
+ "Sequence": 0,
+ "Steps": [
+ {
+ "DataId": 1042242,
+ "Position": {
+ "X": 72.43445,
+ "Y": 5.1,
+ "Z": -75.30328
+ },
+ "TerritoryId": 962,
+ "InteractionType": "AcceptQuest",
+ "AetheryteShortcut": "Old Sharlayan",
+ "SkipConditions": {
+ "AetheryteShortcutIf": {
+ "InSameTerritory": true
+ }
+ }
+ }
+ ]
+ },
+ {
+ "Sequence": 1,
+ "Steps": [
+ {
+ "DataId": 2012872,
+ "Position": {
+ "X": -86.930725,
+ "Y": -12.985474,
+ "Z": 140.30664
+ },
+ "TerritoryId": 962,
+ "InteractionType": "Interact",
+ "AethernetShortcut": [
+ "[Old Sharlayan] Aetheryte Plaza",
+ "[Old Sharlayan] Scholar's Harbor"
+ ]
+ }
+ ]
+ },
+ {
+ "Sequence": 2,
+ "Steps": [
+ {
+ "DataId": 1042427,
+ "Position": {
+ "X": -84.06195,
+ "Y": -13.777,
+ "Z": 140.12354
+ },
+ "TerritoryId": 962,
+ "InteractionType": "Interact"
+ }
+ ]
+ },
+ {
+ "Sequence": 255,
+ "Steps": [
+ {
+ "DataId": 1042428,
+ "Position": {
+ "X": 222.85791,
+ "Y": 24.942732,
+ "Z": -197.71118
+ },
+ "TerritoryId": 962,
+ "InteractionType": "CompleteQuest",
+ "AethernetShortcut": [
+ "[Old Sharlayan] Scholar's Harbor",
+ "[Old Sharlayan] The Leveilleur Estate"
+ ]
+ }
+ ]
+ }
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
+ "Author": "liza",
+ "QuestSequence": [
+ {
+ "Sequence": 0,
+ "Steps": [
+ {
+ "DataId": 1041303,
+ "Position": {
+ "X": 209.55212,
+ "Y": 19.316555,
+ "Z": -110.70422
+ },
+ "TerritoryId": 962,
+ "InteractionType": "AcceptQuest",
+ "AetheryteShortcut": "Old Sharlayan",
+ "AethernetShortcut": [
+ "[Old Sharlayan] Aetheryte Plaza",
+ "[Old Sharlayan] The Leveilleur Estate"
+ ],
+ "SkipConditions": {
+ "AetheryteShortcutIf": {
+ "InSameTerritory": true
+ }
+ },
+ "DialogueChoices": [
+ {
+ "Type": "List",
+ "Prompt": "TEXT_AKTKZI003_04318_Q1_000_000",
+ "Answer": "TEXT_AKTKZI003_04318_A1_000_001"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "Sequence": 1,
+ "Steps": [
+ {
+ "DataId": 2012440,
+ "Position": {
+ "X": 213.9773,
+ "Y": 8.224609,
+ "Z": -33.737732
+ },
+ "TerritoryId": 962,
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 128
+ ]
+ },
+ {
+ "DataId": 2012441,
+ "Position": {
+ "X": 168.0476,
+ "Y": 1.296936,
+ "Z": 53.94055
+ },
+ "TerritoryId": 962,
+ "InteractionType": "Interact",
+ "CompletionQuestVariablesFlags": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ 64
+ ]
+ }
+ ]
+ },
+ {
+ "Sequence": 255,
+ "Steps": [
+ {
+ "DataId": 1041303,
+ "Position": {
+ "X": 209.55212,
+ "Y": 19.316555,
+ "Z": -110.70422
+ },
+ "TerritoryId": 962,
+ "InteractionType": "CompleteQuest",
+ "AethernetShortcut": [
+ "[Old Sharlayan] Journey's End",
+ "[Old Sharlayan] The Leveilleur Estate"
+ ]
+ }
+ ]
+ }
+ ]
+}
TerritoryData territoryData,
AetheryteData aetheryteData)
{
+ public ElementId QuestId { get; set; } = null!;
public QuestStep Step { get; set; } = null!;
public Vector3 Destination { get; set; }
yield return new WaitConditionTask(() => movementController.IsNavmeshReady,
"Wait(navmesh ready)");
- float distance = Step.CalculateActualStopDistance();
- var position = clientState.LocalPlayer?.Position ?? new Vector3();
- float actualDistance = (position - Destination).Length();
+ float stopDistance = Step.CalculateActualStopDistance();
+ Vector3? position = clientState.LocalPlayer?.Position;
+ float actualDistance = position == null ? float.MaxValue : Vector3.Distance(position.Value, Destination);
// if we teleport to a different zone, assume we always need to move; this is primarily relevant for cases
// where you're e.g. in Lakeland, and the step navigates via Crystarium → Tesselation back into the same
// Side effects of this check being broken include:
// - mounting when near the target npc (if you spawn close enough for the next step)
// - trying to fly when near the target npc (if close enough where no movement is required)
- if (Step.AetheryteShortcut != null && aetheryteData.TerritoryIds[Step.AetheryteShortcut.Value] != Step.TerritoryId)
+ if (Step.AetheryteShortcut != null &&
+ aetheryteData.TerritoryIds[Step.AetheryteShortcut.Value] != Step.TerritoryId)
+ {
+ logger.LogDebug("Aetheryte: Changing distance to max, previous distance: {Distance}", actualDistance);
+ actualDistance = float.MaxValue;
+ }
+
+ if (QuestId is SatisfactionSupplyNpcId)
+ {
+ logger.LogDebug("SatisfactionSupply: Changing distance to max, previous distance: {Distance}",
+ actualDistance);
actualDistance = float.MaxValue;
+ }
if (Step.Mount == true)
yield return serviceProvider.GetRequiredService<MountTask>()
if (Step.Mount == null)
{
MountTask.EMountIf mountIf =
- actualDistance > distance && Step.Fly == true &&
+ actualDistance > stopDistance && Step.Fly == true &&
gameFunctions.IsFlyingUnlocked(Step.TerritoryId)
? MountTask.EMountIf.Always
: MountTask.EMountIf.AwayFromPosition;
.With(Step.TerritoryId, mountIf, Destination);
}
- if (actualDistance > distance)
+ if (actualDistance > stopDistance)
{
yield return serviceProvider.GetRequiredService<MoveInternal>()
.With(Step, Destination);
}
+ else
+ logger.LogInformation("Skipping move task, distance: {ActualDistance} < {StopDistance}",
+ actualDistance, stopDistance);
}
else
{
// navmesh won't move close enough
- if (actualDistance > distance)
+ if (actualDistance > stopDistance)
{
yield return serviceProvider.GetRequiredService<MoveInternal>()
.With(Step, Destination);
}
+ else
+ logger.LogInformation("Skipping move task, distance: {ActualDistance} < {StopDistance}",
+ actualDistance, stopDistance);
}
if (Step.Fly == true && Step.Land == true)