Grasscutter Windows Local Server Configuration Guide

Grasscutter is an experimental server written in Java, designed to simulate the server-side of a certain Anime Game. This article documents the process of configuring the server, including the installation of Grasscutter and Cultivation, the usage of relevant commands, methods for utilizing practical plugins and tools, configuration of gacha pools and shops, as well as the replacement of character models.

Note: This article is based on the Windows 11 system, where the client and server run on the same PC.

Tip: Please replace [Username] in the provided file paths with your own Windows username.

Environment Setup

Grasscutter relies on Java and MongoDB for its operation. It is recommended to install JDK17, and the latest version of MongoDB. Below are the download links:

Download JDK17.webp
Download MongoDB.webp

Java Installation:

  • Download the Java installation package, selecting either Windows x64 Installer or Windows x64 MSI Installer.
  • During installation, proceed with the default options.

MongoDB Installation:

  1. Download MongoDB, opting for the community edition in msi format.
  2. Choose Complete installation during setup.
  3. In Service Configuration, you can modify file paths (the last two options), keeping the rest as default.
  4. MongoDB Compass is the graphical user interface for MongoDB, which is optional.
Choose Complete.webp
Service Configuration.webp
MongoDB Compass.webp

Client Download

The client download links can be obtained from GI-Download-Library.

  • The download link for the main files is available in GI-Download-Library/GenshinImpact/Client/[Version].md. After downloading, unzip the files.
  • The download link for voice files can be found in GI-Download-Library/GenshinImpact/Audio/[Version].md. After extracting, copy the folder to the main files’ directory.

Server Setup

Installation of Cultivation

Cultivation is a cross-platform launcher developed by the Grasscutter team, capable of running on Windows, macOS, and Linux. It comes with a built-in proxy function, greatly simplifying the Grasscutter installation process; just a few clicks are needed to run it.

Download the file with the msi extension from the link below, for example, Cultivation_1.2.0_x64_en-US.msi.

After installation, restart your computer, and then run Cultivation as an administrator.

Download Grasscutter

Click on the Download icon in the top right corner of Cultivation,

  • Depending on your preferences, download either the All-in-One file. Both downloaded files are pre-built, eliminating the need for manual compilation.
    • Grasscutter All-in-One doesn’t include quests, but some scenes require unlocking through commands, such as the wind barrier in the Stormterror’s Lair.
    • Questing All-in-One includes quests, but be aware that there might be some bugs, occasionally requiring manual input of commands to proceed with tasks. For more details, refer to: Common Quest Bugs and Command Handling.
  • Download Grasscutter Resources.

Download Grasscutter.webp

If you need resources from a specific version, you can switch to the corresponding branch in the repository below. After downloading, copy the files to the C:\Users\[Username]\AppData\Roaming\cultivation\grasscutter\resources folder.

Configure Cultivation

Upon the first launch, a popup window will prompt you to install the CA certificate. Click Yes to agree to the installation. After installing the certificate, Cultivation’s built-in mitmproxy will be able to proxy the communication between the client and the game server through a Man-in-the-Middle (MITM) attack to the local server.

安装证书.webp

Click on the small gear icon in the top right corner of Cultivation to open the settings page,

  • At the bottom is the language settings section, supporting multiple languages.
  • For the game install path, select the GenshinImpact.exe file in the root directory of the client folder.
  • Confirm that the following four options are checked:
    • Automatically Patch RSA
    • Use Internal Proxy
    • Automatically Start MongoDB
    • Automatically launch Grasscutter with game
  • Set the custom Java path to C:\Program Files\Java\jdk-17\bin\java.exe.
  • Keep other options as default.
Config1.webp
Config2.webp

XX, Launch!

The server is now configured. XX, launch!

  1. Open Cultivation.
  2. Click on the small button to the right of the launch button to run Grasscutter.
    • Windows Firewall-related prompts may appear; allow them.
  3. Click the Launch button to launch the game.
  4. Enter any username and password; the system will automatically create an account.
    • The password is not essential; you can enter any number when logging in next time.

Commands

For commonly used commands, refer to C:\Users\[Username]\AppData\Roaming\cultivation\grasscutter\GM Handbook. Additionally, in the Grasscutter window, you can use the help command to view detailed usage for each command.

When running commands directly in Grasscutter, you generally need to specify UID. For example, the following command is used to remove the stamina limit for a user with UID 10001:

1
/prop ns on @10001

Moreover, you can execute commands in the client using the built-in chat feature:

  1. Press Enter in the client.
  2. Click on the Add Conversation in the bottom left corner.
  3. Click the plus icon to the right of the friend banner to start a conversation.
  4. Enter the command in the dialog box and send it.

When directly entering commands in the chat box, keep in mind:

  • Commands like account creation cannot be used in the chat box.
  • Commands generally do not require specifying UID and apply to the current user by default.
  • Note that commands entered in the chat box should start with /.
  • For example, /give 223 x1 gives the current user 1 pink ball.
    • 223 is the ID of the pink ball.
    • The number after x represents the quantity of the item.

Tools

Entering commands one by one can be tedious. I recommend using the following tools to generate commands directly. After installing the relevant plugins, you can even execute commands within the tools, eliminating the need for manual copy-pasting.

Plugins

Grasscutter supports the installation of plugins. I’ve installed the following two plugins:

  • Grasscutter-Rollback
  • gc-opencommand-plugin

Place the plugins in the C:\Users\[Username]\AppData\Roaming\cultivation\grasscutter\plugins folder.

gc-opencommand-plugin

gc-opencommand-plugin is a plugin that opens the GC command execution interface for third-party clients. It can be used with Grasscutter Tools to execute relevant commands directly without the need to input them into the in-game chat window.

Configuration steps:

  1. Start Grasscutter.
  2. Open the folder in the plugins directory with the same name as the plugin JAR file and find config.json.
  3. Copy the token from config.json. Normally, this token is automatically generated. If not, you can randomly create a 32-character one.
  4. Open Grasscutter Tools.
  5. Switch to the Settings tab.
  6. Check the UID option in the program settings.
  7. Enter the UID for the current account.
  8. Switch to the Remote tab.
  9. Click the query button next to the server address.
  10. Confirm that there is a green checkmark after Server Status - Remote Execution Plugin.
  11. Click Console, paste the token copied in step 3.
  12. Click Connect.
opencommand1.webp
opencommand2.webp

Grasscutter-Rollback

Grasscutter-Rollback is a database backup and rollback plugin. It can be used when there are issues with the game data, allowing you to rollback to a previous state.

Usage:

  • Backup the current database: bk
  • Rollback to the previous database: rb
  • Backup the current database and rename it: bk [name]
  • Rollback to a specified database: rb [name]

Banner Replacement

The Grasscutter_Banners repository contains information on all banners from the server’s launch until now. Download the corresponding file, copy it to C:\Users\[Username]\AppData\Roaming\cultivation\grasscutter\data\, replace the original Banners.json file, and then execute the reload command in Grasscutter to change the current banner.

Edit Shop Items

By default, the shop contains no items. You need to add a shop.json file to C:\Users\[Username]\AppData\Roaming\cultivation\grasscutter\data\.

It is recommended to use the Shop Editor in the previously mentioned Grasscutter Tools for editing related files. Here’s how:

  1. Copy C:\Users\[Username]\AppData\Roaming\cultivation\grasscutter\resources\ExcelBinOutput\ShopGoodsExcelConfigData.json to another folder.
  2. Open the Shop Editor in Grasscutter Tools.
  3. Paste the copied file path into Grasscutter Tools and click Load.
  4. Edit the file. Note that after completing each item, click the Add or Update button at the bottom; otherwise, the changes won’t take effect.
  5. Click Save. You will be prompted to overwrite the file; allow it.
  6. Rename the file to shop.json.
  7. Copy the file to C:\Users\[Username]。\AppData\Roaming\cultivation\grasscutter\data\.

Character Model Replacement

Character model mods can be downloaded from Gamebanana and injected into the game using GI-Model-Importer.

Here are the specific steps:

  1. Download GI-Model-Importer from the Release page and unzip it.
    • Generally, choose 3dmigoto-GIMI-for-playing-mods.zip.
    • If you want to create your own mod, choose 3dmigoto-GIMI-for-development.zip.
  2. Open d3dx.ini with VSCode.
  3. Quickly locate by searching [Loader] and modify the target under [Loader] to your game installation location, for example, D:\Program Files\GenshinImpact_4.0.1\GenshinImpact.exe.
    Replace Path.webp
  4. Save the file.
  5. Unzip the downloaded mod file and copy it to the Mods folder of GI-Model-Importer.
    • Note: Only one mod can be enabled for each character.
  6. Start 3DMigoto Loader.exe first.
  7. Then start the game through Cultivation.
  8. If a popup window appears in the lower-left corner of the screen during the loading process as shown in the image below, it indicates a successful launch.
    Successful Launch Popup.webp

For more details, please refer to the Genshin-Impact-Model-Importer documentation.

可厉害了.webp