Im need help!

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

MusicManSK

Active Member
Nov 30, 2017
230
11
18
Hello!
Im need to make Achievements..
but i want to know your opinion:
How whould i do it?
should i save it into skript variables, or into some text file?
 
I would do variables, they don't require addons
 
ye.. but i dont have good experiences with variables.. because i will have 30-40 achievements*all players... its so much of variables.. and my variable file has 4GB.. 4GB of text.. its insane! excel couldnt open it so i opened only first milion of them and taken only first 200 which i needed.. skript couldnt start and i thought that all my variables are gone.. but its ok..
 
Well if your variable file is 4GB I don't think it's because of the achievements
 
i already fixed it several monts ago.. i know but you have 10 players, times 40 achevements its 400 variables and its only 10 players!
 
So? 400 can do. If you want you create another Skript database
 
So you are worrying about your variable file when you have 2000 players on one server? There are other things to worry about when you have that many players online
 
Skript itself has an options to add a MySQL or SQLite database in the config.sk file
 
but they don't have to be online.. there can be just 20 players online a day.. but variables are saved for each
 
Use a database, they are better at handling a lot of data then .csv files
 
You can reduce the number of variables you save per-player by only storing data for each achievement for a particular player if they have started progress on that achievement. Don't go looping through all of your achievements and setting {achievement::%loop-value%::complete::%player's UUID%} to false for every one of them on first join. People too often don't take advantage of the fact that "not set" is a variable state in Skript. The very, very large majority of players will not finish all 40 achievements, so you will save on a lot of data storage.

That being said, 80,000 variables isn't crazy. There are ~90,000 variables on my server at the moment and they load in 2.7 seconds. Now, of course, you'll ideally not have 80,000 variables coming from a single script, so I understand your concern, but as long as you optimize it correctly I don't see it being a huge issue. Once you're reaching the point of thousands of players, you'll need smarter solutions for stuff like this anyway.
 
Status
Not open for further replies.