Jump to content
Igitur

Stance Adjustment revised

Recommended Posts

This addon is an overhaul of the game's default stance adjustment mechanism. It adds two new temporary modes to the default (persistent) game mode and allows the player to enter the adjusted stances on the move, dynamically. The leaning stances are processed as well.

 

The mod also features a custom color-based stance indicator system that provides clear and complete awareness of your current stance and mode, as well as an embedded mousewheel function to switch quickly through all vertical stances.

 

 

 

 

 

STANCE ADJUSTMENT MOD  -
_________________________

 

Version :  Igit_ADJv4 - (09.15.2015) - Signed.

 

Author : Igitur

 

Requirements : ArmA3.

_________________________

 

 

Installation : Extract the Zip file in your main Arma 3 directory and copy/paste the Igit_ADJv4 file in your userconfig (create one if necessary). Import and enable @Igit_ADJv4 in your game expansions menu.

 

Userconfig :  Right click on the included IGIT_ADJV4.hpp and select "Edit with notepad".

 

 IGIT_Adj_DefaultMode = 1;   // 1 = Full Temporary (Yellow) / 2 = Semi-temporary (Blue) / 3 = Persistent (White).
 IGIT_Adj_UserKey = "User15";  // defines custom control User15 as your Adjust modifier. Change at will from "User1" to "User20" and bind accordingly in the game's custom controls menu. Works with both keys (single tap) and mouse buttons (single press).
 
 IGIT_Adj_StanceIndicator = 1;   // Displays the mod's custom stance indicator. Better disable the game's indicator in the difficulty menu if you use this one.  Put 0 if you dont need it or prefer the default hud.
 IGIT_Adj_StanceDuration = 10;  // Custom stance indicator duration in seconds. Change at will. Put higher values to simulate permanent HUD.
 IGIT_Adj_StanceColor_FullTemp = [255/255,255/255,0/255,0.6]; // light yellow
 IGIT_Adj_StanceColor_SemiTemp = [0/255,255/255,255/255,0.6]; // light blue
 IGIT_Adj_StanceColor_Persistent = [255/255,255/255,255/255,1]; // white

 Here is a good link to rgba color codes : http://www.december.com/html/spec/colorrgbadec.html
 
 IGIT_Adj_MouseWheel = 1;   // 1 = embedded MouseWheel function enabled. / 0 = disabled.
 
 IGIT_Adj_persistent_key = 46;  // defines adj+C as persistent mode (White) modifier. Vertical and horizontal adjustments are persistent.
 IGIT_Adj_SemiTemporary_key = 47;  // defines adj+V as semi-temporary mode (Blue) modifier. Horizontal adjustments are temporary. Vertical adjustments are persistent.
 IGIT_Adj_FullTemporary_key = 48;  // defines adj+B as full-temporary mode (Yellow) modifier. Vertical and horizontal adustments are temporary.
  

  Note that holding your Adjust modifier will disable the default action bound to the selected key. Choose new keys carefully if you dont want the mod to interfere with your gameplay.
  Check https://resources.bisimulations.com/w/index.php?title=DIK_KeyCodes for a list of key codes.

 

 Usage :

 

1. Select a UserKey in the userconfig file or use the default one (User15). Bind whatever key or mouse button you want to use as your 'Adjust' modifier to that UserKey in the Custom controls menu.
    I do recommend you give a try to MseBtn#5 or MseBtn#4 to make the most of this mod.
2. As a precaution, and especially if you want to keep using the same hotkey you're used to, delete all your current key bindings in the "Adjust stance Up/Down/Left/Right" controls and bind that key in your selected custom control instead.
3. Hold your brand new 'Adjust' modifier and press either 'C', 'V' or 'B' (default keys) to switch from one mode to the other :

 

 'C' - persistent mode : the original game mode,
 'V' - semi-temporary mode : horizontal adjustments are temporary, vertical adjustments remain permanent, or
 'B' - full-temporary mode : horizontal and vertical adjustments are temporary.

 

4. Hold 'Adjust' and hit the WASD keys to play the adjusted stances in the selected mode. Use the leaning keys instead of (or with) the left and right keys for a leaning stance adjustment.
5. Hold 'Adjust' and use the mousewheel to switch through vertical stances.

 

 Limitations :

 

1. To prevent from accidentally throwing grenades I have disabled the possibility to cycle through the throwable items while holding a side stance, except for the persistent mode.  Just release 'Adjust' and select your item, you're in a temporary mode anyway.
    However, because key-combo detection is a mess,  I've only been able to do it for the six usual hotkeys L/RShift, L/RCtrl, L/RAlt. It is therefore recommended to use one of those keys in your combo (ex: LCtrl+G), or just a single key for "cycleThrowItems".
2. For some reason beyond my understanding, holding 'Adjust' + leaning L or R when walking will play your first side step in the opposite direction. Just toggle your leaning key to get round that issue. You're already walking.
3. The mod should work as long as you're reloading saved games inside the current mission, but wont work if you try and reload an exited mission.
4. The 'GROUP' Respawn in MP breaks the mod. Seems to work fine with other types of respawn though.

 

 Credits & thanks :

 

 Tpw for the early version of the mousewheel script. Thank you again mate.
 KillzoneKid and Iceman77 for their GUI tutorials. Priceless for the noob I am.
 VanZant for a method of hooking a script I gratefully imitated.
 

  • Like 1

Share this post


Link to post
Share on other sites

Looks interesting - will give it a go when I get back from work today.

Congrats on first release :)

Share this post


Link to post
Share on other sites

Just a heads up about the problem you might have in the future with this bit of code:

IGIT_ADJ_AKNA_Mse_Adjust = call compile format ["%1", ActionKeysNamesArray "Adjust"]; 

if ("Prim. Mouse Btn." in IGIT_ADJ_AKNA_Mse_Adjust) then {IGIT_ADJ_Mse_Btn = 0};
if ("Sec. Mouse Btn." in IGIT_ADJ_AKNA_Mse_Adjust) then {IGIT_ADJ_Mse_Btn = 1};
if ("Middle Mouse Btn." in IGIT_ADJ_AKNA_Mse_Adjust) then {IGIT_ADJ_Mse_Btn = 2};
if ("Mouse Btn. #4" in IGIT_ADJ_AKNA_Mse_Adjust) then {IGIT_ADJ_Mse_Btn = 3};
if ("Mouse Btn. #5" in IGIT_ADJ_AKNA_Mse_Adjust) then {IGIT_ADJ_Mse_Btn = 4};
if ("Mouse Btn. #6" in IGIT_ADJ_AKNA_Mse_Adjust) then {IGIT_ADJ_Mse_Btn = 5};

ActionKeyNamesArray returns an array of localized strings for keys, so at some point when they introduce other languages besides English and people switch to them "Mouse Btn. #4" won't return that but for example in french "Bouton 4 souris" or something like that.

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

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

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

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

Share this post


Link to post
Share on other sites
Looks interesting - will give it a go when I get back from work today.

Congrats on first release :)

Thanks !

Just a heads up about the problem you might have in the future with this bit of code:

/

ActionKeyNamesArray returns an array of localized strings for keys, so at some point when they introduce other languages besides English and people switch to them "Mouse Btn. #4" won't return that but for example in french "Bouton 4 souris" or something like that.

Good point! I never even thought of that.

@Foxhound : thanks, even though this is still a very early version.

Edited by Igitur

Share this post


Link to post
Share on other sites

Update 08.11.13

- Mousewheel implementation : Credit & thanks to tpw for his excellent code !

- The mod now works in MP (but better in SP).

Edited by Igitur

Share this post


Link to post
Share on other sites

Thanks for this.... Really appreciate your hard work!!! I couldnt do it!!! Thanks.!!!

Share this post


Link to post
Share on other sites
Thanks for this.... Really appreciate your hard work!!! I couldnt do it!!! Thanks.!!!

Thanks Lordprimate. Your feedback is much appreciated :).

Update 08.17.13

- signed version;

- rare game freezes fixed;

- stances are now accessible on the move in all speed modes (run included);

- to prevent accidental fall to side-prone, mousewheel in side stances is now limited to switch from side-stand to side-crouch and vice versa;

- more reliable side-lock system (hit the opposite key once, release, and release the adjust key. Works better when you stop though);

- CBA pre-init EH used instead of post-init makes the mod much more stable in multiplayer.

Edited by Igitur

Share this post


Link to post
Share on other sites
Guest

Updated version frontpaged on the Armaholic homepage.

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

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

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

Share this post


Link to post
Share on other sites

I think I will prefer the temporary side steps way more. Only I wasn't able to lock the side stances. I'm still testing a lot here because ctrl+wasd are too inaccessible for me. I consider using mouse button 4 as a modifier, it works. Stance locking doesn't work for me, maybe because I use Arma III dev version? I'm also very interested in the auto unlocking of the side stances when walking with wasd.

Share this post


Link to post
Share on other sites
I think I will prefer the temporary side steps way more. Only I wasn't able to lock the side stances. I'm still testing a lot here because ctrl+wasd are too inaccessible for me. I consider using mouse button 4 as a modifier, it works. Stance locking doesn't work for me, maybe because I use Arma III dev version? I'm also very interested in the auto unlocking of the side stances when walking with wasd.

Hey tortuosit,

Unfortunately, left ctrl is (to my knowledge) the only way to access the mousewheel without popping up the game's scroll menu. Using the default Adjust key is therefore the simplest way to make the most of the mod. The mouse button implementation is a relic of the previous version and does not work properly anymore. I will clean up the code nonetheless and try to make it fully functiunal again in the next version.

Locking stances is easy once you get the trick and is not dependant of the game version. For instance, to lock stand-right : keep both ADJ+D pressed, hit A briefly, release D, release ADJ. You can always switch to any other stance using ADJ+WASD (or the mousewheel). The four side-stances will remain locked until you decide to move using a mere WASD key (without ADJ).

I'll keep trying to improve this mod (when I find time) and make it as reliable as possible. I'm struggling with the teamSwitch stuff at the moment. Should anyone know an easy way to implement it properly, please feel free to let me know :) !

Share this post


Link to post
Share on other sites

I see. I was using MButton4+WASD for Stance adjustment, which I pretty much like. I hate ctrl as modifier. With your addon, MB4+A/D is adjusting temporary (as long as I hold MB4), which is great. I think I don't need side stance locking anyway.

If you use the mousewheel (i.e. no use of w or s): can vertical stance adjustment be done while walking/jogging/running? Cannot test currently.

ArmA III keybinds are a really complicated topic. Sometimes we press like 3 or 4 buttons at the same time. OMFG :D

Edited by tortuosit

Share this post


Link to post
Share on other sites

temp toggle stance will only be good for me if it can be assigned to a controller like pedals. I need to be able to move left/right with A & D whilst the using the stance but you have A & D cancel the stance.

Share this post


Link to post
Share on other sites

08.27.13

- The mod will now work on Team Switch.

- Simplified lock system : hold 'Adjust' + hit 'Crouch' to lock any stance until a WASD key is pressed.

- Mouse button as 'ADJUST' modifier is working again.

- Controller lateral input is detected. I cant vouch for its behaviour though.

- Note for multiplayer : the mod seems to work flawlessly on 'Base' and 'Side' Respawn types, but for some unknown reason wont work with the 'Group' type.

Edited by Igitur

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

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

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

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

Share this post


Link to post
Share on other sites

Update 09.21.13

- Mouse buttons as 'Adjust' modifiers are now supported in all languages.

interesting, tracking

Thanks for your interest.

Edited by Igitur

Share this post


Link to post
Share on other sites

Finally I had time to test it!

I have to say I really like the implementation of the mouse wheel and that the side step reverts once you move.

However that your "lower" or "upper" crouch reverts once you move leads to some very bad behavior!

For example you cannot move fast away from windows anymore if you are in upper crouch. Because first your soldier will attempt to crouch again and only then move.

Also it becomes very hard to maneuver around windows if you have to get up every time you move away from the window again.

Suggestion: Locking the "lower" and "upper" stances should lock them even through moving. Pressing "crouch" or "stand up" again should revert the stance to normal again.

I hope you take a look at it again!

Best regards!

Share this post


Link to post
Share on other sites

The game update that enabled players to continue walking with their rifle shouldered on the left side rendered this mod largely undesirable to me, as nowadays I use that feature frequently when rounding corners to the right, in order to expose as little of my body as possible when doing so. When using this addon, however, there's no way to keep adjust left or right locked whilst moving about.

I'm currently trying to work out if it would be viable to create an addon which would allow you to assign the adjust stance left and right actions to separate, custom keys. I've worked out a control scheme which would allow the player to switch from left to right whilst moving through urban terrain very efficiently this way, as at the moment I find it awfully cumbersome to have to release the movement keys before adjusting stance and resuming movement. Obviously, though, the option to do this isn't standard.

Share this post


Link to post
Share on other sites
The game update that enabled players to continue walking with their rifle shouldered on the left side rendered this mod largely undesirable to me, as nowadays I use that feature frequently when rounding corners to the right, in order to expose as little of my body as possible when doing so. When using this addon, however, there's no way to keep adjust left or right locked whilst moving about.

I'm currently trying to work out if it would be viable to create an addon which would allow you to assign the adjust stance left and right actions to separate, custom keys. I've worked out a control scheme which would allow the player to switch from left to right whilst moving through urban terrain very efficiently this way, as at the moment I find it awfully cumbersome to have to release the movement keys before adjusting stance and resuming movement. Obviously, though, the option to do this isn't standard.

Hi LuckyLegs,

Yes, that new feature in the original adjustment system is a very positive addition. I'm on something else at the moment, but I'll definitely think of a way to allow users to switch from one system (persistent) to the other (temporary) at will while playing.

Edited by Igitur

Share this post


Link to post
Share on other sites

hi igitur,

thnx for your mod. most i like is the changing stance via mousewheel. don't know why bohemia this dosen't bring to vanilla standard.

but i have problem with the mod and the acutal dev. version of arma 3.

while im in a in beetween stance (you know the stance with the arrow sign on the indicator) i can't walk.

only in normal stance mode my soldier is movable. can you please check this?

suggestion 1:

please change the way your mod handles the sitestep stance (don't know the right description)

what i don't like is that the mod doesn't keep this stance after a move. t think this should also be

lockable with a key as the sneak stance (holding weapon diagonal).

suggestion 2

is it possible to develop the following feature:

change the side stances via mousewheel side klick (my mousewheel can klick left and right)

hope you find time to fix the above written bug and maybe you find the suggestions helpful

1000 thnx

johnny

Share this post


Link to post
Share on other sites

Version : 08.23.14

Persistent mode implementation.

Two modes are now available. You can switch between them by holding your 'Adjust' modifier and pressing either 'C' or 'V'.

ADJ+V : temporary mode. The mod will work like the previous version.

ADJ+C : persistent mode. The mod will behave like the original system.

This version (WIP) will be my entry in the MANW mod contest. Even though it doesn't yet work fully as intended, I think it's good enough to be shared and tested. Thanks in advance for your support, should you want to see these features implemented in the vanilla game.

Share this post


Link to post
Share on other sites

What if..... the mousewheel changes the stance and LCtrl+mousewheel is for the action menu..? I would like that as stance should be more fluent than accessing the menu.

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

×