Jump to content

Dedicated Server in one folder


SgtFlexxx

Recommended Posts

Hi all! I know this is really specific and odd, but I want to setup a server (and actually know if this would work) in one folder anywhere. None of me or my friends have a dedicated computer to run a server, so I thought it would be a cool idea to have a shared server (via google cloud) that any one of us could run if the others are offline. I've gotten this to work so far, but my main issues are:

 

1) My save folder is locating itself to AppData/Roaming/7DaystoDie. I need to know how to make my save folder in the same folder as my dedicated server.

 

2) Serveradmin.xml keeps resetting everytime I start the server. I want to add myself as admin, but the file keeps rewritting itself.

 

3) What files do I need ONLY for a dedicated server? I feel like I can shave down quite a bit of this folder if I knew which files are actually necessary and which aren't.

 

Any help is much appreciated. The only real pressing issue is getting the save folder to be local in the same folder as everything else.

 

Cloud server that works, but only on my computer at the moment I think: http://i.imgur.com/4DtCvFK.png

Link to comment
Share on other sites

If I understand you correctly, what you're trying to do is create a "shared" peer-to-peer (P2P) saved game, wherein any of the players connecting can potentially be the host in a future session. So, for example, you start the hosted game, you and your friends play, then when the session is done, you upload this saved game to a location where any of the other players can download it and host the next session, and so on and so forth.

 

The biggest issue I can see with this scenario is that the host's player profile (player.ttp and player.map) are unique to the host, wherein anyone else connecting would have their steam ID number as their specific file name. Perhaps it would work with even the host having their steam ID number as their file names for both .ttp and .map files, but that would need tested.

 

Also, the serveradmin file would have to be copied across for the new host, and this may be generated upon hosting. Not sure how that works exactly.

 

I don't know if there's a way to configure file associations directly for P2P hosting like there is for dedicated hosting. I feel like there should be, but it may not be set up to work that way.

 

But basically, for hosting a saved game, for the most part you just need the saved folder and each of the local player profiles (for map exploration and player info). Your biggest hurdle is going to be in how to "pass the torch" to the next host, but retain admin rights for the original host. Good luck, and post your success (plus any failed attempts) - you may help someone else figure it out who would also be willing to contribute their success.

Link to comment
Share on other sites

If I understand you correctly, what you're trying to do is create a "shared" peer-to-peer (P2P) saved game, wherein any of the players connecting can potentially be the host in a future session. So, for example, you start the hosted game, you and your friends play, then when the session is done, you upload this saved game to a location where any of the other players can download it and host the next session, and so on and so forth.

 

The biggest issue I can see with this scenario is that the host's player profile (player.ttp and player.map) are unique to the host, wherein anyone else connecting would have their steam ID number as their specific file name. Perhaps it would work with even the host having their steam ID number as their file names for both .ttp and .map files, but that would need tested.

 

Also, the serveradmin file would have to be copied across for the new host, and this may be generated upon hosting. Not sure how that works exactly.

 

I don't know if there's a way to configure file associations directly for P2P hosting like there is for dedicated hosting. I feel like there should be, but it may not be set up to work that way.

 

But basically, for hosting a saved game, for the most part you just need the saved folder and each of the local player profiles (for map exploration and player info). Your biggest hurdle is going to be in how to "pass the torch" to the next host, but retain admin rights for the original host. Good luck, and post your success (plus any failed attempts) - you may help someone else figure it out who would also be willing to contribute their success.

 

For the most part, that's correct. It's not a normal LAN session, whereas there's one host, and when he leaves the game, the server closes. It is for the most part still a dedicated server. So, if I ran the game, closed it, but still have the server running, everyone should still be able to play on it.

 

I don't think the steam profile ID thing should be an issue, as the server has no clue as to who's actually hosting it since it's outside the game. I realized this when I had no admin privileges and am still looking to get that back. It also is a bit complex using services like LogMeIn Hamachi since no port forwarding or server-IP assigning is required. I can just launch it and anyone on the hamachi server is able to launch it.

 

As far as the serveradmin.xml, I think the issue (and the main one stopping me from progressing) is that the save folder is auto-generated outside of the main 7 days to die folder (http://i.imgur.com/Rxb4s5R.png). If I can find a way to make the generate location inside the same folder as everything else, then it should be saved and transferrable on the cloud. So, in all, the only thing actually stopping me is this line of code (http://i.imgur.com/4nr6NMp.png) as im not sure how to basically specify "save in THIS folder"

 

- - - Updated - - -

 

You're using the dedi tool, not the game, right?

 

...your idea is certainly interesting...

 

startdedicated.bat is the file im using. Im not sure if there's a seperate tool. I basically just copied over the entire 7daystodie folder over to the cloud and used the startdedicated.bat only. I'm going to shed off any additional files that aren't needed when using the dedicated server if possible.

Link to comment
Share on other sites

If you're running a dedicated server, then there should be no issue, so long as the actual computer running the dedicated server remains on. If you're looking to share a dedicated save file - again, shouldn't be an issue so long as the dedicated server - regardless of host - remains on while clients are connected.

 

I guess I'm a little bit confused. You say you don't have a dedicated hardware box to run the dedicated server on, but by the sounds of things you just want to run the dedicated server on one of the client machines. This is not only possible, but many people already do exactly this. However, that machine would still have to be on pretty much all the time, or at least every time anyone wants to play.

 

I was under the impression that you wanted a simple shared save folder, and would simply rotate hosts as needed depending on who was on. This too should be possible, with some minor tweaks.

 

Perhaps you could go into a little more detail on the setup you're aiming for, with a simple example. Use names and roles, like "John is the host, Dan and Bill are clients. When John leaves the game, he leaves his computer running because it's hosting the dedicated server." - that sort of thing.

Link to comment
Share on other sites

If you're running a dedicated server, then there should be no issue, so long as the actual computer running the dedicated server remains on. If you're looking to share a dedicated save file - again, shouldn't be an issue so long as the dedicated server - regardless of host - remains on while clients are connected.

 

I guess I'm a little bit confused. You say you don't have a dedicated hardware box to run the dedicated server on, but by the sounds of things you just want to run the dedicated server on one of the client machines. This is not only possible, but many people already do exactly this. However, that machine would still have to be on pretty much all the time, or at least every time anyone wants to play.

 

I was under the impression that you wanted a simple shared save folder, and would simply rotate hosts as needed depending on who was on. This too should be possible, with some minor tweaks.

 

Perhaps you could go into a little more detail on the setup you're aiming for, with a simple example. Use names and roles, like "John is the host, Dan and Bill are clients. When John leaves the game, he leaves his computer running because it's hosting the dedicated server." - that sort of thing.

 

Sure. For the most part, what you said right now is correct. It's a dedicated server and I could leave my computer on to keep the server running, but I don't want to have to leave it on all the time or when I go somewhere. So, instead, I wanted to see if I could have the ability for anyone to run the dedicated server. So im not only sharing save files, im sharing the entire server and the ability to host it.

 

As an example:

 

There are 3 of us: Aaron, Chris, and Julian.

 

I, Aaron, store the dedicated server on Google Drive, and share it between all of us with the installed application (Gives you a file directory that's constantly updated whenever anything's changed).

 

When I, Aaron, am on, I run the server on my computer. If things get too laggy or I need to turn off my computer, I shut down the server. Google Drive will automatically update whatever files were changed (including the world) and then either Julian or Chris can go into their Google Drive directory and run the server no problem, and everyone else can connect. Important to note is that Google Drive isn't hosting the server, it's just storing the files and sharing them between our computers.

 

I believe, overall, this would not only be handy for making it so that no person has to constantly run a server on their machine, but it also serves as a backup as the server will always be on Google Drive.

 

If you still feel confused, feel free to ask. I know it's a weird thing to want to do, im just curious if I can do it. So far, it seems like I can aside from the save location being problematic.

Link to comment
Share on other sites

Well, I do know that some people have migrated a save game from one PC to another, so setting up something like this shouldn't be too difficult. Will Google Drive sync folders like that? Right now, I have my entire dedicated server packaged into a single folder on my secondary / hosting computer, and have no issues with save files. As a matter of fact, I can have multiple saves within the dedicated server folder, and simply use a different batch file / serverconfig.xml to switch between them (I do that now for 2 - 3 different instances). So if you can sync the files, then the rest is pretty simple. You just have to make sure you're syncing all of the files, including the serveradmin.xml file.

 

Probably the only issue you may run into is if someone overwrites a file, either by doing a file validation (update and validate simultaneously) or by pushing an outdated file. But sharing a save game across multiple servers, as long as the player files are updated on each push / pull, should be easy enough.

Link to comment
Share on other sites

Oh my.

 

..have you considered only sharing the save game over what essentially you're using as a VPN (although, make it a real VPN), and each user runs the dedi locally when it is their turn?

 

Yes, which would work most definitely, it would just require us to transfer over the save files each time. Just trying to bypass this if at all possible. This is more of just an experiment.

Link to comment
Share on other sites

Well, I do know that some people have migrated a save game from one PC to another, so setting up something like this shouldn't be too difficult. Will Google Drive sync folders like that? Right now, I have my entire dedicated server packaged into a single folder on my secondary / hosting computer, and have no issues with save files. As a matter of fact, I can have multiple saves within the dedicated server folder, and simply use a different batch file / serverconfig.xml to switch between them (I do that now for 2 - 3 different instances). So if you can sync the files, then the rest is pretty simple. You just have to make sure you're syncing all of the files, including the serveradmin.xml file.

 

Probably the only issue you may run into is if someone overwrites a file, either by doing a file validation (update and validate simultaneously) or by pushing an outdated file. But sharing a save game across multiple servers, as long as the player files are updated on each push / pull, should be easy enough.

 

Basically, when you install Google Drive, you get a new folder under your User. Anything put under this folder is synced up to the drive. I can sync everything up right now between me and my friends because I located the dedicated server under one folder. The only issues is that the save game world has a specific directory setup to AppData/Roaming/7DtD, and im not sure how to specify "Use this folder" instead of a specific directory (Since each of our directorys is different). In other games, you can usually specify a specific command like "Local" that will make it create the saves folder where the DedicatedServer.bat is. I just dont know how or what that command would be on here.

Link to comment
Share on other sites

serverconfig.xml

<property name="SaveGameFolder" value="./Subfolderingamedir" />

 

Thank you! That worked exactly how I wanted it to. I'll probably do some testing with this once more people come online and we can test this.

 

- - - Updated - - -

 

Might create quite a lot of bandwidth usage and game speed issues depending on your bandwidth. Each save pulse would push some fairly large files through the network

 

Hrm. Perhaps I can bypass this issue by only enabling sync when I turn off the server, so it'll overwrite way less often.

Link to comment
Share on other sites

After a few bumps, everything is working as I imagined. Thanks for the help guys!

 

Now, no one has to leave their computer overnight on to allow the other person to play. Everyone is able to host the same dedicated server anytime they want, meaning no one person has to leave their computer running constantly.

Link to comment
Share on other sites

Seems to me, since you can set the save game up on Google drive, that you could all have full copies of the dedi locally, all just pointing to the google drive folder for the save. The disadvantage, if it is one, is that one user could use mods when they host.

 

All in all, nifty idea. Kudos for getting it to work.

Link to comment
Share on other sites

  • 2 years later...

Hello! I'm rather new to 7DTD and have been loving the game. I've been playing with a few friends and was hoping to implement the same functionality that SgtFlexxx has setup of syncing our multiplayer gamesave to GDrive and have any one of us host when we want to continue playing our gamesave.

 

Would it be possible for someone to write up a step by step guide to set this up? So far I've been mimicking what I can from this thread, however, there seems to be a lot missing. Any help would be greatly appreciated, thank you!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...