Dragon Age (X360) - Profile and AutoHotKey Script

Share and discuss profiles
Post Reply
jfoster

Dragon Age (X360) - Profile and AutoHotKey Script

Post by jfoster »

I made a Dragon Age profile that has been working pretty well with the XBox 360 Controller, and created an AutoHotKey script that will make switching between characters on the inventory screen easier. You could also use the AutoHotKey script to add some keyboard or mouse commands to switch between characters.

Here's the Xpadder Profile. I'm not using the Right Button because it doesn't work on my controller. Note that there are two button sets. The second set is accessed by using the Left Button.

Code: Select all

;----------------------
; Xpadder Profile File for Dragon Age Origins
;----------------------

Version=5.6

[Profile Settings]

[Set Settings]

[Assignments]
Set1Button1Slots=Left Mouse Button (1)
Set1Button2Slots=3
Set1Button3Slots=1
Set1Button4Slots=2
Set1Button5Name=Change Mode
Set1Button5SetSelect=1
Set1Button7Name=(M)ap
Set1Button7Slots=M
Set1Button8Slots=Space
Set1Button9Slots=Tab
Set1Button10Slots=Right Mouse Button (2)
Set1DPadUpName=(H)old
Set1DPadUpSlots=H
Set1DPadRightName=(J)ournal
Set1DPadRightSlots=J
Set1DPadDownSlots=Escape
Set1DPadLeftName=(I)nventory
Set1DPadLeftSlots=I
Set1Stick1UpSlots=W
Set1Stick1RightSlots=E
Set1Stick1DownSlots=S
Set1Stick1LeftSlots=Q
Set1Stick2UpSlots=Mouse Move Up
Set1Stick2UpMouseSpeed=38
Set1Stick2RightSlots=Mouse Move Right
Set1Stick2RightMouseSpeed=38
Set1Stick2DownSlots=Mouse Move Down
Set1Stick2DownMouseSpeed=38
Set1Stick2LeftSlots=Mouse Move Left
Set1Stick2LeftMouseSpeed=38
Set1TriggerLeftSlots=A
Set1TriggerRightSlots=D
Set2Button1Slots=Left Mouse Button (1)
Set2Button2Slots=6
Set2Button3Slots=4
Set2Button4Slots=5
Set2Button5SetSelect=0
Set2Button7Slots=Forward-Slash
Set2Button9Slots=Left Shift
Set2DPadUpSlots=8
Set2DPadRightSlots=9
Set2DPadDownSlots=0
Set2DPadLeftSlots=7
Set2Stick1UpSlots=F1
Set2Stick1RightSlots=F3
Set2Stick1DownSlots=F4
Set2Stick1LeftSlots=F2
Set2Stick2UpSlots=Mouse Wheel Up
Set2Stick2RightSlots=Mouse Move Right
Set2Stick2RightMouseSpeed=32
Set2Stick2DownSlots=Mouse Wheel Down
Set2Stick2LeftSlots=Mouse Move Left
Set2Stick2LeftMouseSpeed=32
Set2TriggerLeftSlots=Left Control,Alt,F7
Set2TriggerLeftTurboRate=24
Set2TriggerRightSlots=Left Control,Alt,F8
And here's the AutoHotKey script. Save this as DragonAge.ahk or whatever, and run it before you run DragonAge. You may have to change the path to DAOriginsLauncher.exe to get the icon to show up correctly, and you definitely have to change the path of Xpadder if you want that to launch.

Code: Select all

; This script runs Xpadder and assigns hotkeys that can be activated through Xpadder.
Menu Tray, Icon, C:\Program Files (x86)\Dragon Age\DAOriginsLauncher.exe

Run, C:\Users\UserName\AppData\Local\Xpadder 5.6\Xpadder.exe

#IfWinActive ahk_class DragonAge
^!F7::Gosub CharClickLeft
#IfWinActive ahk_class DragonAge
^!F8::Gosub CharClickRight

;Clicks the Previous Character Button in the Inventory/Character screen
CharClickLeft:
MouseGetPos, xpos, ypos
Click 550, 273
MouseMove, xpos, ypos, 0
Return

;Clicks the Next Character Button in the Inventory/Character screen
CharClickRight:
MouseGetPos, xpos, ypos
Click 900, 273
MouseMove, xpos, ypos, 0
Return
The Xpadder profile assigns the Left and Right Triggers in Set 2 (activated by holding the Left Button) to Ctrl+Alt+F7 and Ctrl+Alt+F8. The AutoHotKey script assigns Ctrl+Alt+F7 and Ctrl+Alt+F8 to functions that click on the location of the Previous Character and Next Character button in the Inventory Screen. I've got a 1920x1080 screen, so you may have to adjust the x,y values in the lines that say "Click", depending on what resolution you run DA at. If you have two monitors and you right-click on the script tray icon, you can activate the Window spy to tell you the location of those buttons when you move your cursor over them. Optionally, you could take a screenshot of the Inventory window and use Window Spy or probably Photoshop or Irfanview or something to figure out the coordinates of the two buttons.

gotyouagain

Re: Dragon Age Profile and AutoHotKey Script

Post by gotyouagain »

how do i save this as a profile so can load it on xpadder, sorry im new to this

SGTCableDog
Xpadder Xpert
Posts: 1118
Joined: 27 Aug 2009, 03:35
Location: Minnesota, USA
Contact:

Re: Dragon Age Profile and AutoHotKey Script

Post by SGTCableDog »

The top code portion is the Xpadder profile. Click the "Select all" link and [control+C] to copy the text to the clip board. Then in Xpadder click the profile menu and choose the "Paste" option.
Image
I'm not familiar with what is included in the second code box.

dmcly1
Posts: 1
Joined: 06 Jun 2013, 18:11

Re: Dragon Age (X360) - Profile and AutoHotKey Script

Post by dmcly1 »

so when I bring up the profile there is no way to switch to the second set. can you be a little more specific besides "left button"

Primal Fear
Xpadder Xpert
Posts: 2437
Joined: 09 Feb 2010, 16:41
Location: Germany
Contact:

Re: Dragon Age (X360) - Profile and AutoHotKey Script

Post by Primal Fear »

Left button means LB on the Xbox360pad, the button over the left stick around the corner, it is labeled on the original Xbox360pad. Actually called left bumper on Microsoft but most people (including myself) call these buttons shoulder button (like usual on the side of Nintendo and Sony), so what stays is left (shoulder) button.
As long as you hold it, Xpadder will switch to Set2.

Post Reply

Return to “Game Profiles”