One Hour One Life Forums

a multiplayer game of parenting and civilization building

You are not logged in.

#1 2018-04-06 22:49:48

Maximoose
Member
Registered: 2018-04-06
Posts: 26

How can i make my own server?

I want to create a server for me only, hosted by me lol. I have looked around but nothing i have seen works so far. So i can explore the tech tree and learn how to do everything in order to help more in the real servers. Basically a single player mode

Last edited by Maximoose (2018-04-06 23:49:10)

Offline

#2 2018-04-06 23:46:46

Maximoose
Member
Registered: 2018-04-06
Posts: 26

Re: How can i make my own server?

Anyone know how?

Offline

#3 2018-04-07 00:01:19

powa
Member
Registered: 2018-03-11
Posts: 58

Re: How can i make my own server?

Yeah, I just went through it all today and built mine.  Still got screwed by the last Apocalypse though, lol.

Start here: https://onehouronelife.com/forums/viewtopic.php?id=112

On pp 2 there's a couple of links of peoples' methods.  I got a VirtualBox server working following Bimble's guide.  Also read the EditorAndServerAndServerBuildNotes.txt in OneLife/documentation.

Offline

#4 2018-04-07 20:58:43

Maximoose
Member
Registered: 2018-04-06
Posts: 26

Re: How can i make my own server?

powa wrote:

Yeah, I just went through it all today and built mine.  Still got screwed by the last Apocalypse though, lol.

Start here: https://onehouronelife.com/forums/viewtopic.php?id=112

On pp 2 there's a couple of links of peoples' methods.  I got a VirtualBox server working following Bimble's guide.  Also read the EditorAndServerAndServerBuildNotes.txt in OneLife/documentation.

Thank you!

Offline

#5 2018-04-08 04:02:12

Mewmew
Member
Registered: 2018-04-04
Posts: 3

Re: How can i make my own server?

Can you avoid things like the Apocalypse and keep things going how you want though and not have to deal with the wipe whims?  I thought other servers could be ran your way and not have to have anything to do with stuff on the main server?

Offline

#6 2018-04-08 05:29:02

powa
Member
Registered: 2018-03-11
Posts: 58

Re: How can i make my own server?

Mewmew wrote:

Can you avoid things like the Apocalypse and keep things going how you want though and not have to deal with the wipe whims?  I thought other servers could be ran your way and not have to have anything to do with stuff on the main server?

Yup.  Specifically for Apocalypse, at least.  Under OneLife/server/settings are the ini files for (you guessed it) server settings.  Change apocalypsePossible to 0 to disable apocalypses on your server.

But then, Apocalypses are currently turned off on the main servers.  I don't think it's possible for private servers to cause Apocalypse sweeps onto the main servers without knowing Jason's "secret code".

Offline

#7 2018-04-08 11:17:53

mikekchar
Member
Registered: 2018-03-19
Posts: 51

Re: How can i make my own server?

The thing that scares me about the apocalypse is that I noticed that *my* server checks for remote apocalypses!  Interestingly, my server was down when the apocalypses happened, so it didn't affect me, but that option is well worth turning off on a private server.  I need to check the source code because I was tempted to try to do an apocalypse on my own server, but I'm a bit afraid that it will trigger the same on other private servers that don't have the option turned off...

Offline

#8 2018-04-08 11:34:54

Joriom
Moderator
From: Warsaw, Poland
Registered: 2018-03-11
Posts: 565
Website

Re: How can i make my own server?

Apocalypse on private server should not trigger the Apocalypse event spreading.
At least Jason assured us that you could not trigger Apocalypse from private server. He had official servers in mind but I suppose that should be true for custom servers as well.

Custom servers read the official server feed for Apocalypse event though. Apocalypse might be disabled but... I'm not sure if official servers block the even from spreading or simply do not respond to the event. Trying to start Apocalypse on official server might fail to have any effect on other official servers but.... customs might still read it? We would need to ask Sammoh whos probably best versed in game code or Jason directly.

Offline

#9 2018-04-08 18:05:09

powa
Member
Registered: 2018-03-11
Posts: 58

Re: How can i make my own server?

Joriom wrote:

Apocalypse on private server should not trigger the Apocalypse event spreading.
At least Jason assured us that you could not trigger Apocalypse from private server. He had official servers in mind but I suppose that should be true for custom servers as well.

Custom servers read the official server feed for Apocalypse event though. Apocalypse might be disabled but... I'm not sure if official servers block the even from spreading or simply do not respond to the event. Trying to start Apocalypse on official server might fail to have any effect on other official servers but.... customs might still read it? We would need to ask Sammoh whos probably best versed in game code or Jason directly.

I investigated this for a day or so (didn't want my server affected).  You can look at all the changes since the apocalypse code got added on github to easily see all apocalypse code:

https://github.com/jasonrohrer/OneLife/ … c...master .

I guessed the first commit in the comparison by looking at the commit messages.  You can choose whatever commit you want to start the comparison from here: https://github.com/jasonrohrer/OneLife/commits/master.  You could also chose an early second commit to compare against to ignore changes unrelated to Apocalypse.  But this seems like a good comparison.


Here's what I gleaned:

The apocalypse code is mainly split into five files: server/server.cpp, server/map.cpp, gameSource/objectBank.cpp, reflector/server.php, and gameSource/LivingLifePage.cpp.  There's some other relevant ini files and minor effects.

gameSource/objectBank.cpp -- Defines which items should trigger the Apocalypse
server/map.cpp -- Actually checks if an object in the world satisfies the trigger definition
refelctor/server.cpp -- Checks if the apocalypse triggered should actually propagate to other servers (by comparing encrypted codes).  For application to the main servers, this seems to run on some special server Jason has so that his secret code doesn't have to be sent out (see below).
server/server.cpp -- checks online if an Apocalypse has occured and propagates to the current server, including killing the players.
gameSource/LivingLifePage.cpp -- Runs the Apocalypse animation/visuals on the client.

Importantly, there's the ini file server/settings/apocalypsePossible.ini .  Before the fix post Apocalypse 5, this didn't actually affect server/server.cpp, so all the connected servers would get hit if an apocalypse was triggered, which happened for Apoc 5.  Now that the fix is in place, you can just set the value inside to 0 and the main servers won't propagate an apocalypse to your server.

A private server should not be able to propagate apocalypses to the other servers because, by assumption, the private server doesn't have the correct reflectors/sharedSecret.php file.

This is all basically conjecture from looking at the code in the past few days so I could be wrong.  But I'd be surprised if that isn't the gist of it.


Edit:

Also, there's the server/reflectorURL.ini file.  If you just change the URL to something else in your server, it shouldn't ping the official reflector server for remote Apocalypses, being another measure to avoid Apocalypse waves from the mains.  You could apparently change this to some other reflector address to be connected to a different "multiverse" of Apocalypse-linked servers.

Last edited by powa (2018-04-08 18:44:31)

Offline

Board footer

Powered by FluxBB