RimWorld

RimWorld

503 ratings
Melee Weapons: Speed and Damage
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.1, 1.2, 1.3, 1.4, 1.5
File Size
Posted
Updated
114.749 KB
Mar 22, 2020 @ 4:34pm
Apr 9, 2024 @ 1:39pm
8 Change Notes ( view )

Subscribe to download
Melee Weapons: Speed and Damage

Description
In this mod, the pawns "Melee skill" and "Manipulation" now affect melee weapon damage and cooldown.

You can change scaling in mod settings.
91 Comments
DaftValac Mar 16 @ 11:48pm 
@2017632033 Quick answer: other commenters say yes, this mod is compatible with CE.

I haven't personally tested this. If you've found it doesn't work with CE, please let us know.
2017632033 Mar 10 @ 2:55am 
Does it support the CE mode?
DESU98 Dec 7, 2024 @ 10:59pm 
이것은 정말 멋진 모드입니다.
Al120 Nov 2, 2024 @ 11:04am 
I do wish I knew enough to self patch this on my behalf. My pawns are super viable unarmed, but they don't get the cooldown reduction they would get if holding weapons.
Dagda Oct 31, 2024 @ 6:51am 
Thanks to this mod, I now have Bacchus, a vampire with nearly all of her body replaced with bionic and archotech components, wielding a monoblade and being capable of slicing down nearly 60 people before she collapses.
BrokenBed  [author] Aug 5, 2024 @ 8:07am 
Well... I will check your suggestion when I work on this mod again.
ELF SLAYER Aug 5, 2024 @ 6:50am 
@BrokenBed

Hey hey!

Decided to look back at my Discord messages from my initial investigation into the issue to try and find out what caused it. I came across messages I had with legodude where he helped me identify what was wrong.

The issue wasn't exactly with VFE itself, but code inside it which is called by other mods. I had a hard time tracking down the incompatibility at first because VFE is such a core mod to most people's modlists and there were times when it worked with it and times when it worked without it. it was seemingly random which mods I could remove or add and suddenly have it working.

Sorry I can't give you specifics of which mods to combine with the Framework to trigger it. It's kind of hit or miss and seemingly random. Some mods which caused this issue weren't even directly combat related mods.

The code itself is your own though, I simply moved the logic you used for checking the pawn's weapon in the damage section to the cooldown section.
BrokenBed  [author] Aug 5, 2024 @ 3:54am 
ELF SLAYER, I remember you reporting this bug. I tried to reproduce it several times, but without success (Ran this mod along with VFE).
I don't plan to change the code without reproducing the bug.
ELF SLAYER Aug 3, 2024 @ 2:44am 
Specifically, this portion of the code with these if condition checks from AdjustedMeleeDamageAmount_Patch:

if (attacker != null && attacker.RaceProps != null && __result > 0f)
{
bool con = true;
if (equipment == null)
{
con = false;
if (attacker.RaceProps.Humanlike && LoadedModManager.GetMod<MWSADMod>().GetSettings<MWSADModSettings>().EveryMeleeSourceFromHumanoid)
con = true;
if (!attacker.RaceProps.Humanlike && LoadedModManager.GetMod<MWSADMod>().GetSettings<MWSADModSettings>().EveryMeleeSourceFromEverythingBesideHumanoid)
con = true;
}


That equivalent section of the code needs to be moved down to the equivalent section of AdjustedCooldown_Patch in order to fix the compatibility issue.
ELF SLAYER Aug 3, 2024 @ 2:44am 
Hey hey! I posted here a few years back in 2022 on the issue with melee cooldowns not being applied to unarmed attacks while they were applied to melee weapons despite having the setting ticked.

I posted the problem and solution on Apr 12, 2022 if you want to refer back for more details on the issue, but it boiled down to a compatibility issue with the Vanilla Expanded Framework.

I noticed at the time that the solution was already present in your source code in the AdjustedMeleeDamageAmount_Patch class so I simply moved it over to your AdjustedCooldown_Patch class to fix it.

I'll follow up with another comment on details with the fix.