Jump to content
  • 0

How to understand the database in DB Browser?


RandemGamor

Question

Hi there,

So it's been around 3.5 years since I last did this.. but when I open up the database for my server in DB Browser it's got all weird symbols instead of tangible text?
Is there a way to get around this so I can actually understand whats in the database files please?

Many Thanks,
Randem Gamor.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 1

I think it depends on which values you're trying to look at.

 

Some fields are just references to other fields or guids and won't have any relevant information. Some are basically just dumps of information and others are JSON fields. And then there's the fields that are just actual data you can see as is.

Link to comment
Share on other sites

  • 0

Well for example I've opened up playerdata.db
A lot of the cells are just weird symbols and unreadable / uneditable?
It's been 3-4 years since I last did this but I don't remember the weird symbols.. :)

Here's a picture of what it looks like for me.
6c56e1851f8f875ee7858f30c753dadb.jpg

Many Thanks,
Randem Gamor.

Link to comment
Share on other sites

  • 0

You really shouldn't touch those columns or edit the database manually unless you know what you're doing anyhow. (Especially not at runtime, as those changes are likely overwritten or never read by the server anyway)

Those are just the internal Ids that the engine uses to track objects, they're not something sensible you have to worry about. (Even if you saw them, they'd just look like this: 134c9681-45f7-4fa1-8a67-67e3245f9e79 )

 

So don't worry about those fields.

I still don't understand what you're trying to accomplish and what fields you'd need for what though. If we know what you're trying to do it might be easier to point you in the right direction?

Link to comment
Share on other sites

  • 0
53 minutes ago, Cheshire said:

You really shouldn't touch those columns or edit the database manually unless you know what you're doing anyhow. (Especially not at runtime, as those changes are likely overwritten or never read by the server anyway)

Those are just the internal Ids that the engine uses to track objects, they're not something sensible you have to worry about. (Even if you saw them, they'd just look like this: 134c9681-45f7-4fa1-8a67-67e3245f9e79 )

 

So don't worry about those fields.

I still don't understand what you're trying to accomplish and what fields you'd need for what though. If we know what you're trying to do it might be easier to point you in the right direction?


Well it's more for admin / moderation - I need to be able to edit the database files if needed, as I don't think there's tools currently to do it via the client or editor?

I'm trying to think of some examples lol... As there's many situations where I'd need to be able to.

Let's say they forgot their password and needed it changing. Currently I can't do that in the database because it's all jargen.
I've even updated to the latest DB Browser and it shows "BLOB" lol.

Or let's say I wanted to tweak the data of a players variable... Say Mining Experience or Mining Level.
I can't even figure out which is which because under 'PlayerId' and 'VariableId' it just says "BLOB"
If it displayed the PlayerId and VariableId then I could simply see what variable belonged to who, and if needed edit/tweak it in the database.
I would do it with the server offline, then put the server back up.

Let's say I wanted to check the inventory of a player. Currently I can't see Item Id, PlayerId, etc in the database as it's all "BLOB".

Database access / edit ability would also be useful for giving/taking items from players. Let's say they somehow got a forbidden item for example and I needed to search the database for it to remove it. Again it just shows "BLOB" instead of Id, PlayerId, etc :D

Also in the near future when my game is published properly I'll want to add some in-game purchases, vip, tokens etc.
It would be much easier if I could give these without the player being online and having database access / ability to edit would make this real easy.

So that's why I really need to be able to understand and edit the servers playerdata.db :)

Unless there either are some admin tools already, or a way I could do this in-game? Like via admin commands let's say..
/invview player_name - to get their inventory up. Be able to take stuff out, put stuff in etc.
Would also need to be able to tweak variables for players too. Let's say for setting the days they have VIP for, and so on.

Hope this all makes sense :D

Many Thanks,
Randem Gamor.

Link to comment
Share on other sites

  • 0

Yeah, none of those things are possible unless you shut down the entire server, then make your edits and reboot the server. Do not edit the database while the server is running and even when it's not be really careful with what you do.

Not exactly a desirable or recommended approach.

The Blobs are exactly the data they are, they're either bulk data or a Guid that identifies an object. (And when it identifies an object, there's an object elsewhere with the exact same Guid that it references.. If you need to know how that works or why, it follows the Relational Database Model)

 

What you're looking for is the API to do stuff like this from, it lets you do live edits of data. (See documentation: https://docs.freemmorpgmaker.com/en-US/api/v1/ )

There's currently no finished front-end for the API, so you'd either have to write your own or wait for a project that's being worked on to be released.

 

c393dceca1b057c43cf7143b82510ac7.png

 

I know there's a website (IntersectCMS) around that can do SOME parts of the user management process as well. But it's not focussed on managing your server so much as it is a front-end for your users to log in to and see data from.

Link to comment
Share on other sites

  • 0
5 hours ago, Cheshire said:

Yeah, none of those things are possible unless you shut down the entire server, then make your edits and reboot the server. Do not edit the database while the server is running and even when it's not be really careful with what you do.

Not exactly a desirable or recommended approach.

The Blobs are exactly the data they are, they're either bulk data or a Guid that identifies an object. (And when it identifies an object, there's an object elsewhere with the exact same Guid that it references.. If you need to know how that works or why, it follows the Relational Database Model)

 

What you're looking for is the API to do stuff like this from, it lets you do live edits of data. (See documentation: https://docs.freemmorpgmaker.com/en-US/api/v1/ )

There's currently no finished front-end for the API, so you'd either have to write your own or wait for a project that's being worked on to be released.

 

c393dceca1b057c43cf7143b82510ac7.png

 

I know there's a website (IntersectCMS) around that can do SOME parts of the user management process as well. But it's not focussed on managing your server so much as it is a front-end for your users to log in to and see data from.



Ooo okay thanks! I'm not sure where to even start with the API stuff but I have a couple of people I know who are working with various lots of coding so I'll ask them :)

Thanks.


*Edit*
How do you get that dashboard thing you've screenshoted there please?

Thanks :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...