Jump to content

A16 - 7DaysProfileEditor


Karlovsky120

Recommended Posts

  • 2 weeks later...

Well your Editor doesn't work with SMX UI Mod. Was able to get it to open without an error on a unmodded backup I have for the game. However, when I click to open a file in the Editor, there is no option for my character stuff. It just has all the normal folders for the game but my characters info is all saved in %appdata%.

 

I tried moving the "Save" fold into the normal 7 Days to Die folder just to see if the Editor would even work from there and it gave me another error. Probably something to do with the SMX mod but either way, a little help would be appreciated. I really don't want to try and understand all the Hex and edit my character that way lol.

Link to comment
Share on other sites

It's a simple open file dialog. You can reach any folder on your computer from it. You have the address bar on the top.

 

SMX UI Mod is pure UI mod, none of the files it modifies are ones the Editor accesses. I doubt it modifies the save file either. Meaning no error should occur.

 

If you get an error, I'll need to know what it says exactly.

Link to comment
Share on other sites

These are the two messages I get while trying to link the .exe file and open the character file.

 

Unhandled exception has occurred in a component in your application.

If you click Continue, the application will ignore this error and attempt to continue.

 

Object reference not set to an instance of an object.

 

 

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

 

************** Exception Text **************

System.NullReferenceException: Object reference not set to an instance of an object.

at SevenDaysProfileEditor.Xml.initialize(String gameRoot)

at SevenDaysProfileEditor.Program.<>c__DisplayClass0_1.<Main>b__0(Object sender1, CancelEventArgs e1)

at System.Windows.Forms.FileDialog.OnFileOk(CancelEventArgs e)

at System.Windows.Forms.FileDialog.HandleVistaFileOk(IFileDialog dialog)

 

 

************** Loaded Assemblies **************

mscorlib

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1076.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

----------------------------------------

7DaysProfileEditor

Assembly Version: 0.14.3.0

Win32 Version: 0.14.3.0

CodeBase: file:///C:/Users/Selig/Desktop/7%20Days%20to%20Die%20Player%20Editor/7DaysProfileEditor.exe

----------------------------------------

System.Windows.Forms

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Drawing

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System.Configuration

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

----------------------------------------

System.Core

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

----------------------------------------

System.Xml

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1067.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

 

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

 

For example:

 

<configuration>

<system.windows.forms jitDebugging="true" />

</configuration>

 

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

 

 

 

 

After clicking continue and closing the search window, the program opens and displays "Ready" at the bottom.

 

I find the Save fold and my character file, click open, and then get the same message as before except it says "Index was outside the bounds of the array".

 

With the details saying:

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

 

************** Exception Text **************

System.IndexOutOfRangeException: Index was outside the bounds of the array.

at SevenDaysSaveManipulator.GameData.ItemValue.Read(BinaryReader reader)

at SevenDaysSaveManipulator.GameData.ItemValue.Read(BinaryReader reader)

at SevenDaysSaveManipulator.GameData.ItemStack.Read(BinaryReader reader)

at SevenDaysSaveManipulator.GameData.ItemStack.ReadItemStack(BinaryReader reader)

at SevenDaysSaveManipulator.GameData.PlayerDataFile.Read(String path)

at SevenDaysSaveManipulator.GameData.PlayerDataFile..ctor(String path)

at SevenDaysProfileEditor.GUI.TabPlayer..ctor(String path)

at SevenDaysProfileEditor.GUI.MainMenuStrip.<>c__DisplayClass12_0.<openClick>b__0(Object sender1, CancelEventArgs e1)

at System.Windows.Forms.FileDialog.OnFileOk(CancelEventArgs e)

at System.Windows.Forms.FileDialog.HandleVistaFileOk(IFileDialog dialog)

 

 

************** Loaded Assemblies **************

mscorlib

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1076.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

----------------------------------------

7DaysProfileEditor

Assembly Version: 0.14.3.0

Win32 Version: 0.14.3.0

CodeBase: file:///C:/Users/Selig/Desktop/7%20Days%20to%20Die%20Player%20Editor/7DaysProfileEditor.exe

----------------------------------------

System.Windows.Forms

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Drawing

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System.Configuration

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

----------------------------------------

System.Core

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1055.0 built by: NETFXREL2

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

----------------------------------------

System.Xml

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1067.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

7DaysSaveManipulator

Assembly Version: 1.0.0.0

Win32 Version: 1.0.0.0

CodeBase: file:///C:/Users/Selig/Desktop/7%20Days%20to%20Die%20Player%20Editor/7DaysSaveManipulator.DLL

----------------------------------------

 

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

 

For example:

 

<configuration>

<system.windows.forms jitDebugging="true" />

</configuration>

 

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

 

 

 

I click continue, close the window that was opened for me to find the file and the bottom of the program now says "Opening..."

 

Unless it takes about 10 minutes to open, then I assume it's an error of some kind. I left it "opening" for a good 5 minutes or more while I stepped away and came back to the same white screen with the program saying "opening" at the bottom.

Link to comment
Share on other sites

  • 4 months later...

Hello! Please excuse my newbness, but how do I install this? I went to the link, and found the files, and downloaded it, but there is no install routine, nowhere to pay to get one, no readme file to explain. Can you help me? Thanks! :D

Link to comment
Share on other sites

Many thanks Karlovsky. I lost my game profile due to an electricity outage last night. I was on day 32, and had just gotten myself a fine minibike and was about halfway through building a huge zombie trap. I couldn't believe it when the game dropped me into nowhere with nothing at level 1. :( You have made my day. :D

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I'm having some issues attempting to get this to work.

 

1. I have both the .exe and .dll files in the same folder, as instructed.

2. Launched .exe, then navigated to the 7daystodie game root folder

3. Tool opens, I navigate to my MP save file in my appdata folder and open the .ttp

4. Play around with some values, and attempt to save

5. This error appears: http://imgur.com/a/G4Lzv

 

Am I doing something wrong? Much thanks.

Link to comment
Share on other sites

Aw crap. I've added a few classes in the latest release and forgot to mark them as serializible.

 

I should really work on my testing habits (as in actually do it every once in a while).

 

I'll have it fixed as soon as I can (about 18h or so from now (sorry)).

 

Also, does the thread subscription thingy on the forum ever work properly? I was lucky enough to be notified this time, albeit 23h to late...

 

EDIT: I fixed it yesterday, forgot to post it here.

Link to comment
Share on other sites

Aw crap. I've added a few classes in the latest release and forgot to mark them as serializible.

 

I should really work on my testing habits (as in actually do it every once in a while).

 

I'll have it fixed as soon as I can (about 18h or so from now (sorry)).

 

Also, does the thread subscription thingy on the forum ever work properly? I was lucky enough to be notified this time, albeit 23h to late...

 

EDIT: I fixed it yesterday, forgot to post it here.

 

I still have this problem....

Link to comment
Share on other sites

Aw crap. I've added a few classes in the latest release and forgot to mark them as serializible.

 

I should really work on my testing habits (as in actually do it every once in a while).

 

I'll have it fixed as soon as I can (about 18h or so from now (sorry)).

 

Also, does the thread subscription thingy on the forum ever work properly? I was lucky enough to be notified this time, albeit 23h to late...

 

EDIT: I fixed it yesterday, forgot to post it here.

 

Thanks for your time and great work, I'll check it out soon and report back!

Link to comment
Share on other sites

Any idea how I can make this work with my Starvation modded save? I have a copy of my game in a separate folder with the XMLs, but when I try and load the exe for the tool to use, it instantly gives me an 'object was not set to an instance of an object' exception and crashes.

 

I'll see if I can get the crash log out to you later on (if it's possible)

 

All I literally want to do is tick back the number of deaths from 5 to 4 on my save :)

Link to comment
Share on other sites

Hmm, since it crashes on startup, something must be amiss with the XMLs. Either I missed something, or the mod's doing something quirky with them.

 

Either way, I'm gonna have to see them to fix the problem. blocks, items and progression are the ones I need.

 

Upload them somewhere and send me a link.

 

P.S. I wanted to change my death count from 1 to 0. I couldn't, so I created this tool. :D

Link to comment
Share on other sites

I figured it out. It's this item:

 

<item id="1579" name="flyer">
<property name="Extends" value="schematicMaster" />
<property name="EconomicValue" value="50" />
<property class="Preview">
	<property name="Zoom" value="10" />
	<property name="Pos" value="0,-0.2" />
	<property name="Rot" value="90,45,0" />
</property>
</item>

 

It extends schematicMaster, and I assume that any item that extends it has Action1 defined, and that within it has Recipes_to_learn defined. Which they always do, at least until now.

 

This one doesn't, so I get a null reference exception. The modder broke the xml rules, and I do not intend to implement code to check for this specific case. Any schematic that inherits schematicMaster must implement some kind of recipe, even if it's just a blank list.

 

However, if you comment this line out:

 

<property name="Extends" value="schematicMaster" />

 

the program will work. The flyer item will probably work fine within the program with the line commented out (you'll be able to place it in the inventory and remove it), but make sure you revert it before playing the game.

 

Alternatively, you could suggest to the mod creator to add this property to the item:

 

<property class="Action1">
<property name="Recipes_to_learn" value="" />
</property>

 

I don't think it will change how the item behaves in any way, but the item won't be breaking any rules anymore.

 

Karl, if you're tapping into the assembly-csharp.dll for your editor, the starvation mod edits it, so that may be the cause of his particular problem.

 

Purely guessing. Been following this thread with interest. :)

 

I don't access the assembly-csharp.dll with the program, but any mod that changes it might change the defined rules my program works off, which in turn might end up in a crash. The same thing with the xmls, if they go outside the defined rules, really. I don't really see the point of that item extending schematicMaster.

 

Oh, and I'm really glad people are interested in this project. :D

Link to comment
Share on other sites

Awesome, so I commented out the line of XML and the tool loads now. Now I get a new crash when it tries to load my save into the editor...

 

 

Time Stamp: 27/04/2017 07:53:26

Message: An item with the same key has already been added.

Source: mscorlib

Inner Exception:

Stack Trace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)

at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)

at SevenDaysProfileEditor.Skills.SkillBinder..ctor(Skill skill, Value`1 playerLevel, List`1 recipeBinderList)

at SevenDaysProfileEditor.Skills.SkillsTab..ctor(PlayerDataFile playerDataFile, List`1 recipes)

at SevenDaysProfileEditor.GUI.PlayerTab..ctor(PlayerDataFile playerDataFile, String path, Int32 selectedIndex)

at SevenDaysProfileEditor.GUI.MainMenuActions.OpenFile(String fileName, PlayerDataFile playerDataFile, Int32 selectedIndex)

Target Site: Void ThrowArgumentException(System.ExceptionResource)

 

 

I'm thinking because I tried to open this one before it's gone a bit loopy?

 

Where do the keys get stored and I could probably remove said key to make it work (unless deleting and redownloading the package would solve it?)

Link to comment
Share on other sites

Sorry, I caught your post late yesterday, so after confirming the program loads, I didn't try to open your save with it.

 

Only data the program saves when it runs is the location of the game exe, so it can look up other files it needs (namely xmls), so the progran should work fine regardless of what happend in the previous runs.

 

The error appears when loading skills from the save into the program. There must be some kind of duplicate somewhere. Maybe the mod you're using has the skill with the same name? I think that might cause it.

 

I'll know more when I get home and can look further into it.

Link to comment
Share on other sites

No need to apologise, I'm just amazed that this tool can do what it does, you've done a fine job. As I said on my vanilla save I tested it and it works wonderfully.

 

The Starvation save looks quite different to a vanilla save, as it does add a couple new skills, and quite a lot of new quests and buffs in the mod itself - there seems to be a bit of extra info in the Starvation file near the beginning.

 

I really appreciate the help! :)

Link to comment
Share on other sites

No need to apologise, I'm just amazed that this tool can do what it does, you've done a fine job. As I said on my vanilla save I tested it and it works wonderfully.

 

The Starvation save looks quite different to a vanilla save, as it does add a couple new skills, and quite a lot of new quests and buffs in the mod itself - there seems to be a bit of extra info in the Starvation file near the beginning.

 

I really appreciate the help! :)

 

I really appreciate your appreciation. :D

 

Anyway, I know what's wrong. And it's not my fault. Yay! That always makes me happy.

 

<crafting_skill name="Deep Water" exp_to_level="150" icon="fishing" description_key="deepWaterDesc" title_key="deepWater" max_level="7" group="Fishing">
		<requirement skill_level="1" required_skill_name="Fisherman" required_skill_level="40" />
		<requirement skill_level="2" required_skill_name="Fisherman" required_skill_level="50" />
		<requirement skill_level="3" required_skill_name="Fisherman" required_skill_level="60" />
		<requirement skill_level="4" required_skill_name="Fisherman" required_skill_level="70" />
		<requirement skill_level="5" required_skill_name="Fisherman" required_skill_level="80" />
		<requirement skill_level="6" required_skill_name="Fisherman" required_skill_level="90" />
		<requirement skill_level="7" required_skill_name="Fisherman" required_skill_level="100" />
		<recipe name="fishingLure3" unlock_level="1" />
		<recipe name="improvedCane" unlock_level="1" />
		<recipe name="bambooRaft" unlock_level="2" />
		<recipe name="barge" unlock_level="5" />
		<recipe name="barge" unlock_level="5" />
		<effect name="CraftingTime">
			<multiply skill_level="1,2" value="1.00,0.76" />
			<multiply skill_level="2,4" value="0.76,0.66" />
			<multiply skill_level="4,5" value="0.66,0.59" />
			<multiply skill_level="5,6" value="0.59,0.53" />
			<multiply skill_level="6,7" value="0.53,0.47" />
		</effect>
		<effect name="CraftingQuality">
			<setvalue skill_level="1,1" value="350,416" />
			<setvalue skill_level="1,4" value="416,520" />
			<setvalue skill_level="4,6" value="520,575" />
			<setvalue skill_level="6,7" value="575,600" />
		</effect>
		<effect name="RepairTime">
			<multiply skill_level="1,2" value="1.00,0.61" />
			<multiply skill_level="2,3" value="0.61,0.54" />
			<multiply skill_level="3,4" value="0.54,0.48" />
			<multiply skill_level="4,5" value="0.48,0.43" />
			<multiply skill_level="5,6" value="0.43,0.39" />
			<multiply skill_level="6,7" value="0.39,0.35" />
		</effect>
		<effect name="RepairAmount">
			<add skill_level="1,2" value="1,27" />
			<add skill_level="2,3" value="27,31" />
			<add skill_level="3,4" value="31,35" />
			<add skill_level="4,5" value="35,38" />
			<add skill_level="5,6" value="38,41" />
			<add skill_level="6,7" value="41,43" />
		</effect>
		<effect name="RepairQualityLoss">
			<multiply skill_level="1,2" value="1.00,0.53" />
			<multiply skill_level="2,3" value="0.53,0.44" />
			<multiply skill_level="3,4" value="0.44,0.38" />
			<multiply skill_level="4,5" value="0.38,0.32" />
			<multiply skill_level="5,6" value="0.32,0.27" />
			<multiply skill_level="6,7" value="0.27,0.22" />
		</effect>
	</crafting_skill>

 

See anything fishy (I'm so, so sorry) about it? (Hint, hint, look at the "barge" recipe).

 

No my friend, you are not drunk, there are indeed two barges there. Unless, you see four, then you might have a problem (I'm still so very sorry).

 

The program adds these entries to a dictionary of sorts, and uses the name as the dictionary key. Each dictionary key needs to be unique. And therein lies our problem - we try to introduce a duplicate (Oh my god, please don't hate me).

 

Anyway, this is a violation of xml rules and while I could write a really robust program that handles all kind of input, I'm just to lazy to do it (I promise I won't make bad [something resembling a pun, but not really a pun] again). Besides, this might even be better, since it detects any mistakes made by modders. =)

 

(Sorry.)

 

P.S. Remove duplicate and it's clear sailing from there (Sorry, not sorry. I lied. You can hate all you want.).

Link to comment
Share on other sites

It worked! Woohoo! Thanks so much for this tool. I've reverted the XMLs now but I'll report both these things on the Starvation forums. I think more people should know about this tool in order to test their XMLs, it actually makes a great validation tool!

 

Where can I donate to this project?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...