I like mods. They extend games in ways not conceived by the developers and make gameplay more interesting. Cities: Skylines is a fantastic simulation game in its own right, but when I found out it was built in Unity and fully supported mods I needed to contribute.
Cities: Skylines comes with its own modding API out of the box, fully supported by Colossal Order – the developers. I first had a read up on their documentation, however the API (at the time) was very limited and pretty basic so I had a look around at what other developers had done, as a majority of them open source their mods so you can gather knowledge and contribute. After some searching I found most of them were using Harmony – a tool that utilises reflection in C# to redirect and override methods. All that was required was the function signature, however to get an insight into how things worked you’d have to go a step further and decompile the code.
One thing I’d noticed missing from the game that was present in other games like Sim City was a way of naming roads, so I went about attempting to create one.
The road namer tool was born. It gained a fair amount of popularity and the developers even added their version of it into the game. Having created a mod, I had learned some of the game’s inner workings, and how its simulations operated which made me want to make something a bit larger in scope. Again, it was something that I felt was missing that other games did slightly better: rush hour. Citizens in Cities: Skylines seemed to just go about doing their thing any time of the day. You’d find people in schools and parks at 3am, and traffic was constant regardless of time. This didn’t feel right so I went about experimenting again, what if I could give everyone a schedule?
A lot of trial and error later and I had some of the workings of my Rush Hour mod. Most citizens would wake up in the morning, go about their business during the day then go back home in the evening. It added some additional dynamics and challenge to the game. After publishing to the Steam Workshop it quickly shot to the top of the rankings and was picked up by a few journalists.
Scope carefully increased and more features were added over time. I implemented an event system where buildings could host activities such as sports games, expos or festivals and citizens from all over the player’s city would flock to it at once. I even developed an API so other developers could add events to their own buildings and players could host events at buildings themselves.
The mod kept increasing in popularity, the developers invited me (and other modders) into private betas so we could update everything before updates got published and I was even offered a job.
Eventually an event system similar to what I had developed was added to the game officially, and unfortunately life events started to eat into any time I had to develop so I gradually stopped working on mods. A spiritual successor was created by another developer and it continues on today.