Server Setup

This guide will help you start your own playable old Drift City server. You'll be using the 2008 TW Docker Repack and configuring it to run locally on your computer for modding and/or playing.

Requirements

Tip

If you know what Docker and Docker Compose are and have previously used them, you can stop here and just use the repack files since they include a docker-compose config.

Steps

Set up SQL Server

  • Simple:
    • Run installer (SQL2022-something)
    • Run Installation -> New SQL Server standalone installation
    • Set up the database, selecting the following when relevant:
      • developer edition
      • no azure extension for sql server
      • include database engine services
      • mixed mode authentication, create and write down password
  • Detailed:
    • run installer (SQL2022-something)
    • click Custom
    • click Install
    • it downloads and does stuff
    • SQL Server Installation Center pops up
      • click Installation
      • click New SQL Server standalone installation
    • says please wait, SQL Server 2022 Setup pops up
    • make sure free edition says Developer
    • click Next
    • click I accept
    • click Next
    • Microsoft Update step
      • click Next
    • Install Rules step
      • click Next
    • Azure Extension for SQL Server step
      • click Azure Extension for SQL Server to make sure it's not checked
      • click Next
    • Feature Selection step
      • click Database Engine Services to make sure it's checked
      • click Next
    • Instance Configuration step
      • click Next
    • Server Configuration step
      • click Next
    • Database Engine Configuration step
      • click on Mixed Mode to select it
      • enter a password and write it down (this guide will refer to this as database server password later)
      • click Add Current User
      • click Next
    • Ready to Install step
      • click Install
    • Complete step
      • click Close
    • close SQL Server Installation Center

Set up SQL Server Management Studio

  • run installer (SSMS-something)
  • click Install
  • click Close

Creating a database for ZoneServer

  • launch Microsoft Sql Server Management Studio 18
  • click Connect
  • right click the server in the left sidebar and click Properties
    • write down the name displayed near the top (this guide will refer to this as database server name later)
    • click on Connections and make sure Allow remote connections to this server is checked
    • click OK
  • right click Databases in the left sidebar
  • click New Database
    • name it SKDBTW
    • click Options
    • for Recovery model: choose Simple
    • click Ok
  • open the File menu at the top and under Open choose File
    • find the zoneserver-docker folder and in the db folder select 01_initialize_database and press Open
    • click Execute (with the little green play icon)
    • when it's done it should show Commands completed successfully. in the lower half of the window
  • open the File menu at the top and under Open choose File
    • find the zoneserver-docker folder and in the db folder select 02_create_user and press Open
    • click Execute (with the little green play icon)
    • when it's done it should show Commands completed successfully. in the lower half of the window

Configuring database connectivity (ODBC)

  • launch ODBC Data Sources (32-bit)
  • click on the System DSN tab
  • click Add
    • choose SQL Server Native Client 11.0
    • for Name: write SKDBTW
    • for Server: write the database server name you wrote down when creating the database
  • click With SQL Server authentication using a login ID and password entered by the user
    • for Login ID: write sa
    • for Password: write the database server password you wrote down when setting up the database
  • click Next
  • click Change the default database to: and write SKDBTW
  • click Next
  • click Finish
  • click Test Data Source... to check if everything was configured correctly
    • if you followed every step of this guide, it should say TESTS COMPLETED SUCCESSFULLY!
    • click OK, click OK again, and click OK to close the last ODBC window.

Set up Visual Studio Code

you can skip this if you decided to use some other editor instead. these settings are for convenience

  • make sure the following options are selected:
    • Add "Open with Code" action to Windows Explorer file context menu
    • Add "Open with Code" action to Windows Explorer directory context menu

Configuring the server to use the new database

  • find the zoneserver-docker folder and go to the server folder inside it
  • open the file named GDBC (right click it and open with -> visual studio code)
    • visual studio code should open up with the contents of the file displayed. if it's showing the Get Started page, you can click on the X next to Get Started to close it.
  • you should see the contents of the file as follows:
  	[DBCONN]
0	SKDBTW
1	sa
2	z0ne!server
  • replace z0ne!server with your database server password
  • click on File in the top left and then click Save to save your changes

Enabling legacy console

  • launch Command Prompt
  • click on the icon in the top left and in the menu that pops up click Properties
  • click on Use legacy console near the bottom
  • click OK
  • close the command prompt window

Trying it out

  • find the zoneserver-docker folder and go to the server folder inside it
  • double-click on ZoneServer to start the game server
    • if a Windows Security Alert pops up, make sure all the checkboxes are checked and press Allow access
  • find the zoneserver-docker folder and go to the client folder inside it
  • double-click on DriftCity to run the game
  • log in with username admin and password admin

Author

Perl