diff --git a/KoAR.Core/Amalur.cs b/KoAR.Core/Amalur.cs index 9ba6e41a..43690159 100644 --- a/KoAR.Core/Amalur.cs +++ b/KoAR.Core/Amalur.cs @@ -57,7 +57,14 @@ internal static TValue GetOrDefault(this IReadOnlyDictionary MemoryUtilities.Read(Bytes, 8 + _header.Bytes.Length); - set => MemoryUtilities.Write(Bytes, 8 + _header.Bytes.Length, value); + get => IsRemaster ? MemoryUtilities.Read(Bytes, 8 + _header.Bytes.Length) : Bytes.Length - BodyStart; + set + { + if (IsRemaster) + { + MemoryUtilities.Write(Bytes, 8 + _header.Bytes.Length, value); + } + } } public List Items { get; } = new List(); diff --git a/README.md b/README.md index 231989b3..bdd08567 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,47 @@ ## Kingdoms of Amalur: Reckoning Save Editor This is heavily updated editor, rewritten in WPF and modern C#8 paradigms. A product of covid-19 quarantine and my frustrations with this game. -#### New Features -* Reliable updating of inventory size - - The table that stores the inventory size in the save file rearranges itself every time the game was saved. - - the old editor assumed a fix offset, so it would only work some times. -* Toggle the sellable flag of items - - Quest items can get stuck in your inventory, this let's you simply turn that flag off for stuck quest items. - - Can be done on ALL inventory items. -* Better display of items, categorizing them by their equipment type as well as visualizing their core effects. - - All weapon category are detected and show the appropriate icon. - - Armor types are currently not detected so it's all bucketed as armor. - - Kite Shields are easy to detect, but buckler & talisman currently don't always find rhyme or reason. So many talismans may be categorized as bucklers. - - There are **many** of Core effects, and only so many you can get from crafting. - - What's worse is there are half tier effects that when you salvage will go up a tier (e.g. Poison 3.5 will salvage to Master Infected Hilt.) Most are not easy to find. - Nearly every unique has a different effect code. Possibly more than one. -* [Adding and removing of Core Effects](https://github.com/mburbea/koar-item-editor/issues/1) - - Core effects are effects added by usually the second component in a crafted items, or being mastercrafted. - - They confer a visual effect (like the hilt being on fire or the lightning on `Lightning Cage`), as well as a damage effect. - - Adding a code from a unique weapon usually will turn your weapon unique. - - Inexplicably, the item card display effect can actually be different than the applied effect. So your sword can say it deals frost damage but will be on fire and light enemies aflame. The editor currently couples the two together (like the game does). - - You can use right click to copy a listed core effect. -* [Change the Item's TypeId](https://github.com/mburbea/koar-item-editor/issues/6) - - The typeId defines the equipment model it uses and also changes the item's description in game. - - It also defines stats (I believe) There is a struct that follows after the typeId, but modifying it doesn't seem to do anything. - - If your holding the item, it probably will not update the base stats of the item. -* Add a quick way to diversify items - - This operation will change the durability of all unknown equipment. - - You can use this to find an item in the editor. (e.g. 54/82 might become `Lightning Cage`,53/82 might become `Gentleman's Favor`). - -#### Retained Features: -* List items. -* Change Item current and max durability. -* Change an item's name (if it has a name). -* View, add and remove an item's support effects. (For crafted gear this would come come from something like rivets). -* Filter based on Name and durability. - -### Todo: -- [ ] Figure out what's currently equipped. -- [ ] Find a way to determine an armor type. -- [ ] Come up with a listing of TypeIds. Quite a big ordeal as they are more than 500 different items types in the game. -- [ ] Possibly add support for rings & amulets - -#### Thanks -- My brother for his massive assistance in creating the wpf gui. -- [This steam guide which listed the struct of the support component segment](https://steamcommunity.com/sharedfiles/filedetails/?id=1072394368) +### Versioning Strategy +* Version 3.x will be for the Remaster. +* Version 2.x will be for the Original. + - The current final release is the following: https://github.com/mburbea/koar-item-editor/releases/tag/v2.1.189 +* The auto-updater will now only look for updates of the same major version. (e.g. 2.x will find new 2.x releases, and 3.x will find new 3.x releases). +* There is no plan for removing support for the original in 3.x branches, but I'm no longer testing my changes against the original. +* Data definitions are based off the **original** game. Not the remaster. This means that descriptions and localizations may be wrong. Item definitions can also be incorrectly defined. One such example is the longbow The Hunter which now applies both it's buffs as Item buff and not Player buffs. + +### Currently Not Supported / Issues +* Modifying buffs on an equipped item can lead to corruption. Do not modify any of them. (There's no indicator yet as to which items are equipped). +* The remaster now will switch to a compressed format when the save game data exceeds 4 megabytes. This feature is NOT supported. +* Removing stashed items that have gems can corrupt your stash, don't do it! +* Modifying the auto-save, tutorial save, quick save or the end of game save are NOT supported (and may never be). These 4 saves are slightly different formats and if any of these files are corrupted the game can get stuck in an infinite loop. Even deleting the files will still cause an infinite loop. + +### Features +* The inventory view displays and allows modifying items currently in your inventory. It is broken up into equipment categories, and allows user sorting by different columns. + - Level, which is a hidden stat that controls level and stat requirements for an item and the damage amount for weapons + - Gems socketed in the item. (Immutable) + - The name + - The current durability + - The max durability + - View current item prefix/suffix. (Immutable) + - Flags for state: (can be applied to all items) Stolen, Stashable, and Sellability. + - Adjusting an items player and item buff list. Player buffs apply their benefits to the player, Item buffs apply their benefit strictly to the item. (Note: some buffs can only be applied as item buffs), the item buff list is filtered to those that are marked as "On Object" buffs. There is a copy button, so you can copy buff ids into your clipboard. Item buffs will restrict adding or removing buffs if there is unsupported "instance id" in the list. + - The change definition button allows you to change an item of a category into another of the same category. (e.g. you can turn your Rusty iron Longsword into Flameblade). You can also double click in the empty space on a row to bring up this dialog. +* Modify the size of your inventory. +* Quest item management + - This window will list all the quest items in your inventory and let you mark them as sellable. Note that selling currently active quest items can cause quests to break. +* The stash view + - The stash view becomes available for save files that have discovered the stash, and are not in the same room as the stash. + - The stash lists all known properties of stashed items, simmilar to the inventory view, but does not support modifying the item. + - Equipment items can be removed and added directly to the stash. + - The stash size CANNOT be modified, however you can add items past the in game limits. (155 in original, 300 in remaster). + #### HISTORY Fork of a really obscure Chinese item editor developed by RenYue for the game [Kingdoms of Amalur: Reckoning on PC](https://store.steampowered.com/agecheck/app/102500/) and subsequently translated by [Raziel23x](https://github.com/raziel23x) to English. Appeared on the [CheatHappens forum](https://www.cheathappens.com/show_board2.asp?headID=111841&titleID=17461). +#### Thanks +- My brother for his massive assistance in this project. + #### CREDITS AND LICENSE Credits maintained below but I cannot find a license so taking over this for non-commercial purposes and adding the permissive MIT license.