From b482b0576d1633df2ce093555cb150c71b483b6f Mon Sep 17 00:00:00 2001 From: li223 Date: Tue, 7 Jan 2025 21:04:15 +0000 Subject: [PATCH] Internal code improvements and new readme --- PermitSaveEditor/Data/MainWindowFunctions.cs | 10 +- PermitSaveEditor/MainWindow.xaml.cs | 2 + PermitSaveEditor/Objects/Color.cs | 6 +- PermitSaveEditor/Objects/GameSaveData.cs | 6 +- PermitSaveEditor/Objects/IGotLazy.cs | 416 ++++++++++++------ PermitSaveEditor/Objects/QuestProgressList.cs | 6 +- .../{RoomEditorDatum.cs => RoomEditorData.cs} | 2 +- README.md | 10 +- 8 files changed, 303 insertions(+), 155 deletions(-) rename PermitSaveEditor/Objects/{RoomEditorDatum.cs => RoomEditorData.cs} (92%) diff --git a/PermitSaveEditor/Data/MainWindowFunctions.cs b/PermitSaveEditor/Data/MainWindowFunctions.cs index 15b5750..a449899 100644 --- a/PermitSaveEditor/Data/MainWindowFunctions.cs +++ b/PermitSaveEditor/Data/MainWindowFunctions.cs @@ -1,10 +1,8 @@ -using System.Linq; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using Newtonsoft.Json; +using Newtonsoft.Json; using PermitSaveEditor.Data; using PermitSaveEditor.Objects; +using System.Linq; +using System.Windows; using Color = System.Windows.Media.Color; namespace PermitSaveEditor; @@ -97,5 +95,5 @@ public void HandleInputVisibility() HealAll.IsEnabled = !DataManager.AllEnabled(_loadedSave!.NpcHealthDataList.Select(x => !x.IsSick)); } - public bool IsValid(string str, int min, int max) => int.TryParse(str, out int i) && i >= min && i <= max; + private bool IsValid(string str, int min, int max) => int.TryParse(str, out int i) && i >= min && i <= max; } \ No newline at end of file diff --git a/PermitSaveEditor/MainWindow.xaml.cs b/PermitSaveEditor/MainWindow.xaml.cs index 665c3aa..d49d815 100644 --- a/PermitSaveEditor/MainWindow.xaml.cs +++ b/PermitSaveEditor/MainWindow.xaml.cs @@ -61,6 +61,8 @@ private async void LoadFileBtn_Click(object sender, RoutedEventArgs e) } catch (Exception ex) { + File.AppendAllText("log.txt", $"Error on file load: {ex.Message}"); + LoadedFileText.Text = "File Name"; MessageBox.Show("Failed to load save file, data may be corrupted.", "Error", MessageBoxButton.OK); } diff --git a/PermitSaveEditor/Objects/Color.cs b/PermitSaveEditor/Objects/Color.cs index fade8ec..0975351 100644 --- a/PermitSaveEditor/Objects/Color.cs +++ b/PermitSaveEditor/Objects/Color.cs @@ -24,6 +24,9 @@ public Color(string r, string g, string b, string a) A = double.Parse(a); } + [JsonProperty("a")] + public double A { get; set; } + [JsonProperty("r")] public double R { get; set; } @@ -33,9 +36,6 @@ public Color(string r, string g, string b, string a) [JsonProperty("b")] public double B { get; set; } - [JsonProperty("a")] - public double A { get; set; } - public (byte A, byte R, byte G, byte B) ToArgb() { return ((byte)(A * 255.0), (byte)(R * 255.0), (byte)(G * 255.0), (byte)(B * 255.0)); diff --git a/PermitSaveEditor/Objects/GameSaveData.cs b/PermitSaveEditor/Objects/GameSaveData.cs index a123a99..3f9fedc 100644 --- a/PermitSaveEditor/Objects/GameSaveData.cs +++ b/PermitSaveEditor/Objects/GameSaveData.cs @@ -136,10 +136,10 @@ public GameSaveData() public List NewDiseaseDataList { get; set; } [JsonProperty("newQuestDataList")] - public NewQuestDataList[] NewQuestDataList { get; set; } + public string[] NewQuestDataList { get; set; } [JsonProperty("eventStateData")] - public List EventStateData { get; set; } + public List EventStateData { get; set; } [JsonProperty("activeQuestList")] public List ActiveQuestList { get; set; } @@ -163,7 +163,7 @@ public GameSaveData() public List NpcHealthDataList { get; set; } [JsonProperty("roomEditorData")] - public List RoomEditorData { get; set; } + public List RoomEditorData { get; set; } [JsonProperty("diseaseDay")] public int DiseaseDay { get; set; } diff --git a/PermitSaveEditor/Objects/IGotLazy.cs b/PermitSaveEditor/Objects/IGotLazy.cs index 815926c..c36a4d7 100644 --- a/PermitSaveEditor/Objects/IGotLazy.cs +++ b/PermitSaveEditor/Objects/IGotLazy.cs @@ -5,312 +5,428 @@ namespace PermitSaveEditor.Objects; public class AssignQuestIDStacking { - [JsonProperty("npcID")] public string NpcID { get; set; } + [JsonProperty("npcID")] + public string NpcID { get; set; } - [JsonProperty("questID")] public string QuestID { get; set; } + [JsonProperty("questID")] + public string QuestID { get; set; } } public class CampBedList { - [JsonProperty("campBedObject")] public CampBedObject CampBedObject { get; set; } + [JsonProperty("campBedObject")] + public CampBedObject CampBedObject { get; set; } - [JsonProperty("sickNPC")] public int SickNPC { get; set; } + [JsonProperty("sickNPC")] + public int SickNPC { get; set; } } public class CampBedObject { - [JsonProperty("m_FileID")] public int MFileID { get; set; } + [JsonProperty("m_FileID")] + public int MFileID { get; set; } - [JsonProperty("m_PathID")] public int MPathID { get; set; } + [JsonProperty("m_PathID")] + public int MPathID { get; set; } } public class CapsuleDict { - [JsonProperty("reorderableList")] public ReorderableList ReorderableList { get; set; } + [JsonProperty("reorderableList")] + public ReorderableList ReorderableList { get; set; } - [JsonProperty("reqReferences")] public ReqReferences ReqReferences { get; set; } + [JsonProperty("reqReferences")] + public ReqReferences ReqReferences { get; set; } - [JsonProperty("isExpanded")] public bool IsExpanded { get; set; } + [JsonProperty("isExpanded")] + public bool IsExpanded { get; set; } - [JsonProperty("_keyValues")] public List KeyValues { get; set; } + [JsonProperty("_keyValues")] + public List KeyValues { get; set; } - [JsonProperty("_keys")] public List Keys { get; set; } + [JsonProperty("_keys")] + public List Keys { get; set; } - [JsonProperty("_values")] public List Values { get; set; } + [JsonProperty("_values")] + public List Values { get; set; } } public class DeliveryItemList { - [JsonProperty("itemID")] public string ItemID { get; set; } + [JsonProperty("itemID")] + public string ItemID { get; set; } - [JsonProperty("count")] public int Count { get; set; } + [JsonProperty("count")] + public int Count { get; set; } } public class DiseasePatternList { - [JsonProperty("upgradeLevel")] public int UpgradeLevel { get; set; } + [JsonProperty("upgradeLevel")] + public int UpgradeLevel { get; set; } - [JsonProperty("pattern")] public List Pattern { get; set; } + [JsonProperty("pattern")] + public List Pattern { get; set; } } public class EnemySlainData { - [JsonProperty("monsterID")] public int MonsterID { get; set; } + [JsonProperty("monsterID")] + public int MonsterID { get; set; } - [JsonProperty("qty")] public int Qty { get; set; } + [JsonProperty("qty")] + public int Qty { get; set; } } -public class EventStateDatum +public class EventStateData { - [JsonProperty("eventID")] public string EventID { get; set; } + [JsonProperty("eventID")] + public string EventID { get; set; } - [JsonProperty("eventState")] public string EventState { get; set; } + [JsonProperty("eventState")] + public string EventState { get; set; } - [JsonProperty("eventDelay")] public int EventDelay { get; set; } + [JsonProperty("eventDelay")] + public int EventDelay { get; set; } } public class FastTravelState { - [JsonProperty("reorderableList")] public ReorderableList ReorderableList { get; set; } + [JsonProperty("reorderableList")] + public ReorderableList ReorderableList { get; set; } - [JsonProperty("reqReferences")] public ReqReferences ReqReferences { get; set; } + [JsonProperty("reqReferences")] + public ReqReferences ReqReferences { get; set; } - [JsonProperty("isExpanded")] public bool IsExpanded { get; set; } + [JsonProperty("isExpanded")] + public bool IsExpanded { get; set; } - [JsonProperty("_keyValues")] public List KeyValues { get; set; } + [JsonProperty("_keyValues")] + public List KeyValues { get; set; } - [JsonProperty("_keys")] public List Keys { get; set; } + [JsonProperty("_keys")] + public List Keys { get; set; } - [JsonProperty("_values")] public List Values { get; set; } + [JsonProperty("_values")] + public List Values { get; set; } } public class FishExpDict { - [JsonProperty("reorderableList")] public ReorderableList ReorderableList { get; set; } + [JsonProperty("reorderableList")] + public ReorderableList ReorderableList { get; set; } - [JsonProperty("reqReferences")] public ReqReferences ReqReferences { get; set; } + [JsonProperty("reqReferences")] + public ReqReferences ReqReferences { get; set; } - [JsonProperty("isExpanded")] public bool IsExpanded { get; set; } + [JsonProperty("isExpanded")] + public bool IsExpanded { get; set; } - [JsonProperty("_keyValues")] public List KeyValues { get; set; } + [JsonProperty("_keyValues")] + public List KeyValues { get; set; } - [JsonProperty("_keys")] public List Keys { get; set; } + [JsonProperty("_keys")] + public List Keys { get; set; } - [JsonProperty("_values")] public List Values { get; set; } + [JsonProperty("_values")] + public List Values { get; set; } } public class FishRecordList { - [JsonProperty("FISH_ID")] public int FISHID { get; set; } + [JsonProperty("FISH_ID")] + public int FishID { get; set; } - [JsonProperty("TOTAL")] public int TOTAL { get; set; } + [JsonProperty("TOTAL")] + public int Total { get; set; } - [JsonProperty("BEST_LBS")] public double BESTLBS { get; set; } + [JsonProperty("BEST_LBS")] + public double BestWeight_Pounds { get; set; } } public class ItemLockState { - [JsonProperty("reorderableList")] public ReorderableList ReorderableList { get; set; } + [JsonProperty("reorderableList")] + public ReorderableList ReorderableList { get; set; } - [JsonProperty("reqReferences")] public ReqReferences ReqReferences { get; set; } + [JsonProperty("reqReferences")] + public ReqReferences ReqReferences { get; set; } - [JsonProperty("isExpanded")] public bool IsExpanded { get; set; } + [JsonProperty("isExpanded")] + public bool IsExpanded { get; set; } - [JsonProperty("_keyValues")] public List KeyValues { get; set; } + [JsonProperty("_keyValues")] + public List KeyValues { get; set; } - [JsonProperty("_keys")] public List Keys { get; set; } + [JsonProperty("_keys")] + public List Keys { get; set; } - [JsonProperty("_values")] public List Values { get; set; } + [JsonProperty("_values")] + public List Values { get; set; } } public class Items { - [JsonProperty("reorderableList")] public ReorderableList ReorderableList { get; set; } + [JsonProperty("reorderableList")] + public ReorderableList ReorderableList { get; set; } - [JsonProperty("reqReferences")] public ReqReferences ReqReferences { get; set; } + [JsonProperty("reqReferences")] + public ReqReferences ReqReferences { get; set; } - [JsonProperty("isExpanded")] public bool IsExpanded { get; set; } + [JsonProperty("isExpanded")] + public bool IsExpanded { get; set; } - [JsonProperty("_keyValues")] public List KeyValues { get; set; } + [JsonProperty("_keyValues")] + public List KeyValues { get; set; } - [JsonProperty("_keys")] public List Keys { get; set; } + [JsonProperty("_keys")] + public List Keys { get; set; } - [JsonProperty("_values")] public List Values { get; set; } + [JsonProperty("_values")] + public List Values { get; set; } } public class KeyValue { - [JsonProperty("m_FileID")] public int MFileID { get; set; } + [JsonProperty("m_FileID")] + public int MFileID { get; set; } - [JsonProperty("m_PathID")] public int MPathID { get; set; } + [JsonProperty("m_PathID")] + public int MPathID { get; set; } } public class MapResourceState { - [JsonProperty("reorderableList")] public ReorderableList ReorderableList { get; set; } + [JsonProperty("reorderableList")] + public ReorderableList ReorderableList { get; set; } - [JsonProperty("reqReferences")] public ReqReferences ReqReferences { get; set; } + [JsonProperty("reqReferences")] + public ReqReferences ReqReferences { get; set; } - [JsonProperty("isExpanded")] public bool IsExpanded { get; set; } + [JsonProperty("isExpanded")] + public bool IsExpanded { get; set; } - [JsonProperty("_keyValues")] public List KeyValues { get; set; } + [JsonProperty("_keyValues")] + public List KeyValues { get; set; } - [JsonProperty("_keys")] public List Keys { get; set; } + [JsonProperty("_keys")] + public List Keys { get; set; } - [JsonProperty("_values")] public List Values { get; set; } + [JsonProperty("_values")] + public List Values { get; set; } } public class NpcFPDataList { - [JsonProperty("npcID")] public string NpcID { get; set; } + [JsonProperty("npcID")] + public string NpcID { get; set; } - [JsonProperty("fpPoint")] public int FpPoint { get; set; } + [JsonProperty("fpPoint")] + public int FriendshipPoints { get; set; } - [JsonProperty("fpLevel")] public int FpLevel { get; set; } + [JsonProperty("fpLevel")] + public int FriendshipLevel { get; set; } } public class NpcHealthDataList { - [JsonProperty("npcID")] public string NpcID { get; set; } + [JsonProperty("npcID")] + public string NpcID { get; set; } - [JsonProperty("isSick")] public bool IsSick { get; set; } + [JsonProperty("isSick")] + public bool IsSick { get; set; } - [JsonProperty("isAway")] public bool IsAway { get; set; } + [JsonProperty("isAway")] + public bool IsAway { get; set; } - [JsonProperty("isCure")] public bool IsCure { get; set; } + [JsonProperty("isCure")] + public bool IsCure { get; set; } - [JsonProperty("npcHP")] public int NpcHP { get; set; } + [JsonProperty("npcHP")] + public int NpcHP { get; set; } - [JsonProperty("awayCnt")] public int AwayCnt { get; set; } + [JsonProperty("awayCnt")] + public int AwayCnt { get; set; } - [JsonProperty("cureDelayCnt")] public int CureDelayCnt { get; set; } + [JsonProperty("cureDelayCnt")] + public int CureDelayCnt { get; set; } } public class Pattern { - [JsonProperty("symptomDifficulty")] public List SymptomDifficulty { get; set; } + [JsonProperty("symptomDifficulty")] + public List SymptomDifficulty { get; set; } } public class PlayerInventoryItemDatum { - [JsonProperty("index")] public int Index { get; set; } + [JsonProperty("index")] + public int Index { get; set; } - [JsonProperty("itemIDString")] public string ItemIDString { get; set; } + [JsonProperty("itemIDString")] + public string ItemIDString { get; set; } - [JsonProperty("itemIconName")] public string ItemIconName { get; set; } + [JsonProperty("itemIconName")] + public string ItemIconName { get; set; } - [JsonProperty("itemQty")] public int ItemQty { get; set; } + [JsonProperty("itemQty")] + public int ItemQty { get; set; } - [JsonProperty("itemID")] public int ItemID { get; set; } + [JsonProperty("itemID")] + public int ItemID { get; set; } - [JsonProperty("itemGrade")] public int ItemGrade { get; set; } + [JsonProperty("itemGrade")] + public int ItemGrade { get; set; } - [JsonProperty("itemType")] public int ItemType { get; set; } + [JsonProperty("itemType")] + public int ItemType { get; set; } - [JsonProperty("itemPuzzleShape")] public int ItemPuzzleShape { get; set; } + [JsonProperty("itemPuzzleShape")] + public int ItemPuzzleShape { get; set; } - [JsonProperty("itemElement")] public int ItemElement { get; set; } + [JsonProperty("itemElement")] + public int ItemElement { get; set; } - [JsonProperty("materialType")] public int MaterialType { get; set; } + [JsonProperty("materialType")] + public int MaterialType { get; set; } - [JsonProperty("spawnAreaList")] public List SpawnAreaList { get; set; } + [JsonProperty("spawnAreaList")] + public List SpawnAreaList { get; set; } - [JsonProperty("buyingPrice")] public int BuyingPrice { get; set; } + [JsonProperty("buyingPrice")] + public int BuyingPrice { get; set; } - [JsonProperty("sellingPrice")] public int SellingPrice { get; set; } + [JsonProperty("sellingPrice")] + public int SellingPrice { get; set; } - [JsonProperty("health")] public int Health { get; set; } + [JsonProperty("health")] + public int Health { get; set; } - [JsonProperty("stamina")] public int Stamina { get; set; } + [JsonProperty("stamina")] + public int Stamina { get; set; } } public class PlayerVendingDatum { - [JsonProperty("index")] public int Index { get; set; } + [JsonProperty("index")] + public int Index { get; set; } - [JsonProperty("itemIDString")] public string ItemIDString { get; set; } + [JsonProperty("itemIDString")] + public string ItemIDString { get; set; } - [JsonProperty("itemIconName")] public string ItemIconName { get; set; } + [JsonProperty("itemIconName")] + public string ItemIconName { get; set; } - [JsonProperty("itemQty")] public int ItemQty { get; set; } + [JsonProperty("itemQty")] + public int ItemQty { get; set; } - [JsonProperty("itemID")] public int ItemID { get; set; } + [JsonProperty("itemID")] + public int ItemID { get; set; } - [JsonProperty("itemGrade")] public int ItemGrade { get; set; } + [JsonProperty("itemGrade")] + public int ItemGrade { get; set; } - [JsonProperty("itemType")] public int ItemType { get; set; } + [JsonProperty("itemType")] + public int ItemType { get; set; } - [JsonProperty("itemPuzzleShape")] public int ItemPuzzleShape { get; set; } + [JsonProperty("itemPuzzleShape")] + public int ItemPuzzleShape { get; set; } - [JsonProperty("itemElement")] public int ItemElement { get; set; } + [JsonProperty("itemElement")] + public int ItemElement { get; set; } - [JsonProperty("materialType")] public int MaterialType { get; set; } + [JsonProperty("materialType")] + public int MaterialType { get; set; } - [JsonProperty("spawnAreaList")] public List SpawnAreaList { get; set; } + [JsonProperty("spawnAreaList")] + public List SpawnAreaList { get; set; } - [JsonProperty("buyingPrice")] public int BuyingPrice { get; set; } + [JsonProperty("buyingPrice")] + public int BuyingPrice { get; set; } - [JsonProperty("sellingPrice")] public int SellingPrice { get; set; } + [JsonProperty("sellingPrice")] + public int SellingPrice { get; set; } - [JsonProperty("health")] public int Health { get; set; } + [JsonProperty("health")] + public int Health { get; set; } - [JsonProperty("stamina")] public int Stamina { get; set; } + [JsonProperty("stamina")] + public int Stamina { get; set; } } public class Position { - [JsonProperty("x")] public int X { get; set; } + [JsonProperty("x")] + public int X { get; set; } - [JsonProperty("y")] public int Y { get; set; } + [JsonProperty("y")] + public int Y { get; set; } } public class PotionLockState { - [JsonProperty("reorderableList")] public ReorderableList ReorderableList { get; set; } + [JsonProperty("reorderableList")] + public ReorderableList ReorderableList { get; set; } - [JsonProperty("reqReferences")] public ReqReferences ReqReferences { get; set; } + [JsonProperty("reqReferences")] + public ReqReferences ReqReferences { get; set; } - [JsonProperty("isExpanded")] public bool IsExpanded { get; set; } + [JsonProperty("isExpanded")] + public bool IsExpanded { get; set; } - [JsonProperty("_keyValues")] public List KeyValues { get; set; } + [JsonProperty("_keyValues")] + public List KeyValues { get; set; } - [JsonProperty("_keys")] public List Keys { get; set; } + [JsonProperty("_keys")] + public List Keys { get; set; } - [JsonProperty("_values")] public List Values { get; set; } + [JsonProperty("_values")] + public List Values { get; set; } } public class PotionSaveDatum { - [JsonProperty("craftCount")] public int CraftCount { get; set; } + [JsonProperty("craftCount")] + public int CraftCount { get; set; } - [JsonProperty("potionRecipe_1")] public List PotionRecipe1 { get; set; } + [JsonProperty("potionRecipe_1")] + public List PotionRecipe1 { get; set; } - [JsonProperty("potionRecipe_2")] public List PotionRecipe2 { get; set; } + [JsonProperty("potionRecipe_2")] + public List PotionRecipe2 { get; set; } - [JsonProperty("potionRecipe_3")] public List PotionRecipe3 { get; set; } + [JsonProperty("potionRecipe_3")] + public List PotionRecipe3 { get; set; } - [JsonProperty("potionID")] public int PotionID { get; set; } + [JsonProperty("potionID")] + public int PotionID { get; set; } - [JsonProperty("potionIDStr")] public string PotionIDStr { get; set; } + [JsonProperty("potionIDStr")] + public string PotionIDStr { get; set; } } public class ProgressionObjDataList { - [JsonProperty("progressionID")] public string ProgressionID { get; set; } + [JsonProperty("progressionID")] + public string ProgressionID { get; set; } - [JsonProperty("isActive")] public bool IsActive { get; set; } + [JsonProperty("isActive")] + public bool IsActive { get; set; } } public class QuestCollectReq { - [JsonProperty("TARGET_COLLECT_ITEM")] public List TargetCollectionItem { get; set; } + [JsonProperty("TARGET_COLLECT_ITEM")] + public List TargetCollectionItem { get; set; } } public class QuestDeliveryReq { - [JsonProperty("CURRENT_DELIVERY")] public List CURRENTDELIVERY { get; set; } + [JsonProperty("CURRENT_DELIVERY")] + public List CURRENTDELIVERY { get; set; } - [JsonProperty("TARGET_DELIVERY")] public List TargetDelivery { get; set; } + [JsonProperty("TARGET_DELIVERY")] + public List TargetDelivery { get; set; } } public class QuestEventReq @@ -324,58 +440,80 @@ public class QuestEventReq public class QuestKillReq { - [JsonProperty("CURRENT_KILL_MONSTER")] public List CurrentKillMonster { get; set; } + [JsonProperty("CURRENT_KILL_MONSTER")] + public List CurrentKillMonster { get; set; } - [JsonProperty("TARGET_KILL_MONSTER")] public List TargetKillMonster { get; set; } + [JsonProperty("TARGET_KILL_MONSTER")] + public List TargetKillMonster { get; set; } } public class QuestPosition { - [JsonProperty("x")] public double X { get; set; } + [JsonProperty("x")] + public double X { get; set; } - [JsonProperty("y")] public double Y { get; set; } + [JsonProperty("y")] + public double Y { get; set; } } public class QuestPostCompleteData { - [JsonProperty("completeID")] public string CompleteID { get; set; } + [JsonProperty("completeID")] + public string CompleteID { get; set; } - [JsonProperty("commandUI")] public string CommandUI { get; set; } + [JsonProperty("commandUI")] + public string CommandUI { get; set; } - [JsonProperty("increaseFP")] public bool IncreaseFP { get; set; } + [JsonProperty("increaseFP")] + public bool IncreaseFP { get; set; } - [JsonProperty("getItem")] public bool GetItem { get; set; } + [JsonProperty("getItem")] + public bool GetItem { get; set; } - [JsonProperty("activeEvent")] public bool ActiveEvent { get; set; } + [JsonProperty("activeEvent")] + public bool ActiveEvent { get; set; } - [JsonProperty("activeQuest")] public bool ActiveQuest { get; set; } + [JsonProperty("activeQuest")] + public bool ActiveQuest { get; set; } - [JsonProperty("activeObject")] public bool ActiveObject { get; set; } + [JsonProperty("activeObject")] + public bool ActiveObject { get; set; } - [JsonProperty("playerStat")] public bool PlayerStat { get; set; } + [JsonProperty("playerStat")] + public bool PlayerStat { get; set; } - [JsonProperty("badgeLevelUp")] public bool BadgeLevelUp { get; set; } + [JsonProperty("badgeLevelUp")] + public bool BadgeLevelUp { get; set; } - [JsonProperty("reputationLevelUp")] public bool ReputationLevelUp { get; set; } + [JsonProperty("reputationLevelUp")] + public bool ReputationLevelUp { get; set; } - [JsonProperty("getWood")] public int GetWood { get; set; } + [JsonProperty("getWood")] + public int GetWood { get; set; } - [JsonProperty("getStone")] public int GetStone { get; set; } + [JsonProperty("getStone")] + public int GetStone { get; set; } - [JsonProperty("repeatEvent")] public bool RepeatEvent { get; set; } + [JsonProperty("repeatEvent")] + public bool RepeatEvent { get; set; } - [JsonProperty("cameraFieldConfiner")] public int CameraFieldConfiner { get; set; } + [JsonProperty("cameraFieldConfiner")] + public int CameraFieldConfiner { get; set; } - [JsonProperty("goldReward")] public int GoldReward { get; set; } + [JsonProperty("goldReward")] + public int GoldReward { get; set; } - [JsonProperty("chainEventDetail")] public int ChainEventDetail { get; set; } + [JsonProperty("chainEventDetail")] + public int ChainEventDetail { get; set; } - [JsonProperty("questEventDetail")] public int QuestEventDetail { get; set; } + [JsonProperty("questEventDetail")] + public int QuestEventDetail { get; set; } [JsonProperty("FriendshipPointStackings")] public List FriendshipPointStackings { get; set; } - [JsonProperty("ItemDetailList")] public List ItemDetailList { get; set; } + [JsonProperty("ItemDetailList")] + public List ItemDetailList { get; set; } [JsonProperty("ActiveQuestIDStackings")] public List ActiveQuestIDStackings { get; set; } diff --git a/PermitSaveEditor/Objects/QuestProgressList.cs b/PermitSaveEditor/Objects/QuestProgressList.cs index 984cd49..d15dec4 100644 --- a/PermitSaveEditor/Objects/QuestProgressList.cs +++ b/PermitSaveEditor/Objects/QuestProgressList.cs @@ -4,7 +4,9 @@ namespace PermitSaveEditor.Objects; public class QuestProgressList { - [JsonProperty("questID")] public string QuestID { get; set; } + [JsonProperty("questID")] + public string QuestID { get; set; } - [JsonProperty("questState")] public string QuestState { get; set; } + [JsonProperty("questState")] + public string QuestState { get; set; } } \ No newline at end of file diff --git a/PermitSaveEditor/Objects/RoomEditorDatum.cs b/PermitSaveEditor/Objects/RoomEditorData.cs similarity index 92% rename from PermitSaveEditor/Objects/RoomEditorDatum.cs rename to PermitSaveEditor/Objects/RoomEditorData.cs index f3d5fbb..f25e30d 100644 --- a/PermitSaveEditor/Objects/RoomEditorDatum.cs +++ b/PermitSaveEditor/Objects/RoomEditorData.cs @@ -2,7 +2,7 @@ namespace PermitSaveEditor.Objects; -public class RoomEditorDatum +public class RoomEditorData { [JsonProperty("roomObjectStr")] public string RoomObjectStr { get; set; } diff --git a/README.md b/README.md index b91fa17..d2443c5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # PermitSaveEditor -A simple save editor for Potion Permit. Inspired by me not wanting to constantly re-edit the code everytime there's an update. +A simple save editor for Potion Permit. Inspired by me not wanting to constantly re-edit the code everytime there's an update. Might come up with a catchier name. + +# Saves File Location +The save files are located in `/Users/USER/AppData/LocalLow/MasshiveMedia/Potion Permit` and should be numbered according to the file slot. Highly recommend making a backup copy of this file in case something goes wrong. + +# XYZ doesn't work +If something doesn't work, open an issue and I might have a look. It's been a long time since I played this game so a lot will be missing or have changed. Feel free to add to it if I don't. + +Also due to how the game functions, some level stuff might be locked behind a quest meaning that chaning the level in the save won't do anything functionally. \ No newline at end of file