#(zemenus) flags vs yaml

53 messages · Page 1 of 1 (latest)

fiery valley
#

For example: I want to create factions system, with some data for them, like: amount of money, what players are in there, how much land it got and etc.

Is it better to store such things in flags, or external yaml files?

gilded hollowBOT
#

(zemenus) flags vs yaml

gilded hollowBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

shut tusk
#

flags

fiery valley
# shut tusk flags

Just to be clear: flags stored in the server's active memory (RAM), right? Isn't a lot of this stuff gonna lower the performance?

sour nymph
#

They are, but they shouldn't... at least idt they should (unless you're saving an obscene amount of data at once i guess)

#

I'm working on a pretty massive project rn that saves a lot of data and I've never ran into performance issues

modest jacinth
#

with yaml, you're either keeping it persistently loaded, which just makes it a worse flag, or loading and unloading it for every operation, which is dramatically more expensive, unless you have a really weird hardware setup where you have top-tier everything except ram

#

It's unlikely to create any noticable problems

#

and for the record, not all flags are persistently loaded

#

it differs depending on what it is you're flagging

#

player flags, for instance, aren't loaded unless the player is online or they are accessed

fiery valley
#

The only thing I have in YAML is the nicknames and ID's these nicknames linked to

modest jacinth
#

I assumed most of the data we're talking about would be in server flags, and so my comment wasn't necessarily relevant to this project, but I just wanted to make sure you understood how it worked

#

flags stored in the server's active memory (RAM), right?
^ just wanted to clear this up

#

only sometimes

fiery valley
# modest jacinth only sometimes

Player flags active when player online

Location flags active if the location is loaded then?

And server flags are active all the time I assume

fiery valley
modest jacinth
#

I'm not certian if locations require the chunk to be loaded, or just the world itself

#

one of the two

#

someone else surely knows if it's important

shut tusk
#

iirc location flags are loaded on demand, could be wrong

fiery valley
#

Okay then. Back to the faction and flag theme question:
What if I want to edit some data in these flags?
Of course I can make a command or override flag value with mine, but what if I want to edit it, well, like in a file?

I know that it's pretty simple to do it in yaml file, but what about flags? (Last time I checked my server flags - I couldn't read a thing)

#

Is there any tip to make flag be formatted more appropriately for manual editting?

#

Also, can I save flags in the different files? Or is it unnecessary?

modest jacinth
#

you uhh

#

shouldn't?

shut tusk
#

you shouldnt be messing with the flags folder at ALL

modest jacinth
#

yaml is the appropriate choice if you somehow needed to manually input data but

sour nymph
#

yeah denizen handles the transfer of flags from ram to permanent memory for you

modest jacinth
#

I see no reason why you'd want/need to here

gilded coral
#

flags are attached to objects

modest jacinth
#

any rare instances where it's needed you can just use a command

gilded coral
#

what

modest jacinth
#

what is that in responce to lol

fiery valley
#

Hmm, okay then, thanks for the info and help, guess I'll be using flags for these kind of things

Buuut last question(s):
What are the benefits of using YAML then? Or do you have any example of you using it instead flags?

modest jacinth
#

^ or manual data

gilded coral
#

yml aint for data

modest jacinth
#

98.6% of the time flags are better

#

in half of the remaining 1.4% of the time, a database is actually a better idea

#

(this is not such an instance, to be clear)

fiery valley
#

I heard it's very useful

gilded coral
#

You dont need a database, just make use of flags

#

and subflags

modest jacinth
#

I've never made use of one for minecraft

#

flags have always served my purposes better

fiery valley
#

Okie-dokie then, thanks for helping me out, again, I guess it's resolved now