Do you know of any way to export the data displayed, say for one character .dat file, as a txt or some other file?
I am trying to figure out ways to display such things as experience, levels, class / race on a website.
Normally I would just use craftbukkit sql, but the mods I am using are not supported in bukkit.
There isn't anything for export currently. There is a JSON exporter in the underlying SDK for NBT data, so it wouldn't be hard to add something, or write a short program specifically to turn .dat files into JSON files.
There isn't anything for export currently. There is a JSON exporter in the underlying SDK for NBT data, so it wouldn't be hard to add something, or write a short program specifically to turn .dat files into JSON files.
I did see you mention, or Ed mention in your other thread about JSON exporters.
Its all kind of over my head, and I know nothing of nbt files, so I am stuck at the moment.
Either I wait and search for a tool to do this for me, edit my serverside mods (which I haven't done before) and write a plugin that exports the data before it is saved or scrap the idea all together.
I would love to see an "export fields/values as text" option added to NBTexplorer, but that is a very specific function, as I see it haha..
I can't promise any changes immediately, but export is a feature I would be okay with adding, since it's still data-neutral. The kinds of features that I'm not willing to add are the ones that add specific interpretation to the NBT data, e.g. more friendly displays/editors for items.
At minimum I think I could put a text version of the data on the clipboard when you copy.
I can't promise any changes immediately, but export is a feature I would be okay with adding, since it's still data-neutral. The kinds of features that I'm not willing to add are the ones that add specific interpretation to the NBT data, e.g. more friendly displays/editors for items.
At minimum I think I could put a text version of the data on the clipboard when you copy.
This would help, but it would mean I would have to do it by hand for every player. I don't know what I'm going to do.
This server discourages me at every step haha.. I guess I can do nothing short of writing my own addon for the mod I am using.
Thanks for the help, your program has always been useful to me.
If you're willing to dip your toes into C#, give Substrate a try. I reckon you could write what you want in just a few lines.
Something like this takes a string to a .dat file, and gives you JSON-encoded data as a string, which you could write out to another file. Wrap this up in a loop over all the files in your player directory.
string pathToPlayer = "/path/to/player.dat"; NBTFile nbtfile = new NBTFile(pathToPlayer); NbtTree tree = new NbtTree(nbtfile.GetDataInputStream());
string jsondata = JSONSerializer.Serialize(tree.Root);
Im having problems whith this program it will work when i manually direct it to the folder of my save
Im running windows 7
On startup the program can't read my Minecraft directory
and when I close the program it throws an exception
System.Configuration.ConfigurationErrorsException: Failed to save settings: An error occurred loading a configuration file: Could not find a part of the path 'C:\Users\"edited out"\AppData\Local\NBTExplorer\NBTExplorer.exe_Url_fs3qjp2r3n4dwwznplbb0pdd2ispgj3j\2.2.0.0\k4kmy3ft.tmp'. (C:\Users\"edited out"\AppData\Local\NBTExplorer\NBTExplorer.exe_Url_fs3qjp2r3n4dwwznplbb0pdd2ispgj3j\2.2.0.0\user.config) ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Could not find a part of the path 'C:\Users\"edited out"\AppData\Local\NBTExplorer\NBTExplorer.exe_Url_fs3qjp2r3n4dwwznplbb0pdd2ispgj3j\2.2.0.0\k4kmy3ft.tmp'. (C:\Users\"edited out"\AppData\Local\NBTExplorer\NBTExplorer.exe_Url_fs3qjp2r3n4dwwznplbb0pdd2ispgj3j\2.2.0.0\user.config) ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\"edited out"\AppData\Local\NBTExplorer\NBTExplorer.exe_Url_fs3qjp2r3n4dwwznplbb0pdd2ispgj3j\2.2.0.0\k4kmy3ft.tmp'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension)
at System.Configuration.Internal.WriteFileContext..ctor(String filename, String templateFilename)
at System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
at System.Configuration.Internal.DelegatingConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
at System.Configuration.ClientSettingsStore.ClientSettingsConfigurationHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
at System.Configuration.UpdateConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
--- End of inner exception stack trace ---
at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
at System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll)
at System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
--- End of inner exception stack trace ---
at System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
at System.Configuration.LocalFileSettingsProvider.SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection values)
at System.Configuration.SettingsBase.SaveCore()
at System.Configuration.SettingsBase.Save()
at System.Configuration.ApplicationSettingsBase.Save()
at NBTExplorer.Windows.MainForm.MainForm_Closing(Object sender, CancelEventArgs e)
at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.Form.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)
************** 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.
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.
Does this happen consistently if you try running the program again?
It looks like it's having some trouble storing user configuration settings, but they are only a convenience. They are not needed to run or use the program. I will see if I can guard them a little better in case of failure.
Could you tell me the path to your Minecraft directory?
- The minecraft Directory notice happens on startup and the exception only happens on close, It pops up 3 times, when you hit Quit the third time windows says the program has stopped working (Happens everytime I launch the program)
- Yes it works fine (just a little annoying)
- Minecraft Directroy is C:\Users\<Name>\AppData\Roaming\.minecraft
hope this helps
It might be valuable to try once as a learning experience, but there are more specialized tools available for this particular task. At least once is linked from the original post, although I can't personally vouch for specific tools.
Edit: Was it really necessary to respond to a 10-month-old reply?
I can't thank you enough for making this tool! It just saved my butt on our server, when a solar-powered quarry generated 17k entities, overflowing from chests (e.g. cobble/dirt) because of lack of void pipes or recyclers...
I have tried to download this application many times today, but when I get to the gitHub website, both Safari and Chrome can't connect. I wanted to customize villager trades, but until it works, looks like my adventure map has struck bedrock. Plz help! ☭
excuse me, but I noticed something between version 2.2.0 and the older versions. The older versions enable byte values to max out at 255. The newer versions max out byte values at 127. Also(probably intended), the newer version can input negative values while the older ones can't. Is there a reason for this?
excuse me, but I noticed something between version 2.2.0 and the older versions. The older versions enable byte values to max out at 255. The newer versions max out byte values at 127. Also(probably intended), the newer version can input negative values while the older ones can't. Is there a reason for this?
Yes, this was changed because Java bytes are signed, and Minecraft treats them as signed (so I'm told). Values above 127 would have been treated as negative, probably not something expected or intended by the person entering them.
I can't think of any scenario where bytes would fall out of the range [0, 127] though.
Yes, this was changed because Java bytes are signed, and Minecraft treats them as signed (so I'm told). Values above 127 would have been treated as negative, probably not something expected or intended by the person entering them.
I can't think of any scenario where bytes would fall out of the range [0, 127] though.
That also explains why resistence potion lvl 255 protects less than lvl 20.
I am trying to figure out ways to display such things as experience, levels, class / race on a website.
Normally I would just use craftbukkit sql, but the mods I am using are not supported in bukkit.
Any advice is well appreciated.
-Cere
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
I did see you mention, or Ed mention in your other thread about JSON exporters.
Its all kind of over my head, and I know nothing of nbt files, so I am stuck at the moment.
Either I wait and search for a tool to do this for me, edit my serverside mods (which I haven't done before) and write a plugin that exports the data before it is saved or scrap the idea all together.
I would love to see an "export fields/values as text" option added to NBTexplorer, but that is a very specific function, as I see it haha..
At minimum I think I could put a text version of the data on the clipboard when you copy.
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
This would help, but it would mean I would have to do it by hand for every player. I don't know what I'm going to do.
This server discourages me at every step haha.. I guess I can do nothing short of writing my own addon for the mod I am using.
Thanks for the help, your program has always been useful to me.
Something like this takes a string to a .dat file, and gives you JSON-encoded data as a string, which you could write out to another file. Wrap this up in a loop over all the files in your player directory.
string pathToPlayer = "/path/to/player.dat";
NBTFile nbtfile = new NBTFile(pathToPlayer);
NbtTree tree = new NbtTree(nbtfile.GetDataInputStream());
string jsondata = JSONSerializer.Serialize(tree.Root);
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
Im running windows 7
On startup the program can't read my Minecraft directory
and when I close the program it throws an exception
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension)
at System.Configuration.Internal.WriteFileContext..ctor(String filename, String templateFilename)
at System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
at System.Configuration.Internal.DelegatingConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions)
at System.Configuration.ClientSettingsStore.ClientSettingsConfigurationHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
at System.Configuration.UpdateConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext)
at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
--- End of inner exception stack trace ---
at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
at System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll)
at System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
--- End of inner exception stack trace ---
at System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
at System.Configuration.LocalFileSettingsProvider.SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection values)
at System.Configuration.SettingsBase.SaveCore()
at System.Configuration.SettingsBase.Save()
at System.Configuration.ApplicationSettingsBase.Save()
at NBTExplorer.Windows.MainForm.MainForm_Closing(Object sender, CancelEventArgs e)
at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.Form.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.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
NBTExplorer
Assembly Version: 2.2.0.0
Win32 Version: 2.2.0.0
CodeBase: file:///C:/Users/"edited out"/Documents/Minecraft/Edits/World%20Editing/NBT%20Explorer/NBTExplorer.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18014 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Substrate
Assembly Version: 1.3.7.0
Win32 Version: 1.3.7.0
CodeBase: file:///C:/Users/Daniel/Documents/Minecraft/Edits/World%20Editing/NBT%20Explorer/Substrate.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
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.
It looks like it's having some trouble storing user configuration settings, but they are only a convenience. They are not needed to run or use the program. I will see if I can guard them a little better in case of failure.
Could you tell me the path to your Minecraft directory?
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
- Yes it works fine (just a little annoying)
- Minecraft Directroy is C:\Users\<Name>\AppData\Roaming\.minecraft
hope this helps
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
Use TMI/SPC/NEI/MCEDIT
It might be valuable to try once as a learning experience, but there are more specialized tools available for this particular task. At least once is linked from the original post, although I can't personally vouch for specific tools.
Edit: Was it really necessary to respond to a 10-month-old reply?
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
THANK YOU!!!
--S
Syrkaz Plays Games
http://hocuspocus.taloncrossing.com/rii/NBTExplorer-2.2.0.zip
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
It's not a native .exe. It's compatible with mac via Mono.
http://hocuspocus.taloncrossing.com/rii/NBTExplorer-Mac.zip
Mac version. Only tested on 10.8, reported to not work on 10.6.
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate
Yes, this was changed because Java bytes are signed, and Minecraft treats them as signed (so I'm told). Values above 127 would have been treated as negative, probably not something expected or intended by the person entering them.
I can't think of any scenario where bytes would fall out of the range [0, 127] though.
Mods I Develop: Garden Stuff -- Storage Drawers -- Hunger Strike
Tools I Develop: NBTExplorer -- Substrate