Overwrite Default Game Classes/Functions in C#?

Started by MikeLemmer, August 28, 2016, 08:26:13 AM

Previous topic - Next topic

MikeLemmer

I'm writing a mod that puts more info in the tooltips of the work priority window. However, it looks like to do that, I need to modify one of the functions in the C# coding itself. Is that feasible? How much would it conflict with other mods?

Lockdown

#1
Quote from: MikeLemmer on August 28, 2016, 08:26:13 AM
I'm writing a mod that puts more info in the tooltips of the work priority window. However, it looks like to do that, I need to modify one of the functions in the C# coding itself. Is that feasible? How much would it conflict with other mods?

Class methods from the core game can be detoured into your own methods to give them different functionality. This is most easily done with the help of CCL, here's a quick tutorial by JaxelT to get you started.

Quote from: MikeLemmer on August 28, 2016, 08:26:13 AMHow much would it conflict with other mods?

You won't be able to have multiple mods installed that detour the same core method without some functionality being lost, from what I understand.

MikeLemmer

Thanks. I'll experiment with this a bit and see if I get anything feasible.