Giter Club home page Giter Club logo

cultivation's Introduction

EN | 简中 | 繁中 | 日本語

Cultivation

A game launcher designed to easily proxy traffic from anime game to private servers.

Table Of Contents

Client Patching Notice

For game versions 3.1 and above, Cultivation automatically makes a small patch to your game client when launching using Grasscutter, and restores it upon closing the game. In theory, you should still be totally safe, however it would be dishonest to not explicitly state that modifying the game client could, theoretically, lead to a ban if you connect to official servers with it. It is extremely unlikely AND there are no instances known of it happening, but the possibility exists.

Download

Find release builds here!

Download and open the MSI, and once installed, run Cultivation as administrator. Refer below for more detailed setup instructions.

Windows 7 Users: You will need to download WebView2 manually, and download the .zip instead of the .msi.

Setup

5-minute video for those who don't like to/cannot read: https://youtu.be/e0irOYbQe7I

  • Download Cultivation
  • Install or extract Cultivation
  • Open Cultivation as administrator
  • Before clicking randomly on stuff, in options (top right cog icon), set your Game Install Path.
    • If you are using an existing server installation from somewhere else, you can set the .jar file in settings as well. All downloads made through Culti will automatically use that path, no additional config needed.
    • If you use multiple Java versions, you can set the Java path to your Java 17 installation (only required if you are running your own server)
  • Decide if you want to download your own server, or just join a public one
    • If joining a public one, you're done. Just click "Connect with Grasscutter" and input the address and port. You do not have to continue these instructions.
  • Open the "Downloads" menu (top right)
    • Download "Grasscutter All-in-One" (top of the list)
  • Once that is done, click the icon next to "Launch"
  • To play on your new server:
    • Click "Connect with Grasscutter"
    • Input localhost as the address, and 443 as the port
    • Ensure HTTPS is disabled
  • Any generic "I am getting XYZ error!" should go in the Discord support channels
  • Any specific Cultivation issues should go in the issues section
  • Any Grasscutter server related issues should go in the Grasscutter issues section

Troubleshooting

White screen, insta-crash or something similar

Internet not working after use

Please allow the Cultivation window to pop back up once you have quit out of the game. This tells you that it knows you closed the game, and that it has reverted your proxy settings. If you have closed Cultivation before this happens, or have had some other issue with your internet, go to your proxy settings in Windows and disable the "Manual proxy setup".

Developer Quickstart

Setup

  • Install NodeJS >12
  • Install yarn (cry about it npm lovers)
  • Install Rust
  • yarn install
  • yarn tauri dev

Building

For a release build,

  • yarn build

For a debug build,

  • yarn build --debug

Code Formatting and Linting

Formatting:

  • yarn format

Check Lints, fix (some) lints:

  • yarn lint, yarn lint:fix

Generating Update Artifacts

  • Add the TAURI_PRIVATE_KEY as an environment variable with a path to your private key.
  • Add the TAURI_KEY_PASSWORD as an environment variable with the password for your private key.
  • yarn build

The update will be at src-tauri/target/(release|debug)/msi/Cultivation_X.X.X_x64_xx-XX.msi.zip

Theming

A full theming reference can be found here!

Screenshots

image image image image

Credits

  • SpikeHD: For originally creating GrassClipper and creating the amazing UI of Cultivation.
  • KingRainbow44: For building a proxy daemon from scratch and integrating it with Cultivation.
  • Benj: For assistance in client patching.
  • lilmayofuksu: For assistance in client patching.
  • Tauri: For providing an amazing, efficient, and simple desktop application framework/library.

cultivation's People

Contributors

4benj avatar arikatsu avatar ariqpradipa avatar bims-sh avatar chisatonishikigi73 avatar daydreamer-json avatar dependabot[bot] avatar f1zztao avatar ffauzan avatar fnr1r avatar jseniuk avatar kelsegs avatar kiminanatsuki avatar kingrainbow44 avatar lilmayofuksu avatar notthorny avatar pfyy avatar pikachubolk avatar realshuru avatar ricecracker12 avatar root-mega avatar seeker14491 avatar spikehd avatar tesutarin avatar totallynotondre avatar tukandev avatar untitled avatar wehigami avatar xotakfr avatar yann48gmx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cultivation's Issues

Registry is always wiped

The "Wipe Login Cache" toggle doesn't work; the registry is always wiped. Looking at the code, it seems the wipe_registry() function is being called unconditionally:

// First wipe registry if we have to
await invoke('wipe_registry', {
// The exe is always PascalCase so we can get the dir using regex
execName: (await getGameExecutable())?.split('.exe')[0].replace(/([a-z\d])([A-Z])/g, '$1 $2'),
})

[Feature request] Automatically set 3dmigoto loader target path

It would be cool if cultivator could automatically set the loader target from d3dx.ini to the genshin directory set in the launcher. While it can be expected of people to be capable of setting the path themselves when running swag mode, I think it would a nice small addition to streamline things a bit more.

It can be implemented using rust-ini by modifying d3dx.ini as soon as 3dmigoto's executable path is set in the options panel.

Um, where's the proxy?

After downloading the newest release and starting the game on Grasscutter, the proxy just... doesn't start? And obviously I can't connect to the server. This isn't a problem with my game or internet connection because using Grassclipper works just fine...

Edit: The console window shows that I am connected to the proxy, but clearly I'm not because nothing works properly.

Proxy sometimes does not connect when using mods

I have been using Akebi and 3dmigoto with Cultivation (swag mode) and have had an issue whereby when launching with these mods and connecting via Grasscutter, the proxy sometimes does not connect and I get the captcha from official servers. This happens after no known settings were changed nor were any configurations with Akebi or 3dmigoto.

[fixed]I am also experiencing an issue whereby when using Reshade, it does not inject properly and fails to connect to the proxy each time, however I'm not as sure about that issue as Reshade has not yet worked for me and it could be an error on my end. I was previously having the same issue with Akebi but discovered its launch path was pointing toward the wrong install of the game, and so Cultivation didn't connect the proxy, so since I'm new to Reshade this could also be happening there (though I did change the install path in the PowerShell script).

Update: SpikeHD pointed out that Cultivation must be run in Administrator mode in order to use Reshade. That issue has now been fixed.

Invalid Password format

Every time I try to launch through the official launcher after closing everything from cultivation down I get a long error message beginning with "Invalid password format." In a recent video released by the creator he stated that Cultivation patches the game every time you launch it up so I this causing the issue? When I'm brought to the login screen via the official launcher and game the username inputted into the Cultivation version is preserved, if that is intentional/makes any difference as well.

Add trigger for unpatching on SIGTERM and SIGKILL

Currently if you cultivation gets closed by any abrupt way, the patching isn't undone, leading to the proxying to stay activate, leading to many problems on internet usage (like certificate validation). To solve that, one has to reopen cultivation and then launch the game from it, it will fail to patch, but then when closing the game properly, it will unpatch it. Adding triggers for abrupt interruptions and unpatching at that time would solve that issue.

Says could not patch game

It says could not patch game even though the game hasn't been patched. I've tried older versions. Nothing works

And also for me the settings on cultivation don't save.

Added a proxy function to block WindSeedClientNotify|增加一个代理功能以阻止WindSeedClientNotify

EN:
I noticed that WindSeedClientNotify is blocked in Grasscutter because it can execute lua scripts remotely. This can be harmful to players.
But if you want to add custom plots then WindSeedClientNotify may be necessary
So I hope to add a proxy function that can be controlled by the player to censor the game's kcp traffic to filter WindSeedClientNotify
While Akebi can do it, not every player uses Akebi
CN:
我注意到Grasscutter中阻止WindSeedClientNotify因为它可以远程执行lua脚本。这可能会对玩家产生危害。
但是如果想添加自定义剧情。那么WindSeedClientNotify或许是必要的
所以希望添加一个可以让玩家自行控制的代理功能对游戏的kcp流量进行审查以过滤WindSeedClientNotify
虽然Akebi可以做到,但不是每个玩家都使用Akebi

resources aren't copied over

GrasscutterResources-%latest% contents are not copied or moved into resources automatically after unzip.

This might be a feature request instead of a bug.

[Feature Request] Linux support

Probably it's too soon to ask for a Linux port (although I think it should be easy, since the main problem would be launching the game on Linux but that's easy solvable launching the Lutris launcher.bat file of the game instead of the .exe), but could we get a quick guide on how to launch Cultivation with Wine?, it's currently impossible without some tinkering that I don't know (or maybe it's absolutely impossible to run it with Wine for some technical reason?).

resources issue

culti gets stuck at 0 bites a second for hours and when i install manually my resources I get the error in the image bellow and cannot login. if someone can help I would appreciate it. (and I downloaded 2.8 resources btw)
Screenshot 2022-07-26 151613

Genshin Impact crash

i started the server,mongodbcompass and start to open genshin impact with all the mods and it crashed after 3dmigoto successfully injected into the game

Internal Proxy Exceptions

Add this to the proxy exceptions so that we can use discord with cultivation.
https://*.discord.com;https://*.discordapp.net;https://discord.gg/*;https://*.discordapp.com;https://*.discordapp.net;https://*.discordapp.net;https://*.discord.media;https://*.discord.gift/*
image
I tried to search in registry after what store these values but weren't able to find it

Crash

Followed the steps to build,but crashed soon when clicked "Launch".
When using yarn start:dev,
the terminal showed:
Failed to parse response: missing field bg_file at line 1 column 279321
Failed to parse response: missing field bg_file at line 1 column 279321
Patching metadata file: C:\Users\1111\AppData\Roaming\cultivation\metadata\global-metadata-unpatched.dat
Successfully decrypted global-metadata
Replacing password key
Replacing dispatch key
fatal runtime error: Rust cannot catch foreign exceptions
error Command failed with exit code 4294967295.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 3221226505.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Cannot start Cultivation from source code

I tried starting cultivation using npm run start:dev but it doesn't work because it tries to use yarn (I don't have yarn installed). I already installed dependencies with npm i also, I'm using the branch "patching".

Screenshot:
image

Failed to load mono

I've gotten an issue when trying to boot up the game that reads: "Fatal Error. Failed to load mono." Not too sure what it means or what to do about it.
Screenshot 2022-09-05 135943

Dedicated server: detailed issue report on "System error. Please try again later"

I run recent Grasscutter on a dedicated Gentoo Linux server and so far it appears to run smoothly:

Vecanoi /opt/grasscutter # /opt/openjdk-bin-17/bin/java -jar ./grasscutter-1.2.3-dev.jar
18:58:39 WARN:Language Failed to load language file: en-.json, falling back to: en-US.json
18:58:39 INFO:Language Loading cached TextMaps
18:58:39 INFO:ResourceLoader Loading resources...
18:58:42 INFO:ResourceLoader Finished loading resources.
18:58:42 INFO:Tools GM Handbooks generated!
18:58:42 INFO:Grasscutter Starting Grasscutter...
18:58:42 INFO:Grasscutter Game version: 3.0.0
18:58:42 INFO:Grasscutter Grasscutter version: 1.2.3-dev-32289e2
18:58:44 INFO:HttpServer [Dispatch] Dispatch server started at log-upload-os.mihoyo.com:443
18:58:44 INFO:GameServer Grasscutter is FREE software. If you have paid for this, you may have been scammed. Homepage: https://github.com/Grasscutters/Grasscutter
18:58:44 INFO:GameServer Game Server started at 2a01:xx:xx::xx:22102
18:58:44 INFO:Grasscutter Done! For help, type "help"

I ascertained it to be listening on both tcp/443 and udp/22102 sockets and I checked if https:// works in the browser (to that end I even obtained legit LetsEncrypt cert for it). All is OK so far.

So I then downloaded and installed latest Cultivation and ran it. The console window says:

Failed to get bg file response: missing field bg_file at line 1 column 318573
^ please stop reporting this as an error it's so annoying LMFAO
Starting process watcher...
Connecting to proxy...
Connected to the proxy.

That's all it ever says.
Then in Cultivation Launcher I ticked "Connect via Grasscutter" tick, entered hostname and port (443) for the dedicated server and also ticked HTTPS.
Pressed Launch.
The game said "System error. Please try again later" when I try to login (existing user in mongodb instance, any password -- this worked back with Grassclipper).

I also checked system proxy settings and yes, while Cultivation is running, the proxy host address field contains "http=127.0.0.1:8365;https=127.0.0.1:8365" and port field is empty.
This looked a little weird, so I also tried setting host to "127.0.0.1" and port to "8365" but it didn't help either.

What do I do next to make it work?

Crashes when cancelling UAC on game launch

Cultivation crashes when you click Launch and hit No when UAC asks if "CertainAnimeGame.exe" wants to make changes to your device.
I'm pretty sure this worked before and I've noticed that system_helpers::run_program was changed in PR #20 which was merged in with commit 0b2296f.

Debug Information:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1223, kind: Uncategorized, message: "The operation was canceled by the user." }', src\system_helpers.rs:6:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\cultivation.exe` (exit code: 101)0. Error = 0
error Command failed with exit code 4294967295.

Cultivation keeps connecting to official server

I'm pretty sure that I followed all the steps correctly, but when I launch Genshin via Cultivation, it keeps connecting to the official server. Btw, I hosted my own local server. The command prompt works fine, I can even create an acc with it. Idk if I messed up at any part, so I really need some help

[Feature request] Provide option to download tools from swag mode

Currently users have to download and set the paths to the various tools available in swag mode. Since all of it is hosted publicly on github (exception might be the special reshade), I think it would be nice to present the download option for those tools under the download menu when in swag mode.

It would make modding feel more intergrated with the rest of the launcher, (almost) everything needed would be in once place and would make it a bit more friendly to use those tools.

cannot connected to proxy

image
I looked at other issues, most of them have the text connect to proxy, but why mine can't connect?

Better error handling and reporting

Error handling could use a rework. There's many places in the Rust code where we call unwrap() for things like file system access or downloading stuff, which means Cultivation will crash if any of those operations fail. I think if such an operation fails, we should display that error on the frontend such as with a pop up message. The Rust code will need refactoring first though, so we return Results to the frontend instead of crashing.

got a sign error

When I login in games,I got an error message “System Error,please try after a minite”。
The Server run in localhost also got an error but not crash,so I ignore it.
image
When I run the client,the terminal also give me an error message.
image
I will appreciate it very much if someone help me.

Ability to set server download path

We should be able to set the download path for Grasscutter when using Cultivation to download Grasscutter. Same for the Data and Resources file as well. I know that there is a workaround by installing Grasscutter manually, but this should be a nice quality of life for those that aren't advanced.

Error when trying to sign in

When I try to sign into an account that I have created in the server terminal I get the error "System Error. Please try again later."

I've installed the Proxy certificate
I have the 2.8 client
I unchecked HTTPS and disabled Encryption

I fixed it. I had my proxy set to automatic

Entering the teapot creates an error

Whenever I give myself a teapot, select a realm layout and enter, the main house doesn't exist and the placement function is gone. Then, I get this error in the console and get a white screen the next time I try to enter the door into the game.
image

Genshin Impact System Error

So I tried to open Genshin Impact on the Cultivation launcher and when I try to login it says: "System Error. Please try again later.". I've looked if I missed something in the process but seems that there's nothing that I've left:

  • I've installed the Proxy certificate
  • I've put the WIndows proxy settings set to manual
  • I have the 2.8 client
  • I unchecked HTTPS and disabled Encryption

If anyone could help I would be very grateful!

Domains

I don't know if this is just an issue I have since I haven't seen anyone complaining but I was doing the thundering fury domain and I got to 10/15 kills and nothing else spawned so I couldn't complete the domain.

[Feature request] command line arguments

Since I launch genshin Impact from steam big picture, using a mouse is a hassle. So I would like command line argument support to skip the launcher's GUI and automatically start the game, such as

--custom_server=false --akebigc --3dmigoto

Maybe additional arguments like setting the path to akebi and 3dmigoto could be useful too.

And for server owners, --use-ssl=true --connect=fakeserver.com:666 could allow connecting to a custom server of their choice and setting SSL on/off.

If --connect is specified then --custom_server would implicitly be true, if no connect argument is given while --custom_server=true is given then the previous server would be used like the GUI.

Cultivation doesn't open

I recently got my new computer. I installed Genshin and all of that, the i installed Cultivation.zip but when i open it, it shows the CMD and closes. Any idea how to fix that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.