Timberborn-Modding-Central / TimberAPI

The one and only
https://timberapi.com
GNU Lesser General Public License v2.1
33 stars 17 forks source link

Not working "Out of the Box" #30

Closed SitusKiss closed 2 years ago

SitusKiss commented 2 years ago

I have a fresh installation of R2modman (3.1.32). I used the inbuilt features to acquire the following Mods:

I launched the game using the "Start modded" feature. This results in errors and fails to load the game when both Mods are enabled. The console has the following:

[Message:   BepInEx] BepInEx 5.4.19.0 - Timberborn (9/11/2022 11:41:10 AM)
[Info   :   BepInEx] Running under Unity v2021.2.14.15834644
[Info   :   BepInEx] CLR runtime version: 4.0.30319.42000
[Info   :   BepInEx] Supports SRE: True
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.19.0]
[Info   :   BepInEx] 1 patcher plugin loaded
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 2 plugins to load
[Warning:   BepInEx] Plugin [TimberAPI 0.4.4] targets a wrong version of BepInEx (5.4.20.0) and might not work until you update
[Warning:   BepInEx] Plugin [TimberAPIExample 0.4.3] targets a wrong version of BepInEx (5.4.20.0) and might not work until you update
[Info   :   BepInEx] Loading [TimberAPI 0.4.4]
[Warning:  HarmonyX] AccessTools.GetTypesFromAssembly: assembly TimberAPI, Version=0.4.4.0, Culture=neutral, PublicKeyToken=null => System.Reflection.ReflectionTypeLoadException: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Could not resolve type with token 01000046 from typeref (expected class 'Timberborn.Persistence.ISpecificationService' in assembly 'Timberborn.Persistence, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null')
  at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <6073cf49ed704e958b8a66d540dea948>:0
  at HarmonyLib.AccessTools.GetTypesFromAssembly (System.Reflection.Assembly assembly) [0x0000d] in <474744d65d8e460fa08cd5fd82b5d65f>:0
System.TypeLoadException: Could not resolve type with token 01000046 from typeref (expected class 'Timberborn.Persistence.ISpecificationService' in assembly 'Timberborn.Persistence, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null')
[Info   : TimberAPI] Creating new asset area with prefix: timberApi
[Info   : TimberAPI] Asset timberApi/timber_api found
[Info   : TimberAPI] Prefix timberApi, assets: 1
[Info   : TimberAPI] TimberAPI is loaded!
[Info   :   BepInEx] Loading [TimberAPIExample 0.4.3]
[Info   : TimberAPI] Creating new asset area with prefix: TimberAPIExample
[Info   : TimberAPI] Asset TimberAPIExample/icons found
[Info   : TimberAPI] Asset TimberAPIExample/testprefab.bundle found
[Info   : TimberAPI] Prefix TimberAPIExample, assets: 2
[Info   :TimberAPIExample] TimberAPIExample is loaded!
[Message:   BepInEx] Chainloader startup complete
[Info   : Unity Log] Starting game version 0.1.5.2-773c83b-sw
[Info   : Unity Log] System info:
System: Windows 10  (10.0.19043) 64bit
CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
GPU: NVIDIA GeForce GTX 750 Ti
GPU memory: 2007MB
RAM: 24515MB
Drives:
  C:\ 80.76GB free from 465.16GB

[Info   : Unity Log] Modded: true, BepInEx
[Info   : TimberAPI] Loading scene: Global, prefixes in scene: timberApi
[Info   : TimberAPI] Loading scene: MainMenu, prefixes in scene:
[Info   : TimberAPI] Initialized configurators for Global (First)
[Info   : TimberAPI] Initialized configurators for MainMenu (First)
[Error  : Unity Log] TypeLoadException: Could not resolve type with token 01000046 from typeref (expected class 'Timberborn.Persistence.ISpecificationService' in assembly 'Timberborn.Persistence, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null')
Stack trace:
Bindito.Core.Internal.ContainerDefinition.Install (Bindito.Core.IConfigurator configurator) (at <97564844199c40c08db164961f62f587>:0)
TimberbornAPI.DependencySystem.DependencyRegistry.InstallAll (Bindito.Core.IContainerDefinition containerDefinition, TimberbornAPI.Common.SceneEntryPoint entryPoint, System.Boolean first) (at <ce0ecb323c63403bba20e2c43f498687>:0)
TimberbornAPI.DependencySystem.DependencyRegistry.InjectIntoMainMenuSceneLast (Bindito.Core.IContainerDefinition containerDefinition) (at <ce0ecb323c63403bba20e2c43f498687>:0)
(wrapper dynamic-method) Timberborn.MainMenuScene.MainMenuSceneConfigurator.DMD<Timberborn.MainMenuScene.MainMenuSceneConfigurator::Configure>(Timberborn.MainMenuScene.MainMenuSceneConfigurator,Bindito.Core.IContainerDefinition)
Bindito.Unity.SceneConfigurator.Bindito.Core.IConfigurator.Configure (Bindito.Core.IContainerDefinition containerDefinition) (at <b39f4d0e163e4a6ebf49e6ec2b083479>:0)
Bindito.Core.Internal.ConfiguratorRunner.RunConfigurators (System.Collections.Generic.IEnumerable`1[T] configurators) (at <97564844199c40c08db164961f62f587>:0)
Bindito.Core.Internal.ContainerCreator.ConfigureContainer (Bindito.Core.IContainer container, System.Collections.Generic.IEnumerable`1[T] configurators, Bindito.Core.Internal.IBinder binder, Bindito.Core.Internal.IProvisionListenerNotifier provisionListenerNotifier, Bindito.Core.Internal.IInjectionListenerNotifier injectionListenerNotifier) (at <97564844199c40c08db164961f62f587>:0)
Bindito.Core.Internal.ContainerCreator.CreateContainer (System.Collections.Generic.IEnumerable`1[T] configurators) (at <97564844199c40c08db164961f62f587>:0)
Bindito.Core.Internal.ContainerCreator.CreateChildContainer (System.Collections.Generic.IEnumerable`1[T] configurators) (at <97564844199c40c08db164961f62f587>:0)
Bindito.Core.Internal.Container.CreateChildContainer (System.Collections.Generic.IEnumerable`1[T] configurators) (at <97564844199c40c08db164961f62f587>:0)
Bindito.Core.Internal.Container.CreateChildContainer (Bindito.Core.IConfigurator[] configurators) (at <97564844199c40c08db164961f62f587>:0)
Bindito.Unity.SceneConfigurator.CreateSceneContainer () (at <b39f4d0e163e4a6ebf49e6ec2b083479>:0)
Bindito.Unity.SceneConfigurator.Awake () (at <b39f4d0e163e4a6ebf49e6ec2b083479>:0)

Setting breakpad minidump AppID = 1062090
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198274815951 [API loaded no]
[Info   : Unity Log] Successfully connected to the Steam client.
[Error  : Unity Log] BindingNotFoundException: Couldn't get an instance of TimberbornAPI.PluginSystem.PluginLocationService, it wasn't bound.
Stack trace:
Bindito.Core.Internal.Container.GetInstance (System.Type type) (at <97564844199c40c08db164961f62f587>:0)
Bindito.Core.Internal.Container.GetInstance[T] () (at <97564844199c40c08db164961f62f587>:0)
TimberbornAPI.ContainerSystem.ContainerHolder.GetInstance[T] () (at <ce0ecb323c63403bba20e2c43f498687>:0)
TimberbornAPI.LocalizationSystem.LocalizationRepository.GetLocalizationFilePathsFromDependencies (System.String localizationKey) (at <ce0ecb323c63403bba20e2c43f498687>:0)
TimberbornAPI.LocalizationSystem.LocalizationRepository.GetLocalization (System.String localizationKey) (at <ce0ecb323c63403bba20e2c43f498687>:0)
TimberbornAPI.LocalizationSystem.Localization+LocalizationPatch.Postfix (System.String localizationKey, System.Collections.Generic.IDictionary`2[System.String,System.String]& __result) (at <ce0ecb323c63403bba20e2c43f498687>:0)
(wrapper dynamic-method) Timberborn.Localization.LocalizationRepository.DMD<Timberborn.Localization.LocalizationRepository::GetLocalization>(Timberborn.Localization.LocalizationRepository,string)
Timberborn.Localization.LocalizationService.Load (System.String localizationCode) (at <b8c08bc0ef91476b9623fc2e69ca571e>:0)
Timberborn.Language.LanguageLoader.Load () (at <3cec79be21114748836909ac4e1ef088>:0)
Timberborn.SingletonSystem.SingletonLifecycleService.LoadSingletons () (at <db4603297ab3421687161d2315d401a3>:0)
Timberborn.SingletonSystem.SingletonLifecycleService.LoadAll () (at <db4603297ab3421687161d2315d401a3>:0)
Timberborn.SingletonSystem.SingletonLifecycleAdapter.Start () (at <db4603297ab3421687161d2315d401a3>:0)

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
Timberborn.MainMenuScene.AutoStarter.get_AutoStartingInStandalone () (at <eac6281c786a4fb29df2668d169f3004>:0)
Timberborn.MainMenuScene.AutoStarter.StartInStandaloneMode () (at <eac6281c786a4fb29df2668d169f3004>:0)
Timberborn.MainMenuScene.AutoStarter.Start () (at <eac6281c786a4fb29df2668d169f3004>:0)

I disabled TimberAPI so that BepInEx was the only Mod enabled and the games started properly.

I should also note that I tried all this using the Thunderstore Mod Manager first. Since that, I uninstalled Timberborn, Thunderstore, and removed all Mods. I started fresh after a reboot and then re-downloading Timberborn in Steam. I launched the game and it worked fine. I downloaded and installed r2modman and launched the game using "Start vanilla". This worked fine. I tried using "Start modded" and received errors (obviously, as I didn't have any Mods downloaded or installed/enabled). This is the point where I began at the top of this post.

hawkfalcon commented 2 years ago

Latest requires experimental

SitusKiss commented 2 years ago

Can you expand on that at all? I believe I am running the experimental option. I see in the log it mentions 5.4.20.0, but I don't know how to download that version. The latest I can find is 5.4.19.0

SitusKiss commented 2 years ago

Okay, I figured out what you meant. After joining the Timberborn Discord, I found that one must enable Experimental Mode via the game's Properties | Beta settings (in Steam). The little window that pops up when launching the game offering Experimental or Safe Mode was not the same thing.