Ludeon Forums

Ludeon Forums

  • May 24, 2022, 05:13:33 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

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.

Messages - arkyte

Pages: [1] 2
1
All other raid types are available minus that and scattered drop pods.

2
Help / How to make the visage mask be rendered below the hats?
« on: 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.

3
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
Weird. For me it works fine when planting normal crops. I didn't test with planting trees. The zone even considers adjacent trees.

5
Bugs / [1.3.3069] Pawns without eyes still cannot wear blindfold.
« on: July 23, 2021, 03:17:57 PM »

6
Bugs / Re: [1.3.3067] Blindfold requires eyes body part
« on: 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.

7
Sorry.

Code: [Select]
if (pawn.RaceProps.Humanlike && !pawn.health.hediffSet.HasHediff(Celestials.CelestialsDefOf.O21_CelestialHediff))
{
     float startGrayingHair = pawn.RaceProps.lifeExpectancy / 2;
}

8
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.

9
Help / Re: Linking backstories
« on: May 25, 2021, 12:36:31 PM »
Also, check the backstories+ mod.

10
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
« on: 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
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);

13
Help / Re: Is it possible to patch a GameCondition?
« on: 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

14
Help / Is it possible to patch a GameCondition?
« on: 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.

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
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/

Pages: [1] 2