A game server reimplementation for a certain turn-based anime game
Go to file
2023-11-30 08:50:45 +02:00
.github/workflows (fix) GitHub Action artifact name 2023-11-26 09:58:43 -05:00
data update Banners.json and attempt to fix GachaCeiling 2023-11-28 04:58:10 +02:00
gradle/wrapper Initial commit 2023-09-25 06:03:09 -07:00
lib Update kcp lib (https://github.com/YuFanXing/grasskcpper) 2023-10-19 06:25:40 -07:00
src Update PacketServerAnnounceNotify.java 2023-11-30 08:50:45 +02:00
.editorconfig (misc) Do not specify a specific line ending 2023-11-27 23:03:33 -05:00
.gitattributes Add .gitattributes file 2023-11-27 19:50:43 -08:00
.gitignore Show git hash when starting the server 2023-11-14 04:06:26 -08:00
build.gradle (misc) Create a GitHub Action for building the server JAR 2023-11-26 09:53:43 -05:00
gradlew Initial commit 2023-09-25 06:03:09 -07:00
gradlew.bat Initial commit 2023-09-25 06:03:09 -07:00
keystore.p12 Initial commit 2023-09-25 06:03:09 -07:00
LICENSE Add license 2023-11-25 04:04:45 -08:00
README_ja-JP.md Update README_ja-JP.md 2023-11-27 23:45:04 -08:00
README_zh-CN.md Add ja-JP and fix zh-CN ReadMe 2023-11-27 02:56:42 -08:00
README.md add a command to refill skill points in open world (not tested) 2023-11-28 02:38:25 +02:00
settings.gradle Rename project to Lunar Core 2023-10-24 07:53:10 -07:00

Lunar Core

Language EN | 简中 | 日本語

A game server reimplementation for version 1.5.0 of a certain turn-based anime game for educational purposes. For any extra support, questions, or discussions, check out our discord.

Notable features

  • Basic game features: Logging in, team setup, inventory, basic scene/entity management
  • Monster battles working
  • Natural world monster/prop/NPC spawns
  • Most character techniques are handled
  • Npc shops handled
  • Gacha system
  • Mail system
  • Friend system (Assists are not working yet)
  • Forgotten hall (with 1.4.0 features)
  • Simulated universe (Runs can be finished, but many features are missing)

Running the server and client

Prerequisites

Compiling the server

  1. Download the files from https://gitlab.com/Melledy/LunarCore-Protos and place the proto folder into your server directory
  2. Open your system terminal, and compile the server with ./gradlew jar
  3. Create a folder named resources in your server directory
  4. Download the Config, TextMap, and ExcelBin folders from https://github.com/Dimbreath/StarRailData and place them into your resources folder.
  5. Download the Config folder from https://gitlab.com/Melledy/LunarCore-Configs and place them into your resouces folder. REPLACE any files that your system asks about. These are for world spawns and are quite important for the server.
  6. Run the server with java -jar LunarCore.jar from your system terminal. Lunar Core comes with a built-in internal MongoDB server for its database, so no Mongodb installation is required. However, it is highly recommended to install Mongodb anyway.
  7. If you have autoCreateAccount set to true in the config, then you can skip creating an account. Otherwise, use the /account command in the server console to create one.

Connecting with the client (Fiddler)

  1. Login with the client to an official server and Hoyoverse account at least once to download game data.
  2. Install and have Fiddler Classic running.
  3. Set fiddler to decrypt https traffic. (Tools -> Options -> HTTPS -> Decrypt HTTPS traffic) Make sure ignore server certificate errors is checked as well.
  4. Copy and paste the following code into the Fiddlerscript tab of Fiddler Classic:
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;

class Handlers
{
    static function OnBeforeRequest(oS: Session) {
        if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
            oS.host = "localhost"; // This can also be replaced with another IP address.
        }
    }
};
  1. Login with your account name, the password can be set to anything.

Server commands

Server commands can be run in the server console or in-game. There is a dummy user named "Server" in every player's friends list that you can message to use in-game commands.

/account {create | delete} [username] (reserved player uid). Creates or deletes an account.
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). Sets the current avatar's properties
/clear {relics | lightcones | materials | items}. Removes filtered items from the player inventory.
/gender {male | female}. Sets the player gender.
/give [item id] x[amount]. Gives the targetted player an item.
/giveall {materials | avatars}. Gives the targeted player items.
/help. Displays a list of available commands.
/mail [content]. Sends the targeted player a system mail.
/permission {add | remove | clear} [permission]. Gives/removes a permission from the targeted player.
/reload. Reloads the server config.
/scene [scene id] [floor id]. Teleports the player to the specified scene.
/spawn [monster/prop id] x[amount] s[stage id]. Spawns a monster or prop near the targeted player.
/unstuck @[player id]. Unstucks an offline player if theyre in a scene that doesnt load.
/worldlevel [world level]. Sets the targeted player's equilibrium level.
/refill. Refills your skill points in open world.