XIVCrossbar - A Gamepad Macro Addon

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » Windower » General » XIVCrossbar - A Gamepad Macro Addon
XIVCrossbar - A Gamepad Macro Addon
First Page 2 3 4 ... 10 11 12
Offline
Posts: 25
By Icydeath 2021-01-08 20:59:20
Link | Quote | Reply
 
Icydeath said: »
I'm having targeting issue when cycling through mobs/pc's/trusts using the controllers dpad. The target curser keeps randomly jumping forward and/or backwards a target.

It seems to only happen when I'm in a party.

When I'm solo, ie: no PC's or Trusts in my party. I have no targeting issues.

If it helps, I'm using a Logitech F710.
My brother, who also is having the issue, is using a PlayStation 5 controller.
(which both controllers utilize the ffxi_directinput.ahk)

Looking at the code in ffxi_directinput.ahk I'm thinking it has to do with the CheckPOVState method (starts at line 32) and the if statements.
For example; instead of checking just 0 for up, it might have to be a range of numbers, ie: joyp > 27000 and joyp < 9000 (Those values are wrong of course, just using them as an example)

That's my best guess...
I'm going to try and do some testing by modifying those values. If I end up having success I'll report back ^^.

P.S. I love the addon!

Well i think i was completely wrong on my 'best guess' haha. they are always 0, 9000, 18000 etc... so i have no idea at this point :D
Offline
Posts: 25
By Icydeath 2021-01-09 20:03:05
Link | Quote | Reply
 
Ok I created a fix for ffxi_directinput.ahk
Now targeting works when I'm in a party.

Added the following variable to track the buttons state that opens the list of crossbars where the other variables are initialized.
Code
...
isDialogDown := false


Added a check to see if left trigger, right trigger or start button is down in the CheckPOVState method
Code
...

CheckPOVState:
If WinActive("ahk_class FFXiClass") {
  If (isLeftTriggerDown or isRightTriggerDown or isDialogDown) {
    GetKeyState, joyp, JoyPOV
      If (joyp == 0) {...


In the Joy10 method I set the isDialogDown variable to true/false.
Code
...

; Shows the environment list
Joy10::
If WinActive("ahk_class FFXiClass") {
  SendInput {Ctrl down}
  SendInput {f10 down}
  isDialogDown := true
  SetTimer, WaitForButtonUp10, 10 ; Poll for button setting every 10ms
}
return

WaitForButtonUp10:
If WinActive("ahk_class FFXiClass") {
  if GetKeyState("Joy10")  ; The button is still, down, so keep waiting.
      return
  ; Otherwise, the button has been released.
  SendInput {f10 up}
  SendInput {Ctrl up}
  isDialogDown := false
  SetTimer, WaitForButtonUp10, Off ; Turn off polling
}
return


Here is a pastebin link to the full code
ffxi_directinput.ahk

Hope this helps
[+]
Offline
Posts: 2
By Mithroy 2021-01-10 09:11:10
Link | Quote | Reply
 
-Icydeath, I was having the same issue so used your update, testing it now but seems like its helping so far.
Offline
Posts: 25
By Icydeath 2021-01-10 12:53:37
Link | Quote | Reply
 
I'm actually making a lot of improvements to the code now. When I'm done I'll post it and the OP can decide what to keep for the main repo if he so wishes.
Offline
Posts: 23
By neonrage 2021-01-11 11:11:28
Link | Quote | Reply
 
Is there a way to reposition the location of the hotbar?

Nevermind, found it in the settings.xml!
Code
        <Style>
            <HotbarSpacing>56</HotbarSpacing>
            <OffsetX>0</OffsetX>
            <OffsetY>-100</OffsetY>
            <SlotAlpha>150</SlotAlpha>
            <SlotSpacing>6</SlotSpacing>
        </Style>
Offline
Posts: 25
By Icydeath 2021-01-13 21:51:37
Link | Quote | Reply
 
Below is what I've done so far. At the bottom of the post is a link to the download.

Some notes before using.
  • If you already use the addon make a backup of your config.ini, ffxi_directinput.ahk, and ffxi_xinput.ahk files. So you can copy them back over and not have to reconfig your controller.

  • Remember to enable the 'Run' plugin via the windower launcher. The plugin enables the addon to automatically start the AHK scripts when it loads.

  • I recommend backing up your xivcrossbar/data folder incase something goes wrong


The changes...
  • ffxi_directinput.ahk - fixed an issue with targeting when in a party. (may need to be done with ffxi_xinput.ahk as well? See my previous post.)

  • New ahk folder that has directinput scripts for logitech F710, flight pad pro and ps5

  • killahk.bat to kill the AHK scripts.

  • Removed resources folder, addon now uses windowers resource data.

  • Removed mountroulette library, you should just enable the MountRoulette addon via the windower launcher

  • Lots more icons added for abilities and spells.

  • Fixed multiple issues with pet commands, job abilities, etc.

  • Added automatic crossbars switching for SMN. If there is a crossbar that is the same name as the avatar being casted it will automatically switch to that crossbar.
    When you use the Release command it will automatically switch back to the default crossbar.


New settings --> xivcrossbar/data/settings.xml
  • use_directinput [true/false] (default: true) set to false if your controller isn't direct input

  • use_xinput [true/false] (default: true) set to false if your controller isn't x-input

  • enable_superwarp_all [true/false] (default: false) set to true to enable the all command when creating warp macros.

  • on_unload_killahk [true/false] (default: false) set to true if you want to terminate the ahk scripts when the addon is unloaded. Only works if you are using the 'Run' plugin.


GUI system changes
  • Added ability to add an "Execute Command" (ex) placeholder and select its icon.

  • images/icons/iconpack/default/GENERATE_ICON_LIST.bat - Run this batch file if you added new icons and you want to use them when creating a "Execute Command" via the GUI system.

  • Added Superwarp macro creation. The screen allows you to pick either Survival guide or Home point areas.


Even though there is a lot more I want to do (refactoring and features), I thought this would be a good time to share the changes I've made with the OP.
I would like to avoid two different versions being managed in Github if possible.

xivcrossbar v0.1.2i

edit: changed the download to go through orangedox, it tracks how many times the file is downloaded so I can see if the interested is high or not. If its high, I will move the project to github and continue to make improvements for everyone.
[+]
Offline
Posts: 23
By neonrage 2021-01-14 15:08:51
Link | Quote | Reply
 
Icydeath said: »
(may need to be done with ffxi_xinput.ahk as well? See my previous post.)

I can confirm that when in a party, swapping targets jumps over enemies, making it VERY hard to target a specific mob. This is with an XBox controller using ffxi_xinput.ahk.

Do you think the changes you made in ffxi_directinput.ahk would carry over into edits in the xinput file?
Offline
Posts: 25
By Icydeath 2021-01-14 19:04:38
Link | Quote | Reply
 
I think you would have to implement something like the CheckPOVState method in ffxi_directinput.ahk and a timer (like above the checkpovstate method)... I'm unable to test that theory, but if you figure it out please do share you findings :D
Offline
Posts: 23
By neonrage 2021-01-14 20:15:12
Link | Quote | Reply
 
Could you quickly explain why you had to add the wait to Joy10 only (what button is Joy10?) and not any of the other Joy functions?
Offline
Posts: 25
By Icydeath 2021-01-15 06:29:41
Link | Quote | Reply
 
that is the start button for a logitech F710 a PS5 controller.
Offline
Posts: 25
By Icydeath 2021-01-15 12:19:52
Link | Quote | Reply
 
Icydeath said: »
that is the start button for a logitech F710 a PS5 controller.

I guess you asked me to explain why and not just what it was. Sorry about that.

Since the start button is used to show the additional crossbars menu we want to keep track of its up/down state so we know if we should be sending another key to navigate the menu when the dpad is used.

Hope that helps,
Brent
Offline
Posts: 23
By neonrage 2021-01-15 15:16:28
Link | Quote | Reply
 
Thanks for the work on this Icydeath.

Two minor updates when testing the AWESOME avatar auto-switch function you added.

1) Added Siren to the avatar list in player.lua line 40:
Code
local avatar_names = S{'Shiva','Ramuh','Garuda','Leviathan','Diabolos','Titan','Fenrir','Ifrit','Carbuncle','Fire Spirit','Air Spirit','Ice Spirit','Thunder Spirit','Light Spirit','Dark Spirit','Earth Spirit','Water Spirit','Cait Sith','Alexander','Odin','Atomos','Siren'}


2) Cait Sith was not working with the autoswitch. I suspect it is because the spell has a space in the name and the set lists do not let you put a space in them. I added some quick and dirty code to fix this for just Cait. Here:
Code
	if action.type == 'ma' and avatar_names:contains(action.action:capitalize()) then
		local env = nil
		local abil_name_lc = action.action:lower()
		for hb,_ in pairs(self.hotbar) do
			if abil_name_lc == hb:lower() or abil_name_lc:startswith(hb:lower()) then
				env = hb
				break
			end
			
			if abil_name_lc:contains("cait") then
				set_active_environment("CaitSith")
			end
			
		end


I haven't been able to fix the targeting issues while in a party yet for directinput.
Offline
Posts: 25
By Icydeath 2021-01-15 17:33:25
Link | Quote | Reply
 
You mean for xinput? cause its working for directinput :D. I just flipped my controller over to xinput (forgot it had a switch to do that) I'm going to see can get it working.
Offline
Posts: 23
By neonrage 2021-01-15 17:49:41
Link | Quote | Reply
 
Whichever the native Xbox controller is, is broken ;). Xinput, yea!

On another note, do you happen to know what exactly this is meant for, in the settings.xml file?
Code
        <Controls>
            <ToggleBattleMode>43</ToggleBattleMode>
        </Controls>
Offline
Posts: 25
By Icydeath 2021-01-15 18:17:47
Link | Quote | Reply
 
neonrage said: »
Whichever the native Xbox controller is, is broken ;). Xinput, yea!

On another note, do you happen to know what exactly this is meant for, in the settings.xml file?
Code
        <Controls>
            <ToggleBattleMode>43</ToggleBattleMode>
        </Controls>

I think that may be leftover xivhotbar code that may or may not be used in the sea of files lol.
Offline
Posts: 25
By Icydeath 2021-01-15 18:19:46
Link | Quote | Reply
 
Can you give this ffxi_xinput.ahk a try to see if it fixes the targeting issue?

ffxi_xinput.ahk

line 284 is the line I added. I'm thinking that should do it, but we'll see after your testing :D
[+]
Offline
Posts: 23
By neonrage 2021-01-16 07:39:46
Link | Quote | Reply
 
Icydeath said: »
Can you give this ffxi_xinput.ahk a try to see if it fixes the targeting issue?

Initial testing looks good!
Offline
Posts: 25
By Icydeath 2021-01-16 13:16:02
Link | Quote | Reply
 
neonrage said: »
Icydeath said: »
Can you give this ffxi_xinput.ahk a try to see if it fixes the targeting issue?

Initial testing looks good!

Sweet!
Offline
Posts: 23
By neonrage 2021-01-17 14:44:05
Link | Quote | Reply
 
Targeting looks good!

Have you noticed after using an ability, the last selected crossbar slot has a white flashing dot in it repeatedly? It continues until you activate a different crossbar action, and then that one continues to blink (the same indicator as right when you use a crossbar item but over and over and the action doesn't actually try to execute again, its just a visual indicator). I believe this just started with the latest edits.
 Bahamut.Greyfawkz
Offline
Server: Bahamut
Game: FFXI
user: gymj1m
Posts: 462
By Bahamut.Greyfawkz 2021-01-17 17:10:14
Link | Quote | Reply
 
Any idea why I can't check "enable hat switches" and mark "Enable XInput"?

The second I mark either, it clears the other out.
Offline
Posts: 23
By neonrage 2021-01-17 18:22:20
Link | Quote | Reply
 
They are mutually exclusive. You enable one or the other but not both.

Bahamut.Greyfawkz said: »
Any idea why I can't check "enable hat switches" and mark "Enable XInput"?

The second I mark either, it clears the other out.
Offline
Posts: 2
By Mithroy 2021-02-07 20:43:59
Link | Quote | Reply
 
I updated to v0.1.2i, and so far is working good. But I am trying to find the setting that changes where on the screen the hotbar appears at. currently it is overlapping my chatbox.

Edit: found it, but could you make it easier to find by chance incase other people have this question?
 Bahamut.Jishnu
Offline
Server: Bahamut
Game: FFXI
user: Zhaoyan
Posts: 3
By Bahamut.Jishnu 2021-02-25 18:30:10
Link | Quote | Reply
 
How do I add abilities that are not listed by default? For example, when I'm on Corsair and I go to add a weaponskill, Savage Blade is not an option. Also, thanks for all the hard work, this is a pretty amazing advancement for controller users.

Edit: I figured it out sort of. I just added a different weaponskill then went in and changed it in my character file.

However, I'm noticing ever since I installed ahk and the addon, the enter key on my controller keeps sending multiple commands every time I press a button. Not every time but often enough to be annoying.
 Bahamut.Kelg
Offline
Server: Bahamut
Game: FFXI
user: Kelg
Posts: 58
By Bahamut.Kelg 2021-03-05 19:20:24
Link | Quote | Reply
 
Could this be used alongside something like the rewasd controller mapping program to create the XIV crossbar without the blank macrobook appearing at the top?

Great job making this btw, very well done.
Offline
Posts: 130
By Aliekber 2021-03-06 14:26:15
Link | Quote | Reply
 
@Jishnu
Are you sure you've blanked out your submit button from the native FFXI controller config?

I'll take a look at COR and see what's going on. It should show all WSes you have, even quested ones like Savage Blade.

@Kelg
You could, but you would either lose the ability to use the d-pad to navigate your menus, change targets, etc., or you would accidentally navigate menus, change targets, etc. when using bindings mapped to the d-pad. The underlying issue is that we use the macro books to capture use up the gamepad's d-pad input, because we don't have a way of programmatically creating or filtering d-pad presses (meaning we can't just send the inputs only when we want them, they are just always sent). Instead, the macro books being open makes your d-pad presses do nothing except move you around the macro book. Ideally, we could just prevent the d-pad press from reaching FFXI altogether, and supposedly we'll be able to do things like that in Windower 5.

@Everyone
FYI, I haven't logged in in a while (and as such, haven't been on FFXIAH much), but I am still interested in maintaining this, so if you have a bug to report, or are having a problem, please submit an issue report through the Github page, which automatically emails me. I've updated the original post of this thread to say that as well.
Offline
Posts: 130
By Aliekber 2021-03-07 18:48:55
Link | Quote | Reply
 
@Jishnu
I'm not able to repro your Savage Blade problem. The way I get the WSes to show in the WS binding menu is by using
Code
windower.ffxi.get_abilities().weapon_skills

so the underlying problem is that Windower itself doesn't think you have Savage Blade for whatever reason.

The most likely explanation I can think of is that you didn't have a sword equipped* at the time you were binding your WSes. This would cause the issue you saw, because the API only tells me about WSes you can use with your currently-equipped weapons.

*Or you had a non-Naegling/Kaja Sword equipped, and haven't completed the Savage Blade WS quest.
 Bahamut.Jishnu
Offline
Server: Bahamut
Game: FFXI
user: Zhaoyan
Posts: 3
By Bahamut.Jishnu 2021-03-07 23:57:00
Link | Quote | Reply
 
Aliekber said: »
@Jishnu
I'm not able to repro your Savage Blade problem. The way I get the WSes to show in the WS binding menu is by using
Code
windower.ffxi.get_abilities().weapon_skills

so the underlying problem is that Windower itself doesn't think you have Savage Blade for whatever reason.

The most likely explanation I can think of is that you didn't have a sword equipped* at the time you were binding your WSes. This would cause the issue you saw, because the API only tells me about WSes you can use with your currently-equipped weapons.

*Or you had a non-Naegling/Kaja Sword equipped, and haven't completed the Savage Blade WS quest.

I do have the quest completed but I probably had daggers equipped when I was setting up the bindings so that's probably the issue.

Also, FYI regarding the multiple commands issue, I do use rewasd so I didn't know if that might affect functionality because I did have the ffxi gamepad config set up correctly.
Offline
Posts: 130
By Aliekber 2021-03-08 01:11:24
Link | Quote | Reply
 
Rewasd might affect the functionality, but I don't have it so I can't check, unfortunately.
Offline
Posts: 42
By Souki 2021-04-05 05:54:09
Link | Quote | Reply
 
This is going to sound really dumb, but I cannot get the addon to setup properly.
I downloaded the autohotkey app as instructed, and when I go to set up the buttons as instructed, the addon is not registering the button presses. I've no idea what I'm doing and it's getting a tad frustrating.

Edit: Nevermind. Fixed it lol.
Offline
Server: Asura
Game: FFXI
user: Kaiba
Posts: 11
By Asura.Kingdomhearts 2021-04-05 18:31:09
Link | Quote | Reply
 
Bahamut.Jishnu said: »
Also, FYI regarding the multiple commands issue, I do use rewasd so I didn't know if that might affect functionality because I did have the ffxi gamepad config set up correctly.

Just wanted to chime in and say thank you for making this, the crossbar was one of the few things I loved about XIV.

I am also having the quoted issue above and wanted to mention in case it helped that I am not using rewasd. And although it's not as obvious, I have seen the issue with other buttons as well, such as the square button when changing pages on the main menu.
First Page 2 3 4 ... 10 11 12