Jump to content

Mod compatability with Harmony


Recommended Posts

Since Xenonauts is written in Unity, and Unity is written in C#, and C# compiles to IL i can potentially see the creation of hooks that people can take advantage of with Harmony. For all important functions and data there could be hooks written so that people can splice in their own code. That would especially include map generation, but also all other important parts of the game.

After the game is finished developing mod compatability with Harmony could increase the value of the software to unprecedented levels, and give modding capabilities never seen before without having to reveal the source code ( though no code written in Unity is ever really unknown - cuz of IL ).

Just something to think about.

  • Like 1
Link to comment
Share on other sites

7 hours ago, Charon said:

Since Xenonauts is written in Unity, and Unity is written in C#, and C# compiles to IL i can potentially see the creation of hooks that people can take advantage of with Harmony. For all important functions and data there could be hooks written so that people can splice in their own code. That would especially include map generation, but also all other important parts of the game.

 After the game is finished developing mod compatability with Harmony could increase the value of the software to unprecedented levels, and give modding capabilities never seen before without having to reveal the source code ( though no code written in Unity is ever really unknown - cuz of IL ).

Just something to think about.

As of now, do you think that Xen 2 with harmony will be as modable or more modable than Xen 1 was? If Xen 2 matches or surpasses the modability hat the first one had, I would be really happy. 

Link to comment
Share on other sites

18 minutes ago, Kamehamehayes said:

As of now, do you think that Xen 2 with harmony will be as modable or more modable than Xen 1 was? If Xen 2 matches or surpasses the modability hat the first one had, I would be really happy. 

Most people dont code in C#. Most people cant code at all. So the common basis of extrapolating data sheets to the non coding audience will still be a necessity.

Harmony has its limitations. Mostly that if the source code doesnt extrapolate an hook you cant change it. But also that you can only change objects or functions. If something is written inline you dont really get access to it.

Implementing support for Harmony is the next big step for moddability for a game. Rimworld does it. Amazing Cultivation Simulator does it. And it does amazing things with the game and the community. Also as i mentioned the worry about source code got thrown out of the window fast when you use Unity anyway. Nothing which is coded in Unity stays a secret for long, Unity is simply too well known for how it works.

So harmony could be the next step forward for the people who can do more than just alter spreadsheets, software could get closer to becoming a true platform to enable the players and modders to have the experience they want to have and to give.

  • Like 1
Link to comment
Share on other sites

Support for runtime code-centric mods has been built in from the start. The game has been programmed from a "hook" perspective and I will make sure we release documentation on how this works once we fully release. 

I've also already looked into Harmony / other runtime patchers in the past to check compatibility and we're explicitly keeping things in C# (as opposed to IL2CPP) to provide mod support for this.
My plan is to release a public example project that shows how to use it. 

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...