SyntaxKind.ObjectInitializerExpression,
SeparatedList<ExpressionSyntax>(
SyntaxNodeList(
- Assignment(nameof(QuestRoot.Author), quest.Author, null)
- .AsSyntaxNodeOrToken(),
- AssignmentList(nameof(QuestRoot.Contributors), quest.Contributors)
+ AssignmentList(nameof(QuestRoot.Author), quest.Author)
.AsSyntaxNodeOrToken(),
Assignment(nameof(QuestRoot.Comment), quest.Comment, null)
.AsSyntaxNodeOrToken(),
{
"$schema": "https://carvel.li/questionable/quest-1.0",
- "Author": "liza, JerryWester",
+ "Author": ["liza", "JerryWester"],
"QuestSequence": [
{
"Sequence": 0,
"Sequence": 255,
"Steps": [
{
- "$": "TODO: Questionable doesn't seem to interact with this ferry skipper",
"DataId": 1001263,
"Position": {
"X": 181.41443,
},
"TerritoryId": 133,
"InteractionType": "Interact",
- "DialogueChoices": [
- {
- "Type": "List",
- "ExcelSheet": "Warp",
- "Prompt": "Null",
- "Answer": "131077"
- },
- {
- "Type": "YesNo",
- "ExcelSheet": "Warp",
- "Prompt": "Board the ferry to Sweetbloom Pier?",
- "Yes": true
- }
- ]
+ "TargetTerritoryId": 152
},
{
"TerritoryId": 152,
]
}
]
-}
\ No newline at end of file
+}
"InteractionType": "Emote",\r
"Emote": "dance",\r
"CompletionQuestVariablesFlags": [\r
- 1,\r
+ null,\r
null,\r
null,\r
null,\r
"InteractionType": "Emote",\r
"Emote": "dance",\r
"CompletionQuestVariablesFlags": [\r
- 1,\r
+ null,\r
null,\r
null,\r
null,\r
},\r
"TerritoryId": 152,\r
"InteractionType": "Emote",\r
- "Emote": "dance"\r
+ "Emote": "dance",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 32\r
+ ]\r
}\r
]\r
},\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
"Y": -3.7126513,\r
"Z": 209.76575\r
},\r
+ "StopDistance": 5,\r
"TerritoryId": 152,\r
"InteractionType": "AcceptQuest",\r
"AetheryteShortcut": "East Shroud - Hawthorne Hut",\r
"TerritoryId": 152,\r
"InteractionType": "Combat",\r
"EnemySpawnType": "OverworldEnemies",\r
- "KillEnemyDataIds": [\r
- 179\r
+ "ComplexCombatData": [\r
+ {\r
+ "DataId": 179,\r
+ "CompletionQuestVariablesFlags": [\r
+ 16,\r
+ 1,\r
+ null,\r
+ null,\r
+ null,\r
+ null\r
+ ],\r
+ "MinimumKillCount": 1\r
+ }\r
],\r
"CompletionQuestVariablesFlags": [\r
- 16,\r
+ null,\r
1,\r
null,\r
null,\r
"TerritoryId": 152,\r
"InteractionType": "Interact",\r
"CompletionQuestVariablesFlags": [\r
- 1,\r
null,\r
- 16,\r
+ null,\r
+ null,\r
null,\r
null,\r
32\r
"TerritoryId": 152,\r
"InteractionType": "Interact",\r
"CompletionQuestVariablesFlags": [\r
- 1,\r
null,\r
- 16,\r
+ null,\r
+ null,\r
null,\r
null,\r
64\r
},\r
"TerritoryId": 152,\r
"InteractionType": "Interact",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 128\r
+ ],\r
"$": "18 1 32 0 0 96 -> 35 1 48 0 0 224"\r
},\r
{\r
"TerritoryId": 152,\r
"InteractionType": "Combat",\r
"EnemySpawnType": "OverworldEnemies",\r
- "KillEnemyDataIds": [\r
- 7\r
- ]\r
+ "ComplexCombatData": [\r
+ {\r
+ "DataId": 7,\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ 16,\r
+ null,\r
+ null,\r
+ null,\r
+ null\r
+ ],\r
+ "MinimumKillCount": 1\r
+ }\r
+ ],\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ 16,\r
+ null,\r
+ null,\r
+ null,\r
+ null\r
+ ],\r
+ "$": "If skipping the previous step: 34 17 32 0 0 96"\r
}\r
]\r
},\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
"StopDistance": 7,\r
"TerritoryId": 129,\r
"InteractionType": "Interact",\r
- "TargetTerritoryId": 138,\r
- "DialogueChoices": [\r
- {\r
- "Type": "List",\r
- "ExcelSheet": "Warp",\r
- "Prompt": null,\r
- "Answer": 131109\r
- }\r
- ]\r
+ "TargetTerritoryId": 138\r
},\r
{\r
"DataId": 1003393,\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
{\r
"Sequence": 1,\r
"Steps": [\r
+ {\r
+ "Position": {\r
+ "X": -422.68066,\r
+ "Y": -2.5542965,\r
+ "Z": 150.50304\r
+ },\r
+ "TerritoryId": 139,\r
+ "InteractionType": "WalkTo",\r
+ "DisableNavmesh": true,\r
+ "Comment": "Avoids swimming"\r
+ },\r
{\r
"Position": {\r
"X": -585.1562,\r
{\r
"Sequence": 255,\r
"Steps": [\r
+ {\r
+ "Position": {\r
+ "X": -422.68066,\r
+ "Y": -2.5542965,\r
+ "Z": 150.50304\r
+ },\r
+ "TerritoryId": 139,\r
+ "InteractionType": "WalkTo",\r
+ "Comment": "Avoids swimming"\r
+ },\r
{\r
"DataId": 1006193,\r
"Position": {\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
{\r
"$schema": "https://carvel.li/questionable/quest-1.0",\r
"Author": "JerryWester",\r
+ "TerritoryBlacklist": [\r
+ 1039\r
+ ],\r
"QuestSequence": [\r
{\r
"Sequence": 0,\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
"Y": 3.543561,\r
"Z": 283.71094\r
},\r
+ "StopDistance": 5,\r
"TerritoryId": 152,\r
"InteractionType": "AcceptQuest",\r
"AetheryteShortcut": "East Shroud - Hawthorne Hut",\r
"Z": 279.92664\r
},\r
"TerritoryId": 152,\r
- "InteractionType": "Interact"\r
+ "InteractionType": "Interact",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 128\r
+ ]\r
},\r
{\r
"DataId": 1000557,\r
},\r
"TerritoryId": 152,\r
"InteractionType": "Interact",\r
- "$": "0 0 0 0 0 0 -> 17 0 0 0 0 128"\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 64\r
+ ]\r
},\r
{\r
"DataId": 1000553,\r
},\r
"TerritoryId": 152,\r
"InteractionType": "Interact",\r
- "$": "17 0 0 0 0 128 -> 33 16 0 0 0 192"\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 32\r
+ ]\r
}\r
]\r
},\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
"AetheryteShortcut": "East Shroud - Hawthorne Hut",\r
"SkipIf": [\r
"AetheryteShortcutIfInSameTerritory"\r
- ],\r
- "CompletionQuestVariablesFlags": [\r
- null,\r
- 16,\r
- null,\r
- null,\r
- null,\r
- null\r
]\r
}\r
]\r
"Z": 283.4973\r
},\r
"TerritoryId": 152,\r
- "InteractionType": "Interact",\r
- "CompletionQuestVariablesFlags": [\r
- null,\r
- 1,\r
- null,\r
- null,\r
- null,\r
- null\r
- ]\r
+ "InteractionType": "Interact"\r
}\r
]\r
},\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
"InteractionType": "Interact",\r
"$": "0 0 0 0 0 0 -> 1 0 0 0 0 128",\r
"CompletionQuestVariablesFlags": [\r
- 1,\r
+ null,\r
null,\r
null,\r
null,\r
"InteractionType": "Interact",\r
"$": "1 0 0 0 0 128 -> 2 0 0 0 0 192",\r
"CompletionQuestVariablesFlags": [\r
- 1,\r
+ null,\r
null,\r
null,\r
null,\r
"AetheryteShortcut": "East Shroud - Hawthorne Hut",\r
"$": "2 0 0 0 0 192 -> 3 0 0 0 0 224",\r
"CompletionQuestVariablesFlags": [\r
- 1,\r
+ null,\r
null,\r
null,\r
null,\r
"Z": 286.9154\r
},\r
"TerritoryId": 152,\r
- "InteractionType": "Interact"\r
+ "InteractionType": "Interact",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 16\r
+ ]\r
}\r
]\r
},\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
"Z": -130.11371\r
},\r
"TerritoryId": 153,\r
- "InteractionType": "Combat",\r
- "EnemySpawnType": "AfterInteraction",\r
- "KillEnemyDataIds": [\r
- 55\r
- ],\r
+ "InteractionType": "Interact",\r
"$": "0 0 0 0 0 0 -> 16 0 16 0 0 128",\r
"CompletionQuestVariablesFlags": [\r
- 16,\r
null,\r
- 16,\r
+ null,\r
+ null,\r
null,\r
null,\r
128\r
+ ],\r
+ "Comment": "Enemy loses aggro by the next waypoint"\r
+ },\r
+ {\r
+ "Position": {\r
+ "X": -108.2742,\r
+ "Y": 5.6416674,\r
+ "Z": -80.21974\r
+ },\r
+ "StopDistance": 0.25,\r
+ "TerritoryId": 153,\r
+ "InteractionType": "Jump",\r
+ "JumpDestination": {\r
+ "Position": {\r
+ "X": -111.25065,\r
+ "Y": 8.312978,\r
+ "Z": -82.8167\r
+ },\r
+ "DelaySeconds": 0.25\r
+ },\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ -8\r
]\r
},\r
{\r
"TerritoryId": 153,\r
"InteractionType": "Interact",\r
"$": "16 0 16 0 0 128 -> 32 1 16 0 0 136",\r
+ "DisableNavmesh": true,\r
"CompletionQuestVariablesFlags": [\r
- 16,\r
- 1,\r
+ null,\r
+ null,\r
null,\r
null,\r
null,\r
8\r
]\r
},\r
+ {\r
+ "Position": {\r
+ "X": -90.467575,\r
+ "Y": 3.3634722,\r
+ "Z": -27.515985\r
+ },\r
+ "StopDistance": 0.25,\r
+ "TerritoryId": 153,\r
+ "InteractionType": "Jump",\r
+ "JumpDestination": {\r
+ "Position": {\r
+ "X": -84.96217,\r
+ "Y": 6.1436205,\r
+ "Z": -23.793756\r
+ },\r
+ "DelaySeconds": 0.25\r
+ },\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ -32\r
+ ]\r
+ },\r
{\r
"DataId": 2001951,\r
"Position": {\r
},\r
"TerritoryId": 153,\r
"InteractionType": "Interact",\r
- "$": "32 1 16 0 0 136 -> 49 1 16 0 0 168"\r
+ "$": "32 1 16 0 0 136 -> 49 1 16 0 0 168",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 32\r
+ ]\r
+ },\r
+ {\r
+ "Position": {\r
+ "X": -77.875786,\r
+ "Y": 3.9296143,\r
+ "Z": -27.107864\r
+ },\r
+ "TerritoryId": 153,\r
+ "InteractionType": "WalkTo",\r
+ "DisableNavmesh": true,\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ -16\r
+ ]\r
+ },\r
+ {\r
+ "Position": {\r
+ "X": 15.053005,\r
+ "Y": 3.8386261,\r
+ "Z": -40.758984\r
+ },\r
+ "TerritoryId": 153,\r
+ "InteractionType": "WalkTo",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ -16\r
+ ]\r
},\r
{\r
"DataId": 2001952,\r
"Y": 7.614197,\r
"Z": -43.137268\r
},\r
+ "StopDistance": 6,\r
"TerritoryId": 153,\r
"InteractionType": "Interact",\r
- "$": "49 1 16 0 0 168 -> 65 17 16 0 0 184"\r
+ "$": "49 1 16 0 0 168 -> 65 17 16 0 0 184",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 16\r
+ ]\r
},\r
{\r
"DataId": 2001950,\r
"Z": -32.333923\r
},\r
"TerritoryId": 153,\r
- "InteractionType": "Combat",\r
- "EnemySpawnType": "AfterInteraction",\r
- "KillEnemyDataIds": [\r
- 64,\r
- 61\r
- ],\r
- "$": "65 17 16 0 0 184 -> "\r
+ "InteractionType": "Interact",\r
+ "$": "65 17 16 0 0 184 -> ",\r
+ "CompletionQuestVariablesFlags": [\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ null,\r
+ 64\r
+ ]\r
}\r
]\r
},\r
{\r
"Sequence": 255,\r
"Steps": [\r
+ {\r
+ "Position": {\r
+ "X": 51.85704,\r
+ "Y": 2.712612,\r
+ "Z": -42.67677\r
+ },\r
+ "TerritoryId": 153,\r
+ "InteractionType": "WalkTo",\r
+ "DisableNavmesh": true,\r
+ "Mount": false\r
+ },\r
{\r
"DataId": 1000590,\r
"Position": {\r
"Z": -81.34589\r
},\r
"TerritoryId": 153,\r
- "InteractionType": "CompleteQuest"\r
+ "InteractionType": "CompleteQuest",\r
+ "Mount": false\r
}\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
{\r
"Sequence": 255,\r
"Steps": [\r
+ {\r
+ "TerritoryId": 153,\r
+ "InteractionType": "AttuneAetheryte",\r
+ "Aetheryte": "South Shroud - Camp Tranquil"\r
+ },\r
{\r
"DataId": 1000576,\r
"Position": {\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
"Y": 8.673417,\r
"Z": 187.67012\r
},\r
+ "StopDistance": 0.5,\r
"TerritoryId": 152,\r
"InteractionType": "Emote",\r
"Emote": "lookout"\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
},\r
"TerritoryId": 140,\r
"InteractionType": "Interact",\r
- "DialogueChoices": [\r
- {\r
- "ExcelSheet": "Warp",\r
- "Type": "YesNo",\r
- "Yes": true,\r
- "Prompt": 131088\r
- }\r
- ]\r
+ "TargetTerritoryId": 212\r
}\r
]\r
},\r
},\r
"TerritoryId": 212,\r
"InteractionType": "Interact",\r
- "DialogueChoices": [\r
- {\r
- "ExcelSheet": "Warp",\r
- "Type": "YesNo",\r
- "Yes": true,\r
- "Prompt": 131090\r
- }\r
- ]\r
+ "TargetTerritoryId": 212\r
},\r
{\r
"DataId": 1006688,\r
]\r
}\r
]\r
-}
\ No newline at end of file
+}\r
},
"Author": {
"description": "Author of the quest sequence",
- "type": "string"
- },
- "Contributors": {
- "type": "array",
+ "type": ["string", "array"],
"items": {
"type": "string"
}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Questionable.Model.V1.Converter;
+
+public sealed class StringListOrValueConverter : JsonConverter<List<string>>
+{
+ public override List<string>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ if (reader.TokenType == JsonTokenType.String)
+ return [reader.GetString()!];
+
+ if (reader.TokenType != JsonTokenType.StartArray)
+ throw new JsonException();
+ reader.Read();
+
+ List<string> value = [];
+ while (reader.TokenType != JsonTokenType.EndArray)
+ {
+ value.Add(reader.GetString()!);
+ reader.Read();
+ }
+
+ return value;
+ }
+
+ public override void Write(Utf8JsonWriter writer, List<string>? value, JsonSerializerOptions options)
+ {
+ if (value == null)
+ writer.WriteNullValue();
+ else if (value.Count == 1)
+ writer.WriteStringValue(value[0]);
+ else
+ {
+ writer.WriteStartArray();
+ foreach (var v in value)
+ writer.WriteStringValue(v);
+ writer.WriteEndArray();
+ }
+ }
+}
using System.Collections.Generic;
+using System.Text.Json.Serialization;
+using Questionable.Model.V1.Converter;
namespace Questionable.Model.V1;
public sealed class QuestRoot
{
- public string Author { get; set; } = null!;
- public List<string> Contributors { get; set; } = new();
+ [JsonConverter(typeof(StringListOrValueConverter))]
+ public List<string> Author { get; set; } = new();
/// <summary>
/// This is only relevant for release builds.