Skip to content

Instantly share code, notes, and snippets.

Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
at Androids.DroidUtility.MakeDroidTemplate (Verse.PawnKindDef pawnKindDef, RimWorld.Faction faction, System.Int32 tile, System.Collections.Generic.List`1[T] skills, System.Int32 defaultSkillLevel) [0x00137] in <acb803ec9ce94f14af36f09e69bfc8d7>:0
at Androids.HarmonyPatches.Patch_PawnGenerator_TryGenerateNewPawnInternal (Verse.Pawn& __result, Verse.PawnGenerationRequest& request, System.String& error) [0x00031] in <acb803ec9ce94f14af36f09e69bfc8d7>:0
at (wrapper dynamic-method) Verse.PawnGenerator.Verse.PawnGenerator.TryGenerateNewPawnInternal_Patch2(Verse.PawnGenerationRequest&,string&,bool,bool)
at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest& request) [0x00096] in <7b345446a85d4ed599f9c604ae61854b>:0
at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00183] in <7b345446a85d4ed599f9c604ae6185
@Neceros
Neceros / .xml
Created August 28, 2020 06:13
tools
<tools>
<li>
<label>left bladed fist</label>
<capacities>
<li>Cut</li>
<li>Stab</li>
</capacities>
<power>15</power>
<cooldownTime>1.8</cooldownTime>
<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
@Neceros
Neceros / .xml
Created August 1, 2020 06:37
Drone body parts
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<BodyPartDef>
<defName>DroneShell</defName>
<label>shell</label>
<hitPoints>30</hitPoints>
<permanentInjuryChanceFactor>0</permanentInjuryChanceFactor>
<skinCovered>false</skinCovered>
<bleedRate>0</bleedRate>
@Neceros
Neceros / .xml
Created August 1, 2020 06:29
hediff giver 2
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<HediffGiverSetDef>
<defName>ChjAndroidStandard</defName>
<hediffGivers>
<!-- Environmental -->
<li Class="HediffGiver_Bleeding">
<hediff>ChjCoolantLoss</hediff>
</li>
<li Class="HediffGiver_Heat">
@Neceros
Neceros / .xml
Created August 1, 2020 06:28
hediff set
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<HediffGiverSetDef>
<defName>ChjDroid</defName>
<hediffGivers>
<!-- Responsive and special -->
<li Class="Androids.HediffGiver_Machine">
<hediff>ChjCoolantLoss</hediff>
</li>
@Neceros
Neceros / .xml
Created August 1, 2020 06:27
drone code
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<BodyDef>
<defName>DroneBody</defName>
<label>Drone</label>
<corePart>
<def>DroneShell</def>
<height>Middle</height>
<depth>Outside</depth>
@Neceros
Neceros / settings.cs
Created April 27, 2020 02:14
settings not work
public override void DoSettingsWindowContents(Rect inRect)
{
Text.Font = GameFont.Small;
Rect rect = new Rect(0f, 0f, inRect.x, inRect.y).ContractedBy(10f);
Rect viewRect = new Rect(0f, 0f, rect.width - 16f, 300f);
Widgets.BeginScrollView(rect, ref scrollPosition, viewRect, true);
Listing_Standard listing = new Listing_Standard();
listing.Begin(inRect);
@Neceros
Neceros / .cs
Created April 27, 2020 01:03
settings
public override void DoSettingsWindowContents(Rect inRect)
{
Vector2 size = new Vector2(520f, 450f);
Text.Font = GameFont.Small;
Rect rect = new Rect(0f, 0f, size.x, size.y).ContractedBy(10f);
Rect viewRect = new Rect(0f, 0f, rect.width - 16f, scrollViewHeight);
Widgets.BeginScrollView(rect, ref scrollPosition, viewRect, true);
Listing_Standard listing = new Listing_Standard();
@Neceros
Neceros / file.cs
Created April 24, 2020 07:43
Scribing IExposables
public class StuffWeight : IExposable
{
public ThingDef stuffDef;
public float originalWeight;
public float stuffMultiplier;
public ThingDef StuffDef
{
get
{
@Neceros
Neceros / .cs
Created April 16, 2020 02:32
error
using RimWorld;
using System.Collections.Generic;
using System.Linq;
using Verse;
namespace LeafLikeLife
{
[StaticConstructorOnStartup]
public static class LLLStartUp
{