Jump to content
doctorsheep

Action Button Mod

Recommended Posts

edQRK9v.jpg

The Action Button Mod aims to move time critical actions to a simpler, quicker, and more efficient one button context sensitive interaction method.

Why?

It's simple, we kill the action menu. Or, at least offload time critical actions to a system that is easy to use under duress.

Who?

This is my first go at writing anything for the Arma series, let alone releasing a fully fledged addon. Please be patient as I figure out what I'm doing.

Features:

  • Get in specific vehicle seats (Armored vehicles follow this method of seating)
  • Drag things (Boxes, CSW, objects and gear on the ground)
  • Open backpacks/gear of dead soldiers/gear boxes/doors
  • Incremental opening of doors/hatches
  • Mount/dismount ladders
  • Light/extinguish fires
  • CBA keybinding menu integration
  • Options menu via CBA Fleximenu
  • Compatibility with Arma 2 assets

Known Problems:

  • Mounting short ladders can sometimes mount wrong position of ladder, teleporting the player to the top for example.
  • Dragged objects' angle resets in multiplayer
  • Trying to drag an object with Tactical Pace on will prevent the player from moving
  • Incrementally opening doors makes a lot of noise
  • Poor performance per frame
  • Standing right up against a ladder might result in the icon not being recognized and not being able to mount it
  • Certain A2 Community map buildings' doors don't respond properly to the commands required to detect and open doors
  • Things act strangely over water, luckily, it's rare for a player to be over water.

To Do

  • Optimization
  • Make it open to third party addon writers
  • Mines
  • Dismounting vehicles in the direction the player is looking at. (Similar to the ShackTac Littlebird Enhance Mod)
  • Rotate dragged objects
  • Respect locked vehicles and doors
  • Other key hold visualizations like a timer with numbers
  • Support for server forced settings

Concept of Operation

-While in mission, you can configure what key you use through the CBA Keybind Menu. Controls>Configure Addons>Action Button Mod. The default key is Space. Keep in mind that "Use Default Action" defaults to Space, you'll have to unbind it if you want to use the Spacebar.

-A single tap of the Action Button (<0.5 seconds by default) will perform most actions. Looking at a seat in a vehicle will put you in that seat, looking at a backpack or ammo box will open the gear menu, you can open doors and hatches as well.

-If you hold the Action Button for longer then 0.5 seconds while looking at a CSW, box, or gear you'll start dragging the respective object. You can also do a hold action to incrementally open doors and hatches using the scroll wheel. Ejecting from a vehicle is activated this way as well.

-There is an alternative method of operation available via the options menu (Ctrl+Alt+Shift+I by default) titled "Hold use timeout". With this deactivated the 0.5 second timeout is disabled so you can hold the Action Button to your heart's content and look at all of the pretty icons. When you release you will do a tap-use action. To do hold-use actions, hold the Action Button down and tick the scroll wheel in any direction.

-You don't have to be looking right at a specific icon to use it. The code will take at shot at "figuring out" what you want to do.

What gigantic flaw does this mod have?

At the moment, I don't have any way of finding the physical seat locations in any given vehicle in real time. Why do I need to know where all of the seats are? Having that info lets me draw icons on seats enabling precise seat selections. Look at the left bench seat? You get the left bench seat, instead of trying to guess with some proximity based weirdness. How am I getting around this right now you ask? I wrote a script that cycles a player through all of the seats in all of the vehicles in vanilla Arma 3 and records all of that data in a giant array. Any new vehicle packs/mods added later will have to be trained separately using this same method before they can be used. Either the player, the mod author, or myself would have to go through that process to make the units compatible. How do we solve this? I've put in this ticket requesting a new scripting command that would output the locations of all seats in any given vehicle. Pulling all of that data directly from the model is the most efficient solution.

Download: 26JUL15 v0.6 Requires CBA

Change log:

26JUL15

  • Updated to A3v1.48 .sqf file references for opening doors and hatches
  • Updated options menu to use the not-so-new-anymore CBA keybinding API.

15APR15

  • Slightly modified the position of icons relating to jet pilot seats to make them easier to hit.
  • Added checks for locked vehicles.
  • Added an eight segmented ring for indicating key hold time and relevant options.
  • Prevent a script error resulting from using the action button when there is nothing to action.
  • Prevent a script error when attempting to use the action button to dismount a vehicle you spawned in.
  • Add new version of the proof of concept background updating script. (This new version does not display icons in doorways due to a change in how we draw icons. HOWEVER, this new version is significantly more efficient.)
  • Implemented new CBA keybinding API
  • Added the ability for dragging and incremental opening to be disabled by admins. Logged in admins can use the actions in the ABM options menu to toggle these features on and off for players in the server. Additionally, the public variables "ABM_pub_enableDragging" and "ABM_pub_enableIncrementalDoors" can be set to false in conjunction with the publicVariable command to disable the respective features in mission scripts.

27Jan15

  • SIGNIFICANTLY improved interacting with dead units. Gone are the days of struggling to find the sweet spot on a dead unit just to access his gear. (If a WeaponHolderSimulated (a dropped weapon) is selected, we check for dead units within 5m. This should also prevent the player from getting the inventory screen containing only a weapon from the fallen unit)
  • Incremental opening of Takistan doors
  • Added support for aiming deadzone. Simply enable "Aiming deadzone support" in the "Toggle features" section of the options menu.
  • Selecting an FFV position already being used will move the player to the next available FFV/cargo position
  • Prevent players from mounting ladders through walls/glass
  • Added PROOF OF CONCEPT background drawing of icons and relevant settings. When enabled, transparent icons will display automatically when near objects you can interact with. Disabled by default. This is safe to use, but may cause a performance hit.
  • Fixed incremental opening on upper floors
  • Change to only allow accessing a unit's backpack in a 200 degree arc behind him.
  • Additional compatibility with Chernarus doors. (Specifically, dealing with using the Czech word "Dvere" on certain double doors instead of "Door".)
  • Improved handling of dragging items and preventing them from getting stuck underground.
  • Added provisions to prevent locality issues when a player tries to drag an object already being dragged by someone else
  • Added the ability to choose how you use the action button to dismount a vehicle. Tap, hold, or both.
  • Added an indicator when an action can't be performed or is rejected. For example, if there are no more available seats in a vehicle.

05Nov14

  • Support for Takistan building doors (Only directly selecting these doors works ATM, the memory point used for non direct selection doesn't exist in these models) (To-Do: Incremental opening of these doors)
  • Added support for new helicopters
  • Added support for vehicles that had FFV added to them (To-Do: Have FFV (turret) positions move the player into another open seat if occupied similar to how cargo seats behave)

25Oct14

  • Reworked the system that selects what object the player is wanting to interact with. (My oldest piece of code) This change mostly benefits doors and hatches. Previously, you would have to be looking directly at part of a building to interact with one of its doors. Now, a new system is used to check for objects within 5m that the player is aiming at. If that fails, a circle search expanding from the player will be used to look for nearby objects. In practice this means you wont have to be looking directly at what you want to interact with!
  • Provisions to prevent a player flying into the air if initiating a drag while on top of an object (Thanks to Elvis_FIN for reporting)(Source Engine? In my Arma?)(Side effect: Player will not be able to go if his people need him.)
  • Fixed a design flaw that would allow a player to incrementally open a door while out of range (Thanks to GiPPO for reporting)
  • Fixed a design flaw that would allow a player to open and close a door from another floor (Thanks to St. Jimmy for reporting)
  • Decreased the distance a player can open a door from 4m to 2m
  • Improved code that handles when the player/objects are over water
  • First implementation of disabling specific features of ABM (To Do: forced server settings)
  • Fix for script error when exiting a vehicle

19 Oct 14

  • Initial test release

How can you help?

If you run into any issues please post them here with steps to reproduce and video/screencaps if necessary. If you have any suggestions or feature requests feel free to post those, too.

Vote up these tickets: 0021237 0021238

Check out my MANW page.

Media

Edited by DoctorSheep

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

==================================================

You are not registered on Armaholic, or at least not that we are aware of. In the future we offer the possibility to authors to maintain their own pages.

If you wish to be able to do this as well please register on Armaholic and let me know about it.

This is not mandatory at all! Only if you wish to control your own content you are welcome to join, otherwise we will continue to follow your work like we have always done ;)

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Nice work dude, and a commendable effort training in all those vehicle seat positions!

---------

Chopper / Jet / Vehicle too loud to hear comms?

You need Cyprus Push-to-Hear!

Share this post


Link to post
Share on other sites

Dam the CBA keybinding doesn't let me to bind it in the Middle Mouse Button. Good first effort.

There seems to be little problem. If you're one level above a door you can still open the door below you. This is probably a problem with every building that have more than one floor.

I recommend to combine this with the Sakura's Keys addon. With both combined the action menu is pretty much dead!

Share this post


Link to post
Share on other sites

CBA keybinding system does not support mouse actions yet sadly, due to an inconsistency within engine.

Worst case scenario you could use your mouse software to bind middle mouse to a key set in the CBA keybinding options.

---------

Chopper / Jet / Vehicle too loud to hear comms?

You need Cyprus Push-to-Hear!

Share this post


Link to post
Share on other sites

Awesome release!! However I do have one request that you may want to consider...consider adding a module (or userconfig) to disable your drag system. The reason I say this is that there are already a ton of duplicate mods that all accomplish the same thing. As a server owner, it is incredibly aggravating when I have to choose between two mods because they have overlapping features which are hardcoded and I do not want my server to be filled with 3 or 4 different action menu systems which all do the same thing.

Share this post


Link to post
Share on other sites

New mod v0.1 available at withSIX. Download now by clicking:

@abm.png

@ DoctorSheep ;

Soon you will be able to manage the promo pages of your content on our web platform and publish new content yourself.

To do so, please hit 'this is me' button on the page while logged in and you will get connected to your work.

For now you can send new content or releases our way through withsix.wetransfer.com or add your notification at getsatisfaction.withsix.com.

Share this post


Link to post
Share on other sites

Just had a quick test with this and it is really nice. Found a couple of bugs tho:

- Could not enter the Merlin (Reskinned Mohawk helicopter), guess this might be due to the whole learning vehicles thing

- Dragging objects caused issues in combination with AGM. I think they use their own method for dragging

Also had some ideas:

- Holding the action button at a vehicle with inventory could open that inventory instead of entering.

- Would be nice to reduce the amount of options in the action menu once the action button gets more reliable. (Like SakuKeys does)

Once again nice work and i hope you find a way to determine seats in vehicles dynamically

Share this post


Link to post
Share on other sites

Cant you use the memory points to find the seat locations? Ask NouberNou for help, he has a similar WIP mod he showed.

Share this post


Link to post
Share on other sites
Cant you use the memory points to find the seat locations? Ask NouberNou for help, he has a similar WIP mod he showed.

it's not that simple. i made a proof of concept quite a while ago and i ended up hacking the main menu to run a mission that collects all the data from all the available vehicles. very ugly solution but best i could come up with. there's also a way to check lods for certain named selections using the "intersect" command afaik. that could work in realtime. not sure how fast/performance hungry it would be though.

@DoctorSheep: this is very close to what my personal proof of concept looks like. i really love it. simple and clean. if the 3d icon stuff is causing performance problems (should all work well in crowded MP too) you should consider sacrificing the visual aspect over a more simple commo rose setup or something. you can always do the precise get in stuff using the 3d positions rather than using the icons (not sure how you did it exactly).

Share this post


Link to post
Share on other sites
Cant you use the memory points to find the seat locations?

The seat locations aren't reported using any current scripting commands used to retrieve memory points. I believe it's because they are defined as "proxies" in the model. I don't know too much about modeling currently.

if the 3d icon stuff is causing performance problems (should all work well in crowded MP too) you should consider sacrificing the visual aspect over a more simple commo rose setup or something. you can always do the precise get in stuff using the 3d positions rather than using the icons (not sure how you did it exactly).

The underlying system uses all 3d coordinates and doesn't rely on the icons at all. They can be disabled in the options menu, and they only cause a fraction of a millisecond performance hit per frame so it's up to personal preference.

To everyone else: Thanks for the bug reports and feature requests. I'll look into all of them. (Disabling/forcing features especially)

Share this post


Link to post
Share on other sites

This looks great!!

Any plans on making clickable cockpits this way?

Maybe you could even implement the hidden animations in the vehicles like opening side doors in heli's. Could be great with the new fire-from-vehicle option.

Share this post


Link to post
Share on other sites

It seems to me the flaw isn't the seat locations but how to interact with the objects of your own inventory. Stuff like putting explosives, setting timers, etc.

Share this post


Link to post
Share on other sites

Getting some script errors, but I'm am so looking forward to this mod. Thanks.

Share this post


Link to post
Share on other sites
The seat locations aren't reported using any current scripting commands used to retrieve memory points.

[color="#FF8040"]heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos driver"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos codriver"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo lf"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo l"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo lr"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo rf"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo r"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo rr"[/color][color="#8B3E2F"][b];[/b][/color][/color]

Made with KK's SQF to BBCode Converter

I've also resolved your ticket on FT http://feedback.arma3.com/view.php?id=21237

Share this post


Link to post
Share on other sites
[color="#FF8040"]heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos driver"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos codriver"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo lf"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo l"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo lr"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo rf"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo r"[/color][color="#8B3E2F"][b];[/b][/color]
heli [color="#191970"][b]selectionPosition[/b][/color] [color="#7A7A7A"]"pos cargo rr"[/color][color="#8B3E2F"][b];[/b][/color][/color]

Made with KK's SQF to BBCode Converter]

FFV vehicles provide memory points for FFV enabled seats, yes. Other vehicles do not.

Share this post


Link to post
Share on other sites

Awesome mod! :) Our group is looking forward to things getting more stable but we are all looking forward to being able to use this as status quo!

Share this post


Link to post
Share on other sites

New Version: 25Oct14 v0.2

Changelog:

  • Reworked the system that selects what object the player is wanting to interact with. (My oldest piece of code) This change mostly benefits doors and hatches. Previously, you would have to be looking directly at part of a building to interact with one of its doors. Now, a new system is used to check for objects within 5m that the player is aiming at. If that fails, a circle search expanding from the player will be used to look for nearby objects. In practice this means you wont have to be looking directly at what you want to interact with!
  • Provisions to prevent a player flying into the air if initiating a drag while on top of an object (Thanks to Elvis_FIN for reporting)(Source Engine? In my Arma?)(Side effect: Player will not be able to go if his people need him.)
  • Fixed a design flaw that would allow a player to incrementally open a door while out of range (Thanks to GiPPO for reporting)
  • Fixed a design flaw that would allow a player to open and close a door from another floor (Thanks to St. Jimmy for reporting)
  • Decreased the distance a player can open a door from 4m to 2m
  • Improved code that handles when the player/objects are over water
  • First implementation of disabling specific features of ABM (To Do: forced server settings)
  • Fix for script error when exiting a vehicle

This will be the final release before MANW closes out. Please note: When the FFV vehicles go live with the Helicopter DLC you will be unable to use these vehicles properly with ABM. A new version will be released to remedy this ASAP after the DLC.

Share this post


Link to post
Share on other sites

I can't open the doors in takistan using this mod, i must scroll and use the good old menu. Any idea why ?

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

==================================================

You are not registered on Armaholic, or at least not that we are aware of. In the future we offer the possibility to authors to maintain their own pages.

If you wish to be able to do this as well please register on Armaholic and let me know about it.

This is not mandatory at all! Only if you wish to control your own content you are welcome to join, otherwise we will continue to follow your work like we have always done ;)

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

I still could open door from above in the air control tower but now you have to look for the icon. I also got me climb a ladder in the same building when I was up in the room with many windows looking at the stairs. I can post some video tomorrow.

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

×