Sacred 2: Fallen Angel Discussion
I changed line 143 in the previous version of the editor to
if (((BitConverter.ToUInt32(SaveGameData, i) >= 1073741824)//fixed value that always precedes name
&&(BitConverter.ToUInt32(SaveGameData, i) <= 1073760138)) &&(BitConverter.ToUInt32(SaveGameData, i+129) == 536870912)
This worked for the chars that I have.
I have been unsble to recreate the problem with the Combat Arts.
The new editor looks fantastic. I had been hunting around in the .decoded files for a way to edit the stats. Congrats, you are a legend.
I'll quote the error :
System.NullReferenceException: Object reference not set to an instance of an object.
at Sacred2SaveGameEditor.MainWindow.SaveGame(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks in advance.
Edit: Ok jimbouk pointed out the problem i think good luck for the following guys !
[Edited by Funest, 8/30/2009 12:12:22 PM]
jimbouk, thaks for the saves. Those name reading problems are (most probably) caused by having more than 10 skills (16 is the absolute maximum, isn't it?). That's why when searching for the name stating bytes 00 00 00 40 the editor actually finds XX XX 00 40 (XX being varied, since it is some data shifted because of more skills) and can't handle it. But thanks to your saves I have checked that one can determine exactly where the name starts (how many bytes it is from the static value of 00 FF FF AA). Apparently it is exactly (60 + 1 + (no_of_skills * 5) + 133) bytes. And since no_of_skills is coded in the save file 60 bytes after the mentioned static value, determining the name start position is possible and quite easy.
Having said that, I will correct this issue tomorrow or day after it. I'm too lazy to do it now.
Funest, I confirm that errors similar to yours still exist even after the fix. But now I'm sure what to do to fix them good, so the next release will be (hopefully) error free (at least this error free ).
[Edited by MT4K, 8/30/2009 5:09:42 PM]
Also I have surrounded all values written to the save game (Savegame() function) with try-catch blocks. Nonetheless it still acts in a weird way when some values are null. It doesn't crash the editor, and even copies the values to the decoded file, but then instead of encoding it again, the decoder creates some 0 bytes *.decoded.decoded file. My guess is that maybe some streams aren't closed because of the exceptions (even though they are caught). This mater will have to stand some more investigation.
The good news is such situation shouldn't happen now when there is virtually no possibility to screw up reading character's name.
jimbouk, with the new version of the editor I can read your massively overpacked (I bet they are dragon one-hit killers ) chars no problem. I hope you will have no more problems. Same goes to you, Funest.
Here are the links:
Editor: LINK DELETED. Please use the latest, bugfixed version a few posts below.
Source: LINK DELETED. Please use the latest, bugfixed version a few posts below.
PS. I took the liberty of changing program's name to Sacred 2 Character Editor. Having it Save Editor was in my opinion a huge exaggeration, as there are so many other things in the savegame beside those few stats the editor can change.
[Edited by Karach0s, 10/30/2009 5:16:30 AM]
* Updated game trainers and cheats daily
* Get notified when new cheats are added
* Request which games get new trainers
* Priority support with any problem
• Instant Combat Cooldowns
• Invincible Character
+ 7 more options