RimWorld

RimWorld

[1.4] Vanilla Factions Expanded - Medieval
bihlbo 29. juli 2022 kl. 19:30
Want more shield-usable weapons? Other preferences? Do this.
We do have the ability to change mods to work as we prefer, including changing modded weapons to be usable with a shield. That's by changing the .xml files for the mod.

First off, changing the .xml files for the mod is possible, however when the mod updates it wipes out all the changes you made. You get around this by making a local copy and using that instead. I suggest when you make your changes, you list them in a text doc so if you need to update the mod and start over, you know what you did.

Find the instructions to make a mod, or to make a local copy elsewhere. I instead use this foolproof and easy method: When using the Mod Manager mod by Fluffy, just R-click a mod in the manager's mod list to make a local copy. This makes the only instance of that mod available to choose in the manager your local copy of the mod.

From there, figure out what you want to change and go hog wild. If you don't already know how to do this, here's a few projects you can do with me. You should get the hang of it after doing one or two.

Project One: No tabards for nudists
Nudists are quite happy wearing tabards. Okay, fine, but it looks weird, and this is my game, so I'm against it.

Once you make a local copy of this mod, Vanilla Factions Expanded - Medieval, navigate to steamapps\common\RimWorld\Mods and you should see a folder with a name like "__LocalCopy_Vanilla Factions Expanded - Medieval_-29-7" if Mod Manager made it. Open that up, go to 1.3 (or whatever version you use), then the Defs folder. See all the choices? Good stuff, get excited. For the tabards we want the ThingDefs_Misc folder. Open Apparel_Various.xml in Notepad, Notepad++, or whatever xml editor you like.

Find the tabards (Ctrl-F to search, if you want) and find the <layers> portion. We want that to read the following:
<layers> <li>VFEC_OuterShell</li> <countsAsClothingForNudity>true</countsAsClothingForNudity> </layers>

Make the change. Save and close, fire up the Rim, and check to see if your nudist hates wearing the tabard. If he does, you win.

Project Two: Competitive plate helmets
Have you ever noticed that a simple helmet can be made after you research smithing, but then once you research Plate Armor you gain access to a light plate helmet that is in almost every way worse than the simple helmet? Okay, it looks better, but let's not make a pawn a fashion victim.
Follow the same instructions for Project One, but we're editing the Apparel_Headgear.xml file instead.

The light plate helmet is the first item defined in the file. Under <statBases> you'll see
<StuffEffectMultiplierArmor>0.40
which defines how much protection you get, based on the material used. How do we make this at least as good as the simple helmet? For that, we need to compare them.

Navigate to steamapps\common\RimWorld\Data\Core\Defs\ThingDefs_Misc and open the Apparel_Headgear.xml file. Find "simple helmet" where you can see its statBases values. So, now you know you can safely copy that value to replace the 0.40 for the light plate helmet, and you won't break the balance of your game.

If you also use the Vanilla Armour Expanded mod, you're familiar with the "plate helmet" (non-light version) which has the same stats as the light plate helmet, but covers more, and has a fraction of the shooting accuracy penalty. So if you were also to change the light plate helmet's
<ShootingAccuracyPawn>-4
to a value of -0.1 to match the plate helmet, you would have a more balanced in-game experience. Or change it to 20 to just cheat the game, whatever. It's your experience, do what you want.

You can use this process for the heavy plate helmet, defined in the same file as the light plate helmet, to make sure that it's also to your liking.

You can also use this process to change the plate helmet in the Vanilla Armour Expanded mod to make it have the same protection as the light plate helmet. This seems about right to me, since the plate helmet takes more resources and time to make, but also covers more of the head. If you have both, let them both fill a niche, that's what I say.

Project Three: Shield-friendly mod weapons
Ever notice how Vanilla Weapons Expanded - Tribal adds a light club, half the weight as the club, but cannot be used with medieval shields while the club can? Let's fix that.

Using the same process as in Project One, navigate to the local copy of your Vanilla Weapons Expanded - Tribal mod. Open the 1.3\Defs\ThingDefs_Misc folder, and edit MeleeNeolithic.xml. The heavy club is fine, so scroll down and you'll see the light club entry. Find the </tools> tag. Between that and </ThingDef>, paste the following lines:
<modExtensions> <li Class="VFECore.ThingDefExtension"> <usableWithShields>true</usableWithShields> </li> </modExtensions>

Save and close. Fire up the game and get one of your knights to equip some raider's trashy little club with his shield. If it works, you win!

If you've gotten this far, you're probably fully capable of following the same process to edit items from other mods. Maybe you want all non-automatic pistols to be usable with shields. Maybe you have another mod that adds primitive stone weapons that aren't usable with shields.

Some of you are likely wondering if it's safe to do this with all modded weapons, even the ones you know you'll want to use when you do a run without VFE-Medieval enabled. In my experience, even with VFE-Medieval not loaded, modded weapons made to be usable with shields still say so, and don't produce problems.

Good luck!
Sidst redigeret af bihlbo; 29. juli 2022 kl. 19:48