Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jaitnium

#1
Support / Nothing but the HUD loads
May 26, 2022, 09:48:25 PM
I removed a mod (Giddy up) and it broke my game. I put the mod back in but it doesn't fix the issue.

I can create and play a new colony just fine.
I've tried validating the game files.
I've tried deleting the config folder.

Stack trace error:
Error in Map.FinalizeLoading(): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.ListerFilthInHomeArea.Notify_HomeAreaChanged (Verse.IntVec3 c) [0x00000] in <99518a644a3e4a7ea3fde566568df84a>:0
  at RimWorld.ListerFilthInHomeArea.RebuildAll () [0x00025] in <99518a644a3e4a7ea3fde566568df84a>:0
  at (wrapper dynamic-method) Verse.Map.Verse.Map.FinalizeInit_Patch2(Verse.Map)
  at (wrapper dynamic-method) Verse.Map.Verse.Map.FinalizeLoading_Patch1(Verse.Map)
  at (wrapper dynamic-method) Verse.Game.Verse.Game.LoadGame_Patch1(Verse.Game)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch1 (string)
(wrapper dynamic-method) Verse.Game:Verse.Game.LoadGame_Patch1 (Verse.Game)
(wrapper dynamic-method) Verse.SavedGameLoaderNow:Verse.SavedGameLoaderNow.LoadGameFromSaveFileNow_Patch1 (string)
Verse.Root_Play/<>c:<Start>b__1_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()


Any help would be much appreciated.
#2
Help / Re: How to properly override ThingComp?
October 03, 2019, 07:50:14 PM
Could you give me an example that would look?
#3
Help / Re: How to properly override ThingComp?
October 02, 2019, 07:04:00 PM
Okay I believe I understand thingClass better, but specifying thingClass as ThingWithComps doesn't make the ticker run either:

<?xml version="1.0" encoding="utf-8"?>
<Defs>
<ThingDef>
<defName>Ticker</defName>
<tickerType>Normal</tickerType>
<thingClass>ThingWithComps</thingClass>
        <comps>
            <li Class="MyExampleNamespace.MyExampleCompProperties">
                <myExampleBool>false</myExampleBool>
                <myExampleFloat>0.005</myExampleFloat>
            </li>
        </comps>
    </ThingDef>
</Defs>
#4
Help / Re: How to properly override ThingComp?
October 01, 2019, 02:35:07 AM
I've updated the def to specify the class:

<?xml version="1.0" encoding="utf-8"?>
<Defs>
<ThingDef>
<defName>Ticker</defName>
<tickerType>Normal</tickerType>
<thingClass>MyExampleNamespace.MyExampleComp</thingClass>
        <comps>
            <li Class="MyExampleNamespace.MyExampleCompProperties">
                <myExampleBool>false</myExampleBool>
                <myExampleFloat>0.005</myExampleFloat>
            </li>
        </comps>
    </ThingDef>
</Defs>


Unfortunately I'm still not seeing anything in the dev logs, indicating the ticker isn't working, so I feel like I'm misunderstanding you.
#5
Help / How to properly override ThingComp?
September 30, 2019, 10:11:33 PM
I'm new to modding and C#, so I've been reading a bunch of tutorials. I also successfully followed the Plague Gun mod tutorial:
https://rimworldwiki.com/wiki/Plague_Gun/Introduction

The big issue that is stumping me is that my class that is derived from ThingComp doesn't work at all. I've created a sample mod that uses the exact code listed on the wiki (except I added tickerType to the xml), added the mod to the game, but CompTick doesn't seem to execute at all: https://rimworldwiki.com/wiki/Modding_Tutorials/ThingComp

How can I properly override ThingComp so CompTick will execute?

TickerMod.xml:
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<ThingDef>
<tickerType>Normal</tickerType>
        <comps>
            <li Class="MyExampleNamespace.MyExampleCompProperties">
                <myExampleBool>false</myExampleBool>
                <myExampleFloat>0.005</myExampleFloat>
            </li>
        </comps>
    </ThingDef>
</Defs>


MyExampleNamespace.cs:
using Verse;
using System;

namespace MyExampleNamespace
{
    public class MyExampleComp : ThingComp
    {
        public override void CompTick()
        {
            Log.Error("Let's error on every tick!");
        }

        /// <summary>
        /// By default props returns the base CompProperties class.
        /// You can get props and cast it everywhere you use it,
        /// or you create a Getter like this, which casts once and returns it.
        /// Careful of case sensitivity!
        /// </summary>
        public MyExampleCompProperties Props => (MyExampleCompProperties)this.props;

        public bool ExampleBool => Props.myExampleBool;
    }

    public class MyExampleCompProperties : CompProperties
    {
        public bool myExampleBool;
        public float myExampleFloat;

        /// <summary>
        /// These constructors aren't strictly required if the compClass is set in the XML.
        /// </summary>
        public MyExampleCompProperties()
        {
            this.compClass = typeof(MyExampleComp);
        }

        public MyExampleCompProperties(Type compClass) : base(compClass)
        {
            this.compClass = compClass;
        }
    }
}