Jump to content

Open Community  ·  29 members

Valheim

Valheim World Sync Guide


KuntCnuckle

Recommended Posts

I wrote a guide to setting up an alternative to using a dedicated server.
This allows any player to host at any point.
The core idea behind this revolves around using git to automatically sync worlds.
Player A: Runs a launch .bat
- Pulls the latest from the repository
- Valheim is launched
Player A: Starts a server with the synced world
Player B: Launches Valheim from Steam
Player B: Joins the Game
Player C: Joins the Game
Player D: Joins the Game
All Players play as much as they want
Player A: Closes the game
- Pushes the world’s changes to the repository
To start another session, any of the players can follow these steps.
You can read the setup here:

 

Link to comment
Share on other sites

One small way you could improve this is add a file to those stored in the repo that contains the username of the person who last started the server. Also the time it was started. You can get that from:

echo %username%

echo time /T

echo date /T

 

You could then echo out the contents of the file with the user and time and prompt to continue or not.

 

If the time was recent, the user would know it could be running and contact that person. If they see their name, they no they can continue and play without contacting anyone.

 

Now if the IP of the server was added and echo'd also, that would help people know where they need to connect to for joining the server. I think the intent is that the param.txt is unique on each persons PC, but the batch file is the same for everyone. So the IP of when the server is run could go in the param.txt file too.

 

Too bad Valheim doesn't just include a non-dedicated server option. This is all a bit more than I'd ask any of my friends to do.

Link to comment
Share on other sites

One small way you could improve this is add a file to those stored in the repo that contains the username of the person who last started the server. Also the time it was started. You can get that from:

echo %username%

echo time /T

echo date /T

 

You could then echo out the contents of the file with the user and time and prompt to continue or not.

 

If the time was recent, the user would know it could be running and contact that person. If they see their name, they no they can continue and play without contacting anyone.

 

Now if the IP of the server was added and echo'd also, that would help people know where they need to connect to for joining the server. I think the intent is that the param.txt is unique on each persons PC, but the batch file is the same for everyone. So the IP of when the server is run could go in the param.txt file too.

 

Too bad Valheim doesn't just include a non-dedicated server option. This is all a bit more than I'd ask any of my friends to do.

 

That's a great idea!

 

As an alternative I was thinking of setting a lock file to get around this issue.

 

I did get a suggestion from someone else to just use SyncThing.

 

https://syncthing.net/

 

I didn't test it, but it seems like a much simpler approach for non git familiar users.

Link to comment
Share on other sites

 

One small way you could improve this is add a file to those stored in the repo that contains the username of the person who last started the server. Also the time it was started. You can get that from:

echo %username%

echo time /T

echo date /T

 

You could then echo out the contents of the file with the user and time and prompt to continue or not.

 

If the time was recent, the user would know it could be running and contact that person. If they see their name, they no they can continue and play without contacting anyone.

 

Now if the IP of the server was added and echo'd also, that would help people know where they need to connect to for joining the server. I think the intent is that the param.txt is unique on each persons PC, but the batch file is the same for everyone. So the IP of when the server is run could go in the param.txt file too.

 

Too bad Valheim doesn't just include a non-dedicated server option. This is all a bit more than I'd ask any of my friends to do.

 

That's a great idea!

 

As an alternative I was thinking of setting a lock file to get around this issue.

 

I did get a suggestion from someone else to just use SyncThing.

 

https://syncthing.net/

 

I didn't test it, but it seems like a much simpler approach for non git familiar users.

 

 

I thought of the lock file too. Didn't know exactly how to make it work though.

 

I took a quick look at SyncThing. Looks interesting. Never heard of it. While you are playing, the files would be constantly updating. Would be interesting to see how it would handle that situation and hopefully it wouldn't hit your network too hard.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...