Attempt 'simple' follow mechanics (where you don't have to hide)
This commit is contained in:
parent
b87f54c8e8
commit
d2e7e159dd
@ -291,6 +291,9 @@ public class QuestSourceGenerator : ISourceGenerator
|
|||||||
Assignment(nameof(QuestStep.StopDistance), step.StopDistance,
|
Assignment(nameof(QuestStep.StopDistance), step.StopDistance,
|
||||||
emptyStep.StopDistance)
|
emptyStep.StopDistance)
|
||||||
.AsSyntaxNodeOrToken(),
|
.AsSyntaxNodeOrToken(),
|
||||||
|
Assignment(nameof(QuestStep.NpcWaitDistance), step.NpcWaitDistance,
|
||||||
|
emptyStep.NpcWaitDistance)
|
||||||
|
.AsSyntaxNodeOrToken(),
|
||||||
Assignment(nameof(QuestStep.TargetTerritoryId), step.TargetTerritoryId,
|
Assignment(nameof(QuestStep.TargetTerritoryId), step.TargetTerritoryId,
|
||||||
emptyStep.TargetTerritoryId)
|
emptyStep.TargetTerritoryId)
|
||||||
.AsSyntaxNodeOrToken(),
|
.AsSyntaxNodeOrToken(),
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
"Z": -668.9708
|
"Z": -668.9708
|
||||||
},
|
},
|
||||||
"TerritoryId": 958,
|
"TerritoryId": 958,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Instruction",
|
||||||
"Comment": "Follow Azure-haired Boy"
|
"Comment": "Follow Azure-haired Boy"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -47,8 +47,65 @@
|
|||||||
"Z": -27.054321
|
"Z": -27.054321
|
||||||
},
|
},
|
||||||
"TerritoryId": 962,
|
"TerritoryId": 962,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Interact"
|
||||||
"Comment": "Follow Alisaie"
|
},
|
||||||
|
{
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -144,7 +144,7 @@
|
|||||||
"Z": 390.46313
|
"Z": 390.46313
|
||||||
},
|
},
|
||||||
"TerritoryId": 958,
|
"TerritoryId": 958,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Instruction",
|
||||||
"Comment": "Follow Girl in Green"
|
"Comment": "Follow Girl in Green"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
"Z": 365.7129
|
"Z": 365.7129
|
||||||
},
|
},
|
||||||
"TerritoryId": 958,
|
"TerritoryId": 958,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Instruction",
|
||||||
"Comment": "Follow Alphinaud and Alisaie",
|
"Comment": "Follow Alphinaud and Alisaie",
|
||||||
"DialogueChoices": [
|
"DialogueChoices": [
|
||||||
{
|
{
|
||||||
@ -92,6 +92,44 @@
|
|||||||
{
|
{
|
||||||
"Sequence": 5,
|
"Sequence": 5,
|
||||||
"Steps": [
|
"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,
|
"DataId": 1039880,
|
||||||
"Position": {
|
"Position": {
|
||||||
@ -101,8 +139,7 @@
|
|||||||
},
|
},
|
||||||
"StopDistance": 1,
|
"StopDistance": 1,
|
||||||
"TerritoryId": 958,
|
"TerritoryId": 958,
|
||||||
"InteractionType": "Interact",
|
"InteractionType": "Interact"
|
||||||
"Comment": "Follow Alphinaud and Alisaie"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -204,6 +204,16 @@
|
|||||||
"TerritoryId": 958,
|
"TerritoryId": 958,
|
||||||
"InteractionType": "WalkTo"
|
"InteractionType": "WalkTo"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Position": {
|
||||||
|
"X": 549.7444,
|
||||||
|
"Y": -36.61608,
|
||||||
|
"Z": -225.64955
|
||||||
|
},
|
||||||
|
"TerritoryId": 958,
|
||||||
|
"InteractionType": "WalkTo",
|
||||||
|
"DisableNavmesh": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"DataId": 1039899,
|
"DataId": 1039899,
|
||||||
"Position": {
|
"Position": {
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
"Z": 419.7605
|
"Z": 419.7605
|
||||||
},
|
},
|
||||||
"TerritoryId": 959,
|
"TerritoryId": 959,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Instruction",
|
||||||
"Comment": "Follow Argos"
|
"Comment": "Follow Argos"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -148,7 +148,7 @@
|
|||||||
"Z": 523.5217
|
"Z": 523.5217
|
||||||
},
|
},
|
||||||
"TerritoryId": 959,
|
"TerritoryId": 959,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Instruction",
|
||||||
"Comment": "Follow Argos"
|
"Comment": "Follow Argos"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
"Z": -269.24548
|
"Z": -269.24548
|
||||||
},
|
},
|
||||||
"TerritoryId": 959,
|
"TerritoryId": 959,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Instruction",
|
||||||
"Comment": "Follow Urianger"
|
"Comment": "Follow Urianger"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -61,7 +61,7 @@
|
|||||||
"Z": -269.24548
|
"Z": -269.24548
|
||||||
},
|
},
|
||||||
"TerritoryId": 959,
|
"TerritoryId": 959,
|
||||||
"InteractionType": "WaitForManualProgress",
|
"InteractionType": "Instruction",
|
||||||
"Comment": "Follow Urianger"
|
"Comment": "Follow Urianger"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -810,6 +810,23 @@
|
|||||||
"ContentFinderConditionId"
|
"ContentFinderConditionId"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"properties": {
|
||||||
|
"InteractionType": {
|
||||||
|
"const": "WaitForNpcAtPosition"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"properties": {
|
||||||
|
"NpcWaitDistance": {
|
||||||
|
"type": "number",
|
||||||
|
"exclusiveMinimum": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ public sealed class QuestStep
|
|||||||
public Vector3? Position { get; set; }
|
public Vector3? Position { get; set; }
|
||||||
|
|
||||||
public float? StopDistance { get; set; }
|
public float? StopDistance { get; set; }
|
||||||
|
public float? NpcWaitDistance { get; set; }
|
||||||
public ushort TerritoryId { get; set; }
|
public ushort TerritoryId { get; set; }
|
||||||
public ushort? TargetTerritoryId { get; set; }
|
public ushort? TargetTerritoryId { get; set; }
|
||||||
|
|
||||||
|
@ -468,10 +468,10 @@ internal sealed unsafe class GameFunctions
|
|||||||
ExecuteCommand($"{_emoteCommands[emote]} motion");
|
ExecuteCommand($"{_emoteCommands[emote]} motion");
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsObjectAtPosition(uint dataId, Vector3 position)
|
public bool IsObjectAtPosition(uint dataId, Vector3 position, float distance)
|
||||||
{
|
{
|
||||||
GameObject? gameObject = FindObjectByDataId(dataId);
|
GameObject? gameObject = FindObjectByDataId(dataId);
|
||||||
return gameObject != null && (gameObject.Position - position).Length() < 0.05f;
|
return gameObject != null && (gameObject.Position - position).Length() < distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasStatusPreventingMount()
|
public bool HasStatusPreventingMount()
|
||||||
|
Loading…
Reference in New Issue
Block a user