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

Topics - arkyte

All other raid types are available minus that and scattered drop pods.
The upper part of the visage mask collides a bit with the hat (attached figure for reference). Is it possible for the hat to be in front and the mask below?

Solved: XML property that the mask is rendered below hat. If you disable it the apparel worn first goes below.
As said in title. The only option available is make-roof and delete roof. Delete roof also removes overhead mountain but there is no way to add it.
I want to make a check of a DefOf during my code, but only if such DefOf exists. How do I check if such mod is present?
I solved it, solution for the future on the botton

I have a Pawn_DraftController instance __instance.drafter that has an internal method __instance.drafter.GetGizmos() which does several things and yields an IEnumerable<Gizmo>.

I searched in the forums and found that I could use


but I want to call the method and not get a private value.

Thanks in advance.


I tried to

IEnumerable<Gizmo> gizmos_drafter = Traverse.Create(__instance.drafter).Method("GetGizmos", null).GetValue<IEnumerable<Gizmo>>();

I think it didn't work


I managed to get something working

var getGizmosMethod = __instance.drafter.GetType().GetMethod("GetGizmos", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);

IEnumerable<Gizmo> gizmos_drafter = (IEnumerable<Gizmo>) getGizmosMethod.Invoke(__instance.drafter, null);
Help / Is it possible to patch a GameCondition?
April 27, 2021, 05:24:08 PM
I want to patch lightning strikes. My main problem is that I don't know how to create a variable and give it a starting value at the beginning of the flashstorm. Then this variable would change value during the flashstorm. At the beginning of another flashstorm it would be reset.

namespace Mod
[HarmonyPatch(typeof(GameCondition_Flashstorm), "GameConditionTick")]
public static class GameCondition_Flashstorm_GameConditionTick_Patch
static int nextCheckTicks = 0;
static bool doThisOncePerFlashstorm = true;

public static void Postfix(GameCondition_Flashstorm __instance)
if (doThisOnePerFlashstorm)
doThisOnePerFlashstorm = false;
if (Find.TickManager.TicksGame >= nextCheckTicks)
nextCheckTicks = Find.TickManager.TicksGame + 1000;

My issue is: nextCheckTicks does not reset to 0 at the next flashstorm neither does doThisOncePerFlashstorm turns false.

Thank you.
I recently have been learning to mod, and was trying to change things a bit with polyamory mods. I have been mainly following the .dlls from VanillaExpandedTraits and RationalRomance. I managed to create new traits, do some patches using harmony in pawns thoughts, moods, and romance chance, break ups, etc.

In the source code I found the TryGiveJob method in the JobGiver_DoLovin. It checks for several factors and in the end assigns:

return JobMaker.MakeJob(JobDefOf.Lovin, partnerInMyBed, pawn.CurrentBed());

Is it possible to tweak the lovin need values and when conditions are proper (3 lovers in bed who can do lovin) assign three lovin jobs? Or is it a hardlimit that pawns can only do one job at a time?