BattletechModders / ModTek

Mod system for HBS's PC game BattleTech.
GNU Lesser General Public License v2.1
119 stars 34 forks source link

Add support for OS X #44

Closed davidneedham closed 5 years ago

davidneedham commented 6 years ago

I know it's a stretch, but I have to ask: any chance there will be support for Mac down the road?

mpstark commented 6 years ago

There are some people that have it working -- I'm unsure of how to get it there.

SamwiseLook commented 6 years ago

Here is how I made it work on macOS, using a Windows machine to modify Assembly-CSharp.dll For thos unfamiliar with macoS ~ is your user home directory and Library is a hidden directory inside it. Copy ~/Library/Application Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Data/Managed to a FAT32 USB (you have to take the whole folder) Place BTML files in the new Managed folder. On a Windows machine navigate to the folder in the command line and run the .exe Copy modified Assembly-CSharp.dll 0Harmony.dll and BattleTechModLoader.dll back into the original installation.

To add ModTek support Create ~/Library/Application Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Mods Copy ModTek.dll into this Mods directory. This is also where you put any ModTek compatible mods you want to run.

SamwiseLook commented 6 years ago

Okay so ModTek is kind of working and it's successfully loading json files most of the time (although it doesn't like constants files much it seems). But successfully added weapon, shops, milestones etc... But .dll based mods (presumably BTML) generally don't seem to work so well.

SamwiseLook commented 6 years ago

I thought I would come back and say that this has actually been working for updated dll based mods in recent times. Haven't tested with the new version, but will do so.

davidneedham commented 6 years ago

That's great news. Thanks for the update!

-- David Needham

Sent from my phone, please excuse my brevity

On Mon, Jun 11, 2018, 3:20 AM SamwiseLook notifications@github.com wrote:

I thought I would come back and say that this has actually been working for updated dll based mods in recent times. Haven't tested with the new version, but will do so.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Mpstark/ModTek/issues/44#issuecomment-396104963, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQxDqqLyjcXN1dx8ezWLw8-MZ0Uvm9iks5t7dPXgaJpZM4UF5o1 .

JavaNinjaB commented 6 years ago

I absolutely cannot find the battletech.app folder. I can find the app, which is in the location described... Not a Max/OSX expert, leaving on a trip later today & would love to play on the plane!

Please & thank you!

CptMoore commented 6 years ago

.app files are actually folders. Right click on an app and select show package contents

SamwiseLook commented 6 years ago

If you look at my post you can see the path ~ is the current users profile folder but Library is hidden, you can get to it by clicking the Go menu and holding the option key this should make Library appear in the list. As mpstark said, when you get to Battltech itself you need to right or control click and select show contents.

JavaNinjaB commented 6 years ago

Thanks. Found the folder, made the copy, ran that patch, copied stuff back and now, waiting for the initial mod load to complete.

Regards,

KEVIN STRINGER
Watson & Cloud Platform
Architect (WCPA)
IBM Watson & Cloud Platform,
Industrial Sector

IBM Certified Solution Advisor

From: SamwiseLook notifications@github.com To: Mpstark/ModTek ModTek@noreply.github.com Cc: JavaNinjaB kevinstringer@us.ibm.com, Comment comment@noreply.github.com Date: 06/25/2018 01:32 PM Subject: Re: [Mpstark/ModTek] Add support for OS X (#44)

If you look at my post you can see the path ~ is the current users profile folder but Library is hidden, you can get to it by clicking the Go menu and holding the option key this should make Library appear in the list. As mpstark said, when you get to Battltech itself you need to right or control click and select show contents.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

nullify005 commented 6 years ago

I've been running BTML & ModTek happily now on my MacOS.

Try https://gist.github.com/janxious/ad5b8b886193bc36593aa1d958a37bd9 which is a good basis to get started.

A faster way though is this (assuming you have homebrew installed, you might also need Xcode ...? I'm not sure I have it for dev work so ...):

brew install mono
wget https://github.com/Mpstark/BattleTechModLoader/releases/download/v0.2.3/BTML-v0.2.3.zip -O ~/Downloads/BTML-v0.2.3.zip
cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Data/Managed
unzip ~/Downloads/BTML-v0.2.3.zip
mv System.Core.dll System.Core.dll.bak
mono BattleTechModLoaderInjector.exe
mv System.Core.dll.bak System.Core.dll
mkdir -p ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Mods
cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/
ln -sf Contents/Resources/Mods

Then unzip any mods you want to use into the Mods folder

JavaNinjaB commented 6 years ago

Lee,

Thanks for the reply. I do not have homebrew or other dev tools (just not my wheelhouse), so I'm leery of the whole 'build it' thing. Here's the funny part, until this last patch & upgrade, I was also running mods & RogueTech happily on my Mac. I can't find the instructions I used before, but it was basically injecting the .dll in a Windows environment, then copying the 2-3 .dlls back to the management folder on the Mac.

I try that now and it looks like it's loading the mods ok, I get right into the RogueTech main screen (Sandbox/Skirmish) but whatever I choose next just goes into a blank loading screen . . . forever . . .

It may not be the a BTML thing, but somehow the mods themselves. I looked for the BTML .dll in the mods folder (something I read said that would cause infinite loading loop), etc.

Thoughts?

Thanks!

Kevin

Regards,

KEVIN STRINGER
Watson & Cloud Platform
Architect (WCPA)
IBM Watson & Cloud Platform,
Industrial Sector

IBM Certified Solution Advisor

From: Lee Webb notifications@github.com To: Mpstark/ModTek ModTek@noreply.github.com Cc: JavaNinjaB kevinstringer@us.ibm.com, Comment comment@noreply.github.com Date: 08/20/2018 04:02 AM Subject: Re: [Mpstark/ModTek] Add support for OS X (#44)

I've been running BTML & ModTek happily now on my MacOS.

Try https://gist.github.com/janxious/ad5b8b886193bc36593aa1d958a37bd9 which is a good basis to get started.

A faster way though is this (assuming you have homebrew installed, you might also need Xcode ...? I'm not sure I have it for dev work so ...):

brew install mono wget https://github.com/Mpstark/BattleTechModLoader/releases/download/v0.2.3/BTML-v0.2.3.zip -O ~/Downloads/BTML-v0.2.3.zip cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Data/Managed

unzip ~/Downloads/BTML-v0.2.3.zip mv System.Core.dll System.Core.dll.bak mono BattleTechModLoaderInjector.exe mv System.Core.dll.bak System.Core.dll mkdir -p ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Mods

cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Mods

cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/ ln -sf Contents/Resources/Mods

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

nullify005 commented 6 years ago

Hey @JavaNinjaB,

Yeah I had that same issue with RogueTech too & had a visit to Discord to ask the author about it.

Unfortunately the author of that mod appeared to be having another signature bad attitude day (based on seeing his / her responses to other people asking nicely for help) & told me to go elsewhere so I gave up.

I have had a lot of success with https://www.nexusmods.com/battletech/mods/136 (dZ Consolidated Company Commander) though. There was some fiddling with symlinks & altering the odd mod.json here & there to correct silly windows path sep issues, but after that it's been great.

I did have the infinite load after selecting sandbox with this mod too, but only after I tried to apply the additional mechs (the MAD & Warhammer I think), so perhaps the Mac isn't happy with those?

I was going to give RT another go now that I know what to look out for with the logging & debugging, but not until after I've grown bored of the current play-through.

Regards, Lee

JavaNinjaB commented 6 years ago

I get the same results with no RogueTech involved. I tried with just CustomPortraits and also infinite black screen.Thanks for the response.Regards,Kevin StringerWatson & Cloud Platform ArchitectIBM CloudIBM Certified Solution Advisor - Cloud SolutionsPMI Certified Project Manager - PMPITIL V3 Certified - IT Service Managementmobile: 773.251.4045email: kevinstringer@us.ibm.com(sent from my mobile phone - please excuse the brevity and any odd spellings or word choices)

Lee Webb --- Re: [Mpstark/ModTek] Add support for OS X (#44) --- From:"Lee Webb" notifications@github.comTo:"Mpstark/ModTek" ModTek@noreply.github.comCc:"JavaNinjaB" kevinstringer@us.ibm.com, "Mention" mention@noreply.github.comDate:Wed, Aug 22, 2018 11:33 PMSubject:Re: [Mpstark/ModTek] Add support for OS X (#44)

Hey @JavaNinjaB, Yeah I had that same issue with RogueTech too & had a visit to Discord to ask the author about it. Unfortunately the author of that mod appeared to be having another signature bad attitude day (based on seeing his / her responses to other people asking nicely for help) & told me to go elsewhere so I gave up. I have had a lot of success with https://www.nexusmods.com/battletech/mods/136 (dZ Consolidated Company Commander) though. There was some fiddling with symlinks & altering the odd mod.json here & there to correct silly windows path sep issues, but after that it's been great. I did have the infinite load after selecting sandbox with this mod too, but only after I tried to apply the additional mechs (the MAD & Warhammer I think), so perhaps the Mac isn't happy with those? I was going to give RT another go now that I know what to look out for with the logging & debugging, but not until after I've grown bored of the current play-through. Regards, Lee —You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

JavaNinjaB commented 6 years ago

Actually, that worked very well and easily. It worked so well & easily, that I didn't realize BTML & Modtek were working fine, but it was RogueTech that was hanging. If I just put a couple of small mods in place (SkipIntro, CommanderPortaits, QuietDarius), those worked fine. When I try the RogueTech bundle, things go off into perma-stuck when I try to enter the Skirmish or Campaign directions. I remember on my PC, I had to pull the CommaderPortraits from the RogueTech pack to make it all work - then was able to add the CommanderPortraits back in. Tried that on the Mac and fails.

Any thoughts on the RogueTech mod for Mac?

Thanks a ton!

Kev0

Regards,

KEVIN STRINGER
Watson & Cloud Platform
Architect (WCPA)
IBM Watson & Cloud Platform,
Industrial Sector

IBM Certified Solution Advisor

From: Lee Webb notifications@github.com To: Mpstark/ModTek ModTek@noreply.github.com Cc: JavaNinjaB kevinstringer@us.ibm.com, Comment comment@noreply.github.com Date: 08/20/2018 04:02 AM Subject: Re: [Mpstark/ModTek] Add support for OS X (#44)

I've been running BTML & ModTek happily now on my MacOS.

Try https://gist.github.com/janxious/ad5b8b886193bc36593aa1d958a37bd9 which is a good basis to get started.

A faster way though is this (assuming you have homebrew installed, you might also need Xcode ...? I'm not sure I have it for dev work so ...):

brew install mono wget https://github.com/Mpstark/BattleTechModLoader/releases/download/v0.2.3/BTML-v0.2.3.zip -O ~/Downloads/BTML-v0.2.3.zip cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Data/Managed

unzip ~/Downloads/BTML-v0.2.3.zip mv System.Core.dll System.Core.dll.bak mono BattleTechModLoaderInjector.exe mv System.Core.dll.bak System.Core.dll mkdir -p ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Mods

cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/Mods

cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/ ln -sf Contents/Resources/Mods

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.