Jump to content
diwako

[RELEASE] STALKER-like anomalies

Recommended Posts

Hey there,

this is somewhat of a side project of mine. I wanted to create a mission with stalker elements and searched for anomalies and didn't really find anything too useful. I decided to make them myself in the end and share them so people can use them as well. Plus put them on GitHub so the code is preserved AND that it might get updated by people besides me via pull requests.

 

This project is aiming to be compatible with the addons CBA and ACE. It should work in single and multiplayer. It tries to use as much vanilla content as possible, so this project can be implemented on mission basis and does not need any other addons (besides CBA and ACE).

 

Requirements:

  • CBA (Hard requirement)
  • ACE (soft requirement)

Hard requirement: Script cannot work without

Soft requirement: Some parts will not work or show up without it

(Burner effect will not show without ace right now)

 

Current features:

  • Anomaly detector script
  • Bolt throwing
  • Springboard anomaly
  • Meatgrinder anomaly
  • Electra anomaly
  • Burner anomaly
  • Teleport anomaly
  • Particle sources of idle anomalies that are too far away will not play
  • Anomalies do have a cool down period before before being active again

 

Usage:

The mission in the GitHub repo has everything set up to work. It is important that the function "anomaly_fnc_init" is called from withing init.sqf. Otherwise you will not be able see idle anomalies.

Spawning anomalies can be done with calling the following command either on all machines or on server.

[_pos] call anomaly_fnc_createMeatgrinder; //Meatgrinder
[_pos] call anomaly_fnc_createElectra; // Electra
[_pos] call anomaly_fnc_createSpringboard; //Springboard
[_pos] call anomaly_fnc_createBurner; //Burner
[_pos, _id] call anomaly_fnc_createTeleport //Teleport, _id is used to link teleports with matching _id's
[_pos, _radius, _isRectangle] call anomaly_fnc_createFog // create fog anomaly
[[_pos, _radiusA, _radusB, _andlge, _isRectangle],_howManySpringboards,_howManyElectras,_howManyBurners,_howManyMeatGrínders] call anomaly_fnc_createAnomalyField // create anomaly field with randomly placed anomalies

Anomaly detector can be enabled in Ace self interaction -> Equipment. If Ace inter actions is not installed, then it will be an add action (mouse wheel).

 

Some Media:

Springboard

https://i.imgur.com/ftjEsdN.gifv

 

Meatgrinder

https://i.imgur.com/a25OGBs.gifv

 

Electra

https://i.imgur.com/SicHdcp.gifv

 

Burner

https://steamuserimages-a.akamaihd.net/ugc/902274230650430383/D9E7D3937D4A7167E90198F29F1F348EC31DB88D/

 

Teleport

https://i.imgur.com/C84EIBI.gifv

https://i.imgur.com/eEBL8Zb.gifv

 

Fog

https://steamuserimages-a.akamaihd.net/ugc/912422351864279847/74FA084ACE8A8F585E0827E09C7C8FD7686E82D5/

 

 

 

Download

 

Steam workshop (Mod version)

https://steamcommunity.com/sharedfiles/filedetails/?id=1383903166

 

Armaholic - !Out of date!

http://www.armaholic.com/page.php?id=33602

 

I hope you like and use them. I also hope for people contributing 😉

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

cool idea, i'll check these out, haven't played with armaSTALKER much yet but this should add some nice atmos :D

  • Like 1

Share this post


Link to post
Share on other sites

Just pushed an update

 

  • Added burner anomaly
  • Sprinboards now have idle sounds
  • Anomaly particles are now rendered according to your camera position and not your player position (for zeus and spectator support) (respawn support is still not in ¯\_(ツ)_/¯)
  • Some small bugfixes here and there
Spoiler

D9E7D3937D4A7167E90198F29F1F348EC31DB88D

 

  • Like 1

Share this post


Link to post
Share on other sites

The meat grinder looks awesome ha. Good work! :dontgetit:

Why do you use CBA as requirement? Is it for ease of use or does CBA have something that vanilla can't offer?

Share this post


Link to post
Share on other sites
2 hours ago, HazJ said:

The meat grinder looks awesome ha. Good work! :dontgetit:

Why do you use CBA as requirement? Is it for ease of use or does CBA have something that vanilla can't offer?

 

Ease of use and teleport anomalies are using CBA's hashmap internally. Right now, with all the anomalies added I wanted in the first place, I will be revising and refactoring some code now. And I will be using CBAs "currentUnit" functionality to add zeus support and remote controlled units. Normally I would do all that with the "ace_player" object, but I want to remove ace form the requirement list. So, I need to recreate the flame particle effects at some point.

 

Besides, CBA really became something that is run along side Arma when playing multiplayer or with mods. Well, at least for me.

Share this post


Link to post
Share on other sites

I am very impressed and excited at the same time;). I wanted to do a science fiction mission precisely. Thanks for the job ;)

Is it available in the workshop?

Share this post


Link to post
Share on other sites
28 minutes ago, RedBelette said:

I am very impressed and excited at the same time;). I wanted to do a science fiction mission precisely. Thanks for the job ;)

Is it available in the workshop?

Not really fond of uploading scripts to the workshop as it is not a mod. In order to upload a script to the workshop you'd need to put in a mission and then upload the PBO to it. Imo it is annoying to get the pbo and then extract it, just to get the script. Sure it will help with exposure, but this script really isn't beginner friendly as it uses compiled scripts rather then scripts being called via execVM or precompile at mission start.

 

Of course you can correct me on this, but for now I do not really want to use the workshop because of what I just said and my plans on refactoring scripts for next update.

Share this post


Link to post
Share on other sites

Just pushed an update:

  • Added a small showcase in mission file
  • Added vehicle support!
  • Fixed missing script file to spawning springboards

Vehicle support is now in! It is based on what kind of vehicle and how heavy it is.

 

Examples:

A tracked vehicle driving into a burner will not lose its tracks, but a wheeled vehicle will. Both vehicles will take some engine damage because of the heat.

A vehicle weighing more then 10 Tons will not be thrown away by a springboad, but a lighter vehicle will.

Teleporters will only teleport vehicles weighing less then 10 Tons.

Electras will disable a vehicles engine temporary and damage the engine in the process.

Lighter vehicles will be sucked into a Meatgrinder and receive hull damage. Heavier vehicles will not be affected by the Meatgrinder.

 

Meatgrinder sucking in an M-ATV:

https://i.imgur.com/cIIhZ9O.gifv

 

Share this post


Link to post
Share on other sites

Thanks for the answer, I will use the script and give you feedback. I have little time at the end of the year but probably in early January.

Share this post


Link to post
Share on other sites

Hello @diwako !

 

Nice job on this script! :)

I need one thing....anomalies works perfect but damage not work in MP....

 

Any idea why?

(i have CBA_A3 only+Ravage mod)

 

Thanks for answer.

Share this post


Link to post
Share on other sites
16 hours ago, bombajack said:

Hello @diwako !

 

Nice job on this script! :)

I need one thing....anomalies works perfect but damage not work in MP....

 

Any idea why?

(i have CBA_A3 only+Ravage mod)

 

Thanks for answer.

Thank you,

Normally there should be support for damage without ACE enabled. I also have taken a look into the code on why that might happen. Turns out it is a rookie mistake, really. I will be doing an update some time later with more then just this fix. For now you can look into scripts\anomalies\ and open up the sqf files starting with "fn_activate". In there just search for 

(!isNil "ace_medical_fnc_addDamageToUnit")

And edit the else case from e.g.

_x setDamage _dam + 0.5;

to

_x setDamage (_dam + 0.5);

 

Right now the error seems it is applying the units current damage to itself again and does not add to it. Putting brackets around that should apply it. If not feel free to tell me, as I currently have a a lot to do in real life I have little time right now to work on this project.

 

On a side node. I also have started to work on a stalker mission in my little free time and could gather some interesting ideas and use cases out of it. Next update will contain some bug fixes and new features like Zeus (with Ares/Achilles) support, being able to delete Anomalies, and some tweaks to cool down times to anomalies.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Just pushed an update before I have to leave for 2 weeks and cannot work on anything. So please let me know if you find something that is not working correctly.

 

Changes for 1.4:

-Added Zeus Ares/Achilles support
-Added feature to delete anomalies
-General nil exception fixes
-fixed players not taking damage without ACE medical present
-reduced cool down time for all anomalies
-added feature to check if an item is present in a units loadout (used for anomaly detector)
-anomaly detector feature can now be set up to require an item present in a units loadout. Can be set in init.sqf. empty string means no item needed.

 

Download:

https://github.com/diwako/stalker_anomalies

 

 

And  a sneak peek for an upcoming feature. Right now it is too buggy to be included.

https://i.imgur.com/eGhYFql.gifv

https://i.imgur.com/u8bYVpD.gifv

Share this post


Link to post
Share on other sites
Quote

-anomaly detector feature can now be set up to require an item present in a units loadout. Can be set in init.sqf. empty string means no item needed.

 

Hi.

After death in MP i lost anom.detector.Ok.But how can i set in init.sqf loadout back an.detector?Im really noob in scripting..sry.

 

Thank you

Share this post


Link to post
Share on other sites
1 hour ago, bombajack said:

 

Hi.

After death in MP i lost anom.detector.Ok.But how can i set in init.sqf loadout back an.detector?Im really noob in scripting..sry.

 

Thank you

I may have worded it a bit poorly. I do mean the file "fn_init.sqf" in scripts/anomalies. There you can set up a class name if you want people to have a certain item to able to use the anomaly detector.

 

If you have not set up anything then you should have the ability to turn the detector on and off without needed a specific item. The current problem that I am seeing here is you losing the detector up on death all together.

 

It looks like I forgot to check this without ace enabled. The addActions (Scroll wheel menu) entry will be lost upon death and respawning. This is definitely a bug and I need to fix this. I was planning on either working today or on Friday on this again as I do have a little time then.

 

I am currently at work and cannot really fix this now, but you can add this to your initPlayerLocal.sqf as a quick fix. It will add the actions back upon you respawn.

player addEventHandler ["Respawn", {
	player addAction ["Enable anomaly detector", {
		ANOMALY_DETECTOR_ACTIVE = true;
		[] call anomalyDetector_fnc_detector;
	},nil,0,false,true,"","!ANOMALY_DETECTOR_ACTIVE  && [player, ANOMALY_DETECTOR_ITEM] call anomaly_fnc_hasItem"];
	player addAction ["Enable anomaly detector", {
		ANOMALY_DETECTOR_ACTIVE = false;
	},nil,0,false,true,"","ANOMALY_DETECTOR_ACTIVE"];
}];

 

 

Oh no, it used my gmail login and not my regular one....

Share this post


Link to post
Share on other sites
3 hours ago, diwako Kilian said:

I may have worded it a bit poorly. I do mean the file "fn_init.sqf" in scripts/anomalies. There you can set up a class name if you want people to have a certain item to able to use the anomaly detector.

 

If you have not set up anything then you should have the ability to turn the detector on and off without needed a specific item. The current problem that I am seeing here is you losing the detector up on death all together.

 

It looks like I forgot to check this without ace enabled. The addActions (Scroll wheel menu) entry will be lost upon death and respawning. This is definitely a bug and I need to fix this. I was planning on either working today or on Friday on this again as I do have a little time then.

 

I am currently at work and cannot really fix this now, but you can add this to your initPlayerLocal.sqf as a quick fix. It will add the actions back upon you respawn.


player addEventHandler ["Respawn", {
	player addAction ["Enable anomaly detector", {
		ANOMALY_DETECTOR_ACTIVE = true;
		[] call anomalyDetector_fnc_detector;
	},nil,0,false,true,"","!ANOMALY_DETECTOR_ACTIVE  && [player, ANOMALY_DETECTOR_ITEM] call anomaly_fnc_hasItem"];
	player addAction ["Enable anomaly detector", {
		ANOMALY_DETECTOR_ACTIVE = false;
	},nil,0,false,true,"","ANOMALY_DETECTOR_ACTIVE"];
}];

Thanks so much diwako! :)

Have one more question about anomalies...Is posssible do random spawn anomaly (possible select type)  around player (X meter)?Because for my survival map need too many coordinates for spawn anomaly..

Thank you !

3 hours ago, diwako Kilian said:

 

Oh no, it used my gmail login and not my regular one....

 

Share this post


Link to post
Share on other sites
6 minutes ago, bombajack said:

Have one more question about anomalies...Is posssible do random spawn anomaly (possible select type)  around player (X meter)?Because for my survival map need too many coordinates for spawn anomaly..

 

 

A system like this is not implemented or planned so far. In my own mission I am currently using a system which spawns in and out anomalies on a fixed location marked with a marker. I might implement something like this for future use, but this won't happen for at least 2 months. Right now my focus is in adding bolt throwing and fixing existing code before adding some new feature.

Share this post


Link to post
Share on other sites
4 minutes ago, diwako said:

 

 

A system like this is not implemented or planned so far. In my own mission I am currently using a system which spawns in and out anomalies on a fixed location marked with a marker. I might implement something like this for future use, but this won't happen for at least 2 months. Right now my focus is in adding bolt throwing and fixing existing code before adding some new feature.

Spawn on marker is cool too! :) Can you tell me how can i do it? ;) I dont know how executed type of anomaly on marker...Thx so much!

Share this post


Link to post
Share on other sites
1 minute ago, bombajack said:

Spawn on marker is cool too! :) Can you tell me how can i do it? ;) I dont know how executed type of anomaly on marker...Thx so much!

I cannot give you a code example right now, but here is the general run down

Place invisible markers around an area you want to fill with anomalies. Name them what ever you want,. but they have to have the same start and a different number at the end, example: "loc_anomaly_1", "loc_anomaly_2", "loc_anomaly_3" and so on 

Place a trigger which is repeating and server only and activates if any player is present.

Up on activation create a an empty global array. Create a for loop and iterate over a number beginning with 1 and ends with the last number of your placed down markers.

Create anomalies based on the markerposition (see getMarkerPos) and add them to a global array (see pushBack).

Up on deactivation of that trigger just call the delete anomaly function with the global array as parameter

 

This should be relatively easy to do.

  • Sad 1

Share this post


Link to post
Share on other sites

Bolt throwing is now in. If you have ACE mounted it is in self interact -> equipment. If you are not using ACE it is a scroll wheel action

 

Changes for 1.5:

-Bolt throwing has been added
-fixed actions disappearing upon respawn when not using ACE

 

Download:

https://github.com/diwako/stalker_anomalies

  • Thanks 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×