a multiplayer game of parenting and civilization building
You are not logged in.
Sure, I'll try to build a 32-bit version soon.
You should be able to stop the server process and then run Jason's shell script from the main build directory (the one with OneLife, OneLife 7, and minorGems directories).
The script grabs the latest code for the server, client, and editor from GitHub then recompiles them. I haven't tested it, so I don't know if it resets your progress - I don't think it should.
You should probably update your client to get the latest fixes when you update the server. If you're not using the one on the test server, you can tell it to not use a custom server (change the contents of useCustomServer.ini to "0") and the client will connect to the main game servers and update. Then quit and change useCustomServer.ini back to "1".
Volny, I actually posted a link to a VM I'd built and steps to use it last night. If you do want to put a guide together for building a test server VM, feel free to use any or all of the steps from my post that could apply (like setting up port forwarding). I only made a 64-bit image, so a guide could be helpful for people who want to run it on 32-bit systems.
A friend wanted to fiddle with a custom server, so to help out, I created a VirtualBox image with the test server pre-installed on it.
The username and password are both "ohol", and the build directories are in /home/ohol/ohol-build.
To get started, you'll need to download and install VirtualBox. It runs on both Mac and Windows, though I only tested these instructions on Windows. No reason it wouldn't work fine on a Mac (or even Linux, if you want to run in a VM on there for some reason).
In theory, you should be able to run the pullAndBuildTestSystem.sh script located in the ohol-build directory to rebuild the server when the code updates.
When you have VirtualBox installed, you can use the following (overly detailed) steps to set up the VM, launch the server, and set up the networking to let you connect to the server with a client on the host machine. It's not as involved a process as it looks, I'm just used to thorough documentation.
1. In VirtualBox, Click New.
2. Give the new machine a name (like "Ubuntu-OHOL"), set Type to Linux, and Version to Ubuntu (either 64-bit or 32-bit, depending on the image you downloaded).
3. Allocate memory to the virtual machine. I have no idea what's good, I used 1024MB to test a single local login. It might work fine with as little as 512MB in a pinch.
4. For the Hard disk, select "Use an existing virtual hard disk file". Click the folder icon to the right and you'll get a file selection dialog. Navigate to the VDI file you downloaded and extracted.
5. Click Create.
6. Double-click the new VM to launch it.
7. You'll eventually see a login page with "ohol" listed as a user. Click it. For the password, enter "ohol".
8. In the barebones desktop that comes up, double-click the Terminal icon on the desktop (the one that looks like a black screen with a $ on it) to open a terminal in the OHOL build directory.
9. Type:
ip a10. Buried in all that gobbledygook, in the second group, the third or so line should start with "inet". You want the IP address in that line - if it were to start with "inet 10.0.2.15/24", then the part you would need is "10.0.2.15". Make a note of it.
11. While you're here, let's have the server get the latest code and build it, in case it's updated since I created the image. Assuming you're still in the build directory (if not, run
cd ~/ohol-build), run:
sh refreshBuildScript.sh
sh pullAndBuildTestSystem.shThe first script gets the latest version of the build script, and the second script is the actual build script. The build will take a minute.
12. When it's done, start the OHOL server. Run:
cd OneLife/server
./OneLifeServerThe server will start, and that terminal window will now be dedicated to running it. You can quit the server by typing Ctrl+Z or by closing the terminal window.
13. Now, go back to the VirtualBox main window, select the new VM, and click the Settings button.
14. Go to the Network section and click the arrow next to "Advanced".
15. Click the Port Forwarding button.
16. Click the little green "Add new port forwarding rule" button. Use the following settings, using the VM's IP address for the Guest IP.
Name: OHOL (or whatever you like)
Protocol: TCP
Host IP: 127.0.0.1
Host Port: 8005
Guest IP: (the IP address from earlier, like 10.0.2.15)
Guest Port: 8005
Note: You can leave the "Host IP" and "Guest IP" fields blank if you want to be able to connect to the VM from another computer (thanks, llap!). If you don't want to connect from another computer, I'd recommend using the settings above to restrict access to the VM's server, just in case.
17. Click OK, then OK again to get out of Settings.
18. Almost there! Go to the OHOL game directory on the host computer (i.e. Windows or Mac), go into the settings folder, and edit "useCustomServer.ini". Change the 0 to a 1, and save. If you haven't changed the custom server files before, that's all you need - if you have, change them to point to "localhost" and port "8005".
19. Launch your OHOL client. Enter anything for the email address and password, the test server won't care. If you get a login error, either use Temp Login, or change the email address to something else to force it to re-authenticate.
That should be that.
The pre-installed server uses a rough little test map I made in the editor, created following Jason's instructions here:
https://onehouronelife.com/forums/viewtopic.php?id=112
Those instructions also point out where the editor is located and how to make a test map of your own.
Note that the Guest Addition for VirtualBox are installed on the image, so you can enable the shared clipboard by going to the Devices menu, then Shared Clipboard, then Bidirectional. That will let you copy text on the host or in the VM and paste it in the other environment.
For quick reference, a section on updating the server later:
You can update the server to the latest code by going into a terminal and running:
cd ~/ohol-build
sh pullAndBuildTestSystem.shTo update the client to the latest version, go into the client's "Settings" directory and change the contents of the useCustomServer.ini file from "1" to "0" and save it. Run the client and and log in to automatically update. Then quit the client, go back to useCustomServer.ini, and change the contents back to "1" to use the client with your local server again.
If you have problems like weird crashes, try updating the server and client using the instructions above.
If you still have problems, or if you try to launch the server and get a "Bad socket bind" error, then the old version of the server might still be running in the background. The easiest way to resolve this would be to reboot the VM by running the command:
rebootOr if you want to do it like a Linux pro, run:
ps -ef | grep OneLifeIf there's a line with "./OneLifeServer" in it, check the left-most number on the line and kill that process number. If the number were "12345", you would run:
kill -1 12345Then you should be able to start the game server again.
You can also try going to the build directory, running the refreshBuildScript.sh script in case the build process has been changed, and then running the pullAndBuildTestSystem.sh script again.
sh refreshBuildScript.sh
sh pullAndBuildTestSystem.shIf you have an older version of the image that doesn't have the refreshBuildScript.sh script, go to the build directory and run this instead:
wget -N https://raw.githubusercontent.com/jasonrohrer/OneLife/master/scripts/pullAndBuildTestSystem.shThat's all the refreshBuildScript.sh script does.