A game server reimplementation for a certain turn-based anime game
Go to file
2024-03-30 07:06:37 -07:00
.github/workflows (fix) GitHub Action artifact name 2023-11-26 09:58:43 -05:00
data Update Banners.json 2024-03-28 01:01:34 -07:00
docs Remove unnecessary step in readmes 2023-12-04 21:37:22 -08:00
gradle/wrapper Update gradle wrapper to 8.5 2024-01-15 00:49:35 -08:00
lib Update kcp lib (https://github.com/YuFanXing/grasskcpper) 2023-10-19 06:25:40 -07:00
src Fix SU talent tree 2024-03-28 01:41:58 -07:00
.editorconfig Fix event TriggerBattle, now will quit SU when not win battle, fix the room portal's color 2024-02-01 00:17:31 -08:00
.gitattributes Add .gitattributes file 2023-11-27 19:50:43 -08:00
.gitignore Gitignore plugins folder and extend command args api 2023-12-06 02:23:43 -08:00
build.gradle Bump jar version to 1.2.0 2024-03-13 00:39:13 -07:00
gradlew Update gradle wrapper to 8.5 2024-01-15 00:49:35 -08:00
gradlew.bat Update gradle wrapper to 8.5 2024-01-15 00:49:35 -08: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.md Update to support game version 2.1.0 2024-03-27 02:40:34 -07:00
settings.gradle Remove a space from gradle project name 2024-03-30 07:06:37 -07:00

LunarCore

GitHub release (latest by date) GitHub GitHub last commit GitHub Workflow Status
Discord - Grasscutter

EN | 简中 | 繁中 | JP | RU | FR | KR

Attention: 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
  • Character techniques
  • Crafting/Consumables working
  • NPC shops handled
  • Gacha system
  • Mail system
  • Friend system (Assists are not working yet)
  • Forgotten hall
  • Pure Fiction
  • Simulated universe (Runs can be finished, but many features are missing)

Running the server and client

Prerequisites

Compiling the server

  1. Open your system terminal, and compile the server with ./gradlew jar
  2. Create a folder named resources in your server directory
  3. Download the Config, TextMap, and ExcelBin folders from https://github.com/Dimbreath/StarRailData and place them into your resources folder.
  4. Delete the /resources/Config/LevelOutput folder.
  5. Download the Config folder from https://gitlab.com/Melledy/LunarCore-Configs and place them into your resources folder. These are for world spawns and are very 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.

Connecting with the client (Fiddler method)

  1. Log in 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. If autoCreateAccount is set to true in the config, then you can skip this step. Otherwise, type /account create [account name] in the server console to create an account.
  2. Login with your account name, the password field is ignored by the server and 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's gender.
/give [item id] x[amount] lv[number]. Gives the targetted player an item.
/giveall {materials | avatars | lightcones | relics}. Gives the targeted player items.
/heal. Heals your avatars.
/help. Displays a list of available commands.
/kick @[player id]. Kicks a player from the server.
/mail [content]. Sends the targeted player a system mail.
/permission {add | remove | clear} [permission]. Gives/removes a permission from the targeted player.
/refill. Refill your skill points in open world.
/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.
/stop. Stops the server
/unstuck @[player id]. Unstucks an offline player if they're in a scene that doesn't load.
/worldlevel [world level]. Sets the targeted player's equilibrium level.