Giter Site home page Giter Site logo

ow-mods / owml Goto Github PK

View Code? Open in Web Editor NEW
79.0 4.0 13.0 12.63 MB

The mod loader and mod framework for Outer Wilds

Home Page: https://owml.outerwildsmods.com

License: MIT License

C# 100.00%
outer wilds mod-loader mod-manager outer-wilds modding-framework modding-library

owml's People

Contributors

amazingalek avatar artumino avatar bunn1e5 avatar bwc9876 avatar dependabot[bot] avatar dgarrodc avatar johncorby avatar megapiggy avatar misternebula avatar raicuparta avatar salomj avatar sandsalamand avatar taimatem avatar xen-42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

owml's Issues

Too Many Logs to the Mod Manager Crashes the Game

Repro:

  1. Send a lot of log messages (say, 1 every frame)
  2. Wait a bit. The "#" field on the log tab should stop incrementing.
  3. Wait a little more. The game should freeze.
  4. If you close the mod manager, the game will unfreeze.

If I had to guess what's happening:

  1. The mod manager socket somehow stops receiving log message "packets".
  2. The game socket's send buffer fills up because the mod manager socket is no longer receiving.
  3. The game freezes on Socket.Send because it waits for the send buffer to stop being pull so it can send more messages.
  4. When you close the mod manager, a socket disconnect happens, so the game unfreezes because the Socket.Send probably throws an exception saying "ah! can't send anything because the connection was closed!"

I haven't actually looked into the code enough to know the exact details of what does what, but that's what seems to be happening based on how I know sockets work.

IIRC, if you send a different message (so it shows up as a new line instead of incrementing the # counter), the problem doesn't happen. I'm not entirely sure this is actually true, though, but the fact that this bug doesn't happen if you send the logs to the console window (which doesn't have the # functionality) makes me think it's worth pointing out.

Add "Fatal" log level or similar

I have a few scenarios in NomaiVR where I just want to crash the game and force the player to read a message. For instance, if game version is not supported, if something with SteamVR failed to load, if controllers aren't detected, etc.

All of these problems make the game unplayable, and there's nothing you can do in-game to solve it, so I just want to make the game crash and show a dialog box explaining what to do about it. Because otherwise all I get is a bunch of people asking the same questions over and over again in Discord.

One way we could do this is have an extra log level, that sends this message and then force-closes the game. The log readers (OWML console or Mod Manager) can show a dialog box with the message. Not sure if something has to be done to be sure that the message is sent before the force close happens?

We could also have a "Dialog" log level that just does the dialog box, but doesn't force-close the game. I can make the game force close in NomaiVR so that's not a problem.

Crashing before even loading the game

Whenever I have the owml installed through the mod manager, I get a unity error pop up and Outer Wilds doesn't load at all. Checking the log I see this

Started OWML v1.1.8 OWML  
Current game path is not valid: C:/Program Files/Epic Games/OuterWilds OWML  
Game found in c:/program files (x86)/steam/steamapps/common/Outer Wilds OWML  
Game version: not found OWML  
Warning - invalid game version format OWML  
Game files copied. OWML  
Warning - No mods found. OWML  
PermanentManager.Awake is already patched. OWML  
No mods require VR. OWML  
Starting game...

And then the unity error flashes for a second before vanishing. After uninstalling the mod manager and mod loader, my game continues to crash until I verify the game files and reacquire them

Can't get owml and nomaivr to work anymore

Here are screenshots of the issues and versions. Been trying from within the mod manager and with the owml launcher exe by itself. Haven't tried reinstalling the game yet. This wasn't an issue until hours into echoes of the eye. Tried launch game exe directly. This is the steam version. Tried moving the game to the C drive but no change.

vlcsnap-2021-12-21-20h27m21s626 (3)
ow1
ow3
ow4
.

Run game with OpenVR flag if VR is required

In some cases, we need pass the parameter -vrmode openvr to the game exe in order for SteamVR to pick up the game. This can be done by passing the same param to OWML, but to make it simpler we should just always pass it whenever VR is required.

Unity 5 asset errors in console

Not sure if this is actually an issue since the game ran fine, but I had errors similar to the following from OMWL in the logs after I had finished playing:

Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_01/Center_01_HighResCol", Mesh asset path "" Mesh name "Center_01_HighResCol"

Running Windows 10 with EOTE DLC installed. Full logs are included below:

Mod Manager Logs
Log message Message source  
Started console server on port 59322 Mod Manager  
Client connected to console Mod Manager  
Started OWML v2.2.0 OWML  
Game found in C:/Program Files (x86)/Steam/steamapps/common/Outer Wilds OWML  
Game version: 1.1.12.125 OWML  
Potentially unsupported game version found, continue at your own risk OWML  
Game files copied. OWML  
Found mods: OWML  
Raicuparta.NomaiVR v2.5.1 OWML  
Copying OWML files... OWML  
Copying replacement OW files... OWML  
Patching OW assembly... OWML  
Executing patcher for Raicuparta.NomaiVR v2.5.1 OWML  
Starting game via Steam... OWML  
Client disconnected from console Mod Manager  
Client connected to console Mod Manager  
Mod loader has been initialized. OWML  
Game version: 1.1.12.125 OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_01/Center_01_HighResCol", Mesh asset path "" Mesh name "Center_01_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_02/Center_02_HighResCol", Mesh asset path "" Mesh name "Center_02_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_04/Center_04_HighResCol", Mesh asset path "" Mesh name "Center_04_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_05/Center_05_HighResCol", Mesh asset path "" Mesh name "Center_05_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_06/Center_06_HighResCol", Mesh asset path "" Mesh name "Center_06_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_07/Center_07_HighResCol", Mesh asset path "" Mesh name "Center_07_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_08/Center_08_HighResCol", Mesh asset path "" Mesh name "Center_08_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_09/Center_09_HighResCol", Mesh asset path "" Mesh name "Center_09_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_10/Center_10_HighResCol", Mesh asset path "" Mesh name "Center_10_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_11/Center_11_HighResCol", Mesh asset path "" Mesh name "Center_11_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_12/Center_12_HighResCol", Mesh asset path "" Mesh name "Center_12_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Center_13/Center_13_HighResCol", Mesh asset path "" Mesh name "Center_13_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Upper_01/Upper_01_HighResCol", Mesh asset path "" Mesh name "Upper_01_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Upper_02/Upper_02_HighResCol", Mesh asset path "" Mesh name "Upper_02_HighResCol" OWML  
Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "RingWorld_Body/Sector_RingInterior/Geometry_RingInterior/Dam_Root/Dam_Broken/Structure_IP_BrokenDam/DamPiece_Upper_03/Upper_03_HighResCol", Mesh asset path "" Mesh name "Upper_03_HighResCol" OWML  
  OWML  
Client disconnected from console

Menu Separators sometimes broken in the pause Menu

Steps to reproduce

  1. Add two or more separators to the default-config.json for a mod
  2. Verify that is works on the title screen mod menu
  3. Start the game, and try to open the pause mod menu

Stacktrace

Menu system crashed: System.NullReferenceException 
	at (wrapper managed-to-native) UnityEngine.Object.GetName(UnityEngine.Object) 
	at UnityEngine.Object.get_name () [0x00001] in <d9a322ed61d14dd89945ee0a494ae01f>:0 
	at OWML.ModHelper.Menus.ModMenu+<>c__DisplayClass62_0.<GetSeparator>b__0 (OWML.Common.Menus.IModSeparator x) [0x00019] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <55b3683038794c198a24e8a1362bfc61>:0 
	at OWML.ModHelper.Menus.ModMenu.GetSeparator (System.String title) [0x00013] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at OWML.ModHelper.Menus.ModMenu.SetInputValue (System.String key, System.Object value) [0x0014d] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at OWML.ModHelper.Menus.ModConfigMenu.UpdateUIValues () [0x00053] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at OWML.ModHelper.Menus.ModsMenu.InitConfigMenu (OWML.Common.Menus.IModConfigMenuBase modConfigMenu, OWML.Common.Menus.IModTabbedMenu options, OWML.Common.Menus.IModTabMenu modTabMenu) [0x000ef] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at OWML.ModHelper.Menus.ModsMenu.CreateBlockOfButtons (OWML.Common.Menus.IModTabbedMenu options, OWML.Common.Menus.IModTabMenu menu, System.Collections.Generic.List`1[T] configMenus, System.Int32 index, System.String title) [0x000b3] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at OWML.ModHelper.Menus.ModsMenu.Cre
	ateModsMenu (OWML.Common.Menus.IModTabbedMenu options) [0x0009f] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at OWML.ModHelper.Menus.ModsMenu.Initialize (OWML.Common.Menus.IModMenus menus, OWML.Common.Menus.IModOWMenu owMenu) [0x0007b] in <d6c48abff5fb4b58ab37984165ca214f>:0 
	at OWML.ModHelper.Menus.ModMenus.InitPauseMenu (PauseMenuManager pauseMenuManager) [0x0001c] in <d6c48abff5fb4b58ab37984165ca214f>:0

Don't worry, this is my fault, so I'll take this one., and thankfully separators are also not listed anywhere in the documentation, so that is good as well.

Bug: Mod config action buttons not working with controller

I'm pretty sure this was working before, otherwise I would have noticed... After going in to a mod's config page, it's impossible to use any of the buttons on the bottom using a controller. Only works with mouse. Pressing Enter on the keyboard also highlights "Exit and Save" but does't do anything.

Having duplicate mods crashes OWML and breaks the options menu

Issue occurred when using post-build events for QSB, so this should only happen to modders. Having two mods with the same unique name crashes OWML with the error :

[OWML]: Unity log message: ArgumentException: An element with the same key already exists in the dictionary.. Stack tra
ce: System.Collections.Generic.Dictionary`2[System.String,OWML.Common.IModData].Add (System.String key, IModData value)

OWML.ModLoader.ModSorter.SortMods (IList`1 mods)
OWML.ModLoader.Owo.LoadMods ()
OWML.ModLoader.ModLoader.LoadMods ()
PermanentManager.Awake ()

After loading the title screen, the options button does nothing. However, going into the change profile menu and going back loads the option menu fine, but the leave button does nothing.

If default-config.json is malformed, game refuses to launch.

I tried to launch a newer version of a mod I was developing, and noticed that the game would no longer launch. After some testing, I realized the problem was my mod's default-config.json file was malformed. Ideally, a malformed json file should throw up some kind of error instead of silently preventing the game from being launched.

Crash to Desktop: "An existing connection was forcibly closed by the rmeote host..."

Crashed to desktop while playing Echoes of the Eye with NomaiVR. Crashed about a minute into a new loop while landing my ship.

Noticed the following logs from OWML.launcher.exe after the crash:

Started OWML v2.3.2
Game found in C:/Program Files (x86)/Steam/steamapps/common/Outer Wilds
Game version: 1.1.12.168
Game version is supported
Game files copied.
Found mods:

  • Artum.NomaiVRFoveated v1.0.3
  • Raicuparta.NomaiVR v2.6.0
    Copying OWML files...
    Copying replacement OW files...
    Patching OW assembly...
  • Assembly is already patched.
    Executing patcher for Artum.NomaiVRFoveated v1.0.3
    Executing patcher for Raicuparta.NomaiVR v2.6.0
    Identified as a Steam install. Launching...
    Console connected to socket!
    [OWML.Owo] : Mod loader has been initialized.
    [OWML.Owo] : Game version: 1.1.12.168
    [NomaiVR Fixed Foveated Rendering.NomaiVRFoveated] : Start NomaiVRFoveated
    [NomaiVR Fixed Foveated Rendering.ModAssets] : Loading asset bundle from C:/.../OWML/Mods\Artum.NomaiVRFoveated\assets/foveated-shaders
    [NomaiVR Fixed Foveated Rendering.NomaiVRFoveated] : Creating NomaiVRFoveated behaviour for FoveatedRenderingEnabler
    [NomaiVR Fixed Foveated Rendering.NomaiVRFoveated] : Creating NomaiVRFoveated behaviour for FoveatedRenderingEnabler
    [NomaiVR Fixed Foveated Rendering.NomaiVRFoveated] : Creating NomaiVRFoveated behaviour for FoveatedRenderingEnabler
    [NomaiVR Fixed Foveated Rendering.NomaiVRFoveated] : Creating NomaiVRFoveated behaviour for FoveatedRenderingEnabler
    [NomaiVR Fixed Foveated Rendering.NomaiVRFoveated] : Creating NomaiVRFoveated behaviour for FoveatedRenderingEnabler
    Error while listening: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    --- End of inner exception stack trace ---
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at OWML.Launcher.SocketListener.ListenToSocket() in D:\a\owml\owml\src\OWML.Launcher\SocketListener.cs:line 77
    at OWML.Launcher.SocketListener.SetupSocketListener() in D:\a\owml\owml\src\OWML.Launcher\SocketListener.cs:line 42

InputPopup steals input devices and never gives them back

If I open a custom input popup from the save menu I see the popup text and the pause menu text at the same time. I interact with both, which is an issue unto itself. Once both the popup and the pause menu are closed I can no longer look around with mouse or gamepad. I'm stuck in the mouse mode as if the input still belongs to ModHelper.Menus and not the game. The only way out is to quit the game. Full bork.

The calling code is doing this:
var popup = ModHelper.Menus.PopupManager.CreateInputPopup

Mod config: text input doesn't pop up with controller

Even though it's not possible to type using a controller, we should at least make the text input pop up when selecting that config, so users know to use the keyboad there. Just like when typing the profile name.

Outdated Lib.Harmony version on NuGet

The Issue

There is a problem with the lowest version for Lib.Harmony which the OWML NuGet requires. As its dependencies, it requires Json.Net.Unity3D (>= 9.0.1) and Lib.Harmony (>= 1.2.0.1). The Harmony library has two different namespaces depending on the version that you are using, Harmony for versions <= 2.0 and HarmonyLib for versions >= 2.0, which indicates that neither are compatible, and this is where the problem lies.

For some reason the NuGet, instead of getting the latest Harmony version, uses the lowest one allowed (1.2.0.1):
image

And, OWML uses the 2.5.5.0 version:
image

This means that when you use the NuGet you can't use Harmony as normal in a mod, because not only you are using an incompatible version but the namespaces are different.

Some points to note

As you might notice, while Harmony doesn't work, the ModHelpers for it do. I theorize that, because you are not interacting with the 0Harmony.dll namespace, you don't get this incompatibility issue.

A possible fix

Maybe by updating the OWML NuGet to require a version that is >= 2.0 this issue will be fixed.

Using Through Steam via Proton Not Currently Possible

Trying to launch the modloader on Linux, by taking advantage of Proton, is not possible as the current method for replacing a binary in the launch options doesn't appear to be supported by Proton. That's obviously not an issue on your end, but this could be very easily worked around if there was a config option to specify the Outer Wilds binary.

The typical approach of "C:\Program Files (x86)\Steam\steamapps\common\OWML.Launcher.exe" %command% (similar as you would with SMAPI) works just fine on Windows, but doesn't seem supported by Proton using Windows or Unix filepaths.

So, I instead opted to rename the binary and then rename OMWL.Launcher.exe to OuterWilds.exe just to see what would happen. After looking through the config and fixing filepath issues, the program began successfully, but would start itself in an endless loop. This is seemingly because the OuterWilds.exe filename is hard coded. I hope I have this right.

Would it be possible to allow one to change the Outer Wilds binary name in config? I think it would easily resolve running this via Proton.

Thanks.

Loaded audio does not loop

Seems as if there's just silence added to the end so it never loops within a reasonable amount of time

PopupManager doesn't work properly with keyboard/gamepad controls

var openInputButton = ModHelper.Menus.PauseMenu.ResumeButton.Duplicate("ADD EVENT");
openInputButton.OnClick += EventPopup;
....
private void EventPopup()
{
    var popup = ModHelper.Menus.PopupManager.CreateInputPopup(InputType.Text, "Event Name");
    popup.OnConfirm += AddEvent;
}

When use 'A' (gamepad) or the return key, the popup opens and is immediately confirmed with 'Event Name' (the default text). Only when clicking on the menu item does the prompt actually appear.

Question

Does this method work for any unity game? I have been looking into how to mod VR into Unity games and found a repo for VRGIN and it works for most games but not all. Trying to get it working on newer games like this one. Im thinking I just need to redo what they did to use OpenVR like you seem to be doing..... Only a couple days into it tho... =P Pretty much trying to put my camera controls into any unity game to look around =P store.steampowered.com/app/602630 (if you want to try out my controls its a free app. Players didn't seem to like them, but i didn't put in a tutorial. )

Mod dependencies

  • Allow mod dependencies to be defined in manifest
  • Load mods in order
  • Helper methods to interact with other mods

Add a game version check

Especially from 1.0.6 -> 1.0.7, if the game is not updated OWML will fail without a clear reason (no errors - maybe that's a separate problem?)
We should have a version defined in the owml manifest (Like mods have a owml version) and check if OWML is trying to run on an old game version. This would have to run before LoadMods, preferably as soon as the first thing OWML does so the code actually has a chance of running before running into version-specific OWML code

Support settings changing type between mod versions

If there's a config.json present, that one will be used to define the type of a setting. We need to compare config.json with default-config.json, and if the types of the same setting are different, we reset that setting to default.

Related: settings that are deleted from default-config.json should also be deleted from config.json.

Basically, the mod menu should always be build from default-config.json only if it exists. Leftover stuff in config.json shouldn't show up in the menus.

Deal with PromptGameFinder when running from Mod Manager

When no game path is found, PromptGameFinder will ask for the path via console input. This doesn't work with the mod manager.

We could send a different message type so the mod manager can deal with it better. Or we use #254, which would make the mod manager show an alert explaining what to do (change game path in settings).

Make config files have only values

Should probably work the same way for mod configs and owml config if possible.

This would fix many config problems that we currently have (for instance can't change the max value of a slider in a mod update). Would also simplify the code in a few places in OWML (less logic for deciding whether settings need to be reset after mod updates) and Mod Manager (mod manager would no longer need to keep copying stuff from default).

  • Structure of config could stay in either default-config.json, or move to manifest.json (might reduce the chance of accidentally editing defaults file?);
  • config.json would only need to have values that differ from defaults;
  • When OWML reads a setting value, it will first check config.json, then default-config.json if needed;
  • We never need to copy from default-config.json to config.json;
  • Pressing "reset to defaults" simply deletes config.json;
  • Mod updates can change the format of settings (min/max values, titles, etc) and user configs remain intact;
  • If a mod update changes the type of a setting (like string to int) then it needs to be reset (already done);

Example:

// default-config.json
{
  "enabled": true,
  "settings": {
    "enableMusic": true,
    "power": {
      "type": "slider",
      "value": 10,
      "min": 0,
      "max": 20
    },
    "decimals": {
      "type": "slider",
      "value": 10.54545,
      "min": 0.545,
      "max": 525.545845565
    }
  }
}
// config.json
{
  "enabled": false,
  "settings": {
    "power": 5,
    "decimals": 5.2
  }
}

Asset loading is a mess

Loading a texture2d returns... a mesh renderer? WHAT

  • Loading a mesh/texture/audio should return only the item being loaded, with no other stuff
  • A lot of the code can be simplified as unity has built in methods for loading certain assets

Error in game

Cannot set the parent of the GameObject 'Prefab_CloudExit_GD_StatueIsland(Clone)' while activating or deactivating the parent GameObject 'CloudLayer_Fluid'.
The game crashes in the begining after the statue cutscene.

Game doesn't launch

The game launches when I install OWML for the first time. After this, the game is no longer launching anymore from the Mod Manager app neither from OMWL.Launcher.exe. Everytime I try to open it, a console pops up saying "exception: Access denied to UnityEngine.CoreModule.dll'" and then it closes.
image
The game launches correctly from the default executable, without mods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.