Ludeon Forums

RimWorld => Mods => Help => Topic started by: CannibarRechter on August 13, 2017, 08:03:25 PM

Title: When do you have to include the Abstract class in the mod?
Post by: CannibarRechter on August 13, 2017, 08:03:25 PM
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?
Title: Re: When do you have to include the Abstract class in the mod?
Post by: kaptain_kavern on August 13, 2017, 08:19:12 PM
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
Title: Re: When do you have to include the Abstract class in the mod?
Post by: CannibarRechter on August 14, 2017, 08:28:47 AM
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.