Author Topic: [DLL/WIP] EducationBuff (a.k.a Experimenting With Harmony Patch Library)  (Read 1639 times)

0 Members and 1 Guest are viewing this topic.

March 06, 2019, 09:02:41 AM
Read 1639 times


  • *
  • Information
  • Newbie
  • Posts: 1
    • View Profile
Some people have issues with Alpha 10's changes to education, which went from overpowered to seemingly pointless. I now must admit I sometimes feel the same way too, which is why I spent several hours developing this mod ;D.

After decompiling the game library with dotPeek, I found that the EducationWindow class is responsible for handling employee education, up to and including the (delayed) updating of employees' skills. Having been aware of the Harmony Patch Library by Andreas Pardeike, and having made several failed attempts to use the library for other games (namely Cities: Skylines, though I'm pretty sure loads of people use Harmony more competently than me), I decided to give the library another shot.

Whoo boy, was it easier said than done.

Code mods (including DLL mods) are loaded with the assumption that they would not use external libraries, which is not the case for this mod as I make use of the aforementioned Harmony library. This technical limitation means that the first version of the mod that actually included a ModBehaviour (yeah I am dumb; bite me) fails to load properly because the patch library is not loaded before my mod does, meaning the game freaks out when encountering anything Harmony related. I eventually took the verbose way around and finally managed to get the mod to load... but then Harmony fails to patch anything into the game, as three months of in-game training barely eked out anything. As if the game was not patched at all. Welp, I almost gave up there :(.

So I mostly started over and instead compiled two DLLs, one of which is a stub that would load Harmony and then the other DLL (the actual mod; I labeled it the "Extension") into the game. This time it worked. Six months of in-game training bore fruit through the filling of three-fourths of a programming skill bar 8).

Right now, there are still a couple of kinks to be worked out. Specifically, I still need to find a way to convince the game to load the game at launch rather than having to do command lines, and I am currently looking at ways to give the mods options but I have added options to change how long you need to send employee to school in order to max out a skill you want him/her trained on (default 6). It is not exactly meant for public consumption and is more of a way to demonstrate that the game is moddable in ways other than data modding or code extension modding.

And I doubt this is the right section for this mod, anyway :P

Anyway, this mod allows you to change how long you need to send your employee to school in order to max out a skill of your choosing.

Requirements: Harmony Patch Library (included), Software Inc. Alpha 10 (tested on A10.10)

  • Download the latest release of this mod. Extract the contents of the mod to the DLLMods folder inside your Software Inc. directory.
  • Start up your game. If you haven't already bound your key to opening console, do so by going to Settings -> Keys, and then bind "Open Console" to a key of your choosing. (You might not have to do this, but do it just in case.)
  • Activate the in-game console and type "RELOAD_DLL_MOD EducationBuff2" without quotes.
  • Activate the mod in the Mod section of settings.
  • Enjoy!


Change log:
  • 0.4.1
    • Rebuilt .zip file so that only the OS-built in explorer/extractor is needed to open the file, not 7-zip or similar archive explorers
    • Fixed a bug that causes an error when the mod's settings is loaded the first time
  • 0.4
    • First standard release
    • Transpiler used to update code
  • 0.3
    • Harmony Patch Library v1.2.0.1 binary included
    • Added input box option allowing you to change how long you need to send your employee to school in order to max out a skill of your choosing (default 6).
  • 0.2
    • Changed education time required to max out skills to 6 months
  • 0.1
    • Initial release

Due to technical complications, I doubt I will be publishing this mod to Steam Workshop any time soon. Nor am I giving anyone the right to do so for the time being. Feel free to contribute to my mod in any way you can, though. Well, anything short of copying my mod without my permission, that is :D.
« Last Edit: March 07, 2019, 04:56:28 AM by Designer225 »

There are no comments for this topic. Do you want to be the first?