Add additional flying steps if too far away from the mount-NPC for Vath + Vanu Vanu dailies

This commit is contained in:
Liza 2024-12-03 16:35:37 +01:00
parent 58ec1259f5
commit 6548b5206e
Signed by: liza
GPG Key ID: 8DD6D21C03BB0848
11 changed files with 540 additions and 259 deletions

View File

@ -1,153 +1,198 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1016093,
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"TerritoryId": 401,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": -544.89056,
"Y": 61.602722,
"Z": -373.9669
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006649,
"Position": {
"X": -539.0555,
"Y": 64.22522,
"Z": -377.0047
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "0 0 0 0 0 0 --> 1 0 0 0 0 16",
"CompletionQuestVariablesFlags": [null,null,null,null,null,16]
},
{
"Position": {
"X": -505.35422,
"Y": -28.166508,
"Z": -528.1072
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006647,
"Position": {
"X": -504.78372,
"Y": -26.68805,
"Z": -530.93774
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "1 0 0 0 0 16 --> 2 0 0 0 0 80",
"CompletionQuestVariablesFlags": [null,null,null,null,null,64]
},
{
"Position": {
"X": -478.25208,
"Y": -31.101946,
"Z": -663.0455
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006648,
"Position": {
"X": -477.40906,
"Y": -28.885437,
"Z": -668.32996
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "2 0 0 0 0 80 --> 3 0 0 0 0 112",
"CompletionQuestVariablesFlags": [null,null,null,null,null,32]
},
{
"Position": {
"X": -102.45963,
"Y": -1.2632592,
"Z": -619.294
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006646,
"Position": {
"X": -96.20813,
"Y": 0.32037354,
"Z": -620.26404
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "3 0 0 0 0 112 --> 0 0 0 0 0 0"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "CompleteQuest",
"AetheryteShortcut": "The Sea of Clouds - Ok' Zundu",
"Fly": true
}
]
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "AcceptQuest"
}
]
]
},
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"MaximumDistance": 50,
"TerritoryId": 401
}
}
}
},
{
"DataId": 1016093,
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"TerritoryId": 401,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": -544.89056,
"Y": 61.602722,
"Z": -373.9669
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006649,
"Position": {
"X": -539.0555,
"Y": 64.22522,
"Z": -377.0047
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "0 0 0 0 0 0 --> 1 0 0 0 0 16",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
16
]
},
{
"Position": {
"X": -505.35422,
"Y": -28.166508,
"Z": -528.1072
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006647,
"Position": {
"X": -504.78372,
"Y": -26.68805,
"Z": -530.93774
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "1 0 0 0 0 16 --> 2 0 0 0 0 80",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"Position": {
"X": -478.25208,
"Y": -31.101946,
"Z": -663.0455
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006648,
"Position": {
"X": -477.40906,
"Y": -28.885437,
"Z": -668.32996
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "2 0 0 0 0 80 --> 3 0 0 0 0 112",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"Position": {
"X": -102.45963,
"Y": -1.2632592,
"Z": -619.294
},
"TerritoryId": 401,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 2006646,
"Position": {
"X": -96.20813,
"Y": 0.32037354,
"Z": -620.26404
},
"TerritoryId": 401,
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"StopDistance": 3,
"$": "3 0 0 0 0 112 --> 0 0 0 0 0 0"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "CompleteQuest",
"AetheryteShortcut": "The Sea of Clouds - Ok' Zundu",
"Fly": true
}
]
}
]
}

View File

@ -1,104 +1,128 @@
{
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
"Author": "AnimaMachinae",
"QuestSequence": [
{
"Sequence": 0,
"Steps": [
{
"Sequence": 0,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "AcceptQuest"
}
]
},
{
"Sequence": 1,
"Steps": [
{
"DataId": 1016093,
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"TerritoryId": 401,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 2006655,
"Position": {
"X": -48.325317,
"Y": 17.990356,
"Z": -852.47577
},
"TerritoryId": 401,
"InteractionType": "Action",
"Fly": true,
"Action": "Buffet (Sanuwa)"
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 2006656,
"Position": {
"X": 95.23157,
"Y": -11.886841,
"Z": -817.6242
},
"TerritoryId": 401,
"InteractionType": "Action",
"Fly": true,
"Action": "Buffet (Sanuwa)"
}
]
},
{
"Sequence": 4,
"Steps": [
{
"DataId": 2006657,
"Position": {
"X": 205.8899,
"Y": -6.9123535,
"Z": -785.70233
},
"TerritoryId": 401,
"InteractionType": "Action",
"Fly": true,
"Action": "Buffet (Sanuwa)"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Sea of Clouds - Ok' Zundu"
}
]
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "AcceptQuest"
}
]
]
},
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"MaximumDistance": 50,
"TerritoryId": 401
}
}
}
},
{
"DataId": 1016093,
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"TerritoryId": 401,
"InteractionType": "Interact"
}
]
},
{
"Sequence": 2,
"Steps": [
{
"DataId": 2006655,
"Position": {
"X": -48.325317,
"Y": 17.990356,
"Z": -852.47577
},
"TerritoryId": 401,
"InteractionType": "Action",
"Fly": true,
"Action": "Buffet (Sanuwa)"
}
]
},
{
"Sequence": 3,
"Steps": [
{
"DataId": 2006656,
"Position": {
"X": 95.23157,
"Y": -11.886841,
"Z": -817.6242
},
"TerritoryId": 401,
"InteractionType": "Action",
"Fly": true,
"Action": "Buffet (Sanuwa)"
}
]
},
{
"Sequence": 4,
"Steps": [
{
"DataId": 2006657,
"Position": {
"X": 205.8899,
"Y": -6.9123535,
"Z": -785.70233
},
"TerritoryId": 401,
"InteractionType": "Action",
"Fly": true,
"Action": "Buffet (Sanuwa)"
}
]
},
{
"Sequence": 255,
"Steps": [
{
"DataId": 1016089,
"Position": {
"X": -799.46594,
"Y": -133.2695,
"Z": -404.1352
},
"TerritoryId": 401,
"InteractionType": "CompleteQuest",
"Fly": true,
"AetheryteShortcut": "The Sea of Clouds - Ok' Zundu"
}
]
}
]
}

View File

@ -20,6 +20,30 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"MaximumDistance": 50,
"TerritoryId": 401
}
}
}
},
{
"DataId": 1016093,
"Position": {

View File

@ -35,6 +35,30 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"MaximumDistance": 50,
"TerritoryId": 401
}
}
}
},
{
"DataId": 1016093,
"Position": {
@ -72,7 +96,14 @@
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"Fly": true,
"CompletionQuestVariablesFlags": [null,null,null,null,null,32]
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 1016221,
@ -85,7 +116,14 @@
"InteractionType": "Action",
"Action": "Buffet (Sanuwa)",
"Fly": true,
"CompletionQuestVariablesFlags": [null,null,null,null,null,64]
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 1016220,

View File

@ -36,6 +36,30 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"MaximumDistance": 50,
"TerritoryId": 401
}
}
}
},
{
"DataId": 1016093,
"Position": {

View File

@ -36,6 +36,30 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": -776.0281,
"Y": -133.35559,
"Z": -414.32825
},
"MaximumDistance": 50,
"TerritoryId": 401
}
}
}
},
{
"DataId": 1016093,
"Position": {

View File

@ -20,6 +20,30 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"MaximumDistance": 50,
"TerritoryId": 398
}
}
}
},
{
"DataId": 1017031,
"Position": {

View File

@ -20,6 +20,30 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"MaximumDistance": 50,
"TerritoryId": 398
}
}
}
},
{
"DataId": 1017031,
"Position": {

View File

@ -20,6 +20,30 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"MaximumDistance": 50,
"TerritoryId": 398
}
}
}
},
{
"DataId": 1017031,
"Position": {

View File

@ -20,6 +20,30 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"StopDistance": 3,
"TerritoryId": 398,
"InteractionType": "WalkTo",
"Fly": true,
"SkipConditions": {
"StepIf": {
"NearPosition": {
"Position": {
"X": 74.20459,
"Y": -48.533592,
"Z": -171.12994
},
"MaximumDistance": 50,
"TerritoryId": 398
}
}
}
},
{
"DataId": 1017031,
"Position": {

View File

@ -152,11 +152,13 @@ internal sealed unsafe class QuestFunctions
{
// if we have multiple quests to turn in for an allied society, try and complete all of them
var (firstTrackedQuest, firstTrackedSequence) = trackedQuests.First();
EAlliedSociety firstTrackedAlliedSociety = _alliedSocietyData.GetCommonAlliedSocietyTurnIn(firstTrackedQuest);
EAlliedSociety firstTrackedAlliedSociety =
_alliedSocietyData.GetCommonAlliedSocietyTurnIn(firstTrackedQuest);
if (firstTrackedAlliedSociety != EAlliedSociety.None)
{
var alliedQuestsForSameSociety = trackedQuests.Skip(1)
.Where(quest => _alliedSocietyData.GetCommonAlliedSocietyTurnIn(quest.Quest) == firstTrackedAlliedSociety)
.Where(quest =>
_alliedSocietyData.GetCommonAlliedSocietyTurnIn(quest.Quest) == firstTrackedAlliedSociety)
.ToList();
if (alliedQuestsForSameSociety.Count > 0)
{
@ -177,14 +179,15 @@ internal sealed unsafe class QuestFunctions
// also include the first quest in the list for those
alliedQuestsForSameSociety.Insert(0, (firstTrackedQuest, firstTrackedSequence));
_alliedSocietyData.GetCommonAlliedSocietyNpcs(firstTrackedAlliedSociety, out uint[]? normalNpcs,
_alliedSocietyData.GetCommonAlliedSocietyNpcs(firstTrackedAlliedSociety,
out uint[]? normalNpcs,
out _);
if (normalNpcs.Length > 0)
{
var talkToNormalNpcs = alliedQuestsForSameSociety
.Where(x => x.Sequence < 255)
.Where(x => IsInteractStep(x.Quest, x.Sequence, normalNpcs))
.Where(x => IsInteractSequence(x.Quest, x.Sequence, normalNpcs))
.Cast<(ElementId, byte)?>()
.FirstOrDefault();
if (talkToNormalNpcs != null)
@ -299,13 +302,16 @@ internal sealed unsafe class QuestFunctions
_alliedSocietyData.Mounts.ContainsKey(battleChara->Mount.MountId);
}
private bool IsInteractStep(ElementId questId, byte sequence, uint[] dataIds)
private bool IsInteractSequence(ElementId questId, byte sequenceNo, uint[] dataIds)
{
if (_questRegistry.TryGetQuest(questId, out var quest))
{
QuestStep? firstStepOfSequence = quest.FindSequence(sequence)?.FindStep(0);
return firstStepOfSequence is { InteractionType: EInteractionType.Interact, DataId: { } dataId } &&
dataIds.Contains(dataId);
QuestSequence? sequence = quest.FindSequence(sequenceNo);
return sequence != null &&
sequence.Steps.All(x =>
x is { InteractionType: EInteractionType.WalkTo } ||
(x is { InteractionType: EInteractionType.Interact, DataId: { } dataId } &&
dataIds.Contains(dataId)));
}
return false;