RimWorld

RimWorld

Vanilla Weapons Expanded - Heavy Weapons
Lothion 30 Jun, 2024 @ 6:32pm
Definition of Power armor
I couldn't see exactly how 'power armor' was defined in the mod description, but from trawling through the comments it seems that both marine armor and recon armor will allow heavy weapons to be used - I assume that cataphract armor will too.
< >
Showing 1-4 of 4 comments
Vithrick 28 Jul, 2024 @ 12:15am 
I can only find a small part in the xml files as part of each weapon:

<supportedArmors>
<li>VWE_Apparel_Exoframe</li>
</supportedArmors>
<supportedTraits>
<li>Tough</li>
</supportedTraits>

Seems to indicate only the exoframe supports heavy weapons, even though the mod description says any power armor should support heavy weapons, but I also barely have any understanding of these mods, given I never made or edited one. I don't even understand why there's no 1.3 file in the Mods\Vanilla Weapons Expanded - Heavy Weapons directory.

And besides, I can't even get the mod to work, no matter what combination of mods I use. To me the weapons cannot be picked up even if a colonists is wearing cataphract armor, exoframe and has the tough trait. Only incapable of violence colonists give the option to equip them, except the option is disabled because they are incapable of violence.

I honestly kind of think this mod is discontinued and broken, but then again, I could be wrong and just didn't try hard and long enough.
MrHalfH3art 16 Dec, 2024 @ 6:56am 
ever figure out to fix the issue?
Just figured out with help of GPT. I fixed the problem and now can equip heavy weapons in PA


U can also, just download dnSpy to edit HeavyWeapons.dll

The problem is here. Some command calls inactive method called HasActiveGene that is now called HasGene

So how to fix that

Open heavyweapons.dll from vanilla_expanded_framework\1.5\Assemblies
Make a backup copy

find CanEquip row in the left column - right click - edit method C#

U need 29th row

Change
if (pawn.genes.HasActiveGene(DefDatabase<GeneDef>.GetNamedSilentFail(defName)))
to
if (pawn.genes.HasGene(DefDatabase<GeneDef>.GetNamedSilentFail(defName)))

Compile
And save the dll

If U can't compile and there are errors that means U also need to open some other dlls that contains methods used in this dll

usually these are Assembly-CSharp.dll and UnityEngine.dll fromRimWorld\RimWorldWin64_Data\Managed

U would understand U open all u need as soon as commands in C# method editing will become colored in any colours but red
Last edited by Crazyking; 4 May @ 2:31pm
But now there is another problem: every pawn can equip HWs. Trying to fix that, but as I told im not even close to be a programmer
< >
Showing 1-4 of 4 comments
Per page: 1530 50