ACEO ModLoader 0.0.2

Hello ACEO Community. You probably don’t know me, as I’m more of a lurker than a poster, but recently I’ve been delving into throwing Airport CEO’s guts all over the floor and putting it back together more-or-less (see my previous post in this section). The past couple of weeks I’ve been working on a modding loader that allows modders to modify game code, giving them much more freedom in extending and modifying the game. Today I’m finally ready to release the 0.0.1 version of the Airport CEO ModLoader (Or ACEOML, not to be confused with ACEOMM) Note: 0.0.2 Release information below.

What does this do? Well, on it’s own, nothing much. It provides a framework for modders to load code into the game. However, I won’t leave you empty handed, I’ve provided two sample mods you can install to show it works. They don’t do much, just change the names of the buses and increase the fast-forward time during the night. The possibilities are much greater, however. For example, remember the post about cargo operations? A mod like that can be achieved with this loader.

You can download the release and view the source code at my github: https://github.com/bdgmb2/aceo-modloader

Please read the README before downloading and installing, as there’s some important information in there. If you’re interested in developing an Airport CEO code-side mod, please look at the source code of my two sample mods to start with. Obviously this project has a long way to go and lacks numerous features like a versioning system, mod compatibility check, etc. But it works… so that’s nice.

As with my previous post, Airport CEO does not have a Terms of Service I could easily find, so the developer’s stance on reverse engineering and modifying game code is legally unclear. In the event that Apoapsis Studios does not agree with the actions of this “mod” (if you can call it that), you’ll see it get taken down pretty fast. In addition, Steam Workshop integration may cause changes to how this project works, plus the possibility of the developers adding their own modding API making this project redundant. A lot is still up in the air, but at least you can mess around with this and hopefully create something amazing.

If you have any questions or need support, just comment, I’ll be hanging around in this thread. Make sure to read the FAQ’s on the README first. I’ll also be providing updates to the project through official releases at the GitHub link above on a semi-regular basis.

Note: Since we’re playing with binaries and libraries here, do NOT download any mod from a source you don’t trust! Only genuine ACEO ModLoader releases can be found in the ‘Releases’ tab on the GitHub repository!

Update: Release 0.0.2

This release can be downloaded from the ‘Releases’ tab on the project’s GitHub page. This ModLoader release includes preliminary support for Mac OSX, as well as launching through Steam. This release also simplifies documentation and consolidates needed libraries for developers and modders to build projects into one location.

5 Likes

Wow, this sounds very, very interesting.

I will give it a try, but I want to mention that I have never programmed in C#. But I am able to programm in Java and I heared that they are quite simmilar. I will try my best, but I think, that i will need your help to get a working mod :slight_smile:

And sry for my bad german-english

Hi, as I have written in the post above, I at least want to try a bit around with the code.

But before I have tested the sample mods, and while extracting the SampleMods.zip I was a bit stuck. In the README is written, that all files shoud be copied to the root of ACEO. In my opinion the folder structure of the zip should be as followed:
mods
|_RealisticVehicles
|_SpeedUpNighttime

At the moment both mods are in the root directory of the zip, and first I copied them in the root and not in the mods folder.

Also I have noticed, that when you start the ModLoader Steam is not starting and you cannot access the Steam-Overlay, because Steam is not Running.

Later on I have noticed, that when I put the SampleMods in the mods folder, the ModLoader isn’t loading any mod. After looking in the SourceCode I have seen, that he searches in Airport CEO\mods\RealisticVehicles afrer a .dll which isn’t placed there. So i nedd to go into Airport CEO\mods\RealisticVehicles\bin\Release and copy the RealisticVehicles.dll into the mod root folder. After this step the mods were loaded and worked very well. But I think, that you need to describe this step or/and change the folder structure of the SampleMods.zip

And now I have a question to the development:
I have succesfully installed Visual Studio 2017 Community and forked and opened the project/solution in VS. I also have restored the NuGet packeages only containig the Mono.Cecil package. And now I dont know what I need to do on the step 3.2 from the Readme. I have never worked with VS so I dont have any idea where to search after this. Also a search in the internet was not succesfull.
So the things that arent working at the moment:

  1. There are missing some Unity-files (using statements with unity… are underlined red)
  2. Harmony seems to be good in ModLoaderLibary but not in the sample package and the two sampleMods

Long comment, but I hope you can help me.

Note: First I wanted to write you a PM, but due to helpful tips for other testers, I decided to comment publicly

Alright, let’s see if I can help you. You’ll have to excuse me, I wrote that long-winded readme at about 2AM my time to just get it out before going to bed lol

ModLoader looks inside a folder called “mods” for mod folders. That’s where the two sample mods go. Just unzip the zip file and drop both of those folders inside the mods folder and it should work.

I couldn’t get the ModLoader to launch through Steam, although to be fair I didn’t try very hard. Ultimately I want to do something similar to SMAPI’s install, but I think I got the Steam launch arguments wrong. I’ll try and shoot for that in 0.0.2.

Note about the build process: I previously had a copy command run on post-build that copied the dll’s to the Airport CEO directory, but since the copy command was specific to my computer’s Steam installation it would probably be even worse if I still included it in the project. The easiest way to get your mod to auto-copy to the Airport CEO directory is to go into the project properties => Build Events, then add copy name_of_mod.dll "C:\Path\To\Your\Steam\Install\Airport CEO\Mods\name_of_mod\name_of_mod.dll". Hope that makes it easier.

To answer your last question: VS is freaking out because it can’t find the game’s assemblies. The easiest way to fix this is to go into the project hierarchy. Near the top you should see a “References” drop-down for each project. When you click on that, you should see little yellow triangles next to the references you’re missing. Find those libraries (they all end in .dll) in the “Managed” folder inside Airport CEO_Data and copy them to the solution root (the root of all the projects where the .sln file is. Then you should be able to build.

All these things are pretty ugly and not very fun for devs to fix, I’ll try to streamline the process in 0.0.2, new release hopefully coming tonight.

ModLoader looks inside a folder called “mods” for mod folders. That’s where the two sample mods go. Just unzip the zip file and drop both of those folders inside the mods folder and it should work.

Yes, I have seen this. But what I mean is, that in the .zip of SampleMods in my opinion the root folder should be called mods, followed by the two mod folders. This would make it easier to just drag and drop the complete folder into the root of ACEO. But this is just a nice to have.

Ok, no problem for the Steam thing, that was just something I noticed.

The copy command seems very interesting, I will have a look tomorrow.

I was also able to find the References and copy the needed assamblys into the folder where the .sln is also located. And now I dont have any errors in the ModLoaderLibary and the ModLoaderNetFramework anymore. But looking into the two SampleMods VS says, that there are three Assemblys missing. They are the following ones: 0Harmony, Assembly-CSharp, UnityEngine.CoreModule which are surely copied to the right directory, because the same libarys are needed for the first two mentioned projects.
temp
Do you have an idea where the error could be?

in my opinion the root folder should be called mods

Ok, I understand now and completely agree, that’s probably a good idea. I’ll make sure to fix this in the 0.0.3 release.
I just released 0.0.2, which starts Airport CEO through Steam and consolidates all the references into one place. If you pull the latest commit from master, you’ll see a new folder in the root called “ACEOLibs” with a readme inside. Place all the needed assemblies into this folder. Then everything will build nicely (I hope).

Sounds great, With the new version i am able to compile all projects, so thank you for the fix