Overwriting core classes

Started by Lockdown, June 18, 2016, 06:40:37 PM

Previous topic - Next topic

Lockdown

I'm trying to make a simple mod that adds a Max Skill Level slider to the bill configuration window, in addition to the existing Min Skill Level. I've identified the classes that need to be edited (RimWorld.Bill and RimWorld.Dialog_BillConfig), and having read through the wiki's tutorials, I understand that I need to make an XML definition so that the game loads my modified classes instead of the Core ones.

However, for the life of me I can't figure out where the XML defs reference either of these classes. Dialog_BillConfig doesn't even seem to be present anywhere in \Mods\Core\Defs, and Bill shows up in a few places but none of them pointing towards the Bill class. I know they're supposed to be referenced somewhere, because I've seen some definitions that work this way (for example, HaulToCell lists JobDriver_HaulToCell as its class) but that doesn't seem to be the case for the bill classes. Are these just not possible to mod, or am I missing something here?

mrofa

I think it would require a injector or detour, thrugh im not sure with specific naming :D
Anyways you should check out CCL, it might have what you need, and asking there also wouldnt hurt
All i do is clutter all around.

RawCode

CCL detours allows you to hook internal and mod added functions.