BattletechModders / BattleTechModLoader

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

Current plan of attack on merging with ModTek #36

Open mpstark opened 5 years ago

mpstark commented 5 years ago

Via Discord convo with @CptMoore and @m22spencer which solves most of the issues that I had with doing this sort of move.

var path = Path.Combine(Application.streamingAssetsPath, "../../Mods/ModTek.dll");
if (File.Exists(path))
    Assembly.LoadFrom(path).GetType("ModTek").GetMethod("Init").Invoke(null, null);
mpstark commented 5 years ago

Might want to use Application.dataPath instead -- might need to have Mac users move their mods folder to do that, but their mods folder is in dumb place so maybe a good thing.

janxious commented 5 years ago

MacOS mod folder is in exactly the same relative place as windows. Try again.

CptMoore commented 5 years ago

App.config + privatebinpath for injector?

App.config would be also be useful for RT to define the RTML enums to be patched by default.