Rough Hildibrand pass

pixie
Liza 2024-09-11 23:17:39 +02:00
parent cc4a573b2d
commit b590390b5c
Signed by: liza
GPG Key ID: 7199F8D727D55F67
28 changed files with 415 additions and 90 deletions

View File

@ -32,6 +32,10 @@ internal static class DialogueChoiceExtensions
Assignment(nameof(DialogueChoice.Answer), dialogueChoice.Answer,
emptyChoice.Answer)
.AsSyntaxNodeOrToken(),
Assignment(nameof(DialogueChoice.PromptIsRegularExpression),
dialogueChoice.PromptIsRegularExpression,
emptyChoice.PromptIsRegularExpression)
.AsSyntaxNodeOrToken(),
Assignment(nameof(DialogueChoice.AnswerIsRegularExpression),
dialogueChoice.AnswerIsRegularExpression,
emptyChoice.AnswerIsRegularExpression)

View File

@ -62,8 +62,10 @@
},
"TerritoryId": 146,
"InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies",
"KillEnemyDataIds": []
"EnemySpawnType": "FateEnemies",
"KillEnemyDataIds": [
2390
]
}
]
},
@ -106,7 +108,8 @@
"Prompt": "TEXT_CHRHDB101_01204_Q2_000_1",
"Answer": "TEXT_CHRHDB101_01204_Q2A2_000_2"
}
]
],
"NextQuestId": 1205
}
]
}

View File

@ -28,8 +28,17 @@
"Y": 4.0131226,
"Z": -98.95477
},
"StopDistance": 7,
"TerritoryId": 130,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 1004331,
@ -39,7 +48,15 @@
"Z": -133.22656
},
"TerritoryId": 130,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 1001313,
@ -49,7 +66,15 @@
"Z": -106.21808
},
"TerritoryId": 130,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
}
]
},
@ -64,7 +89,8 @@
"Z": -126.51257
},
"TerritoryId": 130,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1206
}
]
}

View File

@ -117,8 +117,10 @@
"Y": 12,
"Z": 0.99176025
},
"StopDistance": 4,
"TerritoryId": 130,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1207
}
]
}

View File

@ -18,6 +18,7 @@
"Y": 12,
"Z": -5.5390625
},
"StopDistance": 4,
"TerritoryId": 130,
"InteractionType": "AcceptQuest"
}
@ -54,7 +55,15 @@
"Z": -221.27112
},
"TerritoryId": 145,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 1003940,
@ -64,7 +73,15 @@
"Z": -241.07733
},
"TerritoryId": 145,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 1003939,
@ -73,8 +90,17 @@
"Y": 4.137387,
"Z": -240.98578
},
"StopDistance": 4,
"TerritoryId": 145,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
]
},
@ -205,7 +231,15 @@
"Z": 151.87305
},
"TerritoryId": 145,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 2003005,
@ -215,7 +249,15 @@
"Z": 166.0028
},
"TerritoryId": 145,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 2003004,
@ -225,7 +267,15 @@
"Z": 187.36548
},
"TerritoryId": 145,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
]
},
@ -248,8 +298,16 @@
"Sequence": 255,
"Steps": [
{
"Mount": true,
"Fly": true,
"Position": {
"X": -535.8004,
"Y": 5.3931885,
"Z": -252.96324
},
"TerritoryId": 145,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1005731,
"Position": {
"X": -526.8788,
@ -257,7 +315,8 @@
"Z": -246.50952
},
"TerritoryId": 145,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1315
}
]
}

View File

@ -18,6 +18,7 @@
"Y": 5.4049973,
"Z": -249.25616
},
"StopDistance": 4,
"TerritoryId": 145,
"InteractionType": "AcceptQuest"
}
@ -43,7 +44,12 @@
"Sequence": 2,
"Steps": [
{
"AetheryteShortcut": "Western Thanalan - Horizon",
"TerritoryId": 145,
"InteractionType": "UseItem",
"ItemId": 30362,
"TargetTerritoryId": 140
},
{
"Mount": true,
"DataId": 1008709,
"Position": {
@ -70,7 +76,15 @@
"Z": 12.191956
},
"TerritoryId": 140,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"Mount": true,
@ -82,7 +96,15 @@
"Z": 65.384766
},
"TerritoryId": 140,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"Mount": true,
@ -94,7 +116,15 @@
"Z": 158.73962
},
"TerritoryId": 140,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
}
]
},
@ -124,7 +154,15 @@
"Z": 155.9624
},
"TerritoryId": 140,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"DataId": 2003656,
@ -134,7 +172,15 @@
"Z": 159.19727
},
"TerritoryId": 140,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 2003659,
@ -144,7 +190,15 @@
"Z": 155.90137
},
"TerritoryId": 140,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
16
]
},
{
"DataId": 2003657,
@ -154,7 +208,15 @@
"Z": 158.12915
},
"TerritoryId": 140,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
}
]
},
@ -169,7 +231,8 @@
"Z": 157.5188
},
"TerritoryId": 140,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1316
}
]
}

View File

@ -47,7 +47,8 @@
"Z": 254.13892
},
"TerritoryId": 147,
"InteractionType": "Interact"
"InteractionType": "Interact",
"Fly": true
}
]
},
@ -63,11 +64,9 @@
"Z": 121.20239
},
"TerritoryId": 147,
"InteractionType": "Interact"
},
{
"TerritoryId": 147,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"Fly": true,
"NextQuestId": 1317
}
]
}

View File

@ -36,9 +36,13 @@
"Sequence": 2,
"Steps": [
{
"AetheryteShortcut": "Western Thanalan - Horizon",
"TerritoryId": 145,
"InteractionType": "UseItem",
"ItemId": 30362,
"TargetTerritoryId": 140
},
{
"Mount": true,
"Fly": true,
"DataId": 1008730,
"Position": {
"X": -431.26575,
@ -61,7 +65,8 @@
"Z": -367.17786
},
"TerritoryId": 140,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1318
}
]
}

View File

@ -12,6 +12,7 @@
"Y": 23.113976,
"Z": -367.8188
},
"StopDistance": 5,
"TerritoryId": 140,
"InteractionType": "AcceptQuest"
}
@ -77,7 +78,8 @@
"Z": 378.80518
},
"TerritoryId": 155,
"InteractionType": "Interact"
"InteractionType": "Interact",
"Fly": true
}
]
},
@ -93,23 +95,14 @@
"Z": 479.69775
},
"TerritoryId": 155,
"InteractionType": "Interact"
"InteractionType": "Interact",
"Fly": true
}
]
},
{
"Sequence": 6,
"Steps": [
{
"DataId": 2003671,
"Position": {
"X": 489.181,
"Y": 206.8937,
"Z": 479.662
},
"TerritoryId": 155,
"InteractionType": "Interact"
},
{
"TerritoryId": 155,
"InteractionType": "Duty",
@ -127,6 +120,7 @@
"Y": 207.33582,
"Z": 475.33374
},
"StopDistance": 7,
"TerritoryId": 155,
"InteractionType": "Interact"
}
@ -136,7 +130,12 @@
"Sequence": 255,
"Steps": [
{
"AetheryteShortcut": "Western Thanalan - Horizon",
"TerritoryId": 145,
"InteractionType": "UseItem",
"ItemId": 30362,
"TargetTerritoryId": 140
},
{
"Mount": true,
"Fly": true,
"DataId": 1008788,
@ -146,7 +145,8 @@
"Z": -367.57465
},
"TerritoryId": 140,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1438
}
]
}

View File

@ -142,11 +142,8 @@
"Z": 525.81055
},
"TerritoryId": 137,
"InteractionType": "Interact"
},
{
"TerritoryId": 137,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1439
}
]
}

View File

@ -35,6 +35,16 @@
{
"Sequence": 2,
"Steps": [
{
"Position": {
"X": 581.1095,
"Y": 14.587067,
"Z": 394.20828
},
"TerritoryId": 137,
"InteractionType": "WalkTo",
"Fly": true
},
{
"DataId": 1009319,
"Position": {
@ -75,7 +85,8 @@
"Z": 344.71655
},
"TerritoryId": 138,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1440
}
]
}

View File

@ -37,7 +37,15 @@
"Z": 425.58936
},
"TerritoryId": 138,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
},
{
"DataId": 2004325,
@ -47,7 +55,15 @@
"Z": 514.7324
},
"TerritoryId": 138,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 2004326,
@ -57,7 +73,15 @@
"Z": 596.765
},
"TerritoryId": 138,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
}
]
},
@ -73,7 +97,16 @@
"Z": 684.1992
},
"TerritoryId": 138,
"InteractionType": "Interact"
"InteractionType": "Interact",
"DialogueChoices": [
{
"Type": "YesNo",
"ExcelSheet": "Addon",
"Prompt": 102445,
"PromptIsRegularExpression": true,
"Yes": true
}
]
},
{
"Comment": "Fight some Mandragoras",
@ -84,7 +117,7 @@
},
"TerritoryId": 138,
"InteractionType": "Combat",
"EnemySpawnType": "OverworldEnemies",
"EnemySpawnType": "FateEnemies",
"KillEnemyDataIds": [
2950,
2951,
@ -100,8 +133,16 @@
"Steps": [
{
"AetheryteShortcut": "Eastern La Noscea - Costa Del Sol",
"Mount": true,
"Fly": true,
"Position": {
"X": 581.46533,
"Y": 14.587067,
"Z": 393.86594
},
"TerritoryId": 137,
"InteractionType": "WalkTo"
},
{
"DataId": 1009319,
"Position": {
"X": 581.3534,
@ -142,7 +183,8 @@
"Z": 10.879639
},
"TerritoryId": 137,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 1441
}
]
}

View File

@ -89,11 +89,8 @@
"Z": 455.2528
},
"TerritoryId": 137,
"InteractionType": "Interact"
},
{
"TerritoryId": 137,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 166
}
]
}

View File

@ -104,6 +104,15 @@
"[Ul'dah] Aetheryte Plaza",
"[Ul'dah] Gladiators' Guild"
],
"Position": {
"X": -71.1609,
"Y": 6.9845705,
"Z": 9.066199
},
"TerritoryId": 131,
"InteractionType": "WalkTo"
},
{
"DataId": 1010281,
"Position": {
"X": -70.96979,
@ -111,7 +120,8 @@
"Z": 3.982544
},
"TerritoryId": 131,
"InteractionType": "Interact"
"InteractionType": "Interact",
"DisableNavmesh": true
}
]
},
@ -130,7 +140,8 @@
"Z": -3.9215698
},
"TerritoryId": 130,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 202
}
]
}

View File

@ -20,6 +20,15 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -153.18225,
"Y": 14.005,
"Z": 43.458076
},
"TerritoryId": 130,
"InteractionType": "WalkTo"
},
{
"AethernetShortcut": [
"[Ul'dah] Thaumaturges' Guild",
@ -83,7 +92,12 @@
"Z": 260.57825
},
"TerritoryId": 141,
"InteractionType": "Interact"
"InteractionType": "Interact",
"AetheryteShortcut": "Ul'dah",
"AethernetShortcut": [
"[Ul'dah] Aetheryte Plaza",
"[Ul'dah] Gate of Nald (Central Thanalan)"
]
}
]
},
@ -103,7 +117,8 @@
"Z": -5.661133
},
"TerritoryId": 130,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 203
}
]
}

View File

@ -20,6 +20,15 @@
{
"Sequence": 1,
"Steps": [
{
"Position": {
"X": -153.18225,
"Y": 14.005,
"Z": 43.458076
},
"TerritoryId": 130,
"InteractionType": "WalkTo"
},
{
"AethernetShortcut": [
"[Ul'dah] Thaumaturges' Guild",
@ -69,7 +78,24 @@
"Z": 8.255066
},
"TerritoryId": 131,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
32
]
},
{
"Position": {
"X": 109.42333,
"Y": 8,
"Z": 8.92655
},
"TerritoryId": 131,
"InteractionType": "WalkTo"
},
{
"DataId": 2004900,
@ -79,7 +105,15 @@
"Z": -35.233154
},
"TerritoryId": 131,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
64
]
},
{
"DataId": 2004899,
@ -89,7 +123,15 @@
"Z": -74.05206
},
"TerritoryId": 131,
"InteractionType": "Interact"
"InteractionType": "Interact",
"CompletionQuestVariablesFlags": [
null,
null,
null,
null,
null,
128
]
}
]
},
@ -120,14 +162,25 @@
"[Ul'dah] Gladiators' Guild",
"[Ul'dah] Sapphire Avenue Exchange"
],
"Position": {
"X": 137.68585,
"Y": 3.9999998,
"Z": -58.555218
},
"TerritoryId": 131,
"InteractionType": "WalkTo"
},
{
"DataId": 1001679,
"Position": {
"X": 140.48975,
"Y": 4.0099983,
"Z": -59.80017
},
"StopDistance": 5,
"TerritoryId": 131,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 204
}
]
}

View File

@ -25,6 +25,15 @@
"[Ul'dah] Sapphire Avenue Exchange",
"[Ul'dah] Gladiators' Guild"
],
"Position": {
"X": -71.1609,
"Y": 6.9845705,
"Z": 9.066199
},
"TerritoryId": 131,
"InteractionType": "WalkTo"
},
{
"DataId": 1010330,
"Position": {
"X": -69.5354,
@ -33,6 +42,7 @@
},
"TerritoryId": 131,
"InteractionType": "Interact",
"DisableNavmesh": true,
"DialogueChoices": [
{
"Type": "YesNo",
@ -53,6 +63,7 @@
"Y": 6.9839687,
"Z": -0.045776367
},
"StopDistance": 5,
"TerritoryId": 131,
"InteractionType": "Interact"
}
@ -117,7 +128,8 @@
"Z": 0.07623291
},
"TerritoryId": 131,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 490
}
]
}

View File

@ -86,7 +86,8 @@
"Z": 171.12988
},
"TerritoryId": 140,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 491
}
]
}

View File

@ -129,7 +129,8 @@
"Z": 96.29968
},
"TerritoryId": 131,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 492
}
]
}

View File

@ -123,7 +123,8 @@
"Z": 27.237305
},
"TerritoryId": 131,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 493
}
]
}

View File

@ -81,7 +81,8 @@
"Z": 29.343018
},
"TerritoryId": 131,
"InteractionType": "CompleteQuest"
"InteractionType": "CompleteQuest",
"NextQuestId": 502
}
]
}

View File

@ -594,7 +594,8 @@
"AfterInteraction",
"AfterItemUse",
"AfterAction",
"OverworldEnemies"
"OverworldEnemies",
"FateEnemies"
]
},
"KillEnemyDataIds": {
@ -1020,6 +1021,9 @@
"integer"
]
},
"PromptIsRegularExpression": {
"type": "boolean"
},
"Yes": {
"type": "boolean",
"default": true
@ -1048,11 +1052,17 @@
"null"
]
},
"PromptIsRegularExpression": {
"type": "boolean"
},
"Answer": {
"type": [
"string",
"integer"
]
},
"AnswerIsRegularExpression": {
"type": "boolean"
}
},
"required": [

View File

@ -12,5 +12,6 @@ public sealed class EnemySpawnTypeConverter() : EnumConverter<EEnemySpawnType>(V
{ EEnemySpawnType.AfterAction, "AfterAction" },
{ EEnemySpawnType.AutoOnEnterArea, "AutoOnEnterArea" },
{ EEnemySpawnType.OverworldEnemies, "OverworldEnemies" },
{ EEnemySpawnType.FateEnemies, "FateEnemies" },
};
}

View File

@ -16,6 +16,7 @@ public sealed class DialogueChoice
[JsonConverter(typeof(ExcelRefConverter))]
public ExcelRef? Answer { get; set; }
public bool PromptIsRegularExpression { get; set; }
public bool AnswerIsRegularExpression { get; set; }
/// <summary>

View File

@ -12,4 +12,5 @@ public enum EEnemySpawnType
AfterAction,
AutoOnEnterArea,
OverworldEnemies,
FateEnemies,
}

View File

@ -196,8 +196,9 @@ internal sealed class CombatController : IDisposable
// TODO this works as somewhat of a delay between killing enemies if certain items/flags are checked
// but also delays killing the next enemy a little
if (_currentFight == null || _currentFight.Data.SpawnType != EEnemySpawnType.OverworldEnemies ||
_currentFight.Data.ComplexCombatDatas.Count == 0)
if (_currentFight == null ||
_currentFight.Data.SpawnType == EEnemySpawnType.OverworldEnemies ||
(_currentFight.Data.SpawnType != EEnemySpawnType.FateEnemies && _currentFight.Data.KillEnemyDataIds.Count > 0))
{
if (battleNpc.IsDead)
return 0;
@ -262,6 +263,13 @@ internal sealed class CombatController : IDisposable
}
}
if (_currentFight?.Data.SpawnType == EEnemySpawnType.FateEnemies)
{
var gameObjectStruct = (GameObject*)gameObject.Address;
if (gameObjectStruct->FateId != 0)
return 15;
}
// stuff trying to kill us
if (battleNpc.TargetObjectId == _clientState.LocalPlayer?.GameObjectId)
return 10;

View File

@ -428,19 +428,19 @@ internal sealed class InteractionUiController : IDisposable
continue;
}
string? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt, false)
?.GetString();
StringOrRegex? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt,
dialogueChoice.PromptIsRegularExpression);
StringOrRegex? excelAnswer = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Answer,
dialogueChoice.AnswerIsRegularExpression);
if (actualPrompt == null && !string.IsNullOrEmpty(excelPrompt))
if (actualPrompt == null && excelPrompt != null)
{
_logger.LogInformation("Unexpected excelPrompt: {ExcelPrompt}", excelPrompt);
continue;
}
if (actualPrompt != null &&
(excelPrompt == null || !GameFunctions.GameStringEquals(actualPrompt, excelPrompt)))
(excelPrompt == null || !IsMatch(actualPrompt, excelPrompt)))
{
_logger.LogInformation("Unexpected excelPrompt: {ExcelPrompt}, actualPrompt: {ActualPrompt}",
excelPrompt, actualPrompt);
@ -597,9 +597,9 @@ internal sealed class InteractionUiController : IDisposable
continue;
}
string? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt, false)
?.GetString();
if (excelPrompt == null || !GameFunctions.GameStringEquals(actualPrompt, excelPrompt))
StringOrRegex? excelPrompt = ResolveReference(quest, dialogueChoice.ExcelSheet, dialogueChoice.Prompt,
dialogueChoice.PromptIsRegularExpression);
if (excelPrompt == null || !IsMatch(actualPrompt, excelPrompt))
{
_logger.LogInformation("Unexpected excelPrompt: {ExcelPrompt}, actualPrompt: {ActualPrompt}",
excelPrompt, actualPrompt);

View File

@ -83,6 +83,7 @@ internal static class Combat
break;
case EEnemySpawnType.OverworldEnemies:
case EEnemySpawnType.FateEnemies:
yield return CreateTask(quest, sequence, step);
break;