Override game base classes

Started by alchemyfool, October 23, 2017, 05:41:15 PM

Previous topic - Next topic

alchemyfool

Is it possible to override base class like

Verse.Pawn
override prop like this
public PawnKindDef


or
RimWorld.Plant
public virtual float Growth

I understand that if i manage to do something like that i could easily break the game so i would have to be careful.

CannibarRechter

Depends on what you mean by "override". If you mean do it for all classes that inherit from it in the game, the answer is "not directly, no" but there may be other methods available to you, up to and including overriding the methods of the base class. Also, many of the XML files refer to the class in the def, so if you are looking at incorporating XML modding as part of your class change out, it might be possible for those cases only. In any case, it would probably be better for you to pose a scenario, of what you want to do, and then to ask for recommendations.
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

alchemyfool

For example id like to add more to the gender enumeration

public Gender gender;

I want to add "Alien", "Android" and "Piers_Morgan"

But i know the answer i cant do it.