diff --git a/README.md b/README.md index b570e8b..861ae26 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Any useful additions are welcome. Create a new Markdown file in the `docs` folder. -You may also use existing subfolders or create new ones to organize your pages. +You may also use existing sub-folders or create new ones to organize your pages. ### How to Edit the `navigation.json` File diff --git a/docs/Contributing.md b/docs/Contributing.md new file mode 100644 index 0000000..966ad1c --- /dev/null +++ b/docs/Contributing.md @@ -0,0 +1,56 @@ +# Contributing to Grasscutter + +See [this](https://github.com/Grasscutters/Grasscutter/blob/development/CONTRIBUTING.md) for the contributor code of conduct.\ +You must agree to these terms before contributing to this project. + +## Prerequisites + +Anything in **bold** is required to have.\ +Everything else is a recommendation. + +- **[Java (JDK) 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)** - Required for compiling Grasscutter. + - Greater versions of Java might work, but are unsupported. +- **[MongoDB Server](https://www.mongodb.com/try/download/community)** - Required for storing Grasscutter's data. + - [MongoDB Compass](https://www.mongodb.com/try/download/compass) is recommended for managing the database. + - You can use a MongoDB cloud database. +- **[Gradle 7.0+](https://gradle.org/releases/)** - Required for compiling Grasscutter. + - You can also use the Gradle wrapper found when cloning the project. +- A text editor/IDE for viewing/editing source code + - [IntelliJ IDEA](https://www.jetbrains.com/idea/) is recommended. + - [Visual Studio Code](https://code.visualstudio.com/) is recommended alongside IntelliJ IDEA. + - Either or is recommended. +- _A semi-decent knowledge of general software development._ + +## Understanding Branches + +Grasscutter currently has 2 primary branches: +- `development` - This is the more _stable_ branch of Grasscutter. + - This receives mainly version updates and major bug fixes. +- `unstable` - This is the wild west of Grasscutter. + - This receives all updates, including experimental features and bug fixes. + - This branch is not recommended for production use. + +When you make a contribution, if you have a **minor fix**, please make a pull request to `development`.\ +If you have a major fix, such as a **rewrite of a system** or a new **feature**, please make a pull request to `unstable`. + +## Building + +### With IntelliJ IDEA + +It is recommended to change your settings to the following: +- **Build and run using:** `IntelliJ IDEA` +- **Run tests using:** `IntelliJ IDEA` + +Afterwards, you can use IntelliJ's artifact build system to create a JAR file. + +If you are actively working on a feature, consider creating a new profile for an `Application`.\ +If ran in `Debug` with [`HotswapAgent`](http://hotswapagent.org/mydoc_quickstart-jdk17.html), you can make changes to the code *mostly* without restarting the server. + +### With Gradle + +You can use the Gradle wrapper to build Grasscutter.\ +To do this, run the following command in the root directory of the project: + +```shell +gradlew jar +``` \ No newline at end of file diff --git a/docs/Guide/Running.md b/docs/Guide/Running.md new file mode 100644 index 0000000..b5a1211 --- /dev/null +++ b/docs/Guide/Running.md @@ -0,0 +1,58 @@ +# Running Grasscutter + +This is the start to finish guide on running Grasscutter from scratch.\ +**This is only required if you are locally hosting (localhost'ing) your own server.** + +## Prerequisites + +- Grasscutter's [latest release](#releases-of-grasscutter) in the form of a JAR file. + - It is recommended to use the **latest release**. +- [Java (JDK) 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) - Required for compiling Grasscutter. + - Greater versions of Java might work, but are unsupported. +- [MongoDB Server](https://www.mongodb.com/try/download/community) - Required for storing Grasscutter's data. +- A copy of [Grasscutter's resources](https://gitlab.com/YuukiPS/GC-Resources) - Required for the server to function. + - The link above will take you to the latest version of these resources. + - [Click here](https://autopatchgc.yuanshen.zip/dev_pc/serverdata/3.7/latest) for a direct download of the resources for REL3.7 + +## Running the Server + +The server can be run in 2 ways: +- [Standalone, using the command line](#standalone) +- [Together with Cultivation](#with-cultivation) + +### Standalone + +1. Copy/Place your Grasscutter JAR into a folder. + 1. This 'folder' will be referred to as your working directory. +2. Copy/Place your Grasscutter resources into your working directory. + 1. This should be a '.zip' file. + 2. You can extract the contents into a folder called 'resources', but this is not recommended. +3. Open a command prompt in your working directory. + 1. On Windows, you can do this by holding shift and right-clicking in the folder, then selecting 'Open PowerShell window here'. +4. Run the command `java -jar .jar`. + 1. By default, this should be `java -jar grasscutter.jar`. + 2. If the server asks to place a copy of _something_, [see](/Troubleshooting#fixing-the-config) +5. Leave this command prompt open. + 1. Closing it will close the server. + +### With Cultivation + +TODO: Write. + +# Releases of Grasscutter + +Grasscutter comes in a variety of 'flavors' (releases). +- The latest release is the most stable version of Grasscutter. + - Download it [here](https://github.com/Grasscutters/Grasscutter/releases/). + - This is the recommended version for production use. + - It is updated every month, at the end of the month. +- The most up-to-date build of **development**. + - Download it [here](https://autopatchgc.yuanshen.zip/dev_pc/grasscutter/development/latest). + - This is the recommended version for playing. + - This version can contain some bug fixes, be wary. + - It is updated whenever a new commit is added to the `development` branch. +- The most up-to-date build of **unstable**. + - Download it [here](https://autopatchgc.yuanshen.zip/dev_pc/grasscutter/unstable/latest). + - This is **not** a build for production use. + - This version contains the most features, but the most bugs. + - It is updated whenever a new commit is added to the `unstable` branch. \ No newline at end of file diff --git a/docs/Guide/Troubleshooting.md b/docs/Guide/Troubleshooting.md new file mode 100644 index 0000000..82736f7 --- /dev/null +++ b/docs/Guide/Troubleshooting.md @@ -0,0 +1,30 @@ +# Troubleshooting + +## Fixing the Config + +If the server asks you to place a copy of something in the working directory, follow these steps: +1. Open `config.json` in a text editor of your choice +2. Find `folderStructure` in your config + 1. See [Figure A](#figure-a) +3. Find the `resources` part of `folderStructure` + 1. See [Figure B](#figure-b) +4. Change to `./resources.zip` + 1. If your resources are in a different folder, change to the full path of the folder. + +### Figure A +```json +{ + "folderStructure": { + "resources": "./resources/", + "data": "./data/", + "packets": "./packets/", + "scripts": "resources:Scripts/", + "plugins": "./plugins/" + } +} +``` + +### Figure B +``` +"resources": "./resources.zip" +``` \ No newline at end of file diff --git a/docs/Home.md b/docs/Home.md new file mode 100644 index 0000000..6775176 --- /dev/null +++ b/docs/Home.md @@ -0,0 +1,65 @@ +# Welcome to Grasscutter! + +This wiki contains information about the many parts of Grasscutter, including: +- [What is Grasscutter?](#about) +- [Running the Server](Guide/Running) +- [Connecting to the Server](Guide/Connecting) +- [Common Issues](Guide/Troubleshooting) +- [Contributing](Contributing) + +## About + +Grasscutter is a _private server_ for a _certain anime game_.\ +Initially created by Meledy, Grasscutter has become (probably) the go-to server for said game. + +## Features +- SDK Server + - [x] Account system + - [x] Server dispatching + - [x] Internal server communication +- Game Server + - [x] The 'beach' + - [ ] Questing system + - [x] Natural progression between quests + - [x] Quest rewards + - [ ] Every quest trigger + - [ ] Every quest executor + - [ ] Complete implementation of every quest + - [ ] Ability system + - [x] Healing abilities + - [x] Self-damaging abilities + - [ ] More... + - [ ] Scripting system + - [x] _Most_ script functions + - [ ] **All** script functions + - [x] Co-Op implementation + - [x] Avatar system + - [x] Switching avatars + - [x] Configuring teams + - [x] Trial avatar system + - [x] Inventory/Item system + - [x] Storing items + - [x] Buying items from shops + - [x] Deleting items from the inventory + - [x] Limiting items in the inventory + - [x] Social system + - [x] Add friends + - [x] Remove friends + - [x] See avatars on a player's display + - [x] Player signatures + - [x] Player leveling + - [x] Expandable chat system + - [x] Command system + - [x] Support for multiple languages + - [x] Support for multiple game clients + - [x] Android + - [x] iOS + - [x] Windows + - [x] Chinese clients +- Plugin System + - [x] Listening to events + - [x] Modifying event data + - [x] Creating custom commands + - [x] Modifying server behavior + - [x] Customizing the account system + - [x] Managing permissions \ No newline at end of file diff --git a/navigation.json b/navigation.json index 0e0dcd2..aadd422 100644 --- a/navigation.json +++ b/navigation.json @@ -1,3 +1,34 @@ -{ - -} \ No newline at end of file +[ + { + "name": "Introduction", + "_type": "file", + "path": "Home.md" + }, + { + "name": "Working with Grasscutter", + "_type": "file", + "path": "Contributing.md" + }, + { + "name": "Guides", + "_type": "dir", + "_main": true, + "children": [ + { + "name": "Running", + "_type": "file", + "path": "Guide/Running.md" + }, + { + "name": "Connecting", + "_type": "file", + "path": "Guide/Connecting.md" + }, + { + "name": "Troubleshooting", + "_type": "file", + "path": "Guide/Troubleshooting.md" + } + ] + } +] \ No newline at end of file