Skip to content

Commit 5a0cf7d

Browse files
Merge pull request #11 from SpontanCombust/dev
2 parents 8a9101a + 9fe2e23 commit 5a0cf7d

6 files changed

Lines changed: 151 additions & 73 deletions

File tree

Cargo.lock

Lines changed: 57 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.7.0"
6+
version = "0.8.0"
77
edition = "2021"
88
authors = ["SpontanCombust"]
99

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ https://github.com/WolvenKit/WolvenKit
1717

1818
## Usage
1919

20-
In order to use this tool make sure the game is running and that it was launched with following arguments: -net -debugscripts.
20+
In order to use this tool one of two requirements must be met:
21+
1. The game must have been launched with following debug arguments[^1]: -net -debugscripts.
22+
2. A REDkit project must be opened
23+
24+
[^1]: You can either create a shortcut to the executable and add those arguments at the end or configure launch parameters in Steam/GOG.
2125

2226
Print help information.
2327
```ps1
@@ -30,11 +34,16 @@ Recompile game scripts.
3034
rw3d_cli.exe reload
3135
```
3236

33-
Recompile game scripts while developing a mod using REDkit.
37+
Recompile scripts specifically for an active REDkit project.
3438
```ps1
3539
rw3d_cli.exe --target=editor reload
3640
```
3741

42+
Recompile scripts specifically for a game being launched with debug arguments.
43+
```ps1
44+
rw3d_cli.exe --target=game reload
45+
```
46+
3847
Remotely call an exec function from the game. Remember to use quotation marks for the command argument.
3948
```ps1
4049
rw3d_cli.exe exec "spawn('Nekker', 3)"

crates/cli/src/main.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ pub(crate) struct CliOptions {
2626
#[clap(long, default_value="127.0.0.1", display_order=0)]
2727
ip: String,
2828

29-
/// Select connection target
30-
#[clap(long, value_enum, default_value="game", display_order=1)]
29+
/// Select connection target.
30+
/// - game - connect to the standalone game running with debug arguments,
31+
/// - editor - connect to the game running in the REDkit editor,
32+
/// - auto - try connecting to either the standalone game or one running in REDkit
33+
#[clap(long, value_enum, default_value="auto", display_order=1, verbatim_doc_comment)]
3134
target: ConnectionTarget,
3235

3336
/// The maximum amount of milliseconds that program should wait for the game to respond.
@@ -51,10 +54,12 @@ pub(crate) struct CliOptions {
5154

5255
#[derive(Debug, ArgEnum, Clone, Copy, PartialEq, Eq)]
5356
enum ConnectionTarget {
54-
/// Connect to the game running on its own
57+
/// Connect to the standalone game running with debug arguments.
5558
Game,
56-
/// Connect to the game running through REDkit editor
57-
Editor
59+
/// Connect to the game running through the REDkit editor.
60+
Editor,
61+
/// Try connecting to either the standalone game or one running through REDkit.
62+
Auto
5863
}
5964

6065
#[derive(Debug, ArgEnum, Clone, Copy, PartialEq, Eq)]

0 commit comments

Comments
 (0)