RimWorld

RimWorld

380 ratings
BetaTraps
4
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
350.728 KB
3 Mar, 2019 @ 7:40am
15 Jul @ 6:23pm
29 Change Notes ( view )

Subscribe to download
BetaTraps

Description
This will add back in the rearmable deadfall traps that were removed a few versions back.

I was watching a let's play of a tribal ice-sheet challenge from b18 that relied so heavily on the traps that it made me realize that traps used to be way more useful when you didn't have to spend resources to rearm them.
So I decided to make a mod to add deadfall traps back in.

This mod does not replace the current spike traps but adds deadfall traps in as a second choice. They do less damage, cost more to make, and take more time to build. But not having to spend so many resources maintaining a defense should be worth it.

Most of the logic is copied directly from the b18 version of Rimworld, so behavior should more or less match how it used to. Including the ability to place them right next to each other.

Please let me know if you find any bugs or incompatibilities or if the balance feels off.

Thanks!

Russian Translation by: Tkhakiro

Update 2.0: - now with settings and HugsLib support
if HugsLib is detected BetaTraps will now have a few options for personalizing the behavior of the traps.

Friendly Fire: Default true - if unchecked traps will no longer have a chance to spring on friendly pawns.
Treat Animals Different: Default true - If unchecked animals will no longer have the 10% modifier applied to their spring chance
Use Body Size: Default true - If unchecked body size will be ignored and the multiplier for size will always be 1 - the same as a human

I did not want to add a hard dependency to HugsLib so this integration is optional and will not affect people who do not have it installed.

Update 2.1: new setting to allow wild animals to hit traps

Wild Animals Can Trip: Default false - If this setting is true, wild non-hostile enemies will no longer be treated as friendly when calculating whether they "know" about the traps and will thus walk over them and trip them according to their spring chance.

Update 2.2:

Added Trap Armor Penetration as a value in the XML that will show up as a stat when inspecting the trap.

Update 2.3:

Now compatible with multiplayer!
Prior to this change any trap events would immediately cause a desync.
This should be completely resolved now.

I also added the new setting - Super Slow Traps
This will increase the speed penalty for pawns who "know" about the trap to 10x the original amount.
For a more "realistic" feeling of carefully crawling over an armed trap if that is your desire.

Update 2.4:

Now compatible with 1.1
Compatibility with 1.0 should be unchanged

Update 2.5 (For 1.1 only):

Added new setting - Traps Don't Slow
This setting was requested in a comment and will make it so armed traps do not slow pawns down.
Enabling both this setting and Super Slow Traps at the same time will ignore Super Slow Traps and use this option's functionality.

Update 2.6
I realized while attempting to create some sample translations that I was using the same defname as the existing spike traps. So I have deprecated the existing traps - they will continue to work, but will no longer be buildable, and they have been replaced by an identical trap that has a new def name. This will allow it to be translated properly.

Update 2.7
Added Russian translation thanks to Tkhakiro

Update 2.9
Added support for 1.3
Any future updates will now no longer apply to 1.1 and 1.2

Update 2.10
Added new setting called RearmTicks that allows you to customize how long it takes to rearm a trap
Also added flammability attribute to traps, so if they are made of wood(or steel... because that's a thing) watch out for Boomalopes!

Update 4/11/2024
Updated for 1.5
HugsLib is now a hard dependency in order for the settings to continue working.
Reworded many of the english decriptions to make it more clear what they can do.
Renamed the trap to "Rearmable Deadfall trap" To make it clearer which one is which
Made Auto-Rearm turned on by default

Update 4/19/2024
Traps were feeling weaker than before, not sure what caused this really... but I updated the damage calc to more closely resemble the spike trap damage calc and it feels better now.

Update 5/23/2024
This update makes the traps from this mod respect the trap immunity that certain anomaly entities have. But I wanted to retain the ability for these traps to be OP if you want. So there are now 2 new settings.
The first of these toggles whether or not these traps will work against trap immune pawns or not. Toggle this off if you want to retain the previous functionality.
The second can be used in conjunction with the other setting and will toggle whether the traps should be smart enough to try to dodge the traps or not. Thought it could be fun to leave them vulnerable to these traps, but try to dodge them. Use them how you like.

Update 5/27/2024
I decided to finally try and fix the bug where pawns get confused when reloading traps when they have to move a corpse back and forth. The behavior will be different now, they won't drop them on top of traps, so they'll probably walk a bit further when rearming than before if you don't have spare spots to drop them in close by

GitHub: https://github.com/Dorely/RimworldBetaTraps
219 Comments
rowanboel 20 Jul @ 6:34pm 
Mod's tagged 1.6 but when I download it, RimWorld doesn't detect it as being compatible with 1.6 and there isn't a folder for that version - only all of the others.
Phollus 20 Jul @ 10:24am 
dont work, no dmg as Aquila_V said
stecph 16 Jul @ 1:52am 
They work for me in a new 1.6/Odissey game.
Aquila_V 13 Jul @ 2:30pm 
Also even though the traps are marked as auto-rearm they wont mark themselves when triggered.
Aquila_V 13 Jul @ 2:29pm 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.Log:ErrorOnce (string,int)
Verse.TickList:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch2 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch1 (Verse.Game)
Verse.Root_Play:Update ()


(part 2)
Aquila_V 13 Jul @ 2:29pm 
Traps are triggering but no damage is being applied?


Exception ticking BetaTraps_TrapDeadfall43271 (at (137, 0, 133)). Suppressing further errors. Exception: System.MissingMethodException: Method not found: void Verse.DamageInfo..ctor(Verse.DamageDef,single,single,single,Verse.Thing,Verse.BodyPartRecord,Verse.ThingDef,Verse.DamageInfo/SourceCategory,Verse.Thing,bool,bool,RimWorld.QualityCategory,bool)
[Ref 35A026C]
at BetaTraps.Building_TrapRearmable.SpringSub (Verse.Pawn p) [0x00033] in <5f6de28d692645cb996be366eab9d39a>:0
at BetaTraps.Building_Trap.Spring (Verse.Pawn p) [0x00028] in <5f6de28d692645cb996be366eab9d39a>:0
at BetaTraps.Building_Trap.CheckSpring (Verse.Pawn p) [0x00017] in <5f6de28d692645cb996be366eab9d39a>:0
at BetaTraps.Building_Trap.Tick () [0x0006b] in <5f6de28d692645cb996be366eab9d39a>:0
at Verse.Thing.DoTick () [0x0007b] in <fcfab19af5d14a608a65ebd77f29482f>:0
at Verse.TickList.Tick () [0x00139] in <fcfab19af5d14a608a65ebd77f29482f>:0
Aquila_V 13 Jul @ 12:25pm 
Is this not working for anybody else? The traps set up normally but after 1.6 things trigger them and no damage is done
Redrum 13 Jul @ 8:49am 
Is it possible to remove Hugslib dependencies? So many mods are getting away from it.
Lemmy 12 Jul @ 4:47am 
One of the most useful and logic mods, why the eff would a trap disintegrate when triggered. Had this mod since 1.0 and will always have it on my list. Great work.
The Gunslinger 11 Jul @ 10:21am 
TY