All other raid types are available minus that and scattered drop pods.
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.
Pages1
#1
Bugs / [1.3.3080] Dev mode doesn't have the option to initiate drop pod raid
August 05, 2021, 07:37:35 AM #2
Help / How to make the visage mask be rendered below the hats?
July 27, 2021, 06:34:44 AM
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.
Solved: XML property that the mask is rendered below hat. If you disable it the apparel worn first goes below.
#3
Bugs / [1.3.3069] Dev option to create overhead mountain roof is missing.
July 23, 2021, 04:22:40 PM
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.
#4
Help / How do I check if a mod is being used? If it is checkForMod variable is true.
May 25, 2021, 12:35:29 PM
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?
#5
Help / How to call an internal/private method of a class and use it's returned values?
May 07, 2021, 10:45:17 AM
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
Traverse.Create(__instance.drafter).Field("value").GetValue<type>();
but I want to call the method and not get a private value.
Thanks in advance.
Edit:
I tried to
IEnumerable<Gizmo> gizmos_drafter = Traverse.Create(__instance.drafter).Method("GetGizmos", null).GetValue<IEnumerable<Gizmo>>();
I think it didn't work
Solved:
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);
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
Traverse.Create(__instance.drafter).Field("value").GetValue<type>();
but I want to call the method and not get a private value.
Thanks in advance.
Edit:
I tried to
IEnumerable<Gizmo> gizmos_drafter = Traverse.Create(__instance.drafter).Method("GetGizmos", null).GetValue<IEnumerable<Gizmo>>();
I think it didn't work
Solved:
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);
#6
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.
My issue is: nextCheckTicks does not reset to 0 at the next flashstorm neither does doThisOncePerFlashstorm turns false.
Thank you.
Code Select
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)
{
longStuff;
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.
#7
Help / Is it possible to assign two jobs for the same pawn at the same time?
December 24, 2020, 06:13:34 PM
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?
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?
Pages1