ID:1924877
 
(See the best response by Kaiochao.)
Is/would it be possible to overwrite a game's .rsc file (while the game's being hosted) without having to shutdown?

As a secondary question, would it ever be possible for BYOND to create a temporary copy of the .rsc file for hosting, so the original can be overwritten while it's in use?
Best response
If you mean you're trying to compile while hosting, all you have to do is... not host from the source. Put the host files in a separate folder when you want to host and test.
In response to Kaiochao
Kaiochao wrote:
If you mean you're trying to compile while hosting, all you have to do is... not host from the source. Put the host files in a separate folder when you want to host and test.

I'm not hosting from the compiled .dmb, I'm hosting from a sub-directory Game\Hosting\, however, while hosting, if I compiled and a new .rsc is generated (icon update, for example,) overwritting it in the sub-directory isn't possible due to it being locked, a shutdown is required. I'd just like to know if it's possible to overwrite it without a shutdown.
Nope.
In response to Ter13
Ter13 wrote:
Nope.

Super.
Yes and no.

It is doable... We do it on tgstation. But it's not easy. And it only takes effect after a world.Reboot().

What you do is make two hosting directories, lets call them Game\Hosting\a and Game\Hosting\b.

You then make a symbolic link, called Game\Hosting\current, and point it to Game\Hosting\a, and run dd via the current folder. You then update to the Game\Hosting\b folder, then delete the Game\Hosting\current symbolic link and make a new one pointing to the Game\Hosting\b.

on the next update, you do the same, but swap a and b.

Here is the batch file that does this for tgstation: https://github.com/tgstation/-tg-station/blob/master/tools/ tgstation-server/Update%20Server.bat

That's a really clever workaround.
You should have seen how excited i was when i found out it worked.

Turns out, in windows, file locks and file handles effect and point to the target of the symbolic link, not the link. (unless you do things to prevent this) So this can be done just with the rsc as well, and not a folder. But folder is easier to manage.