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 2
#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
Bugs / Re: [1.3.3069] Pawn still cutting tree despite cutting disabeled
July 23, 2021, 04:15:05 PM
Weird. For me it works fine when planting normal crops. I didn't test with planting trees. The zone even considers adjacent trees.
#6
Bugs / Re: [1.3.3067] Blindfold requires eyes body part
July 23, 2021, 11:57:09 AM
Same for me. It was deemed as fixed but it is still bugged.
Moderator Note:
This is now fixed in bug patch 1.3.3080.
Moderator Note:
This is now fixed in bug patch 1.3.3080.
#7
Help / Re: How do I check if a mod is being used? If it is checkForMod variable is true.
May 27, 2021, 04:46:33 PM
Sorry.
Code Select
if (pawn.RaceProps.Humanlike && !pawn.health.hediffSet.HasHediff(Celestials.CelestialsDefOf.O21_CelestialHediff))
{
float startGrayingHair = pawn.RaceProps.lifeExpectancy / 2;
}
#8
Help / Re: How do I check if a mod is being used? If it is checkForMod variable is true.
May 26, 2021, 11:53:08 AM
But how would I check if a defof is present without throwing red errors that it does not exist?
How do I check if Celestials.CelestialsDefOf.O21_CelestialHediff exists?
If I check directly if the pawn has the hediff it throws the error that it does not exist.
How do I check if Celestials.CelestialsDefOf.O21_CelestialHediff exists?
If I check directly if the pawn has the hediff it throws the error that it does not exist.
#10
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?
#11
Help / Re: How to Create a Settings Page for Mod
May 07, 2021, 10:49:22 AM
I would start by searching for a really simple mod that has settings. That way it would be really easy to discern the settings part in the assembly and the actual mod part.
#12
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);
#13
Help / Re: Is it possible to patch a GameCondition?
April 27, 2021, 05:30:40 PM
Genius. I'm so dumb hahahah
My variables carry between harmony patches? Or this one carries because both methods are inside the same GameCondition_Flashstorm?
Edit:
Is there a way to do it? I can't seem to assign values to variables from another harmonypatch
Edit:
Managed to do it. Set the variable to public and call it by
GameCondition_Flashstorm_GameConditionTick_Patch.werePawnsChecked = false;
Inside the other patch
My variables carry between harmony patches? Or this one carries because both methods are inside the same GameCondition_Flashstorm?
Edit:
Is there a way to do it? I can't seem to assign values to variables from another harmonypatch
Edit:
Managed to do it. Set the variable to public and call it by
GameCondition_Flashstorm_GameConditionTick_Patch.werePawnsChecked = false;
Inside the other patch
#14
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.
#15
Help / Re: Is it possible to assign two jobs for the same pawn at the same time?
December 24, 2020, 08:31:02 PM
Thank you. Do I only have to learn how to edit the jobdriver to handle more than two pawns, or is there another related class?
I have been getting my info on this from here https://github.com/Mehni/ExampleJob/wiki/
I have been getting my info on this from here https://github.com/Mehni/ExampleJob/wiki/
Pages1 2