Definitely! You can find it on github.com/asdfcyber/geoshape. Most of the work is figuring out how the code works (in particular, I'm not sure what the difference is between GeoscapeNavigationSystem and GeoscapeMovementSystem - I think the first sets future velocities/rotations that get applied in the second?). I'm not used to the level of abstraction in the code which adds some extra difficulty but so far I haven't encountered any showstoppers. Currently I'm trying to figure out how to find interception points, and after that I want to try to tackle radar range and accurate day/night cycles.
Edit: oh, and the setup: I have a post-build event set up that copies the .dll to My Games/Xenonauts 2/Mods/Geoshape/Geoshape.dll and starts the game, and I modified the original Assembly-CSharp.dll to scan that mods directory for any modname/modname.dll that implements Xenonauts.IMod to load. These are all the modifications I made (I didn't care about code style here btw, this has to be reapplied every time there's a patch anyway and the compiler will replace certain things such as inverted conditions):
public interface IMod
{
void Initialise();
}
public sealed class XenonautsMain : bunchofstuff
{
public static List<IMod> ActiveMods;
public void LoadMods()
{
if (this.ActiveMods == null)
{
this.ActiveMods = new List<IMod>();
}
foreach (string dir in Directory.GetDirectories(Environment.ExpandEnvironmentVariables(
"%USERPROFILE%\\Documents\\My Games\\Xenonauts 2\\Mods")))
{
string modname = Path.GetFileName(dir);
Debug.Log("LoadMods is checking if mod '" + modname + "' exists");
string modfile = dir + "\\" + modname + ".dll";
if (File.Exists(modfile))
{
foreach (Type type in Assembly.LoadFile(modfile).GetExportedTypes())
{
if (type.IsClass && typeof(IMod).IsAssignableFrom(type))
{
IMod mod = (IMod)Activator.CreateInstance(type);
if (mod != null)
{
this.ActiveMods.Add(mod);
mod.Initialise();
Debug.Log("LoadMods loaded '" + dir + "' succesfully");
}
}
}
}
}
}
static XenonautsMain()
{
// bunch of stuff
LoadMods();
}
}
To get this compiled some compiler-generated things need to be turned into valid C#, so I rename fields like <>f__mg$cache0 fields to cache0 and delete most of the new LoadLocalizationFiles because anonymous types also become something weird