diff --git a/Readme.md b/Readme.md index 4b43df26..7f406981 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ # Outer Wilds Mod Loader -OWML is the mod loader and mod framework for Outer Wilds. It patches Outer Wilds to load mods, and provides mods with a framework to interact with the game. OWML is inspired by SMAPI for Stardew Valley. +OWML is the mod loader and mod framework for Outer Wilds. It patches Outer Wilds to load mods, and provides mods a framework to interact with the game. OWML is inspired by SMAPI for Stardew Valley. ## How it works @@ -20,21 +20,13 @@ Manual install: 2. [Download Outer Wilds mods](https://outerwildsmods.com/mods) and put them in the Mods folder, each mod in a separate folder. 3. Start the game with OWML.Launcher.exe. -## Sample mod - -One mod is included as an example. It's disabled by default, enable in manifest.json. - -|Sample mod|Description| -|----------|-----------| -|OWML.EnableDebugMode|Enables the built-in debug mode in the game. Highlights: cycle through debug UIs with F1, warp to planets with the number keys, and explode the sun with the End key.| - ## For modders -Refer to the sample mods for examples. +Refer to the sample mods in the source code for examples. These mods are not included in releases. ### Get started -1. Create a class library project targeting .Net Framework 3.5. +1. Create a C# class library project targeting .Net Framework 3.5. 2. Install the [OWML Nuget package](https://www.nuget.org/packages/OWML/). 3. Reference the following files in {gamePath}\OuterWilds_Data\Managed: * Assembly-CSharp.dll @@ -46,11 +38,12 @@ For more info, see [For modders](https://github.com/amazingalek/owml/wiki/For-mo ## Configuration -OWML is configured by OWML.Config.json: +OWML is configured in the in-game MODS menu, or in OWML.Config.json: |Key|Description| |---|-----------| |gamePath|The path to the game files. OWML will try to locate the game automatically.| +|debugMode|If enabled, a lot more information is written to the console. Intended for developers.| |combinationsBlockInput|If this is true, mod input combinations will block game input.| Each mod is defined in a manifest.json file: @@ -65,7 +58,7 @@ Each mod is defined in a manifest.json file: |owmlVersion|The version of OWML the mod was built for.| |dependencies|Array of dependency names. Make sure to use the unique name.| -Each mod can be configured with an **optional** config.json file: +Each mod can be configured in the in-game MODS menu, or in config.json: |Key|Description| |---|-----------| diff --git a/src/OWML.Launcher/OWML.Manifest.json b/src/OWML.Launcher/OWML.Manifest.json index edbd1eb6..0b652dda 100644 --- a/src/OWML.Launcher/OWML.Manifest.json +++ b/src/OWML.Launcher/OWML.Manifest.json @@ -2,7 +2,7 @@ "author": "Alek", "name": "OWML", "uniqueName": "Alek.OWML", - "version": "1.1.5", + "version": "1.1.6", "description": "The mod loader and mod framework for Outer Wilds", "minGameVersion": "1.0.7.0", "maxGameVersion": "1.0.7.481" diff --git a/src/OWML.Logging/ConsoleUtils.cs b/src/OWML.Logging/ConsoleUtils.cs index 996879ab..07aa811f 100644 --- a/src/OWML.Logging/ConsoleUtils.cs +++ b/src/OWML.Logging/ConsoleUtils.cs @@ -17,15 +17,14 @@ namespace OWML.Logging MessageType.Error => ConsoleColor.Red, MessageType.Warning => ConsoleColor.Yellow, MessageType.Success => ConsoleColor.Green, - MessageType.Message => ConsoleColor.Gray, + MessageType.Message => ConsoleColor.White, MessageType.Info => ConsoleColor.Cyan, MessageType.Fatal => ConsoleColor.Magenta, - MessageType.Debug => ConsoleColor.Blue, - _ => ConsoleColor.Gray + MessageType.Debug => ConsoleColor.DarkGray, + _ => ConsoleColor.White }; Console.WriteLine(line); - Console.ForegroundColor = ConsoleColor.Gray; } } } diff --git a/src/OWML.Logging/UnityLogger.cs b/src/OWML.Logging/UnityLogger.cs index c4806a4a..84980e7a 100644 --- a/src/OWML.Logging/UnityLogger.cs +++ b/src/OWML.Logging/UnityLogger.cs @@ -34,6 +34,7 @@ namespace OWML.Logging { LogType.Error => MessageType.Error, LogType.Exception => MessageType.Error, + LogType.Warning => MessageType.Warning, _ => MessageType.Debug }; diff --git a/src/OWML.ModHelper.Menus/ModMenu.cs b/src/OWML.ModHelper.Menus/ModMenu.cs index 1f596234..2f638089 100644 --- a/src/OWML.ModHelper.Menus/ModMenu.cs +++ b/src/OWML.ModHelper.Menus/ModMenu.cs @@ -18,29 +18,31 @@ namespace OWML.ModHelper.Menus public List BaseButtons { get; private set; } - public List ToggleInputs { get; private set; } - - public List SliderInputs { get; private set; } - - public List SelectorInputs { get; private set; } - - public List TextInputs { get; private set; } - - public List ComboInputs { get; private set; } - - public List NumberInputs { get; private set; } - public List Buttons => BaseButtons.OfType().ToList(); public List LayoutButtons => BaseButtons.OfType().ToList(); public List PromptButtons => BaseButtons.OfType().ToList(); + public List ToggleInputs => _inputs.OfType().ToList(); + + public List SliderInputs => _inputs.OfType().ToList(); + + public List SelectorInputs => _inputs.OfType().ToList(); + + public List TextInputs => _inputs.OfType().ToList(); + + public List ComboInputs => _inputs.OfType().ToList(); + + public List NumberInputs => _inputs.OfType().ToList(); + public List Separators { get; private set; } protected LayoutGroup Layout; protected IModConsole Console; + private List _inputs; + public ModMenu(IModConsole console) => Console = console; @@ -58,23 +60,18 @@ namespace OWML.ModHelper.Menus Menu = menu; Layout = layoutGroup; - var promptButtons = Menu.GetComponentsInChildren(true) - .Select(x => x.GetComponent