Icecovery

[WIN]Game Data Switcher - GDS [V1.0.5]

Recommended Posts

@IcecoveryIt looks like the CKAN problem is that the json and xml files that show up in the CKAN directory are empty when you create a new GameData

Share this post


Link to post
Share on other sites
7 hours ago, Beetlecat said:

Considering the subject matter of the game, I had to re-read this line a couple times to realize what you meant. :)

Sorry for that, I was dying when I write this thing at last night, too sleepy :confused:

4 hours ago, drhay53 said:

@IcecoveryIt looks like the CKAN problem is that the json and xml files that show up in the CKAN directory are empty when you create a new GameData

I was thinking that CKAN will automatically rewrite those files if they are empty.:sealed:
Will try to make those file readable for CKAN at next version.

Share this post


Link to post
Share on other sites
19 minutes ago, Icecovery said:

I was thinking that CKAN will automatically rewrite those files if they are empty.:sealed:
Will try to make those file readable for CKAN at next version.

It may be that CKAN will automatically create them if they don't exist; sorry, I didn't test that.

One thought I had is, if you get the chance, a "clone GameData" function might be useful. This would clone the CKAN files and GameData directory, that way you can set up a "template" GameData, with the very base mods that you always play with no matter what. Already a great tool, but that would be a useful feature for me. 

Share this post


Link to post
Share on other sites
12 minutes ago, drhay53 said:

It may be that CKAN will automatically create them if they don't exist; sorry, I didn't test that.

One thought I had is, if you get the chance, a "clone GameData" function might be useful. This would clone the CKAN files and GameData directory, that way you can set up a "template" GameData, with the very base mods that you always play with no matter what. Already a great tool, but that would be a useful feature for me. 

Good idea, I will add a button that clone the GameData that you are choosing now. Thanks for your recommend!:D

Edited by Icecovery

Share this post


Link to post
Share on other sites

V 1.0.3 - 20180219

Add Clone Button

Fixed bug about CKAN

ZUaflS2.png

UI for V1.0.3

 

@drhay53 Here is it.

Share this post


Link to post
Share on other sites

@Icecovery  Got a bug report for you:

I got and "Unhanded exception" due to a missing file:

 

Could not find fine 'R:\KSP_1.3.1/buildID.txt'

There is a "buildID64.txt", I deleted the non-64 bit files.

So I created the missing file and it worked, but would be nice if this was fixed.  And yes, the x64 box was checked.

 

Thanks

Edit: More errors:  I deleted all files that I could find which it had touched and started it again.  This time, instead of cloning, I just made a new directory.

Tried to set as default, got an error

Access to the path 'R:\KSP_1.3.1\GameData' is denied, but the directory is there

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

More problems:

I copied an existing install to a test directory, installed the Switcher and ran it .

So far, so good.

Then I tried to rename the GameData directory, and got an exception:

Could not find a part of the path

'R:\K_1.3.1_dGameData\GameDataData.data'

What I typed is what I see, it is missing a backslash between the main game directory and the GameData

 

I must say, while I like the idea, the implementation seems to leave something to be desired.  I was hoping to use this on my development installs, but given these issues,  I can't.

So I found the problem with the rename, you are missing a slash.

If I can fix some of the other problems I may do a PR for you on Github

Share this post


Link to post
Share on other sites
8 hours ago, linuxgurugamer said:

Could not find fine 'R:\KSP_1.3.1/buildID.txt'

There is a "buildID64.txt", I deleted the non-64 bit files.

So I created the missing file and it worked, but would be nice if this was fixed.  And yes, the x64 box was checked

And I got this fixed as well.

Why are you making multiple copies of the buildID files?  Is there something that I'm missing?

Share this post


Link to post
Share on other sites

I also found and fixed a bug with renaming, the rename was passing in the complete path for the new name:

//buildID
Microsoft.VisualBasic.FileIO.FileSystem.RenameFile(LOC + "/" + GameDataDataInformation.Text + "_buildID.txt", LOC + "/" + newname + "_buildID.txt");
Microsoft.VisualBasic.FileIO.FileSystem.RenameFile(LOC + "/" + GameDataDataInformation.Text + "_buildID64.txt", LOC + "/" + newname + "_buildID64.txt");
   

Should be:

//buildID
Microsoft.VisualBasic.FileIO.FileSystem.RenameFile(LOC + "/" + GameDataDataInformation.Text + "_buildID.txt", newname + "_buildID.txt");
Microsoft.VisualBasic.FileIO.FileSystem.RenameFile(LOC + "/" + GameDataDataInformation.Text + "_buildID64.txt", newname + "_buildID64.txt");

I'll be doing a PR soon with these fixes

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

I have an unofficial version of this mod available for anyone to download.  It fixes the following problems:

  • Bug fixes
    • Fixed error with missing slash when trying to rename Gamedata directory
    • Fixed errors when one of the buildID.txt or both of the files is missing
    • Fixed error with renaming the buildID.txt files where complete path was being passed in the second argument
  • Addition
    • Added text for CKAN/registry.locked file, if found, throws an exception
       

You can download it from here:

https://github.com/linuxgurugamer/Game-Data-Switcher/releases/tag/1.0.3-beta

Once @Icecovery releases a new version, I'll remove this

Share this post


Link to post
Share on other sites

@linuxgurugamer  Thanks very much for your passionate help and hard work. It's amazing!

I've already merged the pull request, will try to releases a new version soon.

On 2018/3/4 at 11:26 AM, linuxgurugamer said:

Why are you making multiple copies of the buildID files?  Is there something that I'm missing?

it is for different languages. (If you have installed a new language to a new GameData using steam )

Share this post


Link to post
Share on other sites
2 hours ago, Icecovery said:

@linuxgurugamer  Thanks very much for your passionate help and hard work. It's amazing!

I've already merged the pull request, will try to releases a new version soon.

it is for different languages. (If you have installed a new language to a new GameData using steam )

I see, I wasn't aware the buildID files were different for different languages.

Ok, thanks.  Ping me when  you do the release, and I'll pull my version down

 

Share this post


Link to post
Share on other sites

@Icecovery I have found a small bug:

When renaming a GameData, if one hits "Cancel", the application shows this:

BugGDS.PNG

This probably means you should make it stop that script if "Cancel" is chosen.

Edited by Mrcarrot

Share this post


Link to post
Share on other sites
On 2018/3/6 at 1:03 AM, Mrcarrot said:

@Icecovery I have found a small bug:

When renaming a GameData, if one hits "Cancel", the application shows this:

BugGDS.PNG

This probably means you should make it stop that script if "Cancel" is chosen.

This does a really little tiny bug:confused:

I was just lazy to add some statement to check which button user click. Will fix at next version.

Share this post


Link to post
Share on other sites
7 hours ago, Icecovery said:

This does a really little tiny bug:confused:

I was just lazy to add some statement to check which button user click. Will fix at next version.

Yes, but given that, and the other bugs that I found, doesn't leave a good impression

Share this post


Link to post
Share on other sites

V1.0.5 - 20180314

GDS will now copy the DLC file (if present) when creating a new GameData

Add option to choose whether to make backup logs

Add delete logs button

 

V1.0.4 (Unpublished)  - 20180313

Merged pull request #2 (Thanks to linuxgurugamer)

-Fixed error with the missing slash when trying to rename Gamedata directory(Issue #1)

-Fixed errors when one of the buildID.txt or both of the files is missing

-Fixed error with renaming the buildID.txt files where the complete path was being passed in the second argument

bug fixed

 

 

@linuxgurugamer New version is released
 
@Mrcarrot The bug you report has been fixed

 

 

Share this post


Link to post
Share on other sites

Doesn't work, always launches my main GameData folder regardless of what I select

Also, doesn't seem very well coded. The whole idea of the gamedatadata.data folder is pretty redundant and there's a large number of errors

Edited by Clockwork13

Share this post


Link to post
Share on other sites

Feature improvement suggestions:

- move the GameData/Squad folder somewhere, and mklink/j it into every new GameData - saves nearly another 500MB per GameData.

- use the same trick for the CKAN/downloads folder - only keep one set of downloaded mods (another potentially large disk-space hog)

Really neat idea, but personally I'm a bit wary to use it in my "production" install given some of the reported issues and the author's perceived lack of recognition of the severity of some of these ("coded this while sleepy", "it's only a tiny bug", "didn't bother checking which button the user pressed" etc). Considering this tool is altering the filesystem on my PC, that's a bit scary sounding... (yes, I know I can audit the code, but I won't do that for -every- version I download).

So @Icecovery: it would help if you could take bug reports a little bit more seriously - I'm sure you do when you actually code fixes for them, I meant your language here. :)  

Share this post


Link to post
Share on other sites
1 hour ago, Clockwork13 said:

Doesn't work, always launches my main GameData folder regardless of what I select

Also, doesn't seem very well coded. The whole idea of the gamedatadata.data folder is pretty redundant and there's a large number of errors

Can you describe more operations in detail for me to find the problem? I don't have any similar problems here. It may be an issue that needs improvement.

1 hour ago, micha said:

Feature improvement suggestions:

- move the GameData/Squad folder somewhere, and mklink/j it into every new GameData - saves nearly another 500MB per GameData.

- use the same trick for the CKAN/downloads folder - only keep one set of downloaded mods (another potentially large disk-space hog)

1

This suggestion sounds good, but I have to spend time sorting out the code. I've had possible solutions in my mind, I'll see if I can make it in these days because I’ve been busy lately, It may take some time.

(About CKAN/downloads folder, GDS originally would not move or copy it)

1 hour ago, micha said:

Really neat idea, but personally I'm a bit wary to use it in my "production" install given some of the reported issues and the author's perceived lack of recognition of the severity of some of these ("coded this while sleepy", "it's only a tiny bug", "didn't bother checking which button the user pressed" etc). Considering this tool is altering the filesystem on my PC, that's a bit scary sounding... (yes, I know I can audit the code, but I won't do that for -every- version I download).

So @Icecovery: it would help if you could take bug reports a little bit more seriously - I'm sure you do when you actually code fixes for them, I meant your language here. :)  

 

I'm very sorry and I'm gonna change this if it confuses you. :)

Share this post


Link to post
Share on other sites
2 minutes ago, Icecovery said:

Can you describe more operations in detail for me to find the problem? I don't have any similar problems here. It may be an issue that needs improvement.

When I click "Launch KSP", it launches the regular GameData even if I select the other ones.

Share this post


Link to post
Share on other sites
3 minutes ago, Clockwork13 said:

When I click "Launch KSP", it launches the regular GameData even if I select the other ones.

Did you click the "set as default" button after you selected a GameData from the list?

Share this post


Link to post
Share on other sites
15 minutes ago, Icecovery said:

Did you click the "set as default" button after you selected a GameData from the list?

Yes, it gave me an error

Share this post


Link to post
Share on other sites
Just now, Clockwork13 said:

Yes, it gave me an error

Can you describe more detail about this error?

Share this post


Link to post
Share on other sites
2 minutes ago, Icecovery said:

Can you describe more detail about this error?

here's what the details box displays:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: Access to the path 'C:\Steam\SteamApps\common\_OFF-STEAM\Kerbal Space Program 1.3.1 - Stock\GameData' is denied.
   at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
   at Microsoft.VisualBasic.FileIO.FileSystem.RenameDirectory(String directory, String newName)
   at GameDataSwitcher.MainWindow.SetAsDefault_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2633.0 built by: NET471REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
GameDataSwitcher
    Assembly Version: 1.0.5.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Steam/SteamApps/common/_OFF-STEAM/Kerbal%20Space%20Program%201.3.1%20-%20Stock/GameDataSwitcher.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2556.0 built by: NET471REL1
    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.7.2556.0 built by: NET471REL1
    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.7.2556.0 built by: NET471REL1
    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.7.2556.0 built by: NET471REL1
    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.7.2633.0 built by: NET471REL1LAST_C
    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.7.2612.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.7.2556.0 built by: NET471REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.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.

 

Edited by Clockwork13

Share this post


Link to post
Share on other sites
2 hours ago, Clockwork13 said:

here's what the details box displays:


See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: Access to the path 'C:\Steam\SteamApps\common\_OFF-STEAM\Kerbal Space Program 1.3.1 - Stock\GameData' is denied.
   at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
   at Microsoft.VisualBasic.FileIO.FileSystem.RenameDirectory(String directory, String newName)
   at GameDataSwitcher.MainWindow.SetAsDefault_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2633.0 built by: NET471REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
GameDataSwitcher
    Assembly Version: 1.0.5.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Steam/SteamApps/common/_OFF-STEAM/Kerbal%20Space%20Program%201.3.1%20-%20Stock/GameDataSwitcher.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2556.0 built by: NET471REL1
    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.7.2556.0 built by: NET471REL1
    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.7.2556.0 built by: NET471REL1
    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.7.2556.0 built by: NET471REL1
    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.7.2633.0 built by: NET471REL1LAST_C
    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.7.2612.0 built by: NET471REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 14.7.2556.0 built by: NET471REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.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've reproduced this bug on my computer, trying to fix it.

 

————————————Edit————————————

@Clockwork13 I've found the problem, for some reason(rights or readonly), GDS cannot change the folder name if the folder is under /steamapps path. To fix it, please move the game to another path that is not under /steamapps. It works for me, and this is why I didn't reproduce it earlier.

 

Edited by Icecovery

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.