From b752e2c021ac0101a8443c132bb7ea1994eb4214 Mon Sep 17 00:00:00 2001 From: apple1417 Date: Mon, 25 Nov 2024 17:09:06 +1300 Subject: [PATCH] make it a bit clearer that the sample settings are not suitable for use --- README.md | 16 +++++++++------- ...alsdk.toml.example => supported_settings.toml | 13 +++++++++++-- 2 files changed, 20 insertions(+), 9 deletions(-) rename unrealsdk.toml.example => supported_settings.toml (75%) diff --git a/README.md b/README.md index 68c3257..dc83913 100644 --- a/README.md +++ b/README.md @@ -99,16 +99,18 @@ LOG(INFO, "Some log message"); // Both in the log file and console ## Configuration There are a few pieces of sdk behaviour you can configure, via an `unrealsdk.toml`. By default this should be placed next to the dll, though you can also specify a custom location via the -`UNREALSDK_CONFIG_FILE` environment variable. +`UNREALSDK_CONFIG_FILE` environment variable. You are not expect to provide a full configuration, +some settings change behaviour simply by being defined, you should only set the ones you need. If +the defaults work you may not even need a config file to begin with. Since it's somewhat expected your project may have to ship with some default settings, an -`unrealsdk.user.toml` can also be used to add some user specific settings. The two files are merged, -fixing conflicts as follows: -- If a value is a table in both files, it's recursively merged -- Otherwise, whatever value is in the user file overwrites the base file. +`unrealsdk.user.toml` can also be used to add some user specific settings. The values in the user +file overwrite those from the base, unless both values are tables, in which case they're merged +recursively. -See [`unrealsdk.toml.example`](unrealsdk.toml.example) for a full description of what settings are -supported. +[`supported_settings.toml`](supported_settings.toml) has full descriptions of all supported +settings. *Do not* try make a copy of this file as the basis of your config, some of the values +within it are intentionally bogus, as there's no sane default, and using them will likely crashes.
diff --git a/unrealsdk.toml.example b/supported_settings.toml similarity index 75% rename from unrealsdk.toml.example rename to supported_settings.toml index aca9cd4..e68f04d 100644 --- a/unrealsdk.toml.example +++ b/supported_settings.toml @@ -1,6 +1,15 @@ # This file shows all settings which the sdk uses. -# Note that not all settings are used under all build configurations - for example UE3 doesn't -# support FText, so `ftext_get_display_string_vf_index` is of course unused. + +# DO NOT make a copy of this file as the basis of your config. Some values are intentionally bogus +# as there's no sane default to set them to (e.g. virtual function indexes), and will likely cause +# crashes if used. + +# You are not expected to provide all settings, you should only set those you need. Some settings +# will change behaviour simply by being defined. For example, if `uproperty_size` is set, the sdk +# will not attempt to auto detect it, and will instead assume the provided value is accurate. + +# Not all settings are used under all build configurations - for example UE3 doesn't support FText, +# so `ftext_get_display_string_vf_index` is of course unused. [unrealsdk] # If true, creates an external console window mirroring what is written to the game's console.