README.md 3.44 KB
Newer Older
Jaida Wu's avatar
Jaida Wu committed
1
# Grasscutter
lunaticwhat's avatar
gran    
lunaticwhat committed
2
A WIP server reimplementation for *some anime game* 2.3-2.6
Jaida Wu's avatar
Jaida Wu committed
3

lunaticwhat's avatar
gran    
lunaticwhat committed
4
**Documentation**: [Grasscutter Wiki](https://github.com/Melledy/Grasscutter/wiki/)
Jaida Wu's avatar
Jaida Wu committed
5
6
7
8
**Note**: For support please join the [Discord server](https://discord.gg/T5vZU6UyeG).
# Current features
* Logging in
* Combat
lunaticwhat's avatar
gran    
lunaticwhat committed
9
* Spawning monsters via console
Jaida Wu's avatar
Jaida Wu committed
10
11
* Inventory features (recieving items/characters, upgrading items/characters, etc)
* Gacha system
lunaticwhat's avatar
gran    
lunaticwhat committed
12
13
* Friends list
* Co-op *partially* work
14
# Quick setup guide
Jaida Wu's avatar
Jaida Wu committed
15
### Prerequisites
16
* JDK-8u202 ([mirror link](https://mirrors.huaweicloud.com/java/jdk/8u202-b08/) since Oracle required an account to download old builds)
Jaida Wu's avatar
Jaida Wu committed
17
18
19
* Mongodb (recommended 4.0+)
* Proxy daemon: mitmproxy (mitmdump, recommended), Fiddler Classic, etc.

20
### Starting up Grasscutter server (Assuming you are on Windows)
Jaida Wu's avatar
Jaida Wu committed
21
1. Setup compile environment `gradlew.bat`
22
2. Compile Grasscutter with `gradlew jar`
lunaticwhat's avatar
gran    
lunaticwhat committed
23
24
3. Create a folder named `resources` in your Grasscutter directory, bring your `BinOutput` and `ExcelBinOutput` folders into it *(Check the wiki for more details how to get those.)*
4. Run Grasscutter with `java -jar grasscutter.jar`. Make sure mongodb service is running as well.
Jaida Wu's avatar
Jaida Wu committed
25
26

### Connecting with the client
lunaticwhat's avatar
gran    
lunaticwhat committed
27
½. Create an account using *server console command* below
lunaticwhat's avatar
lunaticwhat committed
28
1. Run a proxy daemon: (choose either one)
Jaida Wu's avatar
Jaida Wu committed
29
	- mitmdump: `mitmdump -s proxy.py --ssl-insecure`
30
31
	- Fiddler Classic: Run Fiddler Classic, turn on `Decrypt https traffic` in setting and change the default port there (Tools -> Options -> Connections) to anything other than `8888`, and load [this script](https://github.lunatic.moe/fiddlerscript).
	- [Hosts file](https://github.com/Melledy/Grasscutter/wiki/Running#traffic-route-map)
Jaida Wu's avatar
Jaida Wu committed
32
33
34
2. Trust CA certificate:
	- mitmdump: `certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer`
2. Set network proxy to `127.0.0.1:8080` or the proxy port you specified.
35
4. *yoink*
Jaida Wu's avatar
Jaida Wu committed
36
37
38

* or you can use `run.cmd` to start Server & Proxy daemon with one click

lunaticwhat's avatar
lunaticwhat committed
39
40
# Grasscutter commands
### Server console commands
Jaida Wu's avatar
Jaida Wu committed
41
42
43
44
45
46
47
48
49
50

`account create [username] {playerid}` - Creates an account with the specified username and the in-game uid for that account. The playerid parameter is optional and will be auto generated if not set.

### In-Game commands
There is a dummy user named "Server" in every player's friends list that you can message to use commands. Commands also work in other chat rooms, such as private/team chats.

`!spawn [monster id] [level] [amount]`

`!give [item id] [amount]`

SpikeHD's avatar
SpikeHD committed
51
52
`!givechar [avatar id] [level]`

Jaida Wu's avatar
Jaida Wu committed
53
54
55
56
`!drop [item id] [amount]`

`!killall`

SpikeHD's avatar
SpikeHD committed
57
58
`!setworldlevel [level]` - Relog to see effects properly

Jaida Wu's avatar
Jaida Wu committed
59
60
61
62
63
64
65
66
`!godmode` - Prevents you from taking damage

`!resetconst` - Resets the constellation level on your current active character, will need to relog after using the command to see any changes.

`!sethp [hp]`

`!clearartifacts` - Deletes all unequipped and unlocked level 0 artifacts, **including yellow rarity ones** from your inventory

lunaticwhat's avatar
gran    
lunaticwhat committed
67
68
*More commands will be updated in the [wiki](https://github.com/Melledy/Grasscutter/wiki/).*

lunaticwhat's avatar
lunaticwhat committed
69
# Quick Troubleshooting
lunaticwhat's avatar
gran    
lunaticwhat committed
70
71
* If compiling wasn't successful, please check your JDK installation (must be JDK 8 and validated JDK's bin PATH variable)
* My client doesn't connect, doesn't login, 4206, etc... - Mostly your proxy daemon setup is *the issue*, if using Fiddler make sure it running on another port except 8888
72
* Startup sequence: Mongodb > Grasscutter > Proxy daemon (mitmdump, fiddler, etc.) > Client