Space Engineers

Space Engineers

Treadmill Fix - Now works - Also with RC blocks
SFort 22 Nov, 2017 @ 6:24am
Can't find the xml file
Have checked in:
C:\ProgramData\SpaceEngineersDedicated
C:\Users\-\AppData\Roaming\SpaceEngineersDedicated
< >
Showing 1-8 of 8 comments
Mumberthrax 3 Jan, 2018 @ 3:16pm 
I also have had trouble locating the file. The mod description says it is in the storage folder, but i could not find it in %appdata%\Roaming\SpaceEngineers\Storage nor in the storage folder for my save game.

i tried looking at the source code for the mod, and i do see some code in ".bak" files that seems to be about saving a config file, but I don't know C# or SE modding really to say where it's supposed to store those files or why it might not be working.

I wanted to edit the file to reduce the power production to that of a small ship solar panel for a hard survival game.
spiritplumber  [developer] 3 Jan, 2018 @ 11:52pm 
Should be in there... sbc file
Mumberthrax 4 Jan, 2018 @ 3:58am 
I haven't found it. i thought maybe it was the sandbox.sbc after you mentinoed that, but i didn't see any reference to power levels in that one for the treadmill. Where specifically is the file supposed to be, and under what filename?
Blue64 26 Dec, 2019 @ 10:09pm 
Ctrl + F for
appdata
in that file if you can, as it's using your Computer's Designated Directory for the location, which is what
%appdata%\
is, your Operating System sets this per User on Windows (unsure about iOS and UNIX). Something, somewhere, needs to set up the Save Location, otherwise it has no idea how to retrieve extra Content (eg. Models, Textures, Scripts, etc.)
Mumberthrax 27 Dec, 2019 @ 2:04am 
searching C:\Users\Mumberthrax\AppData\Roaming\SpaceEngineers for "ConfigData.xml" (specified in 1138636179.sbm/Data/Scripts/Treadmill/ConfigDataStore.cs.bak ) returns one result, which is from the needs mod - it has nothing in it which indicates relation to the treadmill.

searching C:\Program Files (x86)\Steam\steamapps\workshop for the same filename returns no results.

It's been a while since I looked at this and I'm a little bit better at reading code now but still not familiar with c# - but i think the commented lines in 1138636179.sbm/Data/Scripts/Treadmill/Treadmill.cs here are the reason the file is not being written to the hard drive:


public override void Init(MyObjectBuilder_EntityBase objectBuilder)
{

if (!loaded)
{
//mConfigDataStore.Load();
//mConfigDataStore.Save();
loaded=true;
}



//fastupdate = mConfigDataStore.get_FAST_UPDATE();
//maxOutput = mConfigDataStore.get_TREADMILL_POWER();

If I am reading this correctly, the functions for saving, loading, and accessing variables from the config file are not being used.
There also is an error logging line that is commented out in ConfigDataStore.cs.bak:

public void Save()
{
try
{
TextWriter writer = MyAPIGateway.Utilities.WriteFileInLocalStorage(mFilename, typeof(ConfigData));
writer.Write(MyAPIGateway.Utilities.SerializeToXML<ConfigData>(mConfigData));
writer.Flush();
writer.Close();
} catch (Exception e)
{
//MyAPIGateway.Utilities.ShowMessage("ERROR", "Error: " + e.Message + "\n" + e.StackTrace);
}

but since this save method is never called because the call is commented out in treadmill.cs, any errors which might otherwise arise are never thrown anyway.
Last edited by Mumberthrax; 27 Dec, 2019 @ 2:06am
Blue64 27 Dec, 2019 @ 11:14am 
I just realized, the OP was checking their Dedicated Server Folder.

TL;DR: I found more locations to Check out, and here's the Dummy's Guide on how to read this info.

Also, for clarification purposes of any passerby readers, it should be noted that the default Path (at least on Windows OS) for
%appdata%\
is equal to
C:\Users\Name\AppData\Roaming\
or
%userprofile%\AppData\Roaming\
so searching
%appdata%\Roaming\
should return
%userprofile%\AppData\Roaming\Roaming\
which means you want
%appdata%\SpaceEngineers\
or
%appdata%\SpaceEngineersDedicated\
to properly locate your files, or more specifically
%userprofile%\AppData\Roaming\SpaceEngineers\
or
%userprofile%\AppData\Roaming\SpaceEngineersDedicated\

If you really wanna shorten the Address, you'll want something like this:
%appdata%\SpaceE~1\
or
%appdata%\SpaceE~2\

The reason why all of that is important is because now you know what I mean when I say your Log File located in
%AppData%\SpaceE~1\SpaceEngineers.log
mentions on line 161 & 162 (roughly):
Game dir: C:\Program Files\Steam\steamapps\common\SpaceEngineers\Bin64 Content dir: C:\Program Files\Steam\steamapps\common\SpaceEngineers\Content
or
Game dir: C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64 Content dir: C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Content
depending on your Operating System & Hardware. Shortened the Address will look like this:
Game dir: C:\Progra~1\Steam\SteamA~1\Common\SpaceE~1\Bin64 Content dir: C:\Progra~1\Steam\SteamA~1\Common\SpaceE~1\Content
&
Game dir: C:\Progra~2\Steam\SteamA~1\Common\SpaceE~1\Bin64 Content dir: C:\Progra~2\Steam\SteamA~1\Common\SpaceE~1\Content
Respectively. The way I get the shortened name is I'm looking it up in Command Prompt (cmd.exe) using the
dir
command, with the
/x
Flag (option).

The Reason why that location is important is because it might have more clues for you to sniff around for. It's at least worth checking out.
Last edited by Blue64; 27 Dec, 2019 @ 11:15am
Blue64 27 Dec, 2019 @ 11:17am 
also, good eye on the commented out lines
spiritplumber  [developer] 27 Dec, 2019 @ 7:06pm 
looks like I uploaded a test version. derp
< >
Showing 1-8 of 8 comments
Per page: 1530 50