Coder Social home page Coder Social logo

d-os-save-editor's Introduction

A save editor for Divinity Original Sin: Enhanced Edition

The save editor will only work for the said game version. Do NOT use it for the original D-OS or D-OS 2.

For use and discussions, please head over to: Larian Forum

Latest release: alpha preview


Credit goes to Norbyte and his LSTools.

d-os-save-editor's People

Contributors

anthonyzjiang avatar greavox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d-os-save-editor's Issues

XmlDocument() memory leak

Issue: Memory usage can become hugh (>1G) once a big savegame is loaded. It gets doubled when edits are being saved to savegame. This memory, however, is only released after the application is closed.

Cause: The LSX content loaded using XmlDocument().Load does not get disposed properly after all references to the object are destroyed.

Possible fix: use XmlRead instead of XmlDocument.

null reference exception when non-item node has a parent id of an inventory id

I am not entirely sure the cause, but it seems the 167805358 is an inventory id and is passed to ParseItem to be processed, which then causes null reference exception because it does not have all the properties a standard item has.

 ---> System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
   en D_OS_Save_Editor.LsxParser.ParseItem(XmlNode node)
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   --- Fin del seguimiento de la pila de la excepción interna ---
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   en System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   en System.Threading.Tasks.Task.InnerInvoke()
   en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   en System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
   --- Fin del seguimiento de la pila de la excepción interna ---
   en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   en System.Threading.Tasks.Task.Wait()
   en System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   en System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_0.<ParsePlayer>b__0(Int32 i)
   en System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   en System.Threading.Tasks.Task.InnerInvoke()
   en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   en System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
---> (Nº de excepción interna 0) D_OS_Save_Editor.ItemParserException: Item XML:

<node id="MapValue">
  <attribute id="Parent" value="167805358" type="5" />
  <attribute id="ViewId" value="0" type="27" />
  <children>
    <node id="Items">
      <attribute id="Object" value="67145133" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67145134" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67145135" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67145136" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67143295" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67143039" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67145138" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67143026" type="5" />
    </node>
    <node id="Items">
      <attribute id="Object" value="67143027" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67145133" type="5" />
      <attribute id="MapValue" value="0" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67145134" type="5" />
      <attribute id="MapValue" value="1" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67143026" type="5" />
      <attribute id="MapValue" value="7" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67145135" type="5" />
      <attribute id="MapValue" value="2" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67143027" type="5" />
      <attribute id="MapValue" value="8" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67145136" type="5" />
      <attribute id="MapValue" value="3" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67145138" type="5" />
      <attribute id="MapValue" value="6" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67143295" type="5" />
      <attribute id="MapValue" value="4" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67143039" type="5" />
      <attribute id="MapValue" value="5" type="5" />
    </node>
  </children>
</node>

 ---> System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
   en D_OS_Save_Editor.LsxParser.ParseItem(XmlNode node)
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   --- Fin del seguimiento de la pila de la excepción interna ---
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   en System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   en System.Threading.Tasks.Task.InnerInvoke()
   en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   en System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Nº de excepción interna 1) D_OS_Save_Editor.ItemParserException: Item XML:

<node id="MapValue">
  <attribute id="Parent" value="167805358" type="5" />
  <attribute id="ViewId" value="26" type="27" />
  <children>
    <node id="Items">
      <attribute id="Object" value="67145131" type="5" />
    </node>
    <node id="Indices">
      <attribute id="MapKey" value="67145131" type="5" />
      <attribute id="MapValue" value="0" type="5" />
    </node>
  </children>
</node>

 ---> System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
   en D_OS_Save_Editor.LsxParser.ParseItem(XmlNode node)
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   --- Fin del seguimiento de la pila de la excepción interna ---
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   en System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   en System.Threading.Tasks.Task.InnerInvoke()
   en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   en System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Nº de excepción interna 2) D_OS_Save_Editor.ItemParserException: Item XML:

<node id="MapValue">
  <attribute id="Parent" value="167805358" type="5" />
  <attribute id="ViewId" value="19" type="27" />
</node>

 ---> System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
   en D_OS_Save_Editor.LsxParser.ParseItem(XmlNode node)
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   --- Fin del seguimiento de la pila de la excepción interna ---
   en D_OS_Save_Editor.LsxParser.<>c__DisplayClass2_1.<ParsePlayer>b__1(Int32 j)
   en System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   en System.Threading.Tasks.Task.InnerInvoke()
   en System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   en System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---
<---


v1.5.4

Feature Request: add inventory items

Is there any way to actually add an item to the inventory instead of simply modifying existing items?

If not, such an addition would be much appreciated.

A "fail to save" exception with an unusually short message

Failed to save changes.

System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
   bij D_OS_Save_Editor.SaveEditor.<SaveButton_OnClick>d__13.MoveNext()

v1.5.4

As were reported by one of the user through the bug report button.

Hexadecimal value 0x00, is an invalid character.

Hi!
Hope you can help me out. I know you are not working on this anymore but I'm desperate to fix my save. If you can just point me in the right direction I can try to fix this if you're not up to working on this anymore.
Looks like the save file structure has changed and can't be parsed correctly anymore.
Getting this error on a Steam version DoS EE 2.0.119.430
I'm a beginner programmer so if you could just tell me what language you are using for this I will try to fix it.
Thank you very much in advance and I hope you can still reply.

`Internal error!

System.ArgumentException: '.', hexadecimal value 0x00, is an invalid character.
at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
at System.Xml.XmlUtf8RawTextWriter.WriteAttributeTextBlock(Char* pSrc, Char* pSrcEnd)
at System.Xml.XmlUtf8RawTextWriter.WriteString(String text)
at System.Xml.XmlUtf8RawTextWriterIndent.WriteString(String text)
at System.Xml.XmlWellFormedWriter.WriteString(String text)
at LSLib.LS.LSXWriter.WriteNode(Node node)
at LSLib.LS.LSXWriter.WriteNode(Node node)
at LSLib.LS.LSXWriter.WriteNode(Node node)
at LSLib.LS.LSXWriter.WriteNode(Node node)
at LSLib.LS.LSXWriter.WriteNode(Node node)
at LSLib.LS.LSXWriter.WriteNode(Node node)
at LSLib.LS.LSXWriter.WriteNode(Node node)
at LSLib.LS.LSXWriter.WriteRegions(Resource rsrc)
at LSLib.LS.LSXWriter.Write(Resource rsrc)
at LSLib.LS.ResourceUtils.SaveResource(Resource resource, String outputPath, ResourceFormat format, FileVersion version)
at D_OS_Save_Editor.Savegame.d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at D_OS_Save_Editor.MainWindow.d__14.MoveNext()

v1.6.0`

Lone Wolf Bug

If both your main characters get lone wolf and then you take it off one or both, you no longer gain the perks from it but also can't gain companions.

Error 117

Getting a error of 'Error 117' while trying to load (in-game) the edited save.

Tried all combinations while editing stats, with various increments. Even just changing one attribute value by 1 point gives that error.

Feature Request: Change "Save" to "Save & Close"

This will help make it clearer that you shouldn't hit Save after your initial change, but rather should make all changes first and only when you're done actually Save & Close... ;)

It would also be nice to see more info (tooltips?) explaining what the "Apply changes" button (in the Inventory tab) does, if it's different from the main "Apply" button.

More generation boosts?!!

Received some report of new generation boosts. It surprises me as I thought I had completed the list by extracting all boosts from DeltaModifier.txt.

I'm a bit weary to add these new boosts before I can confirm they actually work.

These new boosts were reported in two separate submissions:

Armor__AMER_Helmet_Boost_Charisma_Mod
Ring_AMER_Boost_VitalityBoost_Mod
Armor__AMER_Helmet_Boost_APStart_Mod_Small

SmallAirResist_WeaponBoost
SmallPoisonResist_WeaponBoost
Amulet_AMER_Boost_VitalityBoost_Mod
AirResistance_WandBoost
MassVampiric_WeaponBoost
Weapon_Damage_ModKnife_13
NullResistProc_WeaponBoost
Weapon_Damage_ModKnife_18
Weapon_Small_PoisonDamage_ModKnife
Weapon_AMER_Crossbow_Normal_Sight_Mod
Bardic_WeaponBoost
Ring_AMER_Boost_VitalityBoost_Mod
SmallEarthResist_WeaponBoost
SmallFireResist_WeaponBoost
Weapon_Wand_Small_Crit_Mod
SmallInitiative_WeaponBoost
Armor__AMER_Gloves_Boost_HitChance_Mod_Normal
Weapon_Wand_Crit_Huge_WeaponBoost
SelfAvatarPoisoning_WeaponBoost
Armor__AMER_Helmet_Boost_HitChance_Mod_Normal
Armor__AMER_Breast_Boost_APMaximum_Mod_Normal

Possible port?

Would it be possible to port this project to either .NET Core or Mono for us Linux/Mac players? I honestly have no idea if it'd be feasible but I thought I'd ask. I'd try to port it myself but I'm unable to open the source in monodevelop under linux...

Learning Skills

I haven't seen anybody else address this issue yet so I'll be the first I guess. If you modify the skill level (like Pyrokinetic 1 changed to Pyrokinetic 5) the game recognizes that the level has been changed and does not allow for a skillbook to be learned that is outside of the base game parameters. However, if the level is modified the game recognizes the modified level as an "earned" level (so you can change level to learn skillbooks requiring a higher level.) This means that if you are level 1, and would like to learn Meteor Shower, the character level is not a problem but the Pyrokinetic skill level is a problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.