1 Star 0 Fork 7

土生土长 / Grasscutter

forked from aquawius / Grasscutter 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

Grasscutter

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

EN | 中文

注意: 我们一直欢迎您成为该项目的贡献者。在添加您的代码之前,请仔细阅读我们的 代码规范.

当前特性

  • 登录
  • 战斗
  • 好友列表
  • 传送系统
  • 祈愿系统
  • 从控制台生成魔物
  • 多人游戏 部分 可用
  • 物品栏相关 (接收物品/角色, 升级角色/武器等)

快速设置指南

附: 加入我们的 Discord 获取更多帮助!

环境需求

  • Java SE - 17 (当您没有Oracle账户,可以使用镜像)

    注: 如果您仅仅想要简单地运行服务端, 那么使用 jre 便足够了

  • MongoDB (推荐 4.0+)

  • Proxy daemon: mitmproxy (推荐使用mitmdump), Fiddler Classic, 等

运行

注: 如果您从旧版本升级到新版本,最好删除 config.json 并启动服务端jar来重新生成它

  1. 获取 grasscutter.jar
  2. grasscutter.jar 所在目录中创建 resources 文件夹并将 BinOutputExcelBinOutput 放入其中 (查看 wiki 了解更多)
  3. 通过命令 java -jar grasscutter.jar 来运行Grasscutter. 在此之前请确认MongoDB服务运行正常

连接

½. 在服务器控制台中 创建账户.

  1. 重定向流量: (选其一)

    • mitmdump: mitmdump -s proxy.py -k

      信任 CA 证书:

      注: mitmproxy的CA证书通常存放在 % USERPROFILE%\ .mitmproxy, 或者你也可以从http://mitm.it 中下载它

      ​ 双击来安装根证书 或者..

      • 使用命令行

        certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer
    • Fiddler Classic: 运行Fiddler Classic, 在设置中开启 解密https通信 并将端口切换到除8888 以外的任意端口 (工具 -> 选项 -> 连接) 并加载 此脚本.

    • Hosts文件

  2. 设置代理为 127.0.0.1:8080 或其它你所设定的端口

你也可以简单地运行 start.cmd 来全自动启动服务端并设置代理

构建

Grasscutter 使用 Gradle 来处理依赖及构建.

依赖:

  • Java SE Development Kits - 17
  • Git
Windows
git clone https://github.com/Grasscutters/Grasscutter.git
cd Grasscutter
.\gradlew.bat # Setting up environments
.\gradlew jar # Compile
Linux
git clone https://github.com/Grasscutters/Grasscutter.git
cd Grasscutter
chmod +x gradlew
./gradlew jar # Compile

你可以在项目根目录中找到grasscutter.jar

命令列表

你可能需要在终端中运行 java -jar grasscutter.jar -handbook 它将会创建一个 GM Handbook.txt 以方便您查阅物品ID等

你可能需要在终端中运行 java -jar grasscutter.jar -gachamap 来使得祈愿历史记录系统正常显示物品信息。 这个命令生成一个配置文件到如下文件夹:GRASSCUTTER_RESOURCE/gcstatic。 不执行此命令,您的祈愿历史记录中将只会显示数字ID而非物品名称。(目前仅支持自动生成英文记录信息)

在每个玩家的朋友列表中都有一个名为“Server”的虚拟用户,你可以通过发送消息来使用命令。命令也适用于其他聊天室,例如私人/团队聊天。 要在游戏中使用命令,需要添加 /! 前缀,如 /pos

命令 用法 权限节点 可用性 注释 别名
account account <create|delete> <用户名> [uid] 仅服务端 通过指定用户名和uid增删账户
broadcast broadcast <消息内容> server.broadcast 均可使用 给所有玩家发送公告 b
coop coop <uid> <目标uid> server.coop 均可使用 强制某位玩家进入指定玩家的多人世界
changescene changescene <场景ID> player.changescene 仅客户端 切换到指定场景 scene
clear clear <all|wp|art|mat> [UID] player.clearinv 仅客户端 删除所有未装备及未解锁的圣遗物(art)或武器(wp)或材料(mat)或者所有(all),包括五星 clear
drop drop <物品ID|物品名称> [数量] server.drop 仅客户端 在指定玩家周围掉落指定物品 d dropitem
enterdungeon enterdungeon <地牢ID> player.enterdungeon 仅客户端 进入某个地牢
give give [uid] <物品ID|物品名称> [数量] [等级] [精炼等级] player.give 均可使用 给予指定玩家一定数量及等级的物品 (精炼等级仅适用于武器) g item giveitem
givechar givechar <uid> <角色ID> [等级] player.givechar 均可使用 给予指定玩家对应角色 givec
giveart giveart [uid] <圣遗物ID> <主属性ID> [<副属性ID>[,<次数>]]... [等级] player.giveart 均可使用 给予玩家指定属性的圣遗物 gart
giveall giveall [uid] [数量] player.giveall 均可使用 给予指定玩家全部物品 givea
godmode godmode [uid] player.godmode 仅客户端 保护你不受到任何伤害(依然会被击退)
heal heal player.heal 仅客户端 治疗队伍中所有角色 h
help help [命令] 均可使用 显示帮助或展示指定命令的帮助
kick kick <uid> server.kick 均可使用 从服务器中踢出指定玩家 (WIP) k
killall killall [uid] [场景ID] server.killall 均可使用 杀死指定玩家世界中所在或指定场景的全部生物
list list 均可使用 列出在线玩家
permission permission <add|remove> <权限节点> * 均可使用 添加或移除玩家的权限
position position 仅客户端 获取当前坐标 pos
reload reload server.reload 均可使用 重载服务器配置
resetconst resetconst [all] player.resetconstellation 仅客户端 重置当前角色的命座,重新登录即可生效 resetconstellation
restart restart 均可使用 重启服务端
say say <uid> <消息> server.sendmessage 均可使用 作为服务器发送消息给玩家 sendservmsg sendservermessage sendmessage
setfetterlevel setfetterlevel <好感等级> player.setfetterlevel 仅客户端 设置当前角色的好感等级 setfetterlvl setfriendship
setstats setstats <属性> <数值> player.setstats 仅客户端 直接修改当前角色的面板 stats
setworldlevel setworldlevel <世界等级> player.setworldlevel 仅客户端 设置世界等级(重新登录即可生效) setworldlvl
spawn spawn <实体ID> [数量] [等级] server.spawn 仅客户端 在你周围生成实体
stop stop server.stop 均可使用 停止服务器
talent talent <天赋ID> <等级> player.settalent 仅客户端 设置当前角色的天赋等级
teleport teleport [@playerUid] <x> <y> <z> [sceneId] player.teleport 均可使用 传送玩家到指定坐标 tp
tpall player.tpall 仅客户端 传送多人世界中所有的玩家到自身地点
weather weather <天气ID> <气候ID> player.weather 仅客户端 改变天气 w

额外功能

当你想传送到某个地点, 只需要在地图中创建标记, 关闭地图后即可到达目标地点上空

  • 传送
    • 当你想传送到某个地点时,可以使用游戏里的地图标记功能。
      • 用鱼钩(最后一个图标)在地图上标记一个点位。
      • (可选) 将标记名称改为数字,即可修改传送位置的Y坐标(高度,缺省值是300)。
      • 确认添加标记,并关闭地图。
      • 你会看到你的角色从你选定点位的正上方高空落下。

快速排除问题

  • 如果编译未能成功,请检查您的jdk安装 (JDK 17并确认jdk处于环境变量PATH
  • 我的客户端无法登录/连接, 4206, 其它... - 大部分情况下这是因为您的代理存在问题.如果使用Fiddler请确认Fiddler监听端口不是8888
  • 启动顺序: MongoDB > Grasscutter > 代理程序 (mitmdump, fiddler等.) > 客户端
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

clone From Github only download for Grasscutters! 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/opopi/Grasscutter.git
git@gitee.com:opopi/Grasscutter.git
opopi
Grasscutter
Grasscutter
stable

搜索帮助