Thanks to BadSanta for his great shaders!
Script by Dodek96_PL
THIS DOES NOT SUPPORT MULTIPLAYER!
0. Backup your files. in case you're fed up with the effect.
1. ::::::::::: Customizing file for use with sniper of your choice :::::::::::
A. Open HudElementsSniperZoomComm.con with notepad
B. Hit CTRL+H
C. Type sniper in first window
D. Type the full name of the weapon you want to apply the effect to eg. usrif_m24 in second window
E. Find and replace
F. Replace GuiIndex xxx with the number of GuiIndex you want your weapon to use, for example 824. It's important to ensure this Guiindex is unique, is not used by any other weapon/vehicle.
G. Save, close
H. Change Sniper in .con file's name to the name of the weapon you want to apply the effect to, in this case usrif_m24
2. ::::::::::: Editing the weapon's file :::::::::::
A. Open .tweak of the weapon you want to apply the effect to, it should have BadSanta's shader applied already
B. Change weapon's AltGuiIndex for example "ObjectTemplate.weaponHud.altGuiIndex 52" to the one in HudElements file you just edited/created, in this case "ObjectTemplate.weaponHud.altGuiIndex 824"
C. Change second digit of "include /common/Scripts/PostProcess_OpticsBlurZoom.tweak 0.7 0.5" line to 1, DON'T CHANGE FIRST DIGIT. It should now look like this:
"include /common/Scripts/PostProcess_OpticsBlurZoom.tweak 0.7 1"
D. Save and close
3. ::::::::::: Finalizing procedures :::::::::::
A. Put HudElementsSniperZoomComm.con into Menu_server.zipHUDHudSetupCommunication
B. Open HudSetupCommunication.con and add
run HudElementsSniperZoomComm.con
under all the other lines starting with run
C. Of course change Sniper to usrif_m24 or whatever weapon you want the effect applied to
D. Save, close
E. Open HudElementsSpottedComm.con
F. Add
hudBuilder.setNodeLogicShowVariable NOT GuiIndex xxx
under "hudBuilder.setNodeShowVariable SpottedInterfaceShow" line. Replace xxx with your GuiIndex. Should now look like this:
hudBuilder.createSplitNode IngameHud SpottedMenu
hudBuilder.setNodeShowVariable SpottedInterfaceShow
hudBuilder.setNodeLogicShowVariable NOT GuiIndex xxx
etc etc
G. Save, close
H. Test if it works in-game.
I. Repeat for all weapons you want the effect used by.
4. ::::::::::: Usage :::::::::::
Spawn with the weapon, zoom-in and open commrose (default "Q"). Right-click "spotted" and select the zoom value you want. You may have to double-click if it's the first time you're changing the value. Your zoom factor should change.