Jump to content

Recommended Posts

FkmvpHH.jpg

WeaponSights  Zoom

By Gunter Severloh

 

Description
When you look down the Iron sights of any infantry weapon in vanilla Arma 3 some
of the sights are very small, making it challenging to hit anything, so ingame you have to press your zoom button (if you want) which brings the sights closer.

Just to note this is an old addon i put together with some help a few yrs ago, i just decided to make it available for my favorite community

as i thought i should share something i wont play without!
 
What does this addon do?
This addon automatically zooms your iron sights & attachments for all infantry weapons which eliminate the need for you

to have to press your zoom button freeing up the button for other things.

 

What games/mods does this works for?

  • Vanilla Arma 3
  • Marksman DLC
  • Apex
  • CUP_Weapons - (there are a few that wont zoom)
  • RHS - USAF

The weapons this works for includes the following:

  • Rifles
  • Semi-Rifles
  • Assault Rifles
  • Sub-machine guns
  • Machine guns
  • Pistols
  • AT launchers
  • Vanilla Arma 3/Apex/Marksman DLC's weapon attachments

Note: Scoped attachments dont work and are not needed to be zoomed hence why your using a scope,

however if you remove the scope the iron sights of that now nonscoped weapon it will zoom.

 

Download

Vanilla Arma 3 / APEX / Marksman DLC / CUP weapons

RHS

Want the IFA3_AIO version?

Get it here ------>  https://forums.bistudio.com/forums/topic/175593-weaponsights-zoom-for-ifa3/

 

Requirements

  • Apex & Marksman DLC's are not required but if you have them then the addon will work for them.
  • RHS - (if you are using the RHS version.)

 

Credits

Kju -  For his tip on required addons

Rydygier  -  For his insights on classnames and config references

Lao Fei Mao -  For his config template

===========

 

Permissions
Do not change/edit, and upload without my permission.

 

  • Like 4
  • Thanks 4

Share this post


Link to post
Share on other sites

Nice little addon. I assume this works in both SP and MP. Would be nice to get it signed.

Share this post


Link to post
Share on other sites

FINALLY! Now I don't need to keep holding the right mouse button down all day. Woohoo! Cheers for this, Gunter! :)

  • Like 2

Share this post


Link to post
Share on other sites
7 hours ago, yokhanan said:

FINALLY! Now I don't need to keep holding the right mouse button down all day. Woohoo! Cheers for this, Gunter! :)

 

You can have it on toggle but yeah, still annoying.

Share this post


Link to post
Share on other sites
On 10/16/2017 at 5:27 PM, HazJ said:

Nice little addon. I assume this works in both SP and MP. Would be nice to get it signed.

Thanks Haz, ya works fine in sp and MP.

I have a server for arma3 for my group and i have a WarMod i built and this and my IFA3 version are in it,

we dont have the mod on the server and it works fine.

On 10/16/2017 at 5:39 PM, yokhanan said:

FINALLY! Now I don't need to keep holding the right mouse button down all day. Woohoo! Cheers for this, Gunter! 🙂

Dam straight, i got sick of that, for me my right mouse button is for bringing up the iron sites, or sites overall, and my number 1 key on the number pad was used for the zoom,

what a finger twister to try to go to your sights, then zoom, and lean or something else on top of it.

 

@foxhound Thank you sir!

Page looks great, i noticed you guys added some more options and input boxes on the submission form, i really like it makes it alot easier

to submit files, and its more sophisticated too 😉

Update - Plans

I'm planning to update this and heres what i have in mind:

  • Make RHS weapons/attachments zoomable
  • other weapons - need suggestions

Story

Want to tell you guys how i created this, most of the community know me as a compiler for my WarMods, and threads and such, so i have a habit of putting shit together, lol

anyways back in the arma2oa days, i had this addon ----> http://www.armaholic.com/page.php?id=9907

in my COWarMod with permission from Heinblood of course 😉 but i used his addon as a reference/template, i also talked with Kju as i was having issues with

the sights not zooming and so he pointed out the required addons part which i had wrong, so i sorted that out.

    I asked Rydygier for help too with the classnames and some other aspects, dude speaks code i swear lol, but love the guy been working with him on and off for several years now, anyways

I also asked Lao Fei Mao to use a config of his for a template, and the rest i figured out myself.

 

This addon tho has been sitting on my computer for a few years now created my IFA3 Weaponsights zoom from it back in 2013 and with help too, im still rather ....unsure i want to admit on where to put,

to code certain things, especially to update the addon as there are some weapons, and attachments that the zoom dont work for.

   What is cool about the addon tho is you can use an RHS weapon, put an arma3 sight on it and you'll have automatic zoom, lol

 

Anyways i got a video coming for this so stay tuned should be up tomorrow, thanks for your interest!

 

 

  • Like 2

Share this post


Link to post
Share on other sites
7 hours ago, Evil Organ said:

Hi Gunter,

Regarding signing your mod, I found lordprimate's guide both informative and helpful.   

Hey thanks for the info, will check it out!

 

6 hours ago, cmcssc said:

It work fine with my weapon ! thanks!

Good deal, what weapon are you using, you created it or is it from a pack?

Share this post


Link to post
Share on other sites

My heart skipped when I saw the title, I thought it might be a mod that adjusts the speed of the zoom.


Just in case that you're taking suggestions, maybe you could add that feature if it's not too much work (and when you're done adding support for all the weapons you planned)?

Share this post


Link to post
Share on other sites
2 hours ago, Gwynbleidd said:

adjusts the speed of the zoom.

Hmm, idk im not a coder or scripter, im just an overzealous compiler that likes to organize stuff but, i dabbled in a little code here and there

to try to get things to work or change something and was successful only because some of the code made it obvious what was what.

      Some things i can figure out but adding a feature where you can slow the speed of the zoom would need added code,

along with some way to control that speed either by pressing a key which i'd rather not do as that is the point of the addon to eliminate the key.

    The other alternative could be adding an option in the the controls for something to be on, or maybe even a userconfig one could adjust a number themselves,

all that i would have no idea where to go or what to do, im lucky enough to figured out this weaponsight zoom but i did have some help.

 

Its something to keep in mind for down the road, i'd prefer to keep this simple as i can and at least add those attachments and weapons that dont have

the autozoom functioning for them yet, once i sort those out then i can dig in further.

Aside this i have a mod im in the process of building along with an addon/mod thread i want to get back into, but thanks for the suggestion

i will keep it in mind and will see where this goes.

  • Like 1

Share this post


Link to post
Share on other sites

Update

Finally got this done, been so busy with work and my other computer this past week to finish the vid but here is the vid,

nothing special but it demonstrates the addon.

Also added to the first post.

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Update - v1.1

- addon is now signed.

 

Also note my IFA3 version is signed as well, if you play with IFA3 you can get that version here:

https://forums.bistudio.com/forums/topic/175593-weaponsights-zoom-for-ifa3/

 

Submitted the update to Armaholic so waiting for an update on that page, Mega and steam are latest.

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Gunter! This looks great. Can you zoom out while in boresight view? For example, if you want to clear a room and not be zoomed in?

Share this post


Link to post
Share on other sites

Hi Variable, thanks.

No it mainly has one function where when you go to iron sites you will automatically zoom, sites can be a weapon with or without any attached sites on it.

As you see in the vid it mainly effects Arma3, Apex, CUP, & Marksmen weapons and attachments because they all use the same weapons core classnames.

I'm planning to update it so RHS weapons will work with it but i'm working on something else currently.

 

Ideally what would be interesting is to be able to turn the zoom on and off and prob best through a key then the action menu, i was actually thinking about that last night but im not a coder, im a compiler,

this addon i went to great lengths to figure out and it as actually built in 2015, so really i would need to do some research and ask some people i know how i can do that,

i might consider doing that first over RHS weapons, idk it would allow an option.

 

Share this post


Link to post
Share on other sites

I see thanks. What happens when you hold the "Zoom out" button (I think the default is the numpad minus key) when you are in boresight view? I will check it anyway myself but I'm not in front of my computer now so I hope it's not too much of a nitpicking, maybe others were wondering the same as I did.

Share this post


Link to post
Share on other sites

I always tried the zoom temporary as thats what i use for zooming in aside the addon, but i tried to attach that to my iron sights button which is my right mouse button and it didn't work.

I think ideally like you said if there is an option to turn the zoom on and off that would be best, as even if you tied a key to your iron sights button then you would have that zoom everytime you went to the sights.

 

My situation was i didn't like having to press the zoom button while also having to hold down my iron sights button because i needed my fingers for other stuff,

so this addon for me is the most efficient in that regard.

Share this post


Link to post
Share on other sites

Update - RHS WIP

Hey guys i started working on adding RHS to this, mainly just started with the M4.

 

Now i got the weapon to zoom, but at the same time the ammo for the weapon dont work, so im not totally understanding what i need to do here.

Using this page as a reference from RHS's USAF http://class.rhsmods.org/rhsusaf/CfgWeapons_rhs_weap_m4_Base.html

here is a peek at my config's required addons and this is just starting with @RHSUSAF

for the required addons i have the following:  files added are bolded:

Spoiler

class CfgPatches
{

    class WeaponSights_Zoom
    {
        units[] = { };
        weapons[] = { };
        requiredVersion = 1.000000;
        requiredAddons[] = {
                "A3_Weapons_F", "A3_Weapons_F_Acc", "A3_Weapons_F_beta", "A3_Weapons_F_Beta_Acc", "A3_Weapons_F_gamma", "A3_Weapons_F_gamma_Acc", "A3_Weapons_F_EPA", "A3_Weapons_F_EPA_Acc", "rhsusf_weapons", "rhsusf_weapons2", "rhsusf_weapons3"
        };
    };
};

 

for the config itself i added first the rhs_weap_m4_Base but that did nothing ingame, then i changed that to:           class rhs_weap_m4 : Rifle_Base_F

and now all the M4's are zooming.

The ones with the handles you end up looking down at the gun so thats messed up, and overall the ammo for those guns cant be used, so the gun cant shoot now which makes no sense.

 

Can someone whom knows classname hierarchy tell me what im doing wrong here, as im still not fully understanding this.

Heres my config from the top the line where i added RHS classname is bolded:

Spoiler

class CfgPatches
{

    class WeaponSights_Zoom
    {
        units[] = { };
        weapons[] = { };
        requiredVersion = 1.000000;
        requiredAddons[] = {
                "A3_Weapons_F", "A3_Weapons_F_Acc", "A3_Weapons_F_beta", "A3_Weapons_F_Beta_Acc", "A3_Weapons_F_gamma", "A3_Weapons_F_gamma_Acc", "A3_Weapons_F_EPA", "A3_Weapons_F_EPA_Acc", "rhsusf_weapons", "rhsusf_weapons2", "rhsusf_weapons3"
        };
    };
};

class CfgWeapons
{

    class Default ;

    class LauncherCore : Default
    {
    };

    class Launcher : LauncherCore
    {
        opticsZoomMin = 0.500000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.500000;
    };

    class GrenadeLauncher : Default
    {
        opticsZoomMin = 0.500000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.500000;
    };

    class UGL_F : GrenadeLauncher
    {
        opticsZoomMin = 0.500000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.500000;
    };

    class MGunCore ;

    class MGun : MGunCore
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class RifleCore : Default
    {
    };

    class Rifle : RifleCore
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class PistolCore : Default
    {
    };

    class Pistol : PistolCore
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class Pistol_Base_F : Pistol
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class Rifle_Base_F : Rifle
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class arifle_Katiba_Base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class arifle_MX_Base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };
    
    class rhs_weap_m4 : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class SDAR_base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class Tavor_base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class Rifle_Long_Base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class EBR_base_F : Rifle_Long_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class GM6_base_F : Rifle_Long_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class LRR_base_F : Rifle_Long_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class DMR_01_base_F : Rifle_Long_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class mk20_base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class SMG_01_Base : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class SMG_02_base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class SMG_02_F : SMG_02_base_F
    {
    };

    class SMG_02_ARCO_pointg_F : SMG_02_F
    {

        class LinkedItems
        {

            class LinkedItemsOptic
            {
                slot = "CowsSlot";
                item = "optic_ARCO";
            };

            class LinkedItemsAcc
            {
                slot = "PointerSlot";
                item = "acc_pointer_IR";
            };
        };
    };

    class pdw2000_base_F : Rifle_Base_F
    {
        opticsZoomMin = 0.250000;
        opticsZoomMax = 0.500000;
        opticsZoomInit = 0.250000;
    };

    class Binocular : Default
    {
    };

    class Rangefinder : Binocular
    {
    };

    class Laserdesignator : Binocular
    {
        forceOptics = 0;
    };

    class ItemCore ;

    class InventoryOpticsItem_Base_F ;

    class optic_Arco : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ARCO_col
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.500000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.500000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };

                class ARCO2collimator
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.500000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.500000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };
            };
        };
    };

    class optic_Hamr : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class HAMR_col
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };

                class Hamr2Collimator
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };
            };
        };
    };

    class optic_Aco : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };
            };
        };
    };

    class optic_ACO_grn : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };
            };
        };
    };

    class optic_Aco_smg : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };
            };
        };
    };

    class optic_ACO_grn_smg : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };
            };
        };
    };

    class optic_Holosight : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 100;
                    distanceZoomMax = 100;
                    cameraDir = "";
                    visionMode[] = { };
                    opticsPPEffects[] = {
                            "OpticsBlur1"
                    };
                };
            };
        };
    };

    class optic_Holosight_smg : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 100;
                    distanceZoomMax = 100;
                    cameraDir = "";
                    visionMode[] = { };
                    opticsPPEffects[] = {
                            "OpticsBlur1"
                    };
                };
            };
        };
    };

    class optic_MRCO : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class MRCOcq
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 300;
                    distanceZoomMax = 300;
                    cameraDir = "";
                };
            };
        };
    };

    class optic_SOS : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class Snip
                {
                    opticsID = 1;
                    opticsDisplayName = "WFOV";
                    useModelOptics = 1;
                    opticsPPEffects[] = {
                            "OpticsCHAbera1", "OpticsBlur1"
                    };
                    opticsZoomMin = 0.010000;
                    opticsZoomMax = 0.040000;
                    opticsZoomInit = 0.040000;
                    discreteDistance[] = {
                            300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000
                    };
                    discreteDistanceInitIndex = 2;
                    distanceZoomMin = 300;
                    distanceZoomMax = 2300;
                    discretefov[] = {
                            0.040000, 0.010000
                    };
                    discreteInitIndex = 0;
                    memoryPointCamera = "opticView";
                    modelOptics[] = {
                            "\A3\Weapons_F\acc\reticle_sniper_F", "\A3\Weapons_F\acc\reticle_sniper_z_F"
                    };
                    visionMode[] = {
                            "Normal", "NVG", "Ti"
                    };
                    opticsFlare = 1;
                    opticsDisablePeripherialVision = 0;
                    cameraDir = "";
                };

                class Iron : Snip
                {
                    opticsID = 2;
                    opticsDisplayName = "";
                    useModelOptics = 0;
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    opticsZoomMin = 0.375000;
                    opticsZoomMax = 1.100000;
                    opticsZoomInit = 0.750000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    discretefov[] = { };
                    discreteDistance[] = {
                            100
                    };
                    discreteDistanceInitIndex = 0;
                };
            };
        };
    };

    class optic_Nightstalker : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class NCTALKEP
                {
                    opticsID = 1;
                    useModelOptics = 1;
                    opticsPPEffects[] = {
                            "OpticsCHAbera1", "OpticsBlur1"
                    };
                    opticsZoomMin = 0.030000;
                    opticsZoomMax = 0.150000;
                    opticsZoomInit = 0.150000;
                    discreteDistance[] = {
                            100, 300, 400, 500, 600, 700, 800, 900, 1000
                    };
                    discreteDistanceInitIndex = 1;
                    distanceZoomMin = 100;
                    distanceZoomMax = 1000;
                    memoryPointCamera = "opticView";
                    visionMode[] = {
                            "Normal", "NVG", "Ti"
                    };
                    thermalMode[] = {
                            5, 6
                    };
                    opticsFlare = 1;
                    opticsDisablePeripherialVision = 1;
                    cameraDir = "";
                };

                class Iron : NCTALKEP
                {
                    opticsID = 2;
                    useModelOptics = 0;
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    opticsZoomMin = 0.750000;
                    opticsZoomMax = 0.750000;
                    opticsZoomInit = 0.750000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                };
            };
        };
    };

    class optic_DMS : ItemCore
    {

        class ItemInfo : InventoryOpticsItem_Base_F
        {
            
            class OpticsModes
            {

                class Snip
                {
                    opticsID = 1;
                    useModelOptics = 1;
                    opticsPPEffects[] = {
                            "OpticsCHAbera2", "OpticsBlur3"
                    };
                    opticsZoomMin = 0.062500;
                    opticsZoomMax = 0.125000;
                    opticsZoomInit = 0.125000;
                    discreteDistance[] = {
                            300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200
                    };
                    discreteDistanceInitIndex = 1;
                    distanceZoomMin = 300;
                    distanceZoomMax = 1200;
                    discretefov[] = {
                            0.125000, 0.062500
                    };
                    discreteInitIndex = 0;
                    memoryPointCamera = "opticView";
                    modelOptics[] = {
                            "\A3\Weapons_F_EPA\acc\reticle_marksman_F", "\A3\Weapons_F_EPA\acc\reticle_marksman_z_F"
                    };
                    visionMode[] = {
                            "Normal", "NVG", "Ti"
                    };
                    opticsFlare = 1;
                    opticsDisablePeripherialVision = 1;
                    cameraDir = "";
                };

                class Iron : Snip
                {
                    opticsID = 2;
                    useModelOptics = 0;
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    opticsZoomMin = 0.500000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.500000;
                    memoryPointCamera = "eye";
                    visionMode[] = { };
                    discretefov[] = { };
                    distanceZoomMin = 200;
                    distanceZoomMax = 200;
                    discreteDistance[] = {
                            200
                    };
                    discreteDistanceInitIndex = 0;
                    opticsPPEffects[] = {
                            ""
                    };
                };
            };
        };
    };

    class optic_Yorris : ItemCore
    {
        
        class ItemInfo : InventoryOpticsItem_Base_F
        {
            
            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 50;
                    distanceZoomMax = 50;
                    cameraDir = "";
                    visionMode[] = { };
                    opticsPPEffects[] = {
                            ""
                    };
                };
            };
        };
    };

    class optic_MRD : ItemCore
    {
        
        class ItemInfo : InventoryOpticsItem_Base_F
        {

            class OpticsModes
            {

                class ACO
                {
                    opticsID = 1;
                    useModelOptics = 0;
                    opticsZoomMin = 0.250000;
                    opticsZoomMax = 0.500000;
                    opticsZoomInit = 0.250000;
                    memoryPointCamera = "eye";
                    opticsFlare = 0;
                    opticsDisablePeripherialVision = 0;
                    distanceZoomMin = 50;
                    distanceZoomMax = 50;
                    cameraDir = "";
                    visionMode[] = { };
                    opticsPPEffects[] = {
                            ""
                    };
                };
            };
        };
    };
};

 

  • Like 2

Share this post


Link to post
Share on other sites

I can only throw some guesses here, not the config specialist. My blind theory is about this bolded line:

 

class rhs_weap_m4 : Rifle_Base_F

 

Maybe in fact rhs_weap_m4 isn't direct inheritor of Rifle_Base_F, but there's something inbetween, where RHS magazines are defined? Did you tried instead:

 

class rhs_weap_m4_Base;

class rhs_weap_m4 : rhs_weap_m4_Base

 

Because from the link, you gave, RHS magazines for rhs_weap_m4  are apparently defined in the rhs_weap_m4_Base class, not Rifle_Base_F (obviously, since Rifle_Base_F is vanilla class). Seems to me, you omitted the step, where proper magazines are defined. Only guessing though, wasn't even awared, such "bypass" via changing mother class is possible. 

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for looking at the config Rydygier and your insights once again.

I actually did try it but it was like this:

class rhs_weap_m4_Base : Rifle_Base_F

which did nothing, what confuses me is im not understanding the 2nd aspect of the line the Rifle_Base_F part, i really didn't know

what that was there for, so im getting a better idea from your example.

 

I'll give what you suggested a try and see what happens.

edit... 5min later... dude! That worked!

The whole M4 weapon selection zooms, and they fully work, ammo and everything.

 

Now to take that example and apply it to another weapon, thanks again for the insight, im going to mess around with this, and see what i learn from testing,

will post again when i have some results, thank you!

 

Share this post


Link to post
Share on other sites

Update - RHS WIP

Ok guys i got some great news, i have been slowly figuring out the classnames and inheritances, using the RHS wiki of course, and heres what

i have accomplished so far after an hour of trial and error, lol

 

I have the following RHS weapons working:

  • HK rifles - (all of them)
  • M16A4 rifles - (all of them)
  • M240B
  • M240B (Cap)
  • M249 PIP (solid Stock) - apparently i have to add each of the weapon classnames for this, so far the m249 itself isn't working as i didn't add the classname for it.
  • M4 rifles - (all of them)
  • M4a1 - (all of them)
  • M590A1 - (Long & short barrel shotguns)

Still need to be added are the following:

  • Mk11 mod - ( i think they work and they act like they are zooming but then dont, so i dont think Mk11 mod weapons are going to work, idk what to do here)
  • M249 PIP varients & M249 itself - (as seen above only the solid stock works atm)
  • M240G

Weapon site Attachments

Aside the above needed to be added, I still need to add the weapon site attachments, right now there are a few that work already without me doing anything.

Attachments will take a bit more to do because there are alot of them but im only going to add the non scope varients.

 

Sniper rifles/rifles

I will not be adding the sniper rifles because they all use scopes.

 

USAF - Completed

Once the USA is completed i will move onto the Russians, then go from there.

 

RHS Config

I think what im going to do is once i get the weapons finished here, im going to use the current config as a template, remove all the vanilla

assets except the attachments, and basically have an addon for RHS itself, im 50/50 on this only because

1. i think it will be more efficient, and less cluttered in the config, clean code and not mixed

2. a ton of classnames might effect performance? hmm idk i cant say, and it probably wont, coders, scripters, can anyone give me some insight on this?

3.  RHS is independent, making it modular, because i plan to do SMA weapons after this.

 

Alright guys, all the time i have for today, i accomplished alot thanks to Rydygier's insight, and now i learned some things, dont mean im a coder now, lol

 

  • Like 2

Share this post


Link to post
Share on other sites

Great. :)

 

Quote

 what confuses me is im not understanding the 2nd aspect of the line the Rifle_Base_F part, i really didn't know

what that was there for, so im getting a better idea from your example.

 

Just to make the principle here as clear, as possible:

 

The class after ":" is the class, from which the class before ":" inherits all its values except those, you are changing for it (zoom values in this case). The class after ":" is/should be a class just one step higher in the hierarchy, that the class before ":". An example:

 

Let's some "classA" is:

 

classA

{

valA = 1;

valB = 2;

valC = 3;

};

 

Now, if you do this:

 

classB: classA

{

valC = 4;

valD = 5;

};

 

The resulting config of "classB" will become:

 

classB

{

valA = 1;

valB = 2;

valC = 4;

valD = 5;

};

 

(you changed one of inherited entries (valC) and added one new (valD), the rest (valA, valB) is inherited not changed from classA). That's what I know. In your case, you needed to inherit the class, you was editing, from the class, where entry defining magazines was defined, but instead it was inherited from the other, few steps higher class, where such magazines list wasn't yet defined. 

  • Thanks 1

Share this post


Link to post
Share on other sites

Update - v1.3

Ok guys major update here, was working with Rydygier, and Kju, i got to thank both of these great guys for taking the time to help a fellow Arma man out.

Want to thank Rydygier once again for his insights, and for kju's help with config code, optimization, and some tools, thanks guys!

    Now for the update, here we go you may want to sit down for this, lol

 

v1.3 
Added RHS USAF weapons

The following weapons for RHS USAF will now zoom:

  • HK416 - (11 varients)
  • M14EBR
  • M16A4 - (5 varients)
  • M240 B
  • M240B (CAP)
  • M240 G
  • M249 - (8 varients)
  •  M27 IR
  • M4 - (9 varients)
  • M4A1 - (29 varients)
  • M590A1 - (Long & Short barrel shotgun)
  • Mk 11 mod - (6 varients)
  • Mk 18 mod - (9 varients)
  • Mp7a2 - (3 varients)

Pistols

  • Glock 17
  • M1911A1
  • M320Glm
  • M9 Beretta

AT launchers

  • Fim 92F 
  • M136 - (3 varients)
  • M3 Maaws
  • M72A7
  • Mk 153 mod (SMAW - 2 varients)

Attachments

  • all nonscope attachments

Other

  • Rebuilt the original config, thanks to kju's help i now have a more optimized and functioning config, this config is for the original Weaponsight zoom
  • the mod is modular, a created a new config and tested with my fingers crossed, lol but now you have 2 addons once for  vanilla arma3, apex, marksman dlc, CUP weapons and another addon for RHS USAF weapons

Due note

That if you dont play with RHS, and go to run the mod you will get an error message asking for rhs file, just remove the RHS pbo in the addons folder and it will run.

- steam workshop updated

- Mega updated

- Armaholic updated - Thanks Foxhound!

 

Plans

Next update will be RHS weapons - AFRF

 

Edit ........

I might consider just having RHS by itself in its own mod folder instead of combined with the vanilla file, because if you dont run RHS when launching the vanilla file,

you will get an error message stating RHS is missing which means you need to run RHS.

What do you guys think, leave it as it is, or make this more modular and have RHS by itself?

Once i get RHS finished, I will be doing SMA mod so it might be necessary to do that, thoughts?

  • Like 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

×