Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Storing data in database/file

Give us your input on how we may improve the ScriptAPI in the game in future versions.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
MScull
Fighter
Fighter
Posts: 31
Joined: Sun May 29, 2016 9:43 pm
Title: www.youtube.com/c/MScull
SFD Account: MScull
SFD Alias: Scull
Started SFD: PreAlpha 1.8.8
Location: The Netherlands
Gender:
Age: 17

Storing data in database/file

Post by MScull » Sat Dec 31, 2016 10:54 pm

Hello,
I've seen a server storing player's data in a database. So your data wouldn't get lost when you rejoin.
I was wondering if it would be possible to store data in an external file/database. If so, an example would be really appreciated.
Thanks in advance.

-MScull
2 x
hi

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 416
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Sat Dec 31, 2016 11:21 pm

In the past I asked that, in this thread.
we are waiting for that will become possible with a class in the script API because, due for security problems, we cannot use C#'s namespaces for storing data.
The thing you have seen is a trick some server hosts uses to get data from the game and put inside again. For this you can use Cheat Engine or other memory debugger programs, your script needs to save all in the "Game.Data" variable as a long string and then before the server shuts down the string is collected. When the server is reopened, the reverse way.
2 x

User avatar
Billy
Superfighter
Superfighter
Posts: 271
Joined: Fri Apr 22, 2016 3:56 pm
Title: Owner of a failed Clan
SFD Account: Billy
SFD Alias: Billy
Started SFD: October 2015
Location: Austria
Gender:
Age: 17

Post by Billy » Sun Jan 01, 2017 12:17 am

Antonikon did that.
I miss his server so much...
2 x
Join Delta Squad today, if you mail me now you will get this cool private rank for FREE, but thats not all, you will also get an imaginary Cookie, so better hurry up!
Yea, ehh, that was a big fail...

User avatar
MScull
Fighter
Fighter
Posts: 31
Joined: Sun May 29, 2016 9:43 pm
Title: www.youtube.com/c/MScull
SFD Account: MScull
SFD Alias: Scull
Started SFD: PreAlpha 1.8.8
Location: The Netherlands
Gender:
Age: 17

Post by MScull » Sun Jan 01, 2017 6:52 pm

JakSparro98 wrote:In the past I asked that, in this thread.
we are waiting for that will become possible with a class in the script API because, due for security problems, we cannot use C#'s namespaces for storing data.
The thing you have seen is a trick some server hosts uses to get data from the game and put inside again. For this you can use Cheat Engine or other memory debugger programs, your script needs to save all in the "Game.Data" variable as a long string and then before the server shuts down the string is collected. When the server is reopened, the reverse way.
Thanks for posting a link to the original thread. I'm really happy that there will be a way to do it in the future.
1 x
hi

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest