Skip to content

ArTeMiS Game Server ​

Added 2024/06/01

Download ARTemis from https://gitea.tendokyu.moe/Hay1tsme/artemis and choose master branch. DO NOT use develop branch for now because the title server doesn't expose the field hostname unlike in the master.

Most of the description below is taken from the README.md, but I added the screenshot.

Install Prerequisites ​

Python ​

  • Python versions from 3.8 to 3.11 work with ARTEMiS. We recommend 3.11.
  • Install using whichever options best suit your environment, making sure that the Python executable is on path, such that you can open CMD, type python --version and see the version of Python you have installed.
  • If you already have a working version of Python installed, skip this step.

MariaDB ​

It is always recommended to use MariaDB over MySQL because Oracle is a terrible company.

Download version 10.11.8 from https://mariadb.org/mariadb/all-releases/

alt text

alt text

Double click the EXE and follow along the installation wizard.

alt text

REMEMBER YOUR ROOT PASSWORD SO YOU CAN LOG IN IN FUTURE STEPS.

alt text

alt text

Optional: GUI database viewer ​

  • Having a GUI database editor is recommended but not required.
  • MariaDB will try to install HeidiSQL, but we recommend DBeaver.

alt text

Follow the installation wizard to install.

alt text

We will use this later to inspect the database after we setup.

Download ARTEMiS ​

Use git to clone the repo instead of using HTTPS zip download so it is easier to pull any updates.

git clone https://gitea.tendokyu.moe/Hay1tsme/artemis.git -b master

Database Initialization ​

This will create a database named aime, and create a aime user that has the necessary privilege to use that database.

Log into your server as root, either via GUI (recommended) or CMD

alt text

alt text

alt text

alt text

Click Finish button after the connection test completed.

alt text

Next, we will use SQL script to create the default aime user.

alt text

Paste the following into the window. Highlight each line one by one, then press Ctrl+Enter to execute.

TIP

Replace <password> with your own password!

sql
CREATE USER 'aime'@'localhost' IDENTIFIED BY '<password>';
CREATE DATABASE aime;
GRANT Alter,Create,Delete,Drop,Index,Insert,References,Select,Update ON aime.* TO 'aime'@'localhost';

alt text

Create Python Virtual Environment ​

Python virtual environments are a good way to manage packages to avoid any package conflict.

Open your console, then go to your Artemis folder.

python -m venv venv

This will create a venv folder.

Run venv\Scripts\activate.bat to activate the venv whenever you need to interact with ARTEMiS.

alt text

TIP

You are in venv if you see (venv) prefix before the prompt.

All the rest of the steps assume your venv is activated.

Install pip modules ​

pip install -r requirements.txt

Setup Server Configuration ​

Create a new config folder and copy the files in example_config over.

alt text

Edit core.yaml

  • Change listen_address to 0.0.0.0 to listen for connection from all network interfaces.

  • Put the password you created for the aime user into the database section.

  • Put in the aimedb key Copyright(C)SEGA.

    The key is found from https://sega.bsnk.me/allnet/aimedb/communication/#fn:1

    alt text

  • Set your hostname to be whatever hostname or IP address games can reach your server at (many games reject localhost and 127.0.0.1).

  • Optional: generate base64-encoded secrets for aimedb and frontend.

  • See config.md for a full list of options.

My core.yaml file after adding those values.

yaml
server:
  listen_address: "0.0.0.0"  
  hostname: "localhost"  
  port: 80
  ssl_key: "cert/title.key"
  ssl_cert: "cert/title.crt"
  allow_user_registration: True
  allow_unregistered_serials: True
  name: "ARTEMiS"
  is_develop: True
  is_using_proxy: False
  proxy_port: 0
  proxy_port_ssl: 0
  log_dir: "logs"
  check_arcade_ip: False
  strict_ip_checking: False

title:
  loglevel: "info"
  reboot_start_time: "04:00"
  reboot_end_time: "05:00"

database:
  host: "localhost"
  username: "aime"
  password: "password"
  name: "aime"
  port: 3306
  protocol: "mysql"
  sha2_password: False
  loglevel: "info"
  enable_memcached: True
  memcached_host: "localhost"

frontend:
  enable: False
  port: 8080
  loglevel: "info"
  secret: ""

allnet:
  standalone: False
  port: 80
  loglevel: "info"
  allow_online_updates: False
  update_cfg_folder: ""

billing:
  standalone: True
  loglevel: "info"
  port: 8443
  ssl_key: "cert/server.key"
  ssl_cert: "cert/server.pem"
  signing_key: "cert/billing.key"

aimedb:
  enable: True
  listen_address: ""
  loglevel: "info"
  port: 22345
  key: "Copyright(C)SEGA"
  id_secret: ""
  id_lifetime_seconds: 86400

mucha:
  loglevel: "info"

Edit idz.yaml - If you don't plan on anyone using your server to play Initial D Zero, it is best to disable it to cut down on console spam on boot.

Edit other game yamls

  • Add keys, set hostnames, ports, etc. Specific settings will depend on the game. See game_specific_info.

Create Tables into Database ​

Initialize all the tables needed for Aime Game Server

  • python dbutils.py create

alt text

Import Game Song/Tracks into Database ​

@ref: Following content is adapted from https://gitea.tendokyu.moe/Hay1tsme/artemis/src/branch/develop/docs/game_specific_info.md

This will read the songs/tracks from the game folder and write into the database so that the shop/modules feature will function properly.

python read.py --game SBZV --version `<version ID>` --binfolder /path/to/game/data/diva --optfolder /path/to/game/data/diva/mdata

TIP

SBZV is the official game ID that Sega assigned for this game. Each game has a unique game ID, and the server recognized this.

Version IDVersion Name
0Project Diva Arcade
1Project Diva Arcade Future Tone

Since we are using Project Diva Future Tone, we will set version ID to 1.

Example command I used:

python read.py --game SBZV --version 1 --binfolder "r:\ROMS-Arcade-PC-Modern\Sega Nu\Project Diva Arcade Future Tone" --optfolder "r:\ROMS-Arcade-PC-Modern\Sega Nu\Project Diva Arcade Future Tone\mdata"

You should see the following logs if it completed successfully.

alt text