Description

You prepared a special surprise for your guests, but they ignored your invitation? And now the gift is lying there, threatening to harm your friends and your financial state? Now you can carefully approach the package and pick it up so you could gift it to someone else.

Preview
[Anomaly 1.5.1] Defuse and pickup your planted explosives
Post comment Comments
morgannoor1991
morgannoor1991 - - 475 comments

nice idea i give you 10/10 but Who would even think of using this thing? i'm shocked i never thought any stalker would ever need to use landmine explosion !

Reply Good karma Bad karma+3 votes
Chool Author
Chool - - 137 comments

If you're questioning what's the point of using mines in the game, i'd say because it's just fun to plant a little surprise somewhere and then watch the fireworks going off as some clueless soul decides to step into the proximity range of the mines.

The IEDs are also pretty good against a lot of mutants, like bloodsuckers, pseudogiants and controllers. Just don't let pseudogiants or poltergeists throw the bombs towards you.

I also had a case when i set up a bedroll to sleep in a building, and planted an IED at the entrance doorway, and then i woke up to some loud noise and whatever was left from a squad of bandits trying to sneak up on me. Felt pretty great to outsmart the bastards.

Reply Good karma+15 votes
RSteve313
RSteve313 - - 5 comments

Well, they are very useful if, for example, you are attacked by a monolith army in Rostok, like 300 crazy's, they pass me, I kill them all and after 10 minutes they are back, (maybe this broken).

Reply Good karma Bad karma+3 votes
Guest
Guest - - 690,434 comments

I usually used the mines to blow up the Military Vehicles that Freedom wants me to do. Idk it just feels cooler imo. You set them all on 30 then you walk away as the explosions go off in the back. Epic style.

Reply Good karma Bad karma+2 votes
RamseySparrow
RamseySparrow - - 833 comments

I did, it’s useful and highly satisfying to lure fools into ambushes and traps, and can be a lifesaver.
Highly appreciated, hope you’ll find solution to the disappearing ones. Thx!

Reply Good karma Bad karma+2 votes
polishdude
polishdude - - 74 comments

Now I don't need to shoot my mines so that I don't accidentally trigger it

Reply Good karma Bad karma+6 votes
WeebSlav
WeebSlav - - 122 comments

Well this is great, but i don't really use the mines.

i'll try turning my hideout into a mine field to start on

Reply Good karma Bad karma+3 votes
LeForeigner
LeForeigner - - 15 comments

Some people find no use for mines, I just hate them.
This mod however is very useful, there's tons of uses for personal explosives in this game, the problem is remembering where they all are.

This game is like an endless walking simulation of attrition. I would personally only use explosives for dealing with bandits and Monolith. Maybe use one for sleeping in secluded locations for protection from random spawning enemies/bounty squads.

Reply Good karma Bad karma+4 votes
Unit-VII
Unit-VII - - 15 comments

This shouldn't have to be an addon but I'm so glad that it is. Thank you so much!

Reply Good karma Bad karma+5 votes
StronGV
StronGV - - 590 comments

Is it possible to remove physics from a lying explosive? So that all sorts of pseudogiants there would not knock her down with their stomp. It is also annoying when the burer throws your explosive package at you.

Reply Good karma Bad karma+2 votes
Chool Author
Chool - - 137 comments

I might look into making that an option if i find some code that allows freezing entities. However, i have a lot of work at the moment, and even the small amount of code i added to this script took me almost 2 days to figure out and test due to my lack of programming experience, so i give no promises.

Update:
Unfortunately, after spending some time on this, i couldn't find the solution for tthe problem.
I couldn't find any code that allows freezing entities, so i attempted to work around that by making the bomb teleport back to its original position every time it changed, but i couldn't make that idea work because no matter what code i added, it wouldn't compile.
Perhaps someone more experienced in this could take over this issue, but for now i will have to accept defeat on my side.

Reply Good karma+2 votes
StronGV
StronGV - - 590 comments

Perhaps you need to dig not in scripts, but in ltx files. Somehow you need to try to turn off the ragdoll in the lying explosives. Can try to change the class of the item?

Reply Good karma Bad karma+2 votes
Chool Author
Chool - - 137 comments

Among the files that mention the mines, the only one that seems meaningful is items_explosives_new_mines.ltx.
I think it describes the parameters of each mine, presumably their resistance to damage sources like guns, and their explosions.
However, i can't find much related to the way the item works in the world. There is a cform parameter, which is described as collision class by some other files, so perhaps its the one that might affect its movement. However, i don't know what other collision classes there are. Every other config file only mentions the same collision class "skeleton". I tried changing it to words like "static", "level", but it made no difference.

You can take a look at the code yourself if you like:
Pastebin.com

Reply Good karma+2 votes
IgorDolvich
IgorDolvich - - 62 comments

This is a great mod idea, good job bro! As someone who uses the proximity mines a lot, it's a nice change to be able to actually pick them back up if mutants end up avoiding minefields near my hideout lol

This is a hypothetical scenario I thought of, mainly from curiosity of how the script's logic works: For example, I plant a mine in Aprogrom Underground and return later, would the script still know to let me disarm it? I've never really tried leaving mines in a different map and returning later, so I don't know if this is even a thing the game recognizes.

Reply Good karma Bad karma+3 votes
Chool Author
Chool - - 137 comments

I just tested it myself by planting explosives in Truck Cemetery, moving to the Dark Valley, and then returning back to the Cemetery.
The explosives were still there and i was able to disarm and pick them up just fine.

However, i'm pretty sure the original script has a cleaning event(if i understand that correctly, it's there due to some integer limit of spawned entities), so at some point the mines might disappear no matter where you are.
I might look into adding an option to turn off or pause the cleaning event, but at the moment i am busy with a lot of personal work, so i give no promises.

Reply Good karma+2 votes
IgorDolvich
IgorDolvich - - 62 comments

That's awesome, No rush on anything! Thanks for the quick response too bratan. I'm pretty sure the clearing event is to help performance, so it's not a big deal in my opinion. I doubt anyone plans on planting 50 mines in the Underground anyways lol

Reply Good karma Bad karma+3 votes
StronGV
StronGV - - 590 comments

You can do like this, so that explosives do not detonate when a player approaches it?

Reply Good karma Bad karma+2 votes
Chool Author
Chool - - 137 comments

If you are asking, if it's possible to make the mines not require crouching to safely approach, you should be able to do it by
deleting or commenting out
"if IsMoveState('mcCrouch') then"
and the "end" that comes after "return"
in the generic_on_update function

I uploaded the edited file, in case you don't want to search for the lines of code that need changing:
Drive.google.com

Reply Good karma+1 vote
StronGV
StronGV - - 590 comments

No, I like your option for taking the blast pack in the squat.
I wanted you to add one more function to the code. So that the function checks who approached the explosives, the player or someone else. If the player, then ignored, if someone else, then explodes. So that there was no such thing when a player set explosives in the grass, and then accidentally ran past and baaahhhh :)))
If you force explosives to ignore the player, then even more room for maneuver will open up. For example, you can lure swarms of mutants to explosives. You probably understand how long it takes to install explosives, first you need to find it in your inventory, then right-click, especially while running away from the pseudogiant.

Reply Good karma Bad karma+2 votes
Chool Author
Chool - - 137 comments

Here you go, this script should ignore the player if they are walking or sprinting nearby, but defuse the bomb if they are squatting in the defuse range:

Drive.google.com

Reply Good karma+2 votes
StronGV
StronGV - - 590 comments

Thanks, I'll take a look tomorrow.

Reply Good karma Bad karma+2 votes
StronGV
StronGV - - 590 comments

Everything works as I wanted, thanks!

Reply Good karma Bad karma+2 votes
aitch-zed
aitch-zed - - 3 comments

Nice addition, but in my opinion, it would've been better if disarming required low crouch ("prone"), then it would've been harder to accidentally trigger it.

Reply Good karma Bad karma+2 votes
Chool Author
Chool - - 137 comments

To be honest, the original idea i had in mind was making the player press interaction key to defuse the bomb in any movement state.
However i couldn't manage to find any code that would allow me to interact with the bomb entity, so i just made the code check player's movement state and their range to the bomb.

I would add a file with the option you requested, but i don't know how to check for the prone state. The only function i know that checks player's movement state is function IsMoveState(), however
the _g.script file only contains these player movestates:

local actor_move_states = {
['mcFwd'] = 1,
['mcBack'] = 2,
['mcLStrafe'] = 4,
['mcRStrafe'] = 8,
['mcCrouch'] = 16,
['mcAccel'] = 32,
['mcTurn'] = 64,
['mcJump'] = 128,
['mcFall'] = 256,
['mcLanding'] = 512,
['mcLanding2'] = 1024,
['mcClimb'] = 2048,
['mcSprint'] = 4096,
['mcLLookout'] = 8192,
['mcRLookout'] = 16384,
['mcAnyMove'] = 15,
['mcAnyAction'] = 1935,
['mcAnyState'] = 6192,
['mcLookout'] = 24576,
}

The only code that mentions prone state is stuff like:

npc:animation == "prone"

Which only works with npcs, so i don't know what code can check player's prone state.

If you or anybody else find a way to check it, i will add that option. But at this time i just have no idea how to do it.

Reply Good karma+1 vote
GabeCPB0
GabeCPB0 - - 354 comments

Very nice! Thanks a lot!

Reply Good karma Bad karma+2 votes
MoerasGrizzly
MoerasGrizzly - - 58 comments

Excellent, always felt bad about leaving my explosives behind, especially after playing the (Surprisingly excellent) laws of war campaign for Arma 3.

Reply Good karma Bad karma+3 votes
AVEismaschine
AVEismaschine - - 264 comments

Right? Also APERS Mine Dispenser. The ultimate area denial.

Reply Good karma Bad karma+2 votes
aorushome
aorushome - - 221 comments

Thank you!

Reply Good karma Bad karma+2 votes
unwary
unwary - - 54 comments

Enhanced the immersion

10/10

Would spam traps and watch the mercs not show up in their roost on Wild Territory again

Reply Good karma Bad karma+2 votes
StalkerAnomalyPlayer
StalkerAnomalyPlayer - - 447 comments

Essential to use with the IED's and bombs, without this IMO they are pointless almost. They are now awesome deploy-able traps that can take down 3-5 man squads with ease. Rated 10/10!

Reply Good karma Bad karma+2 votes
Gri431
Gri431 - - 21 comments

Good job 10/10 Thanks !

I'm looking for an add-on that wouldn't allow me to eat in a helmet.Maybe it will be easy for you to do it?

Reply Good karma Bad karma+2 votes
Chool Author
Chool - - 137 comments

At this time i am too busy with work and education related projects, so i am unable to make more addons right now, sorry.

I have not played the game in a while, but i'm pretty sure that the food, drink and drug animations addon automatically removes helmet overlay whenever you are using consumables with animations while wearing a helmet, so if you are only looking for more immersion, that addon might give you what you need:

Moddb.com

Might not be exactly the thing you're looking for, but that's the only thing i could find to suggest to you, sorry.

Reply Good karma+3 votes
AVEismaschine
AVEismaschine - - 264 comments

No worries dude, even simple concept mods like this take hours to set up and upload. No rush, take your time. The community appreciates your work and time spent. Hope things go smoothly for you in the Big Land dude.

Reply Good karma Bad karma+2 votes
oozish
oozish - - 320 comments

Thank you...I use IED's vs. Monolith and to guard my sleep quarters if away from base. I like to set up in Limansk and make a little Base out of one of the houses while I collect loot in preparation for a big payday in Dead city. I've tripped on my own mines a few times, not a fun experience.

Reply Good karma Bad karma+2 votes
WeebSlav
WeebSlav - - 122 comments

I hope this still works for 1.5.2, I'll be back as soon as i have the chance test it, if someone hasn't done it first..

Update: Did a quick test and it seems to be working just fine, ill be running it and report back if something crashes.

Reply Good karma Bad karma+2 votes
Guest
Guest - - 690,434 comments

didn't work for me, but I'm using it mid game and not from a fresh game save =(

Reply Good karma Bad karma0 votes
BitoOblib
BitoOblib - - 249 comments

Still works for me, on top of latest Gamma, with an existing save.
I just don’t have an icon showing up when defusing, I don’t know what collide with that, but it still works nonetheless though. (It’s also solving an issue I had with explosives, so it’s even better than expected.)

Reply Good karma Bad karma+1 vote
Blockbuster999
Blockbuster999 - - 2 comments

Unfortunately this seems to crash my game setup. Any ideas where to start debugging this error?

FATAL ERROR

[error]Expression : abstract
[error]Function : CALifeSimulatorBase::spawn_item
[error]File : F:\ANOMALY BUILDS\xray-1.5.2 - UPDATE 2024.01.30\xray-monolith\src\xrGame\alife_simulator_base.cpp
[error]Line : 102
[error]Description : Cannot find item with section
[error]Arguments : nil

edit: the patch for this mod fixes it.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: