RimWorld

RimWorld

Not enough ratings
Degrading Weapons
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
98.643 KB
16 Aug @ 4:36pm
29 Sep @ 2:53pm
4 Change Notes ( view )

Subscribe to download
Degrading Weapons

Description
About
Ever feel strange about your weapons not loosing hp in a battle?
No?
Whatever...
I fixed that!

Dunno actually why nobody did this before...
(Reuploaded due to technical reasons, sorry)

Description
Long story short, this mod makes all weapons in the game loose it's hp while being used to attack in melee/in range

Rates of this and chances to avoid hp loss can be changed in settings

Details
Below are the formulas with explanations on which the mod actually works:
(All variables can be changed in settings)

Melee atack hp loss - calculates by formula:
HP Loss = 0.25 × x
Where: x = 1 by default

Ranged atack hp loss - calculates by formula:
HP Loss = ((warmup + cooldown + (burstAmt - 1) × ticksBtwnShots / 60) / burstAmt) × 0.1 × x
Where: x = 1 by default; ticksBtwnShots - number of ticks between shots in burst; burstAmt - number of shots in burst
This function allows to find average number of shots per second and equalise this way amount of damage that receive minigun and sniper rifle for example

TechLevel Scaling - If enabled, the result of the HP Loss function is multiplied by TechLevelMult
TechLevelMult = TechLevel + TechLevelAdjuster * TechlevelDifference
Where: TechLevel = 0.4 by default (Base Modifier); TechLevelAdjuster = 0.2 by default (Multiplier for TechlevelDifference); TechlevelDifference - Difference between Techlevel of the weapon and Archotech

▲All this values calculates for all weapons on game startup and require restart▲
▼All this values can be changed without the game restart▼

Chance to avoid hp loss both melee and ranged calculates by this formula:
Chance = x + (Skill × y)
Where: x(base chance to avoid hp loss) = 0 by default; Skill(melee or ranged) - skill level of the pawn; y(skill multiplier) = 4 by default

So (by default) chance to avoid hp loss will look like this:



Additionaly in settings you can find options:
To show hp loss rate in info tab of all weapons
To stop hp loss for researched weapons

Performance
I made this mod as optimised as I could

This mod does most calculations during startup, while during run it only applies this damage to required weapon

Compatibilities
Should be compatible with any modded weapons that uses vanilla attack methods (almost all weapon mods)

Added compatibility for Vanilla Weapons Expanded - Makeshift

Not compatible with CE (has it's own system)

Recommended
MendAndRecycle

Quality And Durability or: Quality Affects HP

FAQ
Is this compa...
Look at the section: Compatibilities

Found bug?
Try to unsubscribe from the mod, wait for about half of a minute and subscribe again.
If it doesn't help, submit bug report here
Don't forget to attach log

Is it ok to add/remove from save?
Yep


Popular Discussions View All (1)
4
29 Sep @ 2:37pm
PINNED: Bug Reports
Elv
22 Comments
subhuman_p0s 29 Sep @ 4:54am 
@Elv
thank you so much. although, there is a gamebreaking bug. I listed a link to a video in the bug report discussion
Elv  [author] 28 Sep @ 11:22am 
@subhuman_p0s
Added 1.4 tag, but I'm not sure there won't be any problems
subhuman_p0s 28 Sep @ 8:45am 
can you make this 1.4 compatible?
Elv  [author] 25 Sep @ 1:10pm 
@kyrambox I'll try to implement this in future update
kyrambox 25 Sep @ 11:07am 
It would be nice to show a message when weapon is broken. And play a "crack" sound ))
Elv  [author] 29 Aug @ 12:42am 
Update:

Added: ModIcon
Fix: Game crash that occurred when a colonist's weapon broke while performing a task
Elv  [author] 29 Aug @ 12:41am 
@Lemniscate_Mike
Should be fixed now
Lemniscate_Mike 28 Aug @ 5:42pm 
I get a freeze then crash to desktop whenever a colonist's gun breaks when they're on a hunting task.
Just tried with a vanilla bow(was how I noticed it to begin with, my hunter was causing all these dang crashes!) and a couple modded guns.

It's not generating any type of log sadly... But it's highly repeatable; use dev. mod to spawn and damage gun > set hunting jobs > force colonist to hunt until weapon dies > crash.
csc001 25 Aug @ 6:20am 
Nice mod:steamthumbsup:
Elv  [author] 20 Aug @ 11:31am 
@Axel
Not tested on 1.5 but I think it should be compatible