Advanced Crosshairs, Hitsounds, and Hitmarkers (also known as: "Advanced Crosshairs and Hitmarkers", "Advanced Crosshairs", or simply "ACH") is a mod that adds the capability to display custom reticles, and visual/auditory feedback upon hitting an enemy, as well as making it relatively simple for users to add their own crosshairs, hitmarkers, and hitsounds.
Compatible with TdlQ's Enhanced Hitmarkers, in case you wanted to use the non-hitmarker aspects of ACH while also using TdlQ's Enhanced Hitmarkers.
Dependencies/Requirements:
- SuperBLT is REQUIRED
- BeardLib is REQUIRED
- ColorPicker is needed to change crosshair/hitmarker colors in settings, but is not required for ACH's main functionality.
Features:
Crosshairs
- Customize crosshairs by weapon type/firemode
- ...or use one crosshair for all weapons
- Customizable image
- Bloom (cosmetic, does not reflect weapon accuracy due to the lack of bloom)
- Dynamic Color: Crosshair can optionally change color based on targeted unit (eg. red when aiming at enemies, blue when aiming at teammates, green at civies, etc; these colors can also be customized*)
- Compatible with all custom weapons
Hitmarkers
- Can display animated hitmarkers
- Can display hitmarkers in the world space, similar to GTFO
- Customizable hitmarker image for hits versus kills
- Customizable hitmarker colors* for headshots, crits, kills, nonlethal hits, or combinations thereof
Hitsounds
- Customizable hitsound for headshots, crits, kills, nonlethal hits, or combinations thereof
- Customizable volume
General
- Modular features- you can choose to disable Hitsounds, Hitmarkers, or Crosshairs, or keep any combination of these features enabled, as you like
- Add-on support for custom crosshairs, hitmarkers, or hitsounds- make your own!
- sooper secret april fool's joke
*All color customization options require ColorPicker to change specific colors
Known Issues (and possible solutions):
- Crosshairs sometimes do not reappear after respawning from custody [status: tentative fix implemented in r40]
- Crosshairs will sometimes become permanently misaligned until the game is restarted, if the "Crosshair Shake" option is enabled. [status: under investigation]
- Dragging the Hitsound volume sliders with the mouse results in sounds stacking once per frame at hideously loud volume. Users are strongly advised to enable the hitsound limit setting, use the arrow keys to adjust the volume slider instead, or use BeardLib's right-click feature for exact values.
- Poison and Fire damage may not reliably activate hitmarkers or hitsounds, depending on whether or not you are host. This is due to the way that networking code is done in PD2. [status: no fix planned]
- Some users report that hitsounds do not work in VR. [status: testing needed]
- Some users report issues running ACH on Linux. [status: testing needed]
Addons:
Here is a list of every ACH addon of which I'm currently aware. (I periodically update this list by hand.)
Feel free to add yours to this list, or message me to add it on.
https://github.com/offyerrocker/PD2-AdvancedCrosshairs/wiki/List-of-Addons
You can also search ModWorkshop mods for the keyword (ACH) (or similar keywords) in order to find addons for ACH.
For a tutorial on creating addons, see the GitHub wiki link below.
FAQ:
Spoiler!
- Q: Does this work with the Motion Dot option included in PAYDAY 2's Accessibility Options?
- A: Yes- this mod does not interact or interfere with the Motion Dot option at all. You may enable or disable the motion dot, or this mod's crosshairs, at your own preference.
-
- Q: I found a bug! What do I do?
- A: Report it to me! Leave a comment here, contact me on the ModWorkshop discord, or open a ticket on the GitHub page. Try to be descriptive about the issue so that I can find it and fix it! If the issue is severe enough (eg. crashing), you may wish to try an earlier version from GitHub if I'm not online and available to fix it immediately.
-
- Q: I only want to use the Crosshairs/I only want to use the Hitmarkers/I only want to use the Hitsounds. Can I disable the other features?
- A: Yes! Look in the mod options.
-
- Q: Can I add my own crosshairs/hitmarkers/hitsounds?
- A: Yes! See the guide here: https://github.com/offyerrocker/PD2-AdvancedCrosshairs/wiki
-
- Q: Can you add [whatever] crosshair/hitmarker/hitsound?
- A: You can feel free to make a request. However, whether or not I'll actually do it depends on many factors, including how busy I am, how interesting the request is/how much I like it/how much free time I have/what I had for breakfast that morning. In other words, I might or might not, and even if I like the idea, it might take a while for me to get around to it. I've made it extremely easy for users to make their own crosshairs/hitmarkers/hitsounds, and you'll probably do a better job than I would anyway. Plus, I like seeing the creative stuff that the modding community (that's you!) can do.
-
- Q: Can I help translate this mod into [whatever] language?
- A: Yes, please do! The best way to do this is by sending a pull request on GitHub. If you do not have a GitHub account, you can contact me via ModWorkshop private message, or through the ModWorksshop Discord server.
-
- Q: Is this mod compatible with [whatever] mod?
- A: Generally speaking, I have no idea. Try it, find out, and report back in the comments!
-
- Q: Does this work in VR?
- A: ACH has limited VR support. The hitsounds are currently bugged (working on a fix, stay tuned!), but hitmarkers should work fine, and the crosshair works to some extent if you enable crosshair shake in the ACH mod options.
-
- Q: You abbreviated the mod to ACH. What about "Hitsounds?"
- A: Feature creep. Originally it started as Advanced Crosshairs as a standalone of NobleHUD's crosshairs, but then I decided to add Hitmarkers. Then I decided to add world-position hitmarkers, and then I decided to add hitsounds... I just never bothered to change the name/acronym afterward.
For more information, including:
- More in-depth usage manual
- Documentation and tutorials on creating your own addons
- Addons installation guide
- The latest development version
Moral support
...please see the guide on GitHub! https://github.com/offyerrocker/PD2-AdvancedCrosshairs/wiki/Getting-Started-Using-ACH
Please feel free to leave a comment on this mod page, or contact me in the ModWorkshop Discord, if you would like to report a bug, give feedback, or request help either with this mod or with creating or installing addons for this mod.
You may also submit bug reports by opening tickets (or pull requests, if you have a fix) to the GitHub page.



Crashes due to killsounds playing when a damageable NPC dies to fire damage when playing with Irenfist?
It seems to be specifically the hitsound part. Game runs fine without hitsounds but enabling them just bricks the game and crashes it when a killsound plays upon a burning NPC dies. It's not that the hitsounds aren't present, either. All of my selected hitsounds are contained in the ACH Addons/Hitsounds folder.
Spoiler!
Application has crashed: C++ exception
[string "lib/units/enemies/cop/copdamage.lua"]:2277: attempt to perform arithmetic on local 'damage' (a nil value)
SCRIPT STACK
advanced_crosshairs_did_not_crash_you() @mods/PD2-AdvancedCrosshairs/lua/copdamage.lua:11
Run() @mods/PD2-AdvancedCrosshairs/lua/copdamage.lua:11
orig_roll_crit() @mods/PocoHud3/poco/../poco/Hud3.lua:4813
roll_critical_hit() @mods/PD2-AdvancedCrosshairs/lua/menumanager.lua:1909
damage_fire_original() @mods/IRE AND FIST REBORN/lua/copdamage.lua:286
damage_fire() @mods/IRE AND FIST REBORN/lua/copdamage.lua:332
give_fire_damage() lib/units/weapons/raycastweaponbase.lua:2845
original() lib/units/weapons/raycastweaponbase.lua:2793
on_collision() @mods/base/req/core/Hooks.lua:288
_fire_raycast() @mods/IRE AND FIST REBORN/lua/newshotgun.lua:242
original_fire() @mods/IRE AND FIST REBORN/lua/raycast.lua:300
fire_original() @mods/IRE AND FIST REBORN/lua/raycast.lua:328
fire_original() @mods/VanillaHUD Plus/lua/BurstFire.lua:64
fire_original2() @mods/IRE AND FIST REBORN/lua/BurstFire.lua:145
fire() @mods/IRE AND FIST REBORN/lua/newshotgun.lua:447
trigger_pressed() lib/units/weapons/raycastweaponbase.lua:413
original() @mods/IRE AND FIST REBORN/lua/playerstandard.lua:1191
Run() @mods/base/req/core/Hooks.lua:288
_check_action_primary_attack() @mods/PocoHud3/poco/../poco/Hud3.lua:1842
original() lib/units/beings/player/states/playerstandard.lua:962
_update_check_actions() @mods/base/req/core/Hooks.lua:288
update_original() lib/units/beings/player/states/playerstandard.lua:441
update_original() @mods/VanillaHUD Plus/lua/BurstFire.lua:302
original() @mods/VanillaHUD Plus/lua/VanillaHUD.lua:981
saw_original_playerstandard_update() @mods/base/req/core/Hooks.lua:288
update_original() @mods/Saw Helper/lua/playerstandard.lua:39
update() @mods/IRE AND FIST REBORN/lua/BurstFire.lua:350
original() lib/units/beings/player/playermovement.lua:279
@mods/base/req/core/Hooks.lua:288
ACH is not responsible for this crash. The call from "PD2-AdvancedCrosshairs" appears at the top of the script stack because it is written to call the original code (whether defined from the game's source code or from another mod), but it does not modify that code or the outcome in any meaningful way, so it's not possible for it to have caused the crash described in this particular crash log. One of your multiple gameplay-changing mods or HUD mods is likely the culprit. You can see that quite a few other mods run code here- I suggest looking through those; IREnFIST would be my bet.
Just in case this was the wrong crash log, however, I did attempt to replicate the crash anyway under the circumstances you described- killing an NPC with fire damage over time- and unfortunately, I could not find any issues. Please let me know if you get a different crash log that points to ACH, or gain more information about this issue.
Thanks for the report!
@Offyerrocker Did you try replicating with Irenfist loaded? It doesn't change enough to require changing an entire save file in order to load it, so anything you have in a vanilla save will be completely fine. It occurs specifically when a killsound plays after a burning NPC's death with Irenfist loaded. Sometimes it even occurs when a hitsound plays on a burning NPC, though it could've just been said enemy NPC to a crit or something.
Irenfist, ACH, VH Plus, Saw Helper, but NO Pocohud: Crashed
Irenfist, ACH, Pocohud, Saw Helper, but NO VH Plus: Crashed
Irenfist, ACH, Pocohud, VH Plus, but NO Saw Helper: Crashed
Irenfist, ACH, but NO Pocohud, VH Plus OR Saw Helper: Crashed
Here's the crash for the test with only Irenfist and ACH:
Spoiler!
Application has crashed: C++ exception
[string "lib/units/enemies/cop/copdamage.lua"]:2277: attempt to perform arithmetic on local 'damage' (a nil value)
SCRIPT STACK
advanced_crosshairs_did_not_crash_you() @mods/PD2-AdvancedCrosshairs/lua/copdamage.lua:11
orig_roll_crit() @mods/PD2-AdvancedCrosshairs/lua/copdamage.lua:11
roll_critical_hit() @mods/PD2-AdvancedCrosshairs/lua/menumanager.lua:1909
damage_fire() @mods/IRE AND FIST REBORN/lua/copdamage.lua:286
give_fire_damage() lib/units/weapons/raycastweaponbase.lua:2845
original() lib/units/weapons/raycastweaponbase.lua:2793
on_collision() @mods/base/req/core/Hooks.lua:288
_fire_raycast() @mods/IRE AND FIST REBORN/lua/newshotgun.lua:242
original_fire() @mods/IRE AND FIST REBORN/lua/raycast.lua:300
fire_original() @mods/IRE AND FIST REBORN/lua/raycast.lua:328
fire_original2() @mods/IRE AND FIST REBORN/lua/BurstFire.lua:145
fire() @mods/IRE AND FIST REBORN/lua/newshotgun.lua:447
trigger_pressed() lib/units/weapons/raycastweaponbase.lua:413
original() @mods/IRE AND FIST REBORN/lua/playerstandard.lua:1191
_check_action_primary_attack() @mods/base/req/core/Hooks.lua:288
original() lib/units/beings/player/states/playerstandard.lua:962
_update_check_actions() @mods/base/req/core/Hooks.lua:288
original() lib/units/beings/player/states/playerstandard.lua:441
update_original() @mods/base/req/core/Hooks.lua:288
update() @mods/IRE AND FIST REBORN/lua/BurstFire.lua:350
original() lib/units/beings/player/playermovement.lua:279
@mods/base/req/core/Hooks.lua:288
Callstack:
The interaction causing the crash seems to be exclusively between ACH and Irenfist. Now don't get me wrong, I could easily just play with one mod and not the other, or just not use fire weapons whatsoever, but I'm still going to post this here because Rokk (Irenfist's author) seems to be radiosilent, though ModWorkshop does say their last visit was only 17 days ago.
@gibus
Thanks for the additional testing, but like I said, IreNFist itself was the main suspect, and none of your tests seem to have involved a case with IreNFist disabled. This crash is explicitly caused by IreNFist. ACH is not responsible for this crash.
In Update 219 (9 Mar 2022), OVK changed the signature for the function
CopDamage:roll_critical_hit()to require a second argument, which is the attack's damage. The function performs arithmetic on this damage value to produce the critical hit damage. (copdamage, line 2092)IreNFist was last updated on 16 Jul 2021. Its code relating to allowing critical hits on fire damage (compare the above to IreNFist's copdamage, line 291:
https://github.com/HugoZink/IreNFist/blob/master/IRE AND FIST REBORN/lua/copdamage.lua(link won't parse since it has a space in it) ) has not yet been updated to accommodate for this change.This causes the error visible in the callstack, which points to the PAYDAY 2's own source code:
[string "lib/units/enemies/cop/copdamage.lua"]:2277: attempt to perform arithmetic on local 'damage' (a nil value)I do sincerely appreciate the effort you took in performing multiple test cases to try to narrow down the cause, however.
@Offyerrocker You're right. As thorough as I was I guess I wasn't enough. Just tested to see if, with Irenfist loaded, a crit kill with fire causes the crash and, aligning with your findings, indeed it did. Well at least now I know that Irenfist is indeed the only culprit. My only question now I guess is why did OVK change how crits work? Was it for the addition of Yufu Wang?
@gibus In anticipation of the future weapon dlcs seems likely, but your guess is as good as mine.