This commit is contained in:
Chomp 2022-06-08 16:41:30 +01:00
parent 509cace32e
commit 78494e2472
7 changed files with 46321 additions and 39687 deletions

View File

@ -43,6 +43,9 @@ namespace DumpCleaner
new DumpData{InputName = "resp.client.locations", OutputName = "locations", OutputFolder = "locations", SpecialCase = true}, new DumpData{InputName = "resp.client.locations", OutputName = "locations", OutputFolder = "locations", SpecialCase = true},
new DumpData{InputName = "resp.client.trading.api.traderSettings", OutputName = "traders", OutputFolder = "traders", SpecialCase = true}, new DumpData{InputName = "resp.client.trading.api.traderSettings", OutputName = "traders", OutputFolder = "traders", SpecialCase = true},
new DumpData{InputName= "usec.resp.client.trading.customization", OutputName= "usecsuits", OutputFolder = "traders/5ac3b934156ae10c4430e83c"},
new DumpData{InputName= "bear.resp.client.trading.customization", OutputName= "bearsuits", OutputFolder = "traders/5ac3b934156ae10c4430e83c"}
}; };
} }

View File

@ -73,7 +73,7 @@ void HandleLocationsFile(DumpData names, Dump dumpFile)
// TODO: add back airdrop chance // TODO: add back airdrop chance
} }
JsonWriter.WriteJson(mapdata, $"{names.OutputFolder}/{locationData.Id.ToLower()}", Directory.GetCurrentDirectory(), "base"); JsonWriter.WriteJson(locationData, $"{names.OutputFolder}/{locationData.Id.ToLower()}", Directory.GetCurrentDirectory(), "base");
LoggingHelpers.LogToConsole($"Found map file: {locationData.Id} wrote file to output folder"); LoggingHelpers.LogToConsole($"Found map file: {locationData.Id} wrote file to output folder");
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@ using QuestValidator.Common;
using QuestValidator.Common.Helpers; using QuestValidator.Common.Helpers;
using QuestValidator.Helpers; using QuestValidator.Helpers;
using QuestValidator.Models; using QuestValidator.Models;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
@ -45,7 +46,7 @@ namespace GenerateQuestFile
foreach (var missingQuest in missingQuests) foreach (var missingQuest in missingQuests)
{ {
// Going from a pre-12.7.x version has problems, it doesnt have the new quest data format // Going from a pre-12.7.x version has problems, it doesnt have the new quest data format
CheckAndFixMissingProperties(missingQuest); //CheckAndFixMissingProperties(missingQuest);
questsToOutputToFile.Add(missingQuest._id, missingQuest); questsToOutputToFile.Add(missingQuest._id, missingQuest);
} }
@ -77,6 +78,11 @@ namespace GenerateQuestFile
{ {
AddMissingAvailableForStartConditions(originalQuest, quest); AddMissingAvailableForStartConditions(originalQuest, quest);
} }
if (originalQuest.rewards.Fail.Count > 0)
{
AddMissingFailRewards(originalQuest, quest);
}
} }
// Iterate over quest objects a final time and add hard coded quest requirements if they dont already exist // Iterate over quest objects a final time and add hard coded quest requirements if they dont already exist
@ -122,6 +128,11 @@ namespace GenerateQuestFile
JsonWriter.WriteJson(questsToOutputToFile, "output", Directory.GetCurrentDirectory(), "quests"); JsonWriter.WriteJson(questsToOutputToFile, "output", Directory.GetCurrentDirectory(), "quests");
} }
private static void AddMissingFailRewards(Quest originalQuest, KeyValuePair<string, Quest> quest)
{
quest.Value.rewards.Fail.AddRange(originalQuest.rewards.Fail);
}
private static void CheckAndFixMissingProperties(Quest missingQuest) private static void CheckAndFixMissingProperties(Quest missingQuest)
{ {
if (missingQuest.description is null) if (missingQuest.description is null)

View File

@ -21,11 +21,44 @@ namespace QuestValidator.Common.Models
public string Name { get; set; } public string Name { get; set; }
public string ShortName { get; set; } public string ShortName { get; set; }
public string Description { get; set; } public string Description { get; set; }
public int SpawnChance { get;set;}
public List<string> SpawnFilter { get; set; }
public List<Grid> Grids { get; set; }
public string Rarity { get; set; }
public int ExtraSizeLeft { get; set; }
public int ExtraSizeRight { get; set; }
public int ExtraSizeUp { get; set; }
public int ExtraSizeDown { get; set; }
public int Width { get; set; }
public int Height { get; set; }
public int? StackMinRandom { get; set; }
public int? StackMaxRandom { get; set; }
public List<Chamber> Chambers { get; set; } public List<Chamber> Chambers { get; set; }
public List<Slot> Slots { get; set; } public List<Slot> Slots { get; set; }
public string defAmmo { get; set; } public string defAmmo { get; set; }
} }
public class Grid
{
public GridProps _props { get; set; }
}
public class GridProps
{
public int cellsH { get; set; }
public int cellsV { get; set; }
public int minCount{ get; set; }
public int maxCount { get; set; }
public List<GridFilter> filters {get;set;}
}
public class GridFilter
{
}
public class Chamber public class Chamber
{ {
public string _name { get; set; } public string _name { get; set; }

View File

@ -9,7 +9,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuestValidator.Common", "Qu
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuestValidator.Models", "QuestValidator.Models\QuestValidator.Models.csproj", "{5897813D-96DB-42E2-A436-0CF4472F9C40}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuestValidator.Models", "QuestValidator.Models\QuestValidator.Models.csproj", "{5897813D-96DB-42E2-A436-0CF4472F9C40}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenerateQuestFile", "GenerateQuestFile\GenerateQuestFile.csproj", "{ED2CDA5D-F4BC-4655-808A-F46B722437CD}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenerateQuestFile", "GenerateQuestFile\GenerateQuestFile.csproj", "{ED2CDA5D-F4BC-4655-808A-F46B722437CD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenerateStaticsJson", "GenerateStaticsJson\GenerateStaticsJson.csproj", "{BA79B6DD-990F-41DC-B686-C49D81D1E4D1}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DumpCleaner", "DumpCleaner\DumpCleaner.csproj", "{E3AF6707-2C3B-4C45-A317-86F9DA17A0C4}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DumpCleaner", "DumpCleaner\DumpCleaner.csproj", "{E3AF6707-2C3B-4C45-A317-86F9DA17A0C4}"
EndProject EndProject
@ -35,6 +37,14 @@ Global
{ED2CDA5D-F4BC-4655-808A-F46B722437CD}.Debug|Any CPU.Build.0 = Debug|Any CPU {ED2CDA5D-F4BC-4655-808A-F46B722437CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED2CDA5D-F4BC-4655-808A-F46B722437CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {ED2CDA5D-F4BC-4655-808A-F46B722437CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED2CDA5D-F4BC-4655-808A-F46B722437CD}.Release|Any CPU.Build.0 = Release|Any CPU {ED2CDA5D-F4BC-4655-808A-F46B722437CD}.Release|Any CPU.Build.0 = Release|Any CPU
{BA79B6DD-990F-41DC-B686-C49D81D1E4D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA79B6DD-990F-41DC-B686-C49D81D1E4D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA79B6DD-990F-41DC-B686-C49D81D1E4D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA79B6DD-990F-41DC-B686-C49D81D1E4D1}.Release|Any CPU.Build.0 = Release|Any CPU
{E3AF6707-2C3B-4C45-A317-86F9DA17A0C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3AF6707-2C3B-4C45-A317-86F9DA17A0C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3AF6707-2C3B-4C45-A317-86F9DA17A0C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3AF6707-2C3B-4C45-A317-86F9DA17A0C4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -197,7 +197,7 @@ namespace QuestValidator
CheckValuesMatch(questSuccessRewardItem.items[0]._tpl, relatedLiveRewardItem.items[0]._tpl, "mismatch for template id", questSuccessRewardItem.items[0]._id, true); CheckValuesMatch(questSuccessRewardItem.items[0]._tpl, relatedLiveRewardItem.items[0]._tpl, "mismatch for template id", questSuccessRewardItem.items[0]._id, true);
// Check value values match // Check value values match
CheckValuesMatch(questSuccessRewardItem.value, relatedLiveRewardItem.value, "mismatch for success item reward value", questSuccessRewardItem.id); CheckValuesMatch(questSuccessRewardItem.value.ToString(), relatedLiveRewardItem.value.ToString(), "mismatch for success item reward value", questSuccessRewardItem.id);
// Check item stack count // Check item stack count
if (questSuccessRewardItem.items[0]?.upd != null && relatedLiveRewardItem.items[0]?.upd != null) if (questSuccessRewardItem.items[0]?.upd != null && relatedLiveRewardItem.items[0]?.upd != null)