Mods / Bear Trap

Category: #Crafting #Other #QoL
Author: jayu
Side: Both
Created: Jun 9th at 8:03 PM
Last modified: Jun 14th at 7:14 PM
Downloads: 2969
Follow Unfollow 96

Latest file for v1.19.8:
beartrap_1.1.1.zip 1-click install


Buy Me a Coffee at ko-fi.com

Tired of trapping bears in pits?

Simple, add Bear traps to the game. To craft them, obtain two bear trap jaws by smithing, then craft the trap using nails and strips to join them together. Be careful about handling the open trap when not sneaking!

This mod adds a seeking food behaviour to bears, so placing appropriate bait in the traps (Protein or Fruit) will attract them. Other animals will also be attracted to proper bait, just like with a basket trap, but bear in mind that it will easily kill smaller animals.

To use a bear trap, first place it down. Then, you can open it by sneaking. Bait can be placed by sneaking or sitting, trying to interact with the trap while standing will trap your hand!

Traps have durability which scales with the material. Whenever a player or a trapped beast gets damaged by the trap, it will emit a metallic sound and lose 1 durability. Once that is exhausted, they will break and free the trapped animal. Be careful of trapping bears in low-tier traps for long as they might break them and escape.

Breaking a broken trap will drop nuggets of that metal equivalent to roughly half the metal used for the trap. Similarly, traps can be recycled by smashing them with a hammer.

Extra info

This mod was tested for bugs, but it has just been released, so use it at your own risk. It should not cause any problems to your worlds, but I offer no guarantee. Please report any bugs you find.

Balancing suggestions are welcome. So far, the trap has to be manually opened so that one can't just spam place them under bears chasing them.

If anyone can help with animating the model, please contact me as I couldn't manage to use the VS model creator on mac.

Roadmap
  • Animation on trap snapping (?)
  • Balancing of trap damage (?) Suggestions are welcome
  • Config for player damage (?)

Credits

The model for the bear trap was designed by OriginlessGamer (Socials: YouTube, Discord, Patreon) in this video:

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.1.1 2213 Jun 14th at 7:14 PM Show beartrap_1.1.1.zip Install now
v1.1.0 121 Jun 14th at 12:24 PM Show beartrap_1.1.0.zip Install now
v1.0.5 192 Jun 12th at 4:51 PM Show beartrap_1.0.5.zip Install now
v1.0.4 181 Jun 11th at 1:37 AM Show beartrap_1.0.4.zip Install now
v1.0.3 82 Jun 11th at 12:41 AM Show beartrap_1.0.3.zip Install now
v1.0.2 140 Jun 9th at 11:27 PM Show beartrap_1.0.2.zip Install now

15 Comments (oldest first | newest first)

💬 Tels, Aug 30th at 7:18 PM

It seems Beartrap contains a wrong food category "Protein", which no longer exists and thus VS servers spam the log with errors. Please see here for the full discussion


https://discord.com/channels/302152934249070593/1258296969307230300

💬 Sammy_SMD, Jul 1st at 12:13 PM

jayu tested in creative with a steel trap, it release the animal (not only bears) at 1 life point, then the animal regen his life without dying, it would be great if they dies 

💬 jayuAuthor, Jul 1st at 1:56 AM

Sammy_SMD it doesn't kill them outright, but if they get low enough, they should die... unless I messed up the code that releases the player just before they die.
A copper one will be destroyed by a polar bear before killing it for example.

💬 Sammy_SMD, Jul 1st at 1:05 AM

I have a qustion, the trap is supposed to kill the bears or relese when they are in very low health (one shottable)? 

💬 jayuAuthor, Jun 14th at 4:54 PM

Tels Thanks, will fix in the upcoming patch

💬 Tels, Jun 14th at 3:49 PM

Love the mod 🧡

The latest release is about 5x the size, since the modicon is suddenly a very very high-res 1 MB PNG. Maybe you could reduce its size again, as it won't be visible in the game, anyway :)

💬 Sammy_SMD, Jun 12th at 9:46 PM

OMG thank you

💬 jayuAuthor, Jun 12th at 5:11 PM

The_Teller As of 1.0.4, the trap damage is just flat damage which increases based on metal type as you suggest.

As for trapping the player, I did try what you propose, but as far as I know it doesn't work. There are two walk speed parameters the player has, one is a modifier added by armors, etc to slow the player down, which is just a multiplier. The other is the player's raw walk speed. However, when I tried setting the first to zero (or a low value) it only made the player kinda slow, but nowhere slow enough. Meanwhile setting the raw speed to zero simply did not do anything at all. Maybe I am doing something wrong, and If so, I would appreciate if a more experienced modder could point it out. Otherwise, we're stuck like this for now -.-

Edit: I have figured out how to do so. Expect an update soon.

Update: This is now in the mod.

💬 The_Teller, Jun 12th at 5:00 PM

I'm no coder so take what I say with a grain of salt. 

In order to trap the player would it be possible to decrease the players movement speed all the way down to zero (0) once the bear trap clamps down? In order to release the player they would need to look down and right click the trap, and if I'm not mistaken a string of code would need to be added to prevent it from clamping down again instantly. For instance on that checks if an entity is already on top of the bear trap when it's reset.

As for damaging the player, it could be just an initial flat damage which increases based off of metal type.

 

Again idk how to code nor how it looks like. This is just a concept.

💬 jayuAuthor, Jun 11th at 8:52 PM

Verlia I have attempted to properly trap the players for a long time before giving up and removing it. I did initially want to keep it as config option. If I figure out (or somebody can tell me) how to properly keep a player from moving, I will add that.

💬 Verlia, Jun 11th at 6:29 PM

Love this idea, will probably try it out later when I get a chance. As for players getting trapped, thought it was removed, would it be possible to re-add this effect for personal play? Such like a config file or something that says to turn it on or off?

💬 jayuAuthor, Jun 11th at 12:44 AM

@WickedSchnitzel fixed it. I rebalanced the trap damage and made it so that players don't get trapped inside, they only get hurt when it snaps. The trap is intended to be deadly. It is supposed to keep all trapped entities in place and damage them if they move. Unfortunately, I haven't yet managed to keep players from moving. I now changed it, but it used to only damage players if they moved, and by picking it back up or breaking it, they could break free. I left that behaviour there because I imagined it as the player losing an arm or a leg in the trap and then moving away, however I realise now that from a game design point of view it isn't optimal, so I changed it.

As for the tooltip, it's my bad. I hardcoded in the shift key while I should have checked for the player's sneak control.

💬 WickedSchnitzel, Jun 10th at 3:56 PM

Seems like the tool tip is always showing [ ]+ctrl+rmb, even if one has set the sneaking key to something else than ctrl. So we have to press ctrl+custom sneaking key+rmb
Is it intended, that a player is loosing HP while walking, after getting damaged by the trap, without a way to heal themselves? Is it deadly?

💬 OriginlessGamer, Jun 10th at 9:15 AM

Let's freaking go! Thanks mate, this is amazing🤩

💬 drakray, Jun 10th at 12:59 AM

Seems nice, adding it to my ~80 mods pack, will keep you posted if I crash when I get to metal ages :P

Thank you for your work :D

(edit comment delete)