Setting up a rented server: Difference between revisions

From Medieval Engineers Wiki
Jump to navigation Jump to search
Line 157: Line 157:
Paste this link like in between the config file line like this: <source lang="xml"><LoadWorld></LoadWorld></source> So it looks like this: <source lang="xml"><LoadWorld>c:\games\183_219_32_169_56015\1144769\medievalengi\Saves\TEST</LoadWorld></source>
Paste this link like in between the config file line like this: <source lang="xml"><LoadWorld></LoadWorld></source> So it looks like this: <source lang="xml"><LoadWorld>c:\games\183_219_32_169_56015\1144769\medievalengi\Saves\TEST</LoadWorld></source>


Now go ahead and and change the line: <source lang="xml"><WorldName>TEST</WorldName></source> to: <source lang="xml"><Worldname/></source>. THIS IS VERY IMPORTANT!! If you don't do that it will create a new world every time the server resets or restarts!
Now go ahead and and change the line: <source lang="xml"><WorldName>TEST</WorldName></source> to: <source lang="xml"><Worldname/></source> THIS IS VERY IMPORTANT!! If you don't do that it will create a new world every time the server resets or restarts!


Now save the config file again and start up your server! Following the above, it would be perfectly set and will have the mods you need and will keep your world like you left it.
Now save the config file again and start up your server! Following the above, it would be perfectly set and will have the mods you need and will keep your world like you left it.

Revision as of 16:39, 12 September 2017

Following this guide you will be able to setup your server in a basic way. I have noticed that some people are having some trouble setting up their server using a rental. First of all I would like to say that some hosts have some differences. But it all comes down to the config file.

server rental:

Rent a server at a host where you think it will be the best place to host. For most games I rented a server at Multiplay or Verygames. In my opionion they are reliable and have good support. But everyone has their own experiences so just choose which you think suits you best.

What you need:

Download Filezilla and Notepad++. Once your server has the status online go to your control panel and find the FTP access. Use Filezilla to get access to the FTP (if you have trouble connecting to the FTP please look up a guide). Using your normal notepad will work too, but Notepad++ will be easier in use.

Config file:

Once in filezilla and you have the files open, locate the dedicated.cfg file and open it using rmb on the file and clicking "watch/edit" and choose Notepad++ to open the file. Which should look something like this:

<?xml version="1.0"?>
<MyConfigDedicated xmlns:xsd="http://www.w4.net/2017/XMLSchema" xmlns:xsi="http://www.w4.net/2017/XMLSchema-instance">
<SessionSettings>
<GameMode>Creative</GameMode>
<InventorySizeMultiplier>1</InventorySizeMultiplier>
<AssemblerSpeedMultiplier>1</AssemblerSpeedMultiplier>
<AssemblerEfficiencyMultiplier>1</AssemblerEfficiencyMultiplier>
<RefinerySpeedMultiplier>1</RefinerySpeedMultiplier>
<OnlineMode>PUBLIC</OnlineMode>
<MaxPlayers>8</MaxPlayers>
<MaxFloatingObjects>64</MaxFloatingObjects>
<EnvironmentHostility>SAFE</EnvironmentHostility>
<AutoHealing>true</AutoHealing>
<EnableCopyPaste>true</EnableCopyPaste>
<WeaponsEnabled>true</WeaponsEnabled>
<ShowPlayerNamesOnHud>true</ShowPlayerNamesOnHud>
<ThrusterDamage>true</ThrusterDamage>
<CargoShipsEnabled>true</CargoShipsEnabled>
<EnableSpectator>false</EnableSpectator>
<RemoveTrash>false</RemoveTrash>
<WorldSizeKm>0</WorldSizeKm>
<RespawnShipDelete>true</RespawnShipDelete>
<ResetOwnership>false</ResetOwnership>
<WelderSpeedMultiplier>1</WelderSpeedMultiplier>
<GrinderSpeedMultiplier>1</GrinderSpeedMultiplier>
<RealisticSound>false</RealisticSound>
<ClientCanSave>true</ClientCanSave>
<HackSpeedMultiplier>0.33</HackSpeedMultiplier>
<PermanentDeath>true</PermanentDeath>
<AutoSaveInMinutes>30</AutoSaveInMinutes>
<SpawnShipTimeMultiplier>1</SpawnShipTimeMultiplier>
<DestructibleBlocks>true</DestructibleBlocks>
<EnableIngameScripts>true</EnableIngameScripts>
<ViewDistance>20000</ViewDistance>
<EnableToolShake>true</EnableToolShake>
<VoxelGeneratorVersion>0</VoxelGeneratorVersion>
<EnableOxygen>false</EnableOxygen>
<Enable3rdPersonView>true</Enable3rdPersonView>
<EnableEncounters>true</EnableEncounters>
<EnableStructuralSimulation>true</EnableStructuralSimulation>
<EnableBarbarians>true</EnableBarbarians>
<MaxActiveFracturePieces>24</MaxActiveFracturePieces>
<GameDayInRealMinutes>20</GameDayInRealMinutes>
<DayNightRatio>0.6666667</DayNightRatio>
<EnableAnimals>true</EnableAnimals>
<MaximumBots>10</MaximumBots>
</SessionSettings>
<Scenario Type="MyObjectBuilder_ScenarioDefinition" Subtype="Quickstart Planet"/>
<LoadWorld/>
<IP>_SERvERIP_</IP>
<SteamPort>29016</SteamPort>
<ServerPort>29015</ServerPort>
<AsteroidAmount>0</AsteroidAmount>
<Administrators />
<Banned />
<Mods/>
<GroupID>0</GroupID>
<ServerName>TEST Server</ServerName>
<WorldName/>
<PauseGameWhenEmpty>true</PauseGameWhenEmpty>
<IgnoreLastSession>false</IgnoreLastSession>
</MyConfigDedicated>

Settings:

If you are new to this, this is a lot to look at. But once you get used to it, it is easy. (some of the displayed code will not be the same, like server name, dedicated config etc.) Most things you can leave as is. I will take a look with you at the crucial parts.

Gamemode

Choosing game mode: If you want to play creative use:

<GameMode>Creative</GameMode>

if you want to play survival change it to:

<GameMode>Survival</GameMode>

Everything up to Loadworld is pretty straight forward, so just adjust if you want to. NOTE: some things are set for Space Engineers and won't do anything when you change them or might crash your server.

Loading a world Pt. 1

At first the line will say:

<LoadWorld/>

which basically means it wont load a world. So let's keep it like that and jump to

<WorldName/>

Fill this in with how you want to name your world for example:

<WorldName>TEST</WorldName>

Keep it like that and don't restart the server yet. We will get back to this.

Naming the server

Jump to:

<ServerName>Test server</ServerName>

If it doesn't have a server name set yet it will probably look like this:

<ServerName/>

So go ahead and change it to this:

<ServerName>Test server</ServerName>

(where it says Test server just change to the name the server you want it to be called).

Mods

Mods can be a pain, some may crash the server or might not be supported. I recommend testing the mods in singleplayer first. But look up a mod you want in your server on Steam in the workshop. If you have the mod page open just right click the page and click Copy page address. And paste it somewhere like in word or notepad. At the end of the link, you'll see a code for example 766857004. Copy this code, you'll need it. Go the the config file and look up:

<mods/>

Change it to this:

<Mods>
<unsignedLong></unsignedLong>
</Mods>

Now just go ahead and take the code you saved in word or notepad or wherever and paste it in-between the unsignedlong arrows like this:

<Mods>
<unsignedLong>766857004</unsignedLong>
</Mods>

If you have more than one mod just copy the: <unsignedLong></unsignedLong> line and paste it under the other one and fill in the code of the other mod. A small example:

<Mods>
<unsignedLong>766857004</unsignedLong>
<unsignedLong>554355435</unsignedLong>
<unsignedLong>754646325</unsignedLong>
</Mods>

This would mean i have 3 different mods in my server.

Adding mods after save file has been created

(ONLY DO THIS WHEN YOU FOLLOWED THE BASIC GUIDE TO STARTING THE SERVER, ONLY USE THIS WHEN THE SERVER IS ALREADY LAUNCHED AND YOU WANT TO ADD NEW MODS)

Once you have setup your server and you have played in it you might come across new mods that you want to install. This can be fairly tough and took me some time to figure out how to add them. Simply adding them to the Mods line does not work Here is a guide how to do it.

Save and backup your world using FTP. Then change the config code so it will make a new map by changing:

<WorldName/> to <WorldName>TEST2</WorldName>

Reset the LoadWorld line from:

<LoadWorld>c:\games\183_219_32_169_56015\1144769\medievalengi\Saves\TEST</LoadWorld>

to:

<LoadWorld/>

Then restart the server. The server will create a new world and download the new mods into the new map.

Check the server if it has the new mods enabled. If so, go to "Saves" in the FTP. There you will find the new map "TEST2" (in this case). Open the World config file using RMB and find a section where it says mods which should look like this:

<ModItem>
<Name>363037395sbm</Name>
<PublishedFileId>363037395</PublishedFileId>
</ModItem>

Copy those lines of the NEW mods and open your former world file where you want to add them. Go over to mods again in that file and add the new mod lines shown above. Save and close the notepad and go back to your settings config file.

Change the

<Worldname>TEST</WorldName>

back to:

<WorldName/>

and change

<LoadWorld/>

back to:

<LoadWorld>c:\games\183_219_32_169_56015\1144769\medievalengi\Saves\TEST</LoadWorld>

so it is basically set back to its original values.

Adding admins

To add admins first find you SteamID64 using: https://steamid.io/ Copy the SteamID64 which is a code that will look like this: 79561398041061710

Head into the config file and find:

<Administrators />

Change the line to:

<Administrators>
<unsignedLong>79561398041061710</unsignedLong>
</Administrators>

If you want to add more admins, just find their SteamID64 and add them in the list just like the mods looking like this:

<Administrators>
<unsignedLong>79561398041061710</unsignedLong>
<unsignedLong>89561398041561710</unsignedLong>
</Administrators>

(This would mean my server would have 2 different admins).

Start the server

Once on the server, leave again, and stop the server.

Loading a world 2

Go to the FTP files and find the folder: Saves. Open this folder and find the folder which contains your world. In the case I displayed above it would be called: TEST. Find the FTP URL to this map. Usually through properties. Otherwise open the: RecentWorlds file with notepad and look for the last saved world named TEST (or the name you gave your world) and copy the link it gives you. Which will probably look a bit like this:

c:\games\183_219_32_169_56015\1144769\medievalengi\Saves\TEST

Paste this link like in between the config file line like this:

<LoadWorld></LoadWorld>

So it looks like this:

<LoadWorld>c:\games\183_219_32_169_56015\1144769\medievalengi\Saves\TEST</LoadWorld>

Now go ahead and and change the line:

<WorldName>TEST</WorldName>

to:

<Worldname/>

THIS IS VERY IMPORTANT!! If you don't do that it will create a new world every time the server resets or restarts!

Now save the config file again and start up your server! Following the above, it would be perfectly set and will have the mods you need and will keep your world like you left it.

Side Notes

Be aware that some hosts have different settings and levels of security. This can also affect changing the config file. For example, some hosts allow you to change the config file using FTP but will not change the settings of the config file in the admin panel. In which case you have to make the same changes in each file.

I will change things on this topic if there are new updates changing things.