RimWorld

RimWorld

[Abandoned] Medical System Expansion
 This topic has been pinned, so it's probably important
Oreno  [developer] 23 May, 2019 @ 4:30am
[GUIDE] MSE - Part System Framework [OUTDATED]
Introduction

Medical System Expansion (MSE) introduce new Hediff hediffClass and Surgery workerClass for another modder that can used for.

Hediff hediffClass
1. "OrenoMSE.Hediff_AddedPartSystem"
This hediff class make sure your prosthesis part keep their child's part intact and also generate module slot hediff for it. Apart from that, this hediff class behave like vanilla Hediff_AddedPart.

2. "OrenoMSE.Hediff_AddedPartSystemNoModule"
This hediff class make sure your prosthesis part keep their child's part intact. Apart from that, this hediff class behave like vanilla Hediff_AddedPart.

3. "OrenoMSE.Hediff_AddedPartModule"
This hediff class is for your prosthesis part module. Not support partEfficiency but you can use another modifier to modify efficiency like capMods.

Surgey workerClass
1. "OrenoMSE.Recipe_InstallBodyPartModule"
This surgery workerClass is for your prosthesis part module surgery. This class make you can install part module on module slot generated by "OrenoMSE.Hediff_AddedPartSystem" hediff class.


How to add mod support

To add support for "Body Part System" to your mod and make your own body part keep their child's part intact with module, you can use this guide.

Make sure to add this hediffClass to your prostheses HediffDef
<hediffClass>OrenoMSE.Hediff_AddedPartSystem</hediffClass>
Or this if you don't want modules
<hediffClass>OrenoMSE.Hediff_AddedPartSystemNoModule</hediffClass>

To make your own body part module you must have this mod custom HediffDef hediff class and RecipeDef worker class.

HediffDef Example
<HediffDef ParentName="MSE_AddedModuleBionic"> <hediffClass>OrenoMSE.Hediff_AddedPartModule</hediffClass> ... <addedPartProps> <solid>true</solid> <!-- Required. thrown error if its not "true". --> </addedPartProps> </HediffDef>
RecipeDef Example
<RecipeDef ParentName="MSE_SurgeryBionicModule"> <workerClass>OrenoMSE.Recipe_InstallBodyPartModule</workerClass> ... </RecipeDef>
Last edited by Oreno; 8 Aug, 2019 @ 5:29pm