Skip to content

Releases: janxious/BattleTechModLoader

.NET 3.5 re-configuration

15 Dec 18:00
Compare
Choose a tag to compare
Pre-release

This is a re-compile and small refactor to use fewer modern .net conveniences in order to move the baseline for the mod tool to .net 3.5. It is otherwise the same features as release 0.6.4. Until I get more positive feedback I consider this an alpha.


Mono.Cecil.dll needs to be in the same directory as the injector. Typically the managed dir.


RTML-v0.7.0.zip is a special version of BTML for RogueTech that shouldn't be used outside of the RogueTech installer unless you know what you're doing.

Fixes for downloads

30 Oct 14:00
Compare
Choose a tag to compare

This is the same as v0.6.3 but with fixed zips.


Mostly refactoring cleanup work and introduces new tools for modders and non-windows users.


Installation now can be done from any directory (and should be done outside the Managed folder on at least macOS). So new installation instructions while I work on the wiki:

  1. Download BTML-v0.x.x.zip
  2. Unzip.
  3. Place 0Harmony.dll and BattleTechModLoader.dll in your BTG Managed folder.
  4. Run the executable
  • on windows you should be able to plave run the executable from within the Managed folder
  • for non-windows run the executable via mono and specify your managed directory as an option. e.g. here is me running the executable from within the mods folder:
janxious [Mods] $ mono BattleTechModLoaderInjector.exe /install /manageddir ../Data/Managed/

I have also added tools for other modders who embed BTML to do version checks as part of their BTML installation. /requiredversion and /reqmismatchmsg can be used to specify a required BTG version and fail installation if it's not there. For example, I have the beta abilities preview installed (1.2.300), and someone might specify they want the current non-beta version (1.2.1) and would see this during installation:

janxious [Mods] $ mono BattleTechModLoaderInjector.exe /install /requiredversion=1.2.1 /reqmismatchmsg='Please run the current non-beta version of BTG.'
Expected BTG v1.2.1
Actual BTG v1.2.300
Please run the current non-beta version of BTG.

I have added additional error codes that can occur when running using the /manageddir and /requiredversion options. The full list is:

0 - everything worked as expected
1 - an unhandled error occurred
2 - bad options were passed on the command line
3 - the backup file was missing during a /restore operation
4 - the backup file was injected by BTML and couldn't be /restor'ed
5 - the managed directory provided didn't exist or didn't contain the BTG assembly file
6 - the BTML dll couldn't be found in the managed dir
7 - the version specified by /requiredversion did not match the version of the BTG assembly


RTML-v0.6.3.zip is a special version of BTML for RogueTech that shouldn't be used outside of the RogueTech installer.


This is what the help looks like with this version.

Mods $ mono BattleTechModLoaderInjector.exe --help
BattleTechModLoader Injector
----------------------------
Usage: BattleTechModLoaderInjector.exe [OPTIONS]+
Inject the BattleTech game assembly with an entry point for mod enablement.
If no options are specified, the program assumes you want to /install.

Options:
  /d, /detect                Detect if the BTG assembly is already injected
  /g, /gameversion           Print the BTG version number
  /h, /?, /help              Print this useful help message
  /i, /install               Install the Mod (this is the default behavior)
      /manageddir=VALUE      specify managed dir where BTG's Assembly-CSharp.
                               dll is located
  /y, /nokeypress            Anwser prompts affirmatively
      /reqmismatchmsg=VALUE  Print msg if required version check fails
      /requiredversion=VALUE Don't continue with /install, /update, etc. if the
                               BTG game version does not match given argument
  /r, /restore               Restore pristine backup BTG assembly to folder
  /u, /update                Update mod loader injection of BTG assembly to
                               current BTML version
  /v, /version               Print the BattleTechModInjector version number

New CLI options

29 Oct 11:34
Compare
Choose a tag to compare
New CLI options Pre-release
Pre-release

Mostly refactoring cleanup work and introduces new tools for modders and non-windows users.


Installation now can be done from any directory (and should be done outside the Managed folder on at least macOS). So new installation instructions while I work on the wiki:

  1. Download BTML-v0.x.x.zip
  2. Unzip.
  3. Place 0Harmony.dll and BattleTechModLoader.dll in your BTG Managed folder.
  4. Run the executable
  • on windows you should be able to plave run the executable from within the Managed folder
  • for non-windows run the executable via mono and specify your managed directory as an option. e.g. here is me running the executable from within the mods folder:
janxious [Mods] $ mono BattleTechModLoaderInjector.exe /install /manageddir ../Data/Managed/

I have also added tools for other modders who embed BTML to do version checks as part of their BTML installation. /requiredversion and /reqmismatchmsg can be used to specify a required BTG version and fail installation if it's not there. For example, I have the beta abilities preview installed (1.2.300), and someone might specify they want the current non-beta version (1.2.1) and would see this during installation:

janxious [Mods] $ mono BattleTechModLoaderInjector.exe /install /requiredversion=1.2.1 /reqmismatchmsg='Please run the current non-beta version of BTG.'
Expected BTG v1.2.1
Actual BTG v1.2.300
Please run the current non-beta version of BTG.

I have added additional error codes that can occur when running using the /manageddir and /requiredversion options. The full list is:

0 - everything worked as expected
1 - an unhandled error occurred
2 - bad options were passed on the command line
3 - the backup file was missing during a /restore operation
4 - the backup file was injected by BTML and couldn't be /restor'ed
5 - the managed directory provided didn't exist or didn't contain the BTG assembly file
6 - the BTML dll couldn't be found in the managed dir
7 - the version specified by /requiredversion did not match the version of the BTG assembly


RTML-v0.6.3.zip is a special version of BTML for RogueTech that shouldn't be used outside of the RogueTech installer.


This is what the help looks like with this version.

Mods $ mono BattleTechModLoaderInjector.exe --help
BattleTechModLoader Injector
----------------------------
Usage: BattleTechModLoaderInjector.exe [OPTIONS]+
Inject the BattleTech game assembly with an entry point for mod enablement.
If no options are specified, the program assumes you want to /install.

Options:
  /d, /detect                Detect if the BTG assembly is already injected
  /g, /gameversion           Print the BTG version number
  /h, /?, /help              Print this useful help message
  /i, /install               Install the Mod (this is the default behavior)
      /manageddir=VALUE      specify managed dir where BTG's Assembly-CSharp.
                               dll is located
  /y, /nokeypress            Anwser prompts affirmatively
      /reqmismatchmsg=VALUE  Print msg if required version check fails
      /requiredversion=VALUE Don't continue with /install, /update, etc. if the
                               BTG game version does not match given argument
  /r, /restore               Restore pristine backup BTG assembly to folder
  /u, /update                Update mod loader injection of BTG assembly to
                               current BTML version
  /v, /version               Print the BattleTechModInjector version number

First cut of Faction injection, improvements to Project Layout

03 Sep 01:51
Compare
Choose a tag to compare

BTML-v0.5.0-alpha1.zip should work the same as v0.4.2 as other changes are merely internal changes to make development easy. See the new user project setting examples if you want to develop or build BTML.


This version of RTML is only for RogueTech core modders to use for testing.

This adds a new Build target: RTML. When that is selected, the injector attempts to load a faction file from the directory where the game assembly is to inject new factions into the game. Download RTML-v0.5.0-alpha1.zip to try that out.

1.2 BTG Release compatible + Logging improvements

02 Sep 19:35
Compare
Choose a tag to compare

Add DLL versions to BTML logs to aid with debugging.

BTech 1.2Beta compatibility + Latest Harmony DLL

22 Aug 01:32
Compare
Choose a tag to compare

See title.


important harmony 1.2 notes

Annotation-based patching of Constructors changed. See the methodtype bit below:

[HarmonyPatch(typeof(GameInstanceSave), MethodType.Constructor)]
[HarmonyPatch(new Type[] { typeof(GameInstance), typeof(SaveReason) })]

Also includes CLI enhancements from v0.4.0-alpha1:

And general cleanup and error handling. The /help flag run with the application gives you this:

BattleTechModLoader Injector
----------------------------
Usage: BattleTechModLoaderInjector.exe [OPTIONS]+
Inject the BattleTech game assembly with an entry point for mod enablement.
If no options are specified, the program assumes you want to /install.

Options:
  /d, /detect                Detect if the BTG assembly is already injected
  /h, /?, /help              Print this useful help message
  /i, /install               Install the Mod (Default Behavior)
  /y, /nokeypress            Anwser prompts affirmatively
  /r, /restore               Restore pristine BTG assembly to folder
  /u, /update                Update injected BTG assembly to current version
  /v, /version               Print the BattleTechModInjector version number

New application return codes also implemented.

  • 0 - application ran successfully
  • 1 - general error
  • 2 - options error - happens when options passed in can't be parsed or don't make sense
  • 3 - restore failure - because of missing backup file
  • 4 - restore failure - because of backup file being BTML injected

Better CLI Options

15 Aug 13:15
Compare
Choose a tag to compare
Better CLI Options Pre-release
Pre-release

And general cleanup and error handling. The /help flag run with the application gives you this:

BattleTechModLoader Injector
----------------------------
Usage: BattleTechModLoaderInjector.exe [OPTIONS]+
Inject the BattleTech game assembly with an entry point for mod enablement.
If no options are specified, the program assumes you want to /install.

Options:
  /d, /detect                Detect if the BTG assembly is already injected
  /h, /?, /help              Print this useful help message
  /i, /install               Install the Mod (Default Behavior)
  /y, /nokeypress            Anwser prompts affirmatively
  /r, /restore               Restore pristine BTG assembly to folder
  /u, /update                Update injected BTG assembly to current version
  /v, /version               Print the BattleTechModInjector version number

New application return codes also implemented.

  • 0 - application ran successfully
  • 1 - general error
  • 2 - options error - happens when options passed in can't be parsed or don't make sense
  • 3 - restore failure - because of missing backup file
  • 4 - restore failure - because of backup file being BTML injected

Earlier Injection Point to Enable ModTek features

08 Aug 04:18
Compare
Choose a tag to compare

Earlier Injection Point to Enable ModTek features

07 Aug 06:37
Compare
Choose a tag to compare

👏 We 👏 want 👏 that 👏 loading 👏 bar! 👏

This also adds a new feature to detect old injections generically, which is also good.


For testing purposes, I suggest making a backup of your known good backup file. For example, I called mine Assembly-CSharp.dll.orig.really. 💃


Hard work done by @brianries in #1, with a few changes for personal code clarity by fork owner.