Jump to content
brians200

Standalone JTAC Script

Recommended Posts

Hello,

 

I am here to release my standalone JTAC script for mission makers to use freely in their missions. What this script does is allow players to call in air strikes, artillery strikes, and a few other things without having to have a bunch of other players controlling helicopters, airplanes, and artillery vehicles. I have found this to be useful on servers with a small number of players and on missions where you don't want certain vehicles to be freely available.

 

How does it work:

The script works by adding a JTAC menu option to players who have the JTAC flag enabled. The player then needs to use a laser designator to aim the rounds they wish to fire from the drop down. The more powerful the round, the longer they will have to aim. The rounds will be delivered and the JTAC guns will go on a global cool down. The more powerful the round, the longer they will have to wait before being able to fire anything again. This will force the player to make smart choices about when and what to fire or suffer the consequences when the guns aren't ready and they could really use it. If there is more than one JTAC player, they will have to coordinate, because they share the global cool down.

 

What can the JTAC player fire:

The JTAC player will have a diary entry added to their map explaining all of the possible fire missions they can request. Each of the fire missions have their own accuracy, target acquisition time, reload times, and number of rounds fired.

 

The current available options are below. Videos are speed up for the sake of brevity.

  • Explosive Bullets
    • 20mm
    • 20mm HE
    • 30mm HE
    • 40mm HEDP
    • 40mm HE
  • Shells
    • 82mm AMOS
    • 120mm HE
    • 155mm AMOS
    • 155mm CLUSTER
  • Strafing Run
    • 20mm - 50 meter run
    • 20mm - 100 meter run
    • Dagger - 50 meter run
    • Dagger - 100 meter run
    • Shrieker HE - 50 meter run
    • Shrieker HE - 100 meter run
  • Bombs
    • 250 lb SDB
    • 500 lb GBU12
    • 580 lb CLUSTER
    • 750 lb CLUSTER
    • 1100 lb CLUSTER
    • Cruise Missile Cluster
  • Rocket Barrage
    • 84mm MAAWS 44 HE
    • Vorona 130mm HE
    • 230mm HE
    • Cruise Missile
  • Guided Missiles
    • Titan AT
      • Missile will automatically track to where your laser designator is pointing
    • Titan AT FnF
      • Fire and forget missile that automatically tracks vehicles.
  • Mines
    • APERS Mine
    • APERS Bounding Mine
    • APERS Mix
    • Anti-Tank Mine
    • SLAM Directional Mine
    • Anti-Vehicle Mix
    • Clear Mine Field (Demine)
  • Smoke
    • Signaling smoke
      • White
      • Blue
      • Green
      • Orange
      • Purple
      • Red
      • Yellow
    • Smoke clouds
      • Small
      • Medium
      • Large
  • Night
    • Flare cloud - for lighting up the night over a target
    • Chem lights - for lighting up the ground around a target
    • Strobes - For marking a target with strobes
    • Night Signal - A mixture of smoke and chem lights for signaling at night.

 

How do I call in attacks using the map?

 

 

 

The code:

The script files and a sample mission can be found here:

https://github.com/Brians200/EPD-JTAC/releases/tag/v1.6

The code can also be found here:

https://github.com/Brians200/EPD-JTAC

 

How to use:

Copy the EPD folder to your Mission Folder

In the server's init.sqf, add the following:

call compile preprocessFileLineNumbers "EPD\VirtualJTAC\init.sqf";

Copy the following into your Description.ext

class CfgNotifications
{
	class JtacReloadNotification
	{
		title = "JTAC";
		iconPicture = "a3\ui_f\data\gui\cfg\communicationmenu\call_ca.paa";
		iconText = "1";
		description = "%1";
		color[] = {0.153, 0.933, 0.122, 1};
		duration = 5;
		priority = 0;
		difficulty[] = {};
	};
}

 

On each of the players you want to have JTAC abilities, add the following:

this setVariable ["JTAC",true];

How to configure the script to your liking:

 

This script contains settings that a mission maker can change located in the well documented jtacsettings.sqf file.

 

Attacks can be added/removed and modified in the EPDJtacAvailableAttacks array.

Reload settings can be adjusted in the EPDJtacReloads array.

Missile failure chance can also be adjusted.

 

Media:

 

Screenshots:

Screenshots of using this script aren't super exciting, but here are some anyways.

4B60tH2.jpg

 

B5ez9m9.jpg

 

Change Log:

V1.1

  • Replaced RPG-42 75mm HE with 84mm MAAWS 44 HE.
  • Bombs are no longer spawn overhead and drop straight down. Now they are spawned about 4km and glide in.
  • Missiles are no longer spawn overhead and fire straight down. Now they are spawned about 4km away and fly in.
  • 155mm CLUSTER is no longer spawned overhead and is shot in like the rest of the shells.
  • Bullets, Grenades, and Shells now spawn about 2.2km away, up from 1km away, to give them more time to fly in. (pre requisite work for have a tracer effect)
  • Fixed logic with new players resetting the reload timer to 0.

V1.2

  • Added global cooldown and acquisition modifiers.
  • Fixed JIP not having the JTAC menu.
  • Added the ability to create mine fields.
  • Added the ability to destroy mine fields.
  • Added support for drones to call in fire missions.
  • Swapped BIS_fnc_MP with remoteExec.

V1.21

  • Fixed bug where none JTAC players can access the JTAC menu by using a UAV. (Thanks schweyer and bigshot!)

V1.3

  • Cleaned up code
  • Simplified settings menu
  • Added guided missiles with two firing modes
    • Follow the laser
    • Fire and forget vehicle tracking
  • Added two failure modes for the guide missiles
    • Loss of tracking
    • Unplanned rapid disassembly

V1.31

  • Slight optimization
  • Change rectangular inaccuracy to circular inaccuracy as originally intended.

V1.4

  • Player can choose which direction the projectiles are fired from
  • Strafing runs have been added
  • Each attack category now has its own independent reload timers.
    • There is a short reload timer to simulate a vehicle turning around and reacquiring the target.
    • After several shots in the category a long reload timer is triggered to simulate the vehicle returning to base to rearm.
  • Added reloaded notification
  • Fixed UAVs being unable to call in guided missiles
  • The grenades category has been removed and a couple of options moved to the bullets category.
  • Code clean up and optimizations.

V1.41

  • Added option for the JTAC player to check how much time is left on each of the reload timers.

V1.5

  • Separated nonlethal attacks into smoke and night attacks.
  • Added more smoke attacks for signaling and concealment.
  • Added more documentation to the diary for the JTAC user to read.

V1.6

  • Added the ability to call in firemissions using a map.

 

Please enjoy and let me know your feedback!

  • Like 10
  • Thanks 3

Share this post


Link to post
Share on other sites

can you make addon version of this mod ? for example if you equip UAV Terminal , you can acces to jtac menu..

  • Like 2

Share this post


Link to post
Share on other sites
14 minutes ago, sammael said:

can you make addon version of this mod ? for example if you equip UAV Terminal , you can acces to jtac menu..

Now that would be cool.

Share this post


Link to post
Share on other sites

I will see if I can make this compatible with add ons.

 

As an aside, does anybody know how to get the location of the Laser Marker that commanders can use in some vehicles? The following command only gives me <NULL-object>

laserTarget vehicle player

 

I've even tried using the commander command to no avail.

Share this post


Link to post
Share on other sites

Awesome Script.

 

Would be nice to make a lobby param so you can adjust the reload and acquisition time, depending on how many JTACs, etc.

  • Like 1

Share this post


Link to post
Share on other sites

You can adjust the cool down by changing the second number next to each firemission in this file. The number is in seconds

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/jtacsettings.sqf#L51-L84

 

Can you explain more how this lobby param would work? Should the time get multiplied by the number of jtacs or what?

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, brians200 said:

how to get the location

 

Might this help ?

so if you are , inside the vehicle , assign as commander ,  then  to check the enemy  you can use :

_target = cursorTarget;
_displayname = getText (configFile >> "cfgVehicles" >> typeOf _target >> "displayname");
_information =  format ["%1",_displayname]; 

 

  • Like 1

Share this post


Link to post
Share on other sites
21 hours ago, brians200 said:

You can adjust the cool down by changing the second number next to each firemission in this file. The number is in seconds

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/jtacsettings.sqf#L51-L84

 

Can you explain more how this lobby param would work? Should the time get multiplied by the number of jtacs or what?

I actually want a shorter reload time as default , which I can adjust in the script. Then each additional JTAC would double or 1.5x the time it would add to the reload. So if, 3 JTAC where playing it would take 3-4.5 times longer to reload your assets. I do like the idea of this also working with who ever had a UAV terminal or laser designator.

 

i also use this script a lot for support in game.

 

  • Like 1

Share this post


Link to post
Share on other sites
On ‎8‎/‎6‎/‎2018 at 11:20 PM, brians200 said:

You can adjust the cool down by changing the second number next to each firemission in this file. The number is in seconds

https://github.com/Brians200/EPD-JTAC/blob/master/EPD/VirtualJTAC/jtacsettings.sqf#L51-L84

 

Can you explain more how this lobby param would work? Should the time get multiplied by the number of jtacs or what?

 

 

Maybe try this?  _designatedPos = position laserTarget player;  https://community.bistudio.com/wiki/laserTarget

 

Brian I am also working on a script involving the USS Freedom AI taking off and landing. I finally got it working again. Would you be able to use this in with your Jtac script? I've still got things I'm working out, but was going to use it to make a support type script for Missions off the Freedom and Liberty. Time probably will not be kind to me. lol anywho same offer I make to others. if you need help give me a shout. If I can I will. :)

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
21 hours ago, mikey74 said:

Brian I am also working on a script involving the USS Freedom AI taking off and landing. I finally got it working again. Would you be able to use this in with your Jtac script? I've still got things I'm working out, but was going to use it to make a support type script for Missions off the Freedom and Liberty. Time probably will not be kind to me. lol anywho same offer I make to others. if you need help give me a shout. If I can I will. :)

 

Absolutely Mikey. Should be relatively simple for me to give you a location to go attack. You would just have to give me the code and I can put an example of how to add it to the jtac menu

Share this post


Link to post
Share on other sites

I have updated this script.

 

V1.1

  • Replaced RPG-42 75mm HE with 84mm MAAWS 44 HE.
  • Bombs are no longer spawn overhead and drop straight down. Now they are spawned about 4km and glide in.
  • Missiles are no longer spawn overhead and fire straight down. Now they are spawned about 4km away and fly in.
  • 155mm CLUSTER is no longer spawned overhead and is shot in like the rest of the shells.
  • Bullets, Grenades, and Shells now spawn about 2.2km away, up from 1km away, to give them more time to fly in. (pre requisite work for have a tracer effect)
  • Fixed logic with new players resetting the reload timer to 0.

 

The script files and a sample mission can be found here:

https://github.com/Brians200/EPD-JTAC/releases/tag/V1.1

The code can also be found here:

https://github.com/Brians200/EPD-JTAC

 

Future plans:

  • Adding more settings for map makers (global Cool down modifiers, global acquisition modifiers, etc)
  • Mine fields
  • Making the script work with UAV and Vehicle commander seats that have lasers.

 

 

  • Like 2

Share this post


Link to post
Share on other sites

There was a typo in my release earlier, causing bombs to not work. I have corrected it and updated the code on the same link. I am going to leave the version numbers the same.

Share this post


Link to post
Share on other sites

I have updated the script to v1.2

 

A note on the UAVs. If your laser designator is turned on at the same time as your drone's laser, your handheld laser will be used. At the same time, if your drone's laser is on and you aren't actively controlling it, you can still have the drone call in a fire mission where ever it is aiming.

 

Also I am interested in your thoughts on the new mine fields. Are there too many mines? Are they too big? Is the demining too powerful?

 

V1.2

  • Added global cooldown and acquisition modifiers.
  • Added support for drones to call in fire missions when controlled by JTAC operators.
  • Added the ability to create mine fields.
  • Added the ability to destroy mine fields.
  • Swapped BIS_fnc_MP with remoteExec.
  • Fixed JIP not having the JTAC menu.

 

The script files and a sample mission can be found here:

https://github.com/Brians200/EPD-JTAC/releases/tag/V1.2

The code can also be found here:

https://github.com/Brians200/EPD-JTAC

Share this post


Link to post
Share on other sites

Hi...I've added this script to my mission...it's wonderful for stationary targets, nice job!

I was wondering...is there anyway to get the missiles to track & destroy a MOVING target that im locked onto or lasing (using drone or designator)?

Share this post


Link to post
Share on other sites

Mod is great, one issue though. Players without this setVariable ["JTAC",true]; in there init can still access JTAC through a drones laser, and possible other vehicles as well.

Share this post


Link to post
Share on other sites

Perhaps somehow the variable set true because you have this line of code in the missions init file?

Either that or maybe you have another JTAC variable being true within the mission somehow.

 

I don't believe there's a way for the script to actually run/init without that variable being true. Although maybe it has something to do with it being a public variable?

Share this post


Link to post
Share on other sites
On 11/9/2018 at 5:00 PM, bigshot said:

I was wondering...is there anyway to get the missiles to track & destroy a MOVING target that im locked onto or lasing (using drone or designator)?

:yeahthat:

 

Awesome script man...just one thing: how do I set the available ammo type, so for instance I only want the player to have only 2 bomb available to choose from, 2 shells and so on.... 

 

Thank you.

 

EDIT: Nevermind... I dig into the jtacsettings.sqf and " // " the unwanted ordnance/bombs. If anybody want to cut out a whole category, "BULLETS" for example, go to "jtacfunctions.sqf" and change to FALSE the appropriate line.

i/e:

     

Spoiler

_bulletsCount = count _bullets;
    JtacBulletMenu = [["JTAC Bullets", false]];
    for "_bulletsI" from 0 to _bulletsCount -1 do {
        private ["_currentBullet", "_innerExpressionString"];
        _currentBullet = _bullets select _bulletsI;
        _innerExpressionString = format ["[%1, %2,'[", _currentBullet select 1, _currentBullet select 2] +
                                "%1, " +
                                format["%1", _currentBullet select 4] +
                                format["] call %1;'] call CLIENT_REQUEST_PERMISSION_TO_FIRE;", _currentBullet select 3];
        JtacBulletMenu set [_bulletsI + 1, 
            [_currentBullet select 0, [_bulletsI + 2], "", -5, [["expression", _innerExpressionString]], "1", "1"]
        ];

 

 

  • Like 1

Share this post


Link to post
Share on other sites

@bigshot You can even do it in his sample mission. Load it in the editor remove this setVariable ["JTAC",true]; from the player, play it, open uav terminal, load the darter for example the JTAC menu is there and is operational.

Share this post


Link to post
Share on other sites

well it might be because in his mission he has the jtac init file being pre-processed before he makes the jtac variable true (which you think would work correctly (but it doesnt i guess).

If you make sure to make the variable true BEFORE you run or preprocess the jtac init file then it works I think. This is how ive set it up in my mission.

 

I made it so that I have to buy/unlock JTAC as an ability from a menu...when the player unlocks it from the menu (acts like a trigger of sorts), then I make JTAC=true, and THEN i have it run the jtac init file. Try it that way and see if it helps.

Share this post


Link to post
Share on other sites

Sorry for the absence, I have fixed the bug with players in a UAV being able to access the JTAC menu.

 

@schweyer, can you tell me what other vehicles you saw it in so I can make sure I fixed it everywhere?

 

I will look into making guided missiles work, but it might be a little while with my availability.

 

V1.21

  • Fixed bug where none JTAC players can access the JTAC menu by using a UAV. (Thanks schweyer and bigshot!)

https://github.com/Brians200/EPD-JTAC/releases/tag/V1.21

  • Like 1
  • Thanks 1

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

×