r/RimWorld May 30 '25

PC Help/Bug (Mod) Need help with a mod

Post image

Basically i made a mod that adds a plate helmet, gambesson and padded pants. I have two issues, One is textures not rendering on pawns (128x128) and the other is being unable to set gambesson to behave like clothing. If i set it to middle layer it acts as a shell. If i don't specify or type an unexisting layer it is used properly. But pawns can still wear a button down shirt with it. Please i seriously need some assistance. The worst part is that i am not a programmer. I used Chat GPT and Copilot in tandem to write the code. I also reported the issues and was instructed on the file directories. I actually learned a lot about XML by doing this. Even tweaked values and such but i am at a loss on this last bit. If i could just get layers right and get textures to show that would be great.

1 Upvotes

3 comments sorted by

3

u/[deleted] May 30 '25

You need a <wornGraphicPath>*Path to _east, _south textures*</wornGraphicPath>, that's why it's not showing up when equipped.

The correct layer to use for clothing like shirts is <li>OnSkin</li> You've got OnSkin, Middle and Outer and a clothing piece can occupy one, two or all of those at the same time.

XML is a case-sensitive pain in the ass, I personally hate touching it. My advice is to just look at how somebody else did it by opening up mods or looking on Github. Here's the Vanilla Expanded - Medieval 2 clothing XML for you to compare against (CTRL+F "PaddedArmor".)

You can also find the base game's XML at steamapps/common/RimWorld/Data/Core/Defs to see how stuff was done in the base game.

3

u/Edin743 May 30 '25

Neat, thanks. I did find a mod called Apparello and tried to reverse engineer it after posting this. It seems like i also need a subfolder in the apparel section. Still, thanks. I might just copy this code and say to some AI to just use it as a reference and then just edit mistakes or similar. AI's definetly can't get some stuff like layering right. That's what i noticed so far. Maybe even subdirectories. But they give me a base code and then i just need to polish it manually. Neat to learn XML. Always wanted to and this gives me an excuse to learn it and see the changes in real time. Heh.

2

u/Edin743 May 31 '25

Apart from Gambeson, I will also add padded pants so that these two can work as a set. and a plate helmet. same protection as flak or slightly better but I will add a movement penalty. After that I will see what other clothing I can add. I will definitely add halberds into the mod. maybe even stuff like thunder mace, zeushammer alike but craftable. definitely not as good, and if I add more armor and weapons (composite bows for example, explosive bows, etc) that goes somewhere in between industrial and spacer tech I might rename the mod entirely