From 7103a7debd5c4df2ec56c3eddf0a7cd9b3933a72 Mon Sep 17 00:00:00 2001 From: apple1417 Date: Sat, 30 Nov 2024 15:10:27 +1300 Subject: [PATCH] update developing info to toml --- developing/index.md | 57 +++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/developing/index.md b/developing/index.md index e8e7ca8..3edc284 100644 --- a/developing/index.md +++ b/developing/index.md @@ -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 + 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