Press a key to attach, detach, or change your scope quickly while preserving firing mode.
ToggleScope 2.0 is considered the definitive version. Anomaly 1.5.2 is recommended for the best experience. Anomaly 1.5.1 is still supported, but firing mode preservation will be sub-optimal.
- 2.0 Added proper support for 1.5.2 and fixed glitchy firing mode presevation.
- 1.9.1 Fixed MCM key binding. Thankies, mrsoysauceiii!
- 1.9 Switched to MCM for key binding. Default key is [Numpad Plus].
- 1.8 Fixed secondary weapon unequipping bug. Again. Thankies, Noxilian!
- 1.7 Fixed crash when attempting to swap to an incompatible scope. Thankies, Maid!
- 1.6 Fixed weapons getting "jammed" when toggling scopes with the HUD turned off.
- 1.5 Fixed addon getting stuck when hotkey is pressed with no compatible scope in inventory.
- 1.4 Added "cycle": Double-tap toggle button to cycle to the next compatible scope in inventory.
- 1.3 Fixed secondary weapon unequipping bug during manual swap.
- 1.2 Added "swap": Enabled quickly changing to a new scope without detaching the current one.
- 1.1 Fixed the toggle issue with Groza, Galil, K98, Mosin, SKS, SVT40 and Type63.
- 1.0 Fixed secondary weapon unequipping bug.
- 0.1 Initial version.
Provides a new keybinding via MCM. Requires v1.6 or newer.
Pressing the hotkey (default Numpad Plus) while holding a weapon will quickly attach the first compatible scope from your inventory.
If the weapon already has a scope attached, it will be removed and remembered as the "preferred" scope for that weapon. Double-tap the toggle button to quickly switch to the next compatible scope.
The addon will try to preserve the current firing mode, so you will not have to fumble with it during a firefight.
It is also possible to quickly swap or cycle supported scopes without first detaching the current scope.
Last but not least, you can now drag a scope onto an already-scoped weapon without having to remove the existing scope first.
RazorShultz, RavenAscendant, Big Angry Negro, SparksTheUnicorn, Lucy.xr, Maid, Noxilian
Some issues are due to engine limitations in Anomaly 1.5.1 version. Those issues are marked in the list below. Those are resolved on Anomaly 1.5.2 with ToggleScope v2.0.
Average
9.861 votes submitted.
nice
Is it impossible to fix the issue of the first slot weapon being unequipped? It's super annoying even for standard gameplay. Let alone when you need to hide behind a tree and switch a long range scope onto your AK because you spotted a controller in the distance.
Edited: The fix is ready. Download the new version please.
Also when using Anomaly Magazines (maybe even without it?) and you attach/detach the scope, not only the weapon gets unequipped, but also the magazine inside will disappear into the void. Happens also without your mod. I couldn't fix it, but I'm not that skilled with LUA. Maybe you or anyone else can get it to work :)
btw, a few days back a similar addon has been released. Isn't it yours?
i noticed the same thing, I got 3 45-bullet mags sucked when detaching scope from first weapon slot and wondered where all my mags went
I wasn't even able to reproduce this issue, but if it also happens without my addon as manzmnl said, I don't see how I can do anything about it.
This is nice but we already have this Moddb.com .
Yes, that is the big brother of my mod. I just needed something that selected a scope by itself and tried to preserve the firing mode. Rather than pestering him with feature requests, I wanted to try my hand at scribbling this.
You are a god among man! If you only can also fix the grenade launcher eating grenade (when add/remove a scope) you will be a legend, truly! 10/10.
More experienced people are working on *that* problem, but as I understand it, the engine makes no provisions to fix it. Fingers crossed.
Wow, i hope that they find a solution.
Maybe the solution could be to attach (from the start) a grenade launcher to all weapons that support that, and made impossible to remove it. Because grozas, the only weapons that have a undetachble grenade launcher, are unaffected by this horrible bug.
It's a little bit more involved than that. The way the scopes are implemented is like this: When you attach/detach a scope, the game creates an entirely new weapon (a scoped/unscoped version) with the original weapon's stats and deletes the old weapon. For all practical purposes, the old weapon is gone forever and you are given a brand new weapon with *most* stats copied over. Problem is, the engine fails to copy *some* values and provides no mechanisms to work around the issue. As a result, there is very little that can be done by the modders to fix those.
Keeping the firing mode is the bomb. Nicely done! Although sometimes it resets it (from single fire back to auto) when switching levels and the scope is equipped. Not always, sometimes.
Thanks. To be honest, I've not even tried to handle resets during game loads and level changes. I just wanted to keep it from changing while in combat and frankly that's enough for me for now.
Great mod. Slight conflict with Moddb.com
Both (obviously) use ui_keybinding.xml and their bind is written under custom25.
Sure, it takes few seconds to merge them, but I'd rather let you know.
Update: Latest version no longer uses ui_keybinding.xml and allows setting the hotkey via MCM.
I just tested few things and it appears that Galil and it's scope (wpn_addon_scope_galil) is not working as it should. It's the only one that's refusing to attach/detach after pressing the hotkey. I checked it out on a modless new game with only your addon present.
Thanks for the report. Galil and a few other affected weapons are fixed with version 1.1. Please download again.
Works like a charm. Thanks for updating it, as I can't live without my Galil.
Can i ask if there is a way to have this mod and the quick knife attack mod together ?
That's not something I use, so no promises, but I can take a look if you link the exact mod in question.
Ah ty and no worries if it/s not possible , the mod I mean is this one Moddb.com .
I think it as they both alter keybinds but I have no idea how to merge stuff so any help advice welcome and apricated :)
Yes, it's a keybind conflict and it looks like an easy fix. Try the file below and let me know if it works.
Gist.githubusercontent.com
Edit: This is no longer relevant with the latest version. Please use MCM to choose a key for ToggleScope.
It works !!! Thank you for this. and so quickly too :)
happy stalking !!
scope cycling? I love you.
😊
Oh Wow , not only do you make this mod play nice with others , Now I log in to find scope cycling as well.
Man your a credit to the Zone !
Thankies!
This is great! Since you've fixed that the second weapon slot gets unequipped upon scope toggle, it also doesn't loose the magazine anymore (when using Anomaly Mags). Well done :)
To be honest, I don't see how working around the second slot bug would fix the magazine issue because all I'm doing is catching the new weapon mid air and putting it into the correct slot. If you say it works, then I'm glad it works but be careful with your mags for a while, just in case. :)
possible bug when pressing the cycle scope key without a scope in inventory it locks up some of the controls.
Good catch, thankies. Gonna release a fix soon.
Edit: fix released.
That was fast! Thank you again for continuing your efforts to update!
Scope cycling? Sweet!
ps. Sorry for posting this here, but is there a way for moddb to message me when addons I use/like get updated?
You can follow authors from their profile page and you will be notified when they release/update their mods. You can also follow games so that all new addons for that game will end up in your notifications.
Anxious about trying this one!
Thanks for your work! Cheers!
Thanks, I hope you enjoy it.
At some point i would really love to see a similar switching system for the scopes applied to detectors. being able to flip through them would cut down on menu navigation (which i'm always a fan of) That would be it's own separate addon though and i'm sure your already busy with other projects. (or even updating this one) Fingers crossed and looking forward to your next work :D
I still have the secondary weapon unequipping happening when I use the drag & drop functionality in the inventory (either when adding a scope without an existing one, or swapping scopes).
EDIT: On further investigation, what seems to be happening is it's trying to move it to the main slot when you attach/swap scopes. If the main slot is full, it unequips it. Otherwise, it moves to the main slot when attaching/swapping the scope.
Well, I had fixed it, but apparently I later unfixed it while doing something else. I'll re-fix it soon. Thankies.
Edit: fixed now.
this addon is brutal, and very useful well done Ishmaeel
Thankies!
I have a soft bug here, every time I load the game it defaults to numpad + and not the mcm button I set it to. Only conflict I have is the optional ammo check from anomaly mags redux: Moddb.com
Update: Disabling ammo check does not resolve the issue. Basically the problem I am having is I need to set a new key every time I enter a new area or load my save again, or set a key, then set my old one for it to not be numpad +.
Thanks for catching this issue I missed. Please update, it should work now.
Thank you! Definitely a must have mod for me now who likes long + short range engagements but is too heavy most of the time to suffice.
I have the same problem! Just edit "ish_toggle_scope_mcm.script" with notepad++ and go to line 5, replace "DIK_ADD -- KeyPad Plus" with any key you want, the extra dashes and words are not needed. I changed it to "DIK_TAB" that will replace the default in MCM so you can basically ignore the menu option..
The issue is now fixed, just update to 1.9.1. Thanks for writing out the workaround.
"Last but not least, you can now drag a scope onto an already-scoped weapon without having to remove the existing scope first."
THIS!!!!!
10/10 from me my friend!
Thankies!