Skip to content

Commit

Permalink
update developing info to toml
Browse files Browse the repository at this point in the history
  • Loading branch information
apple1417 committed Nov 30, 2024
1 parent 938f2ef commit 7103a7d
Showing 1 changed file with 34 additions and 23 deletions.
57 changes: 34 additions & 23 deletions developing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,42 @@ Work in progress
1. Create a new folder to develop your mods within. The mod manager supports loading from multiple
mods folders, so you can keep the mods you're developing separate.

2. Open up `OakGame\Binaries\Win64\Plugins\unrealsdk.env`, and add the following lines:
- ```ini
MOD_MANAGER_EXTRA_FOLDERS=["C:\\path\\to\\new\\mod\\folder"]
```
This is a json list of paths to extra mod folders, you can append more - though note it must
stay on a single line.

- ```ini
UNREALSDK_LOG_LEVEL=DWRN
```
This sets the default log level to developer warning. This will print some extra log messages
to console, which are relevant for developers, but which we don't want normal users to worry
over.
- ```ini
PYUNREALSDK_DEBUGPY=1
```
2. Create a new file `Binaries\Win32\Plugins\unrealsdk.user.toml`, and add the following content:

```toml
[unrealsdk]
console_log_level = "DWRN"

[pyunrealsdk]
debugpy = true
# pyexec_root = "C:\\path\\to\\new\\mod\\folder"

[mod_manager]
extra_folders = [
"C:\\path\\to\\new\\mod\\folder"
]
```

- `unrealsdk.console_log_level`

This sets the default log level. Setting it to `DWRN`, developer warning, will print some extra
log messages to console, which are relevant for developers, but which we don't want normal
users to worry over.

- `pyunrealsdk.debugpy`

This enables [debugpy](https://github.com/microsoft/debugpy) support, which will let you
properly attach a debugger.
You may also want to modify `PYUNREALSDK_PYEXEC_ROOT` to point at your mod folder. This will let
you run `C:\path\to\new\mod\folder\test.py` using simply `pyexec test.py`.
Note that the mod manager download contains this file, so when updating you need to be careful
not to overwrite it/to restore it afterwards.

- `pyunrealsdk.pyexec_root`

Changes the root directory used when running `pyexec` commands. You may want to redirect this
to your new folder, so you can run files within it directly.

- `mod_manager.extra_folders`

This is a list of extra mod folders, which lets you keep your development folder seperate from

Check warning on line 42 in developing/index.md

View workflow job for this annotation

GitHub Actions / spelling

"seperate" should be "separate".
other mods.

3. Download the latest version of debugpy, and extract to one of your mods folders such that it's
importable. The mod manager initialization script will automatically import it and start a
Expand Down

0 comments on commit 7103a7d

Please sign in to comment.