Solid-Wires / rimworldmod-pawnkindracediversification

[DISCONTINUED] Hijacks the pawn generator to replace their kindDef races with a race selected from weights.
MIT License
1 stars 2 forks source link

Droids from Chjee's Androids causes a null-reference exception on generating in non-player factions #13

Closed Solid-Wires closed 3 years ago

Solid-Wires commented 3 years ago

This is probably an oversight from how droids are generated from that mod. It certainly was not intended for droids to generate outside of the player faction.

Solid-Wires commented 3 years ago

So far, it appears that droids are trying to set a "hostility response mode," which is basically the reaction that pawns have to threats while not drafted. Since these droids are obviously not your own pawns when generated into other pawnkinds, it makes sense that would be null. Therefore, it appears like I need to insert a transpiler injection to ignore assigning this.

Solid-Wires commented 3 years ago

Although I fixed the issue using the mentioned transpiler technique, droids that spawn in the world will spawn naked. This is because they are classified as "created" droids and therefore they will not spawn with any equipment or clothes. However, they make really scary explosive suicide pawns.

Good luck protecting a stellarch droid!