#World "storage" techniques/database?

1 messages · Page 1 of 1 (latest)

ember ibex
#

I have this issue where I want to save "settings" for my world that apply to all players. My current method is a scoreboard null entity and then I set the players settings to the null entity upon join or refresh.
Like below:

scoreboard players operation @a avatarSet = avatar:config avatarSet
scoreboard players operation @a home = avatar:config home
scoreboard players operation @a shop = avatar:config shop
scoreboard players operation @a chatRankSet = avatar:config chatRankSet
scoreboard players operation @a cdSet = avatar:config cdSet

However, this is annoying when I have so many settings, and I'm looking for a better method of some kind, either block data, dynamic properties (though I'd like to avoid those), or anything else! Keep in mind I am in beta .70.23, so some approaches may no longer work. Also, the data does not need to be player-specific, just world specific! Thanks!

Any databases I can use like smelly db, but scaled down a bit?

ember ibex
#

World "storage" techniques/database?

reef island
# ember ibex I have this issue where I want to save "settings" for my world that apply to all...

Well, you yourself proposed several solutions lol. And I’m not sure to understand why you don’t like them.
Internal database is a huge problem in bedrock and it hasn’t been completely solved yet.
I’ve been using smelly database modified, as making a safe one from scratch turned out to be more complex than you may expect (imagine people killing the database entity, or destroying the database blocks 😂). The only solution you haven’t mentioned is external database through server/net, but I haven’t seen an implementation of it yet (it would also be slower probably).
Anyway most depends on how you need your info organised: do you need info about players also when they are not online? Do you need to store a wide amount of different information? The entity database is basically your best solution.

Do you have less variety of info, and with fixed length? Maybe consider using tags or dynamic properties instead.

ember ibex
# reef island Well, you yourself proposed several solutions lol. And I’m not sure to understan...

In response to this, "do you need info about players also when they are not online" I don't need player info. The player needs the world info. Like what players can do can be toggled by an admin, and it should persist after the admin leaves and a new player joins. For example, my chat ranks are icon, title, or normal - the admin can pick! I'm not sure how to do this without scores. My "values" of info are mostly booleans or short from intergers from 1-5. I've tried using entities before, but it was... not worth it. (the amount of bugs was actually insane) 😂

reef island
#

You once you set the dynamic property you can add typed records

merry bone
#

Why don't you make a config file

#

That would be better ig

#

I have seen a creator doing this

#

Ig it was @pure dew

#

Oh yeah it was him

pure dew
#

But

#

It is hard for players

#

To find out
So i was thinking i will make it ingame

merry bone
reef island
merry bone
#

Yes

#

You can change it from outside the game

reef island
#

Yea, but he said that admins need to change stuff from in game, as far as I understood

merry bone
#

He didn't said in game

reef island
#

Well, otherwise you need to restart the server every time, no?

merry bone
merry bone
#

His choice

prime lagoon
reef island
#

Oh wait, you have it on the same server don’t you?

prime lagoon
prime lagoon
#

The SQL database is setup on my computer. I can host it anywhere but running it on my computer is free lol

reef island
#

Otherwise you may risk the database not being available if server crashes (because pc is off)

prime lagoon
reef island
#

Oh, so you have big plans

#

Do you wanna create a database service for bedrock?

quiet storm
#

whats goin on here

reef island
#

Ello

#

Discussion on net databases

quiet storm
#

eh well why here ? this isnt the post for that

reef island
#

Mm? Yk, discussion on the question... replies...

prime lagoon
reef island
#

Well. Not many. Most server are shared. So they need an additional server/computer for this kind of database

#

I haven’t seen such an implementation on showcases around. Most people are after internal databases (which also work on realms and worlds)

quiet storm
#

external db is useless as its bds exclusive

reef island
reef island
quiet storm
#

just use firebase REST with net for it, u get 100mb per project

reef island
quiet storm
#

and db is json based so yeah

reef island
#

Anyway the real challenge on external (but also internal) databases is probably storing native data like player objects, items...)

prime lagoon
reef island
reef island
prime lagoon
#

What do you mean by mc-shared servers?

reef island
#

Like bisect, or all those companies selling shared bedrock servers

#

They are cheaper than generic servers, but have such limits

prime lagoon
#

Interesting, I didn't realize those companies were so limiting. I was planning on just spinning my server package up with AWS or Google Cloud

reef island
prime lagoon
reef island
prime lagoon
reef island
#

Other bds

prime lagoon
tepid socket
#

Jumping in cuz I found this interesting, I had a script that attempts to replicate rest api using minecraft scoreboards but it results poorly lol.

ember ibex
#

Btw, my current solution for this question is three settings variables with encoder and decoder for settings so it can store "possible configurations" of settings

#

simillar to mrpatches123 approach in that anticheat I can't remember the name of

tepid socket
timid sand