Steam Avatar
You aren't signed in

Server-Sided Saving

3 KB, 12 years ago, submitted by Chrono

Note: Credited Randy & Ephi for the duplicator code I stole.

What does this do?

Well, simple, it saves every brick, ghosted or not, server-sided. Which also means this will work on a dedicated server.

Usage:

ServerSave(saveName,ownership,events);
example: ServerSave("My Freebuild",1,1);
ServerLoad(saveName);
example: ServerLoad("My Freebuild");
Optional: ServerLoad(saveName,Ownership,Map name,color method,silent);
saveName = the name of your save
ownership = Whether ownership saves/loads or not
events = Determines whether or not brick names and events will save
Map name = That dropdown box that shows up when you load bricks, all slate edits usually use slate
color method = 1 tries to add the missing colors to the end of the current colorset which will most likely fail in all cases you try to use it, 2 just uses the color ID, 3 is the default way of loading which tries to find the closest matches for colors


If there's any bugs, don't just rate it down and post rude comments. Tell me the problem and I'll fix it.

If you found a problem and fixed it yourself already, send it to me so I can update this.

And lastly, feel free to use this as a resource without giving any credit. I believe in allowing people to learn by looking at others work without the hassle of having to figure out who they learned from.

Ruiner369
Very useful!
Gredd18
This Dose... What?
ThinkInvisible
@Gredd:
Normally, save bricks button only saves everything you've seen so far, including if you're the host of a dedicated server.
This will save everything that exists, meaning you don't have to walk around and look at everything to save.
Westonini
i still dont get it -_-
@west this saves everything. normally on other servers, you only save everything you've seen, meaning if there are other bricks you haven't looked at, they won't save.
Chrono
If you don't understand what this does then you don't understand the game itself very well.
dontcare4free
To be honest, the only thing that seems unclear is whether it supports loading it again afterwards, and in that case, how.
dontcare4free
NOEDIT: Just read it through and it doesn't seem to be supported. IMO, that'd make it much "nicer" to use (now you either have to download it from the server or copy the save around to load it).
Chrono
The funny part is, there's already a server-sided loading function built into the game.

serverDirectSaveFileLoad(filename, colormethod, directory name, do ownership, silent)

Also what do you mean by NOEDIT? There is an edit button.
Arus3595
You're soooo nice, your not a judgemental freak.
ONTOPIC: Nice. Useful.
cool
Zantigo
So... this lets you save builds without loading? seems like its only making build stealing easier. THANKS :D
Chrono
@Zantigo: It's server sided. This is so a server can save bricks. When you join a server, you are a client. You have no access to this function. Even if you did, it will not send any information to you.
NomAplemNom
Good job Chrono, very useful.
Wtf! Does not save most of the output event parameters!
dany777
On dedicated servers, when i tried to put the Public line, it doesnt work