Now that I have tried out ILSpy instead of dnSpy, I don't think I need to do anything this complicated. I just need to figure out how patch a local method (aka a method inside another method).
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
Help / Re: How do I use Harmony to access an attribute of a compiler generated type?
July 10, 2023, 11:45:09 AM #2
Help / How do I use Harmony to access an attribute of a compiler generated type?
July 09, 2023, 08:13:36 AM
I'm trying to make a mod that shows both eyes of a human pawn when it's facing east or west instead of just one. For that, I need to patch the PawnRenderer class and be able to read its CS$<>8__locals1 attribute. I can't treat it like a regular attribute since it's improperly named. While I figured out how to patch compiler generated methods, using compiler generated attributes within the patches is beyond my understanding at the moment. Any tips?
Image 1: method I'm trying to patch (aka replace with a prefix).You cannot view this attachment.
Image 2: the patch in its current form. The commented out snippet of code was to test if the patch was capable of targeting the method I needed, which it was. You cannot view this attachment.
Image 1: method I'm trying to patch (aka replace with a prefix).You cannot view this attachment.
Image 2: the patch in its current form. The commented out snippet of code was to test if the patch was capable of targeting the method I needed, which it was. You cannot view this attachment.
#3
Help / Re: How to change apparel styles textures?
January 25, 2022, 07:47:49 AM
NWM, I figured it out. There was some bizarre folder name issue where it looked correct but apparently used wrong symbols.
#4
Help / How to change apparel styles textures?
January 25, 2022, 06:25:44 AM
I'm working on a mod that changes how some of the apparel styles look, but the textures don't apply, even though I followed the folder structure and file naming conventions. What could be causing this?
#5
Help / West-facing texture XML tag?
August 31, 2021, 01:58:25 PM
Is there an XML tag that makes it possible to give a piece of apparel a west-facing texture? I can't find a mention of it anywhere.
#6
Help / How do I update my mod?
August 30, 2021, 07:47:11 AM
I have recently uploaded my first mod to the Workshop. However, when I browse its page, I can't find anything related to making updates for it. Do I also have to do this through RimWorld?
#7
Help / Re: What is the purpose of skinColorOverride?
August 30, 2021, 02:54:16 AM
I think I figured it out. This is for rotting, so when a pawn rots, its skin color gets overridden with the rot color.
#8
Help / What is the purpose of skinColorOverride?
August 29, 2021, 11:18:55 AM
I'm currently trying to make a mod that makes all human pawns have gray skin. I want this to be save friendly, so if one were to uninstall my mod, every pawn would go back to their original skin color. To do this, I wanted to make it so when the game tries to render a pawn, instead of asking for its melanin value, it just uses a predetermined color (in my case, gray). While looking for the method responsible for this, I found a nullable Color type value called skinColorOverride. It is used in classes PawnGraphicSet, Pawn_StoryTracker, and PawnGenerator. I'm very new to modding RimWorld, so reading decompiled code is still difficult, and I can't for the life of me figure out what the purpose of this variable is. Any help with this would be appreciated.
Pages1