OpenMU Project
This project aims to create an easy to use, extendable and customizable server for a MMORPG called "MU Online". The server supports multiple versions of the game, but the main focus is version of Season 6 Episode 3 using the ENG (english) protocol. However, parts of the software can also be suitable for the development of other games, even for other kind of games.The code is a complete rewrite from scratch - it's not based on any pre-existing projects, and it's also explicitly not based on decompiled server sources or their countless derivates.There also exists a blog which may contain some valuable information about this development.
Current project state
This project is currently under development without any release. You can try the current state by using the available docker image, also mentioned in the quick start guide.
Quick Start OpenMU
General requirements:
This guide describes two ways of starting the server. Use Docker, if you just want to play around. If you want to develop or debug the server, choose the manual way.
Docker
This guide assumes you know how to use docker in general and have docker installed (e.g. by using Docker Desktop on Windows).
Generates certificate
The project needs a certificate to run the public API.
Linux
Build shell commands and run:
The script generates the certificate on a dedicated docker container and exports the environment variable CERTIFICATE_PASSWORD which can be used at docker-compose.
Windows
Demo Mode
If you just want to play around with the server, you can find the newest docker image on the Docker Hub: https://hub.docker.com/r/munique/openmu
To pull and run the latest docker image, run this command:
The last argument is there to start the server in demo mode, without a database. To use a postgres database, you can use docker-compose.
Docker-compose
To start the server and database in one go, you can use docker-compose with our docker-compose.yml.
The command is as follows when you are in the folder which includes the yml file:
If you want to pass additional arguments you can just call run and append them at the end, for example if you want to start it with the '-resolveIp:local' parameter:
Docker compose pulls the newest images from the docker hub, sets the network and disk volume up and finally starts OpenMU and the postgres database in separate containers.
Environment Variables
It's possible to define additional environment variables to influence the postgres database connection strings.
Manually
Use this way, if you want to develop or debug for OpenMU.Requirements:
If you have that, you'll need to do:
Test Accounts
To test some features of the server, test accounts are created automatically when the database is initialized.These are the user names:
The passwords of these accounts are the same as the user name.
Gameplay differences to the original server
This project doesn't have the goal to copy the original MU Online server behavior to 100 %. This is not entirely possible, because the original server is written in another programming language and has a completely different architecture. With some points we make our life easier in this project, with other points we try to improve the gameplay.
Calculations
The calculations of attribute values (like character damage decrement etc.) is done with 32 bit float numbers and without rounding off, like the original server does at some places.
Countdown when changing character or sub-server
The original server uses a five second countdown when a player wants to change his character or the sub-server. Maybe this was done for some performance reasons, as the original server would then save the character/account data. We think that's really annoying and see no real value in that, so we don't use a countdown.
Source code: https://github.com/emudevs/OpenMU
Original post: https://emudevs.ru/threads/openmu-se...urce-code.623/
This project aims to create an easy to use, extendable and customizable server for a MMORPG called "MU Online". The server supports multiple versions of the game, but the main focus is version of Season 6 Episode 3 using the ENG (english) protocol. However, parts of the software can also be suitable for the development of other games, even for other kind of games.The code is a complete rewrite from scratch - it's not based on any pre-existing projects, and it's also explicitly not based on decompiled server sources or their countless derivates.There also exists a blog which may contain some valuable information about this development.
Current project state
This project is currently under development without any release. You can try the current state by using the available docker image, also mentioned in the quick start guide.
Quick Start OpenMU
General requirements:
- Free TCP ports:
- 1234 (admin panel)
- 55901, 55902, 55903 (game servers)
- 44405 (connect server)
- 55980 (chat server)
- Knowledge or way to start a game client, connecting to the server (I wont provide that, but there is a ClientLauncher project)
This guide describes two ways of starting the server. Use Docker, if you just want to play around. If you want to develop or debug the server, choose the manual way.
Docker
This guide assumes you know how to use docker in general and have docker installed (e.g. by using Docker Desktop on Windows).
Generates certificate
The project needs a certificate to run the public API.
- How to create one depends on your host OS, see below.
- { password here }must be replaced with your certificate password.
- It needs to be run once on the host. If you forgot your password, you can run it again.
Linux
Build shell commands and run:
Code:
source dev.shgenerate_certificate { password here }
Windows
Code:
dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p { password here }dotnet dev-certs https --trustsetx CERTIFICATE_PASSWORD "{ password here }"
If you just want to play around with the server, you can find the newest docker image on the Docker Hub: https://hub.docker.com/r/munique/openmu
To pull and run the latest docker image, run this command:
Code:
docker run --name openmu -d -p 1234:1234 -p 44405:44405 -p 55901:55901 -p 55902:55902 -p 55903:55903 -p 55980:55980 munique/openmu:latest -demo
Docker-compose
To start the server and database in one go, you can use docker-compose with our docker-compose.yml.
Code:
# Docker compose for postgres and MUnique OpenMUversion: '3'
services:
# Deploy MUnique OpenMU from docker hub
munique:
image: munique/openmu
container_name: munique
restart: unless-stopped
tty: true
ports:
- "1234:1234"
- "55901:55901"
- "55902:55902"
- "55903:55903"
- "44405:44405"
- "55980:55980"
environment:
SERVICE_NAME: munique
SERVICE_TAGS: dev
DB_HOST: database
working_dir: /app/
links:
- database
networks:
- munique-network
depends_on:
- database
# Deploy postgres database from docker hub
database:
image: postgres
restart: always
container_name: database
environment:
POSTGRES_PASSWORD: admin
POSTGRES_DB: openmu
POSTGRES_USER: postgres
ports:
- "5432:5432" #acess outside the container
networks:
- munique-network
volumes:
- dbdata:/var/lib/postgresql/data #store data on volume
networks:
munique-network:
driver: bridge
volumes: dbdata:
The command is as follows when you are in the folder which includes the yml file:
Code:
docker-compose up -d --build
Code:
docker-compose run -d munique -resolveIp:local
Environment Variables
It's possible to define additional environment variables to influence the postgres database connection strings.
Name | Description |
DB_HOST | The hostname of the database. If the local configuration file is still configured to use 'localhost', the value of this variable replaces it |
DB_ADMIN_USER | The user name of the postgres admin account. If the local configuration file is still configured to use 'postgres' for the user name of the admin (first entry in the ConnectionSettings.xml), the value of this variable replaces it. |
DB_ADMIN_PW | The user name of the postgres admin account. If the local configuration file is still configured to use 'admin' for the user password of the admin (first entry in the ConnectionSettings.xml), the value of this variable replaces it. |
ASPNETCORE_Kestrel__Certificates__Default__Password | The ASP NET application certificate password. When docker-compose-dev is used, the environment variable CERTIFICATE_PASSWORD must be exported/set on the host system instead. |
Manually
Use this way, if you want to develop or debug for OpenMU.Requirements:
- Windows OS
- It runs under Linux and MacOS, too. However, this guide describes it for windows.
- PostgreSQL installed
- Visual Studio 2019 (16.4) installed
- .NET Core SDK SDK 3.1.100
- This repository cloned
If you have that, you'll need to do:
- Open the solution of OpenMU with Visual Studio
- Right click the solution and 'Restore NuGet Packages'
- Edit OpenMU\Persistence\EntityFramework\ConnectionSettings.xml, so that the connection strings are correct - however only the user/password of the first connection string needs to be correct. The server will try to create the other roles specified by the settings.
- Build the solution
- Start MUnique.OpenMU.Startup
- If required, it will create the database schemas, the required roles and gives permissions to this roles
- If you update to a newer state of the master-branch, it could be possible that you have to delete the database again before starting. Currently, we are not providing patches for database updates.
- You can reinstall the database by adding a '-reinit' parameter
- Optional: you can add the parameter '-resolveIP:' to bind the servers tcp listeners to an ip address of a local network interface. See this Readme for more information.
- Optional: you can add the parameter '-autostart' to save the next step.
- When the Admin Panel is initialized, go to http://localhost:1234/. Then you should see three gameservers, the chat server and the connect server. Start the connect server and at least one gameserver. If all goes well, you should be able to expand a gameserver and see the hosted game maps.
- Then you can connect to the server through the game client.
Test Accounts
To test some features of the server, test accounts are created automatically when the database is initialized.These are the user names:
- test0 - test9: General test accounts, level 1 to 90, in 10 level steps
- test300: General test account with level 300
- test400: General test account with level 400, master characters
- testgm: Test account of a game master
- quest1: Test account for the level 150 quests
- quest2: Test account for the level 220 quests
- quest3: Test account for the level 400 quests
- ancient: Test account with ancient item sets, level 330 characters
- socket: Test account with socket item sets, level 380 characters
The passwords of these accounts are the same as the user name.
Gameplay differences to the original server
This project doesn't have the goal to copy the original MU Online server behavior to 100 %. This is not entirely possible, because the original server is written in another programming language and has a completely different architecture. With some points we make our life easier in this project, with other points we try to improve the gameplay.
Calculations
The calculations of attribute values (like character damage decrement etc.) is done with 32 bit float numbers and without rounding off, like the original server does at some places.
Countdown when changing character or sub-server
The original server uses a five second countdown when a player wants to change his character or the sub-server. Maybe this was done for some performance reasons, as the original server would then save the character/account data. We think that's really annoying and see no real value in that, so we don't use a countdown.
Source code: https://github.com/emudevs/OpenMU
Original post: https://emudevs.ru/threads/openmu-se...urce-code.623/