When do you have to include the Abstract class in the mod?

Started by CannibarRechter, August 13, 2017, 08:03:25 PM

Previous topic - Next topic

CannibarRechter

Hi,

I took some time off from this game and modding, and now I'm playing again. I cannot recall the rules for when you do or do not have to include an Abstract class in your mod.

I can see that it is generally  superior to use xpath. But suppose that this method wasn't being used. If you want to modify PlantHaygrass, do you need to include PlantBase in your mod? I'm confused, because it seems back when I was modding in A14/A15, I frequenly included the Abstract class with any class I modified.

I can see I don't usually need to do that, because of xpath patches (which are cool), but I still want to remind myself of the rule here.

Any help?
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

kaptain_kavern

#1
I was on a break like you for a couple of month and I still included Core abstracts in my mod, but I was since pointed that it is not mandatory now. You totally can inherit from plantBase without copying it in your mod.

See this post for more explanations : https://ludeon.com/forums/index.php?topic=34067.0

CannibarRechter

Thank you much for this. It seems like A17 spent a great deal of trouble making it so that mods could really only be what they modify. I like that a lot.

Also, the new patching system is awesome, because then you have a mod only modifying what it's modding. Very easy to understand a mod that changes the core in any way.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects