spaar / besiege-modloader

spaar's Mod Loader for Besiege - Deprecated
Other
57 stars 14 forks source link

Question: working injector #53

Closed maritaria closed 6 years ago

maritaria commented 7 years ago

We're making a modloader for different unity game (TerraTech). The developers of the game we're not prepared for modding to take off so soon and have directly asked us to not distribute modded versions of Assembly-CSharp.dll, for which I want to make an installer much like yours, so we don't have to distribute the modded DLL anymore. But the main question I have at the moment is if mac/linux users are able to use your installer and if in your experience there were hard-to-trace bugs.

Many thanks,

lenartbezek commented 7 years ago

We actually do distribute the modded Assembly-UnityScript.dll. The injecting is done by @spaar for each game update and then players download it using the installer which merely places the files in the right directories. Besiege players don't inject the game themselves. I suppose this process could be moved to the player, but we haven't bothered to do it yet.

Good luck with your mod loader.

spaar commented 7 years ago

What @lench4991 said is exactly right. I can add that I haven't experienced particular stability issues with the injector myself but considering some of the problems people ran into with the installer I expect it would be more difficult to make the injector run reliably for every user. If you take a look at the source for the injector, it's not exactly easy to write as you need to figure out each IL instruction to inject and where, but it's do-able as long as you don't want to inject too much code. Regarding Mac and Linux users, the installer's currently only written for Windows. It should be very much possible to write a cross-platform one though.

maritaria commented 7 years ago

@spaar don't worry about IL editting, we use a tool called dnSpy which allows us to edit assemblies and also allows us to compare changed IL very easily. I guess for my project I will have to setup a virtual machine and try stuff with Xamarin or something.

Thanks for the help, Maritaria