BattletechModders / BattleTechModLoader

A simple mod loader and injector for HBS's PC game BattleTech.
The Unlicense
48 stars 10 forks source link

v0.2.1 does not play nicely with non-ModTek .dll mods #14

Closed TimeDiver0 closed 6 years ago

TimeDiver0 commented 6 years ago

When entering Skirmish Mode's MechLab, long delay and then infinite load screen (output_log.txt ballooned to 225+ MB after forcing BT to exit).

Reverting to v0.2.0 (didn't have to re-patch Assembly-CSharp.dll, though) resolved the issue; something about Harmony v1.1.0, maybe?

Log file:

BTModLoader -- 5/21/2018 11:27:18 PM
Found DLL: BetterJuggernaut.dll
11:27:18 PM - BetterJuggernaut.dll: Found and called entry point with void param: SprintAndPunch.Init
Found DLL: BetterSorting.dll
11:27:18 PM - BetterSorting.dll: Found and called entry point with void param: BetterSorting.Init
Found DLL: FreeActionSensors.dll
11:27:18 PM - FreeActionSensors.dll: Found and called entry point with void param: SensorPatch.Init
Found DLL: InjuredPiloting.dll
11:27:18 PM - InjuredPiloting.dll: Found and called entry point with void param: InitClass.Init
Found DLL: ModTek.dll
11:27:18 PM - ModTek.dll: Found and called entry point with void param: ModTek.Init
Found DLL: NoCorrectedRoll.dll
11:27:19 PM - NoCorrectedRoll.dll: Found and called entry point with void param: InitClass.Init
Found DLL: RM_LessHeadInjuries.dll
11:27:19 PM - RM_LessHeadInjuries.dll: Found and called entry point with void param: LessHeadInjuries.Init
Found DLL: ShotCountEnabler.dll
11:27:19 PM - ShotCountEnabler.dll: Found and called entry point with void param: ShotCountEnabler.Init
Found DLL: ShutUpDarius.dll
11:27:19 PM - ShutUpDarius.dll: Found and called entry point with void param: BeQuietDarius.Init
Found DLL: StabilityKnockdowns.dll
11:27:19 PM - StabilityKnockdowns.dll: Found and called entry point with void param: InitClass.Init
Found DLL: SurvivableArms.dll
11:27:19 PM - SurvivableArms.dll: Found and called entry point with void param: InitClass.Init

Took 1.377393 seconds to load mods

Harmony Patched Methods (after mod loader startup):
BattleTech.MechMeleeSequence.get_ConsumesFiring:
    Prefixes:
        Battletech.realitymachina.BetterJuggernaut
    Postfixes:
        Battletech.realitymachina.BetterJuggernaut
BattleTech.MechMeleeSequence.get_ConsumesMovement:
    Prefixes:
        Battletech.realitymachina.BetterJuggernaut
    Postfixes:
        Battletech.realitymachina.BetterJuggernaut
BattleTech.UI.CombatHUDMechwarriorTray.ResetMechwarriorButtons:
    Postfixes:
        Battletech.realitymachina.BetterJuggernaut
BattleTech.SalvageDef.GetSalvageSortVal:
    Prefixes:
        org.null.ACCount.BetterSorting
    Postfixes:
        org.null.ACCount.BetterSorting
BattleTech.ShopDefItem.GetShopDefSortVal:
    Prefixes:
        org.null.ACCount.BetterSorting
    Postfixes:
        org.null.ACCount.BetterSorting
BattleTech.SensorLockSequence.get_ConsumesFiring:
    Prefixes:
        Battletech.realitymachina.FreeSensorLock
    Postfixes:
        Battletech.realitymachina.FreeSensorLock
BattleTech.Pilot.get_CanPilot:
    Prefixes:
        Battletech.realitymachina.InjuredPiloting
VersionInfo.GetReleaseVersion:
    Postfixes:
        io.github.mpstark.ModTek
BattleTech.Assetbundles.AssetBundleManager.AssetBundleNameToFilepath:
    Postfixes:
        io.github.mpstark.ModTek
BattleTech.Assetbundles.AssetBundleManager.AssetBundleNameToFileURL:
    Postfixes:
        io.github.mpstark.ModTek
BattleTech.VersionManifestUtilities.LoadDefaultManifest:
    Postfixes:
        io.github.mpstark.ModTek
BattleTech.Data.DataManager..ctor:
    Prefixes:
        io.github.mpstark.ModTek
BattleTech.AttackDirector+AttackSequence.GetCorrectedRoll:
    Prefixes:
        Battletech.realitymachina.NoCorrections
BattleTech.GameInstance.LaunchContract:
    Postfixes:
        Battletech.realitymachina.LessHeadInjuries
        Battletech.realitymachina.SurvivableArms
BattleTech.Mech.DamageLocation:
    Prefixes:
        Battletech.realitymachina.LessHeadInjuries
        Battletech.realitymachina.SurvivableArms
BattleTech.Pilot.SetNeedsInjury:
    Prefixes:
        Battletech.realitymachina.LessHeadInjuries
BallisticEffect.Update:
    Prefixes:
        de.morphyum.ShotCountEnabler
BallisticEffect.OnComplete:
    Prefixes:
        de.morphyum.ShotCountEnabler
    Postfixes:
        de.morphyum.ShotCountEnabler
BattleTech.SimGameState.ShowMechWarriorTrainingNotif:
    Prefixes:
        Battletech.realitymachina.ShutUpDarius
    Postfixes:
        Battletech.realitymachina.ShutUpDarius
BattleTech.Mech.AddInstability:
    Prefixes:
        Battletech.realitymachina.MoreKnockdowns
BattleTech.MechComponent.DamageComponent:
    Prefixes:
        Battletech.realitymachina.SurvivableArms

11:27:19 PM - PunchinOut.dll: Found and called entry point with params: BasicPanic.Init
11:27:19 PM - BrokenSalvagedMechs.dll: Found and called entry point with void param: BrokenSalvagedMechs.Init
11:27:19 PM - BTMLColorLOSMod.dll: Found and called entry point with params: BTMLColorLOSMod.Init
11:27:19 PM - CommanderPortraitLoader.dll: Found and called entry point with void param: CommanderPortraitLoader.Init
11:27:19 PM - CommanderPortraitLoader.dll: While loading a dll, an exception occured:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Harmony.HarmonyInstance.Patch'.
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at BattleTechModLoader.BTModLoader.LoadDLL (System.String path, System.String methodName, System.String typeName, System.Object[] prms, BindingFlags bFlags) [0x00000] in <filename unknown>:0 
11:27:19 PM - CompanyMechSalvage.dll: Found and called entry point with void param: CompanyMechSalvage.Init
11:27:19 PM - DropCostPerMech.dll: Found and called entry point with void param: DropCostPerMech.Init
11:27:19 PM - DynModLib.dll: Found and called entry point with params: Main.Start
11:27:19 PM - DynModLib.dll: While loading a dll, an exception occured:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Harmony.CollectionExtensions.Do'.
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at BattleTechModLoader.BTModLoader.LoadDLL (System.String path, System.String methodName, System.String typeName, System.Object[] prms, BindingFlags bFlags) [0x00000] in <filename unknown>:0 
11:27:19 PM - HardpointFixMod.dll: Found and called entry point with params: Control.Start
11:27:19 PM - LeopardDropLimit.dll: Found and called entry point with params: DropLimit.Init
11:27:19 PM - MechMaintenanceByCost.dll: Found and called entry point with void param: MechMaintenanceByCost.Init
11:27:19 PM - Pansar.dll: Found and called entry point with params: Control.Start
11:27:19 PM - PermanentEvasion.dll: Found and called entry point with void param: PermanentEvasion.Init
11:27:19 PM - PilotHealthPopup.dll: Found and called entry point with void param: Patches.Init
11:27:19 PM - StaticSystemSkulls.dll: Found and called entry point with void param: StaticSystemSkulls.Init
11:27:19 PM - SpeedMod.dll: Found and called entry point with params: Control.Start
11:27:19 PM - StabilityTonnage.dll: Found and called entry point with void param: StabilityFix.Init
11:27:19 PM - StatsFixMod.dll: Found and called entry point with params: Control.Start
CptMoore commented 6 years ago

thx for the report, I think for harmony upgrades btml should do pre-releases to allow mods time to accomodate the non-api compatible changes harmony provides.

mpstark commented 6 years ago

It's the first Harmony release in a year. I'll put up a note on the 0.2.1 release