FarCry4 weapons change using 1,2,3 or 4 keys

Post or request custom configuration files.
Post Reply
Jean-Roch Blais
Posts: 14
Joined: Wed Jan 07, 2015 7:09 pm

FarCry4 weapons change using 1,2,3 or 4 keys

Post by Jean-Roch Blais »

Hello from icy Montreal....
Here are my macros to do weapons change using keys 1, 2, 3, 4 in FarCry 4 on a PS4. The v key is assigned to L1 which brings the weapons wheel menu, and with a mouse move you can select the weapon; up, right, down and left with 45 degrees moves also for secondary weapons. Sorry for my poor english ! I came up with these macros,

Code: Select all

# top wheel weapon
MACRO KEYDOWN F1         # move up loop macro
MAXIS 1 -250             # move cursor along negative y axis 
KEYDOWN F1               # that's how you loop ! ... and to stop it, call it back

# 3 o'clock weapon
MACRO KEYDOWN F2         # move right 
MAXIS 0 +250
KEYDOWN F2

# 6 o'clock
MACRO KEYDOWN F3         # now you know :-)
MAXIS 1 +250
KEYDOWN F3

# 9 o'clock
MACRO KEYDOWN F4
MAXIS 0 -250
KEYDOWN F4

MACRO KEYDOWN 1          # key 1 pressed...
KEYDOWN v                # display the weapons wheel
DELAY 60
KEYDOWN F1               # start the move up macro
DELAY 60

MACRO KEYUP 1            # key 1 released...
KEYDOWN F1               # stop the move up macro
DELAY 60
KEYUP v                  # close the weapons wheel

MACRO KEYDOWN 2
KEYDOWN v
DELAY 60
KEYDOWN F2
DELAY 60

MACRO KEYUP 2
KEYDOWN F2
DELAY 60
KEYUP v

MACRO KEYDOWN 3
KEYDOWN v
DELAY 60
KEYDOWN F3
DELAY 60

MACRO KEYUP 3
KEYDOWN F3
DELAY 60
KEYUP v

MACRO KEYDOWN 4
KEYDOWN v
DELAY 60
KEYDOWN F4
DELAY 60

MACRO KEYUP 4
KEYDOWN F4
DELAY 60
KEYUP v
The F1 thru F4 macros work very well and I can change weapon with key 1 to 4. I tried different methods but this ones works for me and for that game ... See next post for the 45 degree axis moves ! I hope this helps anyone understand the macros, which are somewhat lightly explained, to say the least, in pure unix style ...

I'm still impress by the sheer amount of work involved ... thank's again Matlo !

Here is my config:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <controller id="1" dpi="6400" type="DS4">
    <configuration id="1">
      <trigger type="keyboard" id="0" name="" button_id="b" switch_back="no" delay="0"/>
      <mouse_options_list>
        <mouse name="" id="0" mode="Aiming" buffer_size="1" filter="0.00"/>
      </mouse_options_list>
      <intensity_list/>
      <button_map>
        <button id="abs_axis_13" label="">
          <device type="mouse" id="0" name=""/>
          <event type="button" id="BUTTON_RIGHT"/>
        </button>
        <button id="abs_axis_9" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="SPACE"/>
        </button>
        <button id="abs_axis_8" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="LCTRL"/>
        </button>
        <button id="abs_axis_1" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="ESCAPE"/>
        </button>
        <button id="abs_axis_0" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="k"/>
        </button>
        <button id="abs_axis_14" label="">
          <device type="mouse" id="0" name=""/>
          <event type="button" id="BUTTON_LEFT"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="LEFT"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="DOWN"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="RIGHT"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="UP"/>
        </button>
        <button id="abs_axis_2" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="p"/>
        </button>
        <button id="abs_axis_17" label="">
          <device type="keyboard" id="0" name="PS4 Controller"/>
          <event type="button" id="m"/>
        </button>
        <button id="abs_axis_10" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="2"/>
        </button>
        <button id="abs_axis_9" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="0"/>
        </button>
        <button id="abs_axis_8" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="1"/>
        </button>
        <button id="abs_axis_7" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="3"/>
        </button>
        <button id="abs_axis_11" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="9"/>
        </button>
        <button id="abs_axis_12" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="10"/>
        </button>
        <button id="abs_axis_0" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="4"/>
        </button>
        <button id="abs_axis_1" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="6"/>
        </button>
        <button id="abs_axis_15" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="7"/>
        </button>
        <button id="abs_axis_16" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="8"/>
        </button>
        <button id="abs_axis_2" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="5"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="11"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="14"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="12"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="button" id="13"/>
        </button>
        <button id="abs_axis_7" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="q"/>
        </button>
        <button id="abs_axis_16" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="f"/>
        </button>
        <button id="abs_axis_10" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="e"/>
        </button>
        <button id="abs_axis_15" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="LSHIFT"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="t"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="9"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="h"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="z"/>
        </button>
        <button id="abs_axis_12" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="g"/>
        </button>
        <button id="abs_axis_11" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="v"/>
        </button>
        <button id="abs_axis_10" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="r"/>
        </button>
      </button_map>
      <axis_map>
        <axis id="rel_axis_0-" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="a"/>
        </axis>
        <axis id="rel_axis_1+" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="s"/>
        </axis>
        <axis id="rel_axis_0+" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="d"/>
        </axis>
        <axis id="rel_axis_1-" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="w"/>
        </axis>
        <axis id="rel_axis_3" label="Aiming - y axis">
          <device type="mouse" id="0" name=""/>
          <event type="axis" id="y" dead_zone="1" multiplier="5.00" exponent="1.00" shape=""/>
        </axis>
        <axis id="rel_axis_2" label="Aiming - x axis">
          <device type="mouse" id="0" name=""/>
          <event type="axis" id="x" dead_zone="1" multiplier="5.00" exponent="1.00" shape=""/>
        </axis>
        <axis id="rel_axis_0" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="axis" id="0" dead_zone="0" multiplier="0.004" exponent="1.00" shape=""/>
        </axis>
        <axis id="rel_axis_1" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="axis" id="1" dead_zone="0" multiplier="0.004" exponent="1.00" shape=""/>
        </axis>
        <axis id="rel_axis_2" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="axis" id="2" dead_zone="0" multiplier="0.004" exponent="1.00" shape=""/>
        </axis>
        <axis id="rel_axis_3" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="axis" id="3" dead_zone="0" multiplier="0.004" exponent="1.00" shape=""/>
        </axis>
        <axis id="abs_axis_13" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="axis" id="4" dead_zone="0" multiplier="0.008" exponent="1.00" shape=""/>
        </axis>
        <axis id="abs_axis_14" label="">
          <device type="joystick" id="0" name="PS4 Controller"/>
          <event type="axis" id="5" dead_zone="0" multiplier="0.008" exponent="1.00" shape=""/>
        </axis>
      </axis_map>
    </configuration>
    <configuration id="2">
      <trigger type="mouse" id="0" name="" button_id="BUTTON_RIGHT" switch_back="yes" delay="0"/>
      <mouse_options_list>
        <mouse name="" id="0" mode="Aiming" buffer_size="1" filter="0.00"/>
      </mouse_options_list>
      <intensity_list/>
      <button_map>
        <button id="abs_axis_16" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="f"/>
        </button>
        <button id="abs_axis_15" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="LSHIFT"/>
        </button>
        <button id="abs_axis_12" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="g"/>
        </button>
        <button id="abs_axis_11" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="v"/>
        </button>
        <button id="abs_axis_10" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="e"/>
        </button>
        <button id="abs_axis_7" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="q"/>
        </button>
        <button id="abs_axis_13" label="">
          <device type="mouse" id="0" name=""/>
          <event type="button" id="BUTTON_RIGHT"/>
        </button>
        <button id="abs_axis_9" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="SPACE"/>
        </button>
        <button id="abs_axis_8" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="LCTRL"/>
        </button>
        <button id="abs_axis_1" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="ESCAPE"/>
        </button>
        <button id="abs_axis_0" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="k"/>
        </button>
        <button id="abs_axis_14" label="">
          <device type="mouse" id="0" name=""/>
          <event type="button" id="BUTTON_LEFT"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="LEFT"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="DOWN"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="RIGHT"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="UP"/>
        </button>
        <button id="abs_axis_2" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="p"/>
        </button>
      </button_map>
      <axis_map>
        <axis id="rel_axis_0-" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="a"/>
        </axis>
        <axis id="rel_axis_1+" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="s"/>
        </axis>
        <axis id="rel_axis_0+" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="d"/>
        </axis>
        <axis id="rel_axis_1-" label="">
          <device type="keyboard" id="0" name=""/>
          <event type="button" id="w"/>
        </axis>
        <axis id="rel_axis_3" label="Aiming - y axis">
          <device type="mouse" id="0" name=""/>
          <event type="axis" id="y" dead_zone="1" multiplier="14.00" exponent="1.00" shape=""/>
        </axis>
        <axis id="rel_axis_2" label="Aiming - x axis">
          <device type="mouse" id="0" name=""/>
          <event type="axis" id="x" dead_zone="1" multiplier="7.00" exponent="1.00" shape=""/>
        </axis>
      </axis_map>
    </configuration>
  </controller>
</root>
Last edited by Jean-Roch Blais on Wed Apr 01, 2015 6:17 pm, edited 1 time in total.
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: FarCry4 weapons change using 1,2,3 or 4 keys

Post by Matlo »

Thanks for sharing!

Please use code tags for macros or configs, and don't copy any xml using internet explorer as it breaks the xml (use a text editor instead).
GIMX creator
Jean-Roch Blais
Posts: 14
Joined: Wed Jan 07, 2015 7:09 pm

Re: FarCry4 weapons change using 1,2,3 or 4 keys

Post by Jean-Roch Blais »

Ok let's try those code tags... here are the same macros but with the 45 degrees secondary weapon assigned to keys 6,7,8 and 9...

Code: Select all

MACRO KEYDOWN F1
MAXIS 1 -250
KEYDOWN F1

MACRO KEYDOWN F2
MAXIS 0 +250
KEYDOWN F2

MACRO KEYDOWN F3
MAXIS 1 +250
KEYDOWN F3

MACRO KEYDOWN F4
MAXIS 0 -250
KEYDOWN F4





MACRO KEYDOWN 1
KEYDOWN v
DELAY 60
KEYDOWN F1
DELAY 60

MACRO KEYUP 1
KEYDOWN F1
DELAY 60
KEYUP v



MACRO KEYDOWN 2
KEYDOWN v
DELAY 60
KEYDOWN F2
DELAY 60

MACRO KEYUP 2
KEYDOWN F2
DELAY 60
KEYUP v



MACRO KEYDOWN 3
KEYDOWN v
DELAY 60
KEYDOWN F3
DELAY 60

MACRO KEYUP 3
KEYDOWN F3
DELAY 60
KEYUP v


MACRO KEYDOWN 4
KEYDOWN v
DELAY 60
KEYDOWN F4
DELAY 60

MACRO KEYUP 4
KEYDOWN F4
DELAY 60
KEYUP v


MACRO KEYDOWN 6
KEYDOWN v
DELAY 60
KEYDOWN F1
KEYDOWN F2
DELAY 60

MACRO KEYUP 6
KEYDOWN F1
KEYDOWN F2
DELAY 60
KEYUP v


MACRO KEYDOWN 7
KEYDOWN v
DELAY 60
KEYDOWN F2
KEYDOWN F3
DELAY 60

MACRO KEYUP 7
KEYDOWN F2
KEYDOWN F3
DELAY 60
KEYUP v



MACRO KEYDOWN 8
KEYDOWN v
DELAY 60
KEYDOWN F3
KEYDOWN F4
DELAY 60

MACRO KEYUP 8
KEYDOWN F3
KEYDOWN F4
DELAY 60
KEYUP v



MACRO KEYDOWN 9
KEYDOWN v
DELAY 60
KEYDOWN F1
KEYDOWN F4
DELAY 60

MACRO KEYUP 9
KEYDOWN F1
KEYDOWN F4
DELAY 60
KEYUP v


Have fun !
Post Reply