Jump to content

A16 - 7DaysProfileEditor


Karlovsky120

Recommended Posts

I made a simple tool for editing *.ttp files the game uses to save.

 

It's (as far as I know) bug free, but not really finished. More features will be added when I'll feel like it (let's be honest here).

Feel free to request something to be added to motivate me. :)

 

Current version is 1.15.0.1. It will work with A15.

 

For now you can modify your basic info, stats, inventory and skills.

 

EDIT: Icons have been added and the UI is less ugly now:

 

Inventory:

2ir45kl.png

 

Skills:

hx4sua.png

 

Also, icons work with mods!

 

P.S. The tabs I haven't shown are still ugly. Grow up and deal with it.

P.P.S. Don't listen to him, all tabs are pretty!

 

 

FAQ (or ones I think will be)

 

1. Q: Does this work for modded save games?

 

A: Well, this is BASIC version. If you want to deal with modded save files, you're going to have to upgrade to PRO for $49.99

 

2. Q: Really?

 

A: No, it should work with modded save games, if the modded XMLs have been edited by the book. Make sure you have the modded XMLs in the Data/Config folder. If it doesn't work, you can send me items.xml, blocks.xml and progression.xml so I can maybe make it work.

 

3. Q: Will this corrupt my save?

 

A: Since this is Beta, it might. However, you cannot overwrite your files. It will always backup your file by adding a time stamp and .bkp extension. Even if you ask to overwrite. That being said, backup your save anyway, you never know.

 

4. Q: It doesn't work. You suck.

 

A: While there might be a problem with my program, there are few things you can try out yourself. Try clearing your inventory in game and see if you can open the save now. If you xmls are out of sync, issues might appear which this will fix in 2/3 of cases.

 

5. Q: It still doesn't work. You suck even more now.

A: If you encounter a crash or a bug, the program will prompt you to describe it and will save a file where you specify. Send me that will and I'll see what can be done. If you just encounter strange behavior, you can generate a report by clicking Help->Send error report. You'll still have to send me the file. Then I'll fix it and suck less. I'd be great if you reported the issues on the GitHub page.

 

5. Q: If I mess up my save, can you fix it?

 

A: I probably can't. I can try if you send it to me. But backup your saves!

 

6. Q: What features are you planning to introduce?

 

A: I'm currently working on another project, so this isn't in active development. However, if the community asks for a specific feature, I can implement it on demand (probably, I don't intend for my program to shoot rockets). That means you as well, so ask away.

 

7. Q: This is awesome and I want to help!

 

A: The whole project is open source and anyone who wants can contribute. I do suck at making GUI layouts, so there's that. You can also try to open as many saves you have and press all the buttons and then report what broke.

 

 

There, that should cover it, more or less. If you have any extra questions ask.

 

You can download the tool here (along with the source code):

GitHub

 

The dll that was required to run the program is now merged with the exe, so less hassle for you. Yay!

 

Note: You can use the .dll in your own project to tamper with the saves yourselves. It has it's own project on my GitHub profile. You can also get it's source code there.

 

Also, I totally forgot about the legal stuff. All that I created is protected by which ever license allows you to do anything you want with it, short of selling it, presenting it as your own and weaponizing it (I don't know if it can be done, but better to stay on the safe side). Yes, this will most definitely hold up in court.

 

I'd also appreciate a note if you have any special plans(candlelight dinner, wink wink) regarding it. Totally up to you.

Link to comment
Share on other sites

So my inventory page have no scroll bar (skill page does) so I can't see it all.. Also, I tried to edit profiles with modded items but it didn't work even if the xmls are in the 7dtd folder.

 

Any clues?

Link to comment
Share on other sites

I just pushed an update that will add scroll bars to inventory tab. As for the rest goes, I will need your items.xml, blocks.xml and progression.xml as well as the save that's causing the problem. I will also need to know when the whole thing failed.

 

You can pack them in a .rar or .7z and upload them to some file sharing service and send me the link via PM.

 

I'll also try to force the program to throw prettier errors so I better know what's going on. =)

Link to comment
Share on other sites

I can't even get it to run. (and yes, the DLL is in the same folder)

 

The first thing it wants is "the game exe".

It does not specify which one.

It does not automaticall see it in the folder it is run from.

 

If I navigate to the (first?) exe and hit Enter it crashes.

 

7DaysProfileEditor.config only contains this line:

gameRoot=C:\SteamLibrary\steamapps\common\7 Days To Die

 

 

If I try to run it again it crashes instantly.

Link to comment
Share on other sites

It looks for 7DaysToDie.exe. Once it locates it, it knows where to look for XMLs. I'll specify the name of the .exe in the update.

The path in the config should work, I don't know why would it crash. I think the game fails to load the XMLs for some reason. You can send me yours (items, blocks and progression) to check out why. You might have some mods installed that the program doesn't know how to deal with. It's the only explanation since it works for me, and I have vanilla installed.

 

If you run the program from the games root folder, it shouldn't ask you anything.

 

I did an update about four hours ago and it should print out the error code if it crashes.

EDIT: I just realized now that I didn't push the changes, it should be up to date now.

 

EDIT2: I just updated again. It will specify which exe it looks for and will produce an error log upon crashing (ProfileEditorCrash.log). I might later try to specify it even more to see where it fails within the xml.

Link to comment
Share on other sites

The addition of the scroll bars makes it works. :) and for the player profile that wasn't working, it was mine. I found the issue, it's one item that I was holding and that is devblocks. (<property name="IsDeveloper" value="true" />) It shows up just and only in dev mode, which doesn't seems to be handled by your editor. (and it's fine) I just had to remove that item from my toolbelt and everything works fine now.

 

Thanks for this nice program! But now I'm curious, what are the next steps you're planning to add on it? Equiped clothes and armor? Location? Player stats like kills/deaths/etc ? (That one would be awesome)

Link to comment
Share on other sites

Yeah, my program removes dev items from the list. Some dev items have special properties and it was easier to just avoid them than handling them. I now added fail-safe that notifies you if dev items are in your inventory and asks you to remove them before using the program.

 

The next thing is general stats (including location, kills, deaths and similar) and player stats such as hunger, hydration, wellness etc...

 

I'm not that concerned with equiped clothes/armor since you can change them indirectly via inventory. I do plan to make most of the save editable. I don't see the need to change your favourited items since you can do that in-game.

Link to comment
Share on other sites

I added some basic statistical info to the latest 0.14.5.0 version.

 

Gazz, is the program working for you now (was it the dev items?) or is it still crashing?

 

EDIT: Refined dev item detection, the program will now list ALL the dev items and ask you to remove them before continuing.

Link to comment
Share on other sites

  • 4 months later...

Karlovsky, very cool tool. It is nearly precisely what I've been looking for.

How difficult would it be to add either or both of these features:

1. After opening a given ttp file, be able to save the relevant contents of it in a more-friendly export? I'm thinking something simple like a tab-delimited text file.

2. Even more awesome-sauce would be a menu option that would parse every .ttp file in a specified folder and create that same tab-delimited text file with all of the contents.

 

End-game here for me is that we are kicking around the logistics of holding match-style events with our own criteria/weighted values on game score/kills/skill levels/etc. After a match is over I'd like to be able to parse out all of that info for each player. Then I can drop it into a spreadsheet, run whatever algorithm we decide on for our own scoring metric, and then we can post those to our own internal ladder board.

 

But the key is being able to parse out all those players stats from the .ttp files into something more readable/spreadsheet friendly.

 

Thanks mate!

Link to comment
Share on other sites

  • 3 weeks later...

Frankencow and I had a discussion via PMs, but to clarify it for anyone else.

 

I don't think I'll add export option to the program. The reason is that I don't know what a lot of the values mean (in order to be able to read and write the save file I had to parse it whole, regardless of my understanding of it's meaning). I'm not sure which data is useful and which is not. On the other hand, I don't want to fill the export with bunch of nonsense.

 

If you really want to parse out some data that is relevant to you, you can use the 7DaysSaveManipulator.dll provided in the first post. taking this route will require you learning a little bit about coding. In case you really want to do it, I put sort of a skeleton in the spoiler below. You can paste it into a Visual Studio C# Console project. Note that you'll also have to reference the 7DaysSaveManipulator.dll in the project (Google is your friend). I setup the name and skills export, you can add anything else you find interesting. In order to see what is available, look into the source code of the dll. If you need any help, feel free to send me a message. =)

 

I might end up going half way and overriding or adding ToString() methods for most classes in the dll to make the process easier. Or I might not, I'm not making promises here.

Link to comment
Share on other sites

Update 0.14.7.0 is live, yay!

 

You can now change your stats. However, I don't know what each of the values mean. I have not restricted min or max values that can be entered, so you can mess up your save if you enter a wrong number. Once I know more, I'll make it safer and harder to mess up.

 

If anyone's up for it, he or she can try figuring out what which of the numbers mean by going against my advice and sticking random numbers in.

 

Also note that water and food have an additional entry in the save file so the one here might be an unused relic of an old code. Didn't feel like messing with it at the moment. In short, food and water stats might be broken in this version, or at least non functional.

Link to comment
Share on other sites

  • 1 month later...
Update 0.14.7.0 is live, yay!

 

Any idea if this works with A15 parsing? I am using your code to write a .ttp reader (no edit functionality) and am having issues once we get to stat parsing.

 

I'll probably just test the app itself tonight just to make sure it's not my conversion issue.

 

If you're interested:

https://gist.github.com/KillerInstinct/7f5fe35e9beb54d111642ddfb7a0f955

Link to comment
Share on other sites

not really sure what I'm doing wrong here. Everytime I try to open up the editor and locate the 7daystodie.exe I get this error window.

 

 

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.1586.0 built by: NETFXREL2

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:///B:/Computer%20Games/Tools/Mods/7DTD/Profile%20Editor/7DaysProfileEditor.exe

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

System.Windows.Forms

Assembly Version: 4.0.0.0

Win32 Version: 4.6.1586.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.1586.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.1586.0 built by: NETFXREL2

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.1586.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.1586.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.1586.0 built by: NETFXREL2

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.

 

Link to comment
Share on other sites

It seems to fail when it tries to read the XMLs. There must be something in yours I didn't account for.

 

Are you using mods?

 

Regardless, I'm sure I can fix it, but you'll need to zip up your xml (config) folder and upload it somewhere so I can download it an see what is going on exactly.

 

You can send me the link via PM.

Link to comment
Share on other sites

Actually yes I am using mods and think I may be able to make an educated guess on which is the problem. I'm using Stallionsden's Backpack Expansion mod for 40 inventory slots. Besides that I have the better balance mod in. I'll get them zipped and sent when I finish with work today, if you don't think that would be it.

Link to comment
Share on other sites

I can't really tell anything without the files. I can download them myself, but I'd rather look at your setup, just to be sure.

 

I'm not sure how is inventory space extended in the mod, but I'm pretty sure it would break the editor anyway. I'll see if I can make it work...

Link to comment
Share on other sites

It doesn't throw an error for me when I use the files you provided.

 

The program itself doesn't touch windows.xml or .dll of any kind. The only used xmls are blocks, items and progression. Are you sure you sent me the exact copy of your config folder that failed the program?

Link to comment
Share on other sites

That's the thing, if it changes just the windows.xml and .dll, then it's not it, not at that stage (starting up program). My program won't be able show any inventory slots beyond the ones in vanilla and any items in those slots would be lost and whole save could be broken.

 

But if it fails at loading, it must be something else, some other mod...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...