XIVCrossbar - A Gamepad Macro Addon

Eorzea Time
 
 
 
Language: JP EN FR DE
Version 3.1
New Items
users online
Forum » Windower » General » XIVCrossbar - A Gamepad Macro Addon
XIVCrossbar - A Gamepad Macro Addon
First Page 2 3 ... 7 8 9 10 11
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 415
By Quetzalcoatl.Khajit 2022-08-02 16:06:55
Link | Quote | Reply
 
Thanks to some help on the windower discord I've made a basic bar swap for going in/out of town. I do recall that world.area tends to treat {S} zones and Al Zahbi as a place you couldn't possibly want to see combat in, so it's not perfect code, but it's functional and your biggest issue most of the time should be having to manually swap for beseiged.
Edit town and basic to whatever you like.
Code
windower.raw_register_event('zone change', function()
    if areas.Cities:contains(world.area) then
        windower.send_command('xb bar Town')
    else windower.send_command('xb bar Basic')
    end
end)


Now that I've made this I'm going to have to make a reasonable town bar. Anyone have any suggestions?
Currently I'm going with
HP warps:Rabao, Mhaura,Western Adoulin 2 (sparks), Port Jueno 2, Home City near HTMB KI, Aht urghan Whitegate 1,Ambuscade v1 warp of the month,
Survival guides
/dimmer for warping to reisen
/warp
buy/sell sparks gear
Altana repast macro with a 15 second warning to get in range.
Misc RR
[+]
By Asura.Kuroganashi 2022-08-02 17:29:28
Link | Quote | Reply
 
would this work properly ?

Any suggestions?
Code
if player.equipment.main == Sword then
	windower.send_command('xb bar Basic')

elseif player.equipment.main == Club then
	windower.send_command('xb bar Club')
	
end
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 415
By Quetzalcoatl.Khajit 2022-08-02 18:34:33
Link | Quote | Reply
 
I don't think there is a library of swords/club to define anything simply as "club" or "sword". You're going to have to use the actual item name.
Gearswap also needs to react to something. I'm not seeing anything immediately obvious in the reference page, so you might need that to be attached to an aftercast somewhere so that it checks after any action? In said case you could possibly double tap whatever your ws combo is since the first one would make GS trigger a check, and the second would be after it changes to the right bar?
Offline
Posts: 8
By shmobertson 2022-08-02 19:18:16
Link | Quote | Reply
 
I have been messing around with switching bars in gearswap and so far this has been working well for me. I use Selindrile's gearswap btw, and he allows for function overrides.
Code
function user_job_status_change(newStatus, oldStatus, eventArgs)
	if newStatus == 'Engaged' and (player.equipment.main == 'Umaru' or player.equipment.main == 'Soboro Sukehiro') then
		windower.send_command('xb bar Great-Katana')
	elseif newStatus == 'Engaged' and player.equipment.main == 'Norifusa' then
		windower.send_command('xb bar Bow')
	elseif newStatus == 'Engaged' and player.equipment.main == 'Blurred Lance' then
		windower.send_command('xb bar Polearm')
	elseif newStatus =='Idle' then 
		windower.send_command('xb bar Basic')
	else
		windower.send_command('xb bar Basic')
	end
end

function user_job_state_change(stateField, newValue, oldValue)
	if stateField == 'Weapons' and player.status == 'Engaged' then
		if (newValue == 'Umaru' or newValue == 'ProcWeapon') then
			windower.send_command('xb bar Great-Katana')
		elseif newValue == 'Bow' then
			windower.send_command('xb bar Bow')
		elseif newValue == 'Polearm' then
			windower.send_command('xb bar Polearm')
		else
			windower.send_command('xb bar Basic')
		end
	end
end
[+]
Offline
Posts: 38
By 1thenumber 2022-08-02 19:33:24
Link | Quote | Reply
 
shmobertson said: »
I have been messing around with switching bars in gearswap and so far this has been working well for me. I use Selindrile's gearswap btw, and he allows for function overrides.

Oh dang, this is pretty clever - thanks for sharing! I have just been using scripts that execute 3-4 different WSes per script, one for each weapon type. This is a much better option that would let me use the built-in skillchain UI. Nice work!
Offline
Posts: 38
By 1thenumber 2022-08-02 19:38:01
Link | Quote | Reply
 
If we are making requests - I don't know how possible this is, but my biggest issue with this add-on is actually an issue with the Macro Palettes that gets stuck on screen and I have to cancel out to get rid of it. It doesn't happen often, but it can ruin a fight if it happens at the wrong time.

Example would be, I target and cast a spell on mob A. I try to switch target to mob B and cast another spell, but the macro palette is stuck open and pressing the cross button on my dualsense does nothing other than try to select the macro palette button over and over again with no results. I have to hit my circle button to close the macro palette, then XIVcrossbar works like normal. I'm guessing I could also press R2/L2 to reset it as well. The issue is not in clearing it, it is that the problem is happening but I haven't noticed it yet.

Not sure if this is even possible to fix, but completely removing the macro palette and it's UI would be the best feature I could ask for.
Offline
Posts: 8
By shmobertson 2022-08-02 20:14:49
Link | Quote | Reply
 
It would also be nice to have a swap function. That way if you wanted to swap an "ex" slot, you wouldn't have to modify the xml manually.
By Asura.Kuroganashi 2022-08-02 22:02:52
Link | Quote | Reply
 
shmobertson said: »
I have been messing around with switching bars in gearswap and so far this has been working well for me. I use Selindrile's gearswap btw, and he allows for function overrides.
Code
function user_job_status_change(newStatus, oldStatus, eventArgs)
	if newStatus == 'Engaged' and (player.equipment.main == 'Umaru' or player.equipment.main == 'Soboro Sukehiro') then
		windower.send_command('xb bar Great-Katana')
	elseif newStatus == 'Engaged' and player.equipment.main == 'Norifusa' then
		windower.send_command('xb bar Bow')
	elseif newStatus == 'Engaged' and player.equipment.main == 'Blurred Lance' then
		windower.send_command('xb bar Polearm')
	elseif newStatus =='Idle' then 
		windower.send_command('xb bar Basic')
	else
		windower.send_command('xb bar Basic')
	end
end

function user_job_state_change(stateField, newValue, oldValue)
	if stateField == 'Weapons' and player.status == 'Engaged' then
		if (newValue == 'Umaru' or newValue == 'ProcWeapon') then
			windower.send_command('xb bar Great-Katana')
		elseif newValue == 'Bow' then
			windower.send_command('xb bar Bow')
		elseif newValue == 'Polearm' then
			windower.send_command('xb bar Polearm')
		else
			windower.send_command('xb bar Basic')
		end
	end
end

doesn't work properly if not engaged i try to swap some stuff and still doesn't work properly ^^;

Guess not gonna be that simple as to re-use code.
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 415
By Quetzalcoatl.Khajit 2022-08-03 17:25:00
Link | Quote | Reply
 
That code is entirely set to activate when you engage. The code is working entirely as intended.
It's not much work to copy that into a new function and put =/= instead of == for your disengaged sets and strip down all of that extra code. Although it probably won't change your bar when you first login.
By Asura.Kuroganashi 2022-08-03 22:10:39
Link | Quote | Reply
 
Quetzalcoatl.Khajit said: »
That code is entirely set to activate when you engage. The code is working entirely as intended.
It's not much work to copy that into a new function and put =/= instead of == for your disengaged sets and strip down all of that extra code. Although it probably won't change your bar when you first login.
thing is, didn't work when engaged........ so that is why i was thrown off.
Offline
Posts: 130
By Aliekber 2022-08-04 03:15:39
Link | Quote | Reply
 
1thenumber said: »
Not sure if this is even possible to fix, but completely removing the macro palette and it's UI would be the best feature I could ask for.
You would probably not believe how much time I've spent trying to get around the need for the macro bar to be open in order for XIVCrossbar to work. Until I get native gamepad access and the ability to stop button event propagation (which will hopefully happen in Windower 5), there's not a whole lot I can do to get rid of it. The macro bar capturing button presses is literally the only reason this addon is possible in Windower without screwing up a lot of other stuff (like using the d-pad to navigate menus and select enemies).

The best advice I can give if you're having trouble switching targets a lot is to add a binding for "target npc" so you can switch targets without needing the macro bar to close.

Alternately, try changing whether your triggers are mapped to the macro bars in the native FFXI gamepad config. That is, if you have them mapped, unmap them. Or if you don't have them mapped, try mapping them. Personally, I don't have the triggers mapped, and I've never run into the issue you're describing.
Offline
Posts: 130
By Aliekber 2022-08-04 03:20:38
Link | Quote | Reply
 
shmobertson said: »
It would also be nice to have a swap function. That way if you wanted to swap an "ex" slot, you wouldn't have to modify the xml manually.
By swap function, do you mean like if I had Dark Arts bound to Left Trigger + Dpad Left, and Light Arts bound to Left Trigger + Dpad Right, I could use the binding menu to swap them, and have Light Arts move to LT+Dpad Left and Dark Arts move to LT+Dpad Right?
Offline
Posts: 8
By shmobertson 2022-08-04 05:14:03
Link | Quote | Reply
 
Yes, that is exactly what I meant. Mainly for switching custom macros around.
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 415
By Quetzalcoatl.Khajit 2022-08-04 05:22:50
Link | Quote | Reply
 
Asura.Kuroganashi said: »
Quetzalcoatl.Khajit said: »
That code is entirely set to activate when you engage. The code is working entirely as intended.
It's not much work to copy that into a new function and put =/= instead of == for your disengaged sets and strip down all of that extra code. Although it probably won't change your bar when you first login.
thing is, didn't work when engaged........ so that is why i was thrown off.
Ah. No problem. There was some advice for that on the discord. I'll look it up when im actually awake. Main reason I haven't troubleshooted this is because im because I was busy ingame and being able to swap between engaged/disengaged is of dubious use to my characters/playstyle.
Offline
Posts: 130
By Aliekber 2022-08-04 05:53:19
Link | Quote | Reply
 
shmobertson said: »
Yes, that is exactly what I meant. Mainly for switching custom macros around.
Yeah, that's a good idea. I'll add it to the list.
[+]
By Asura.Kuroganashi 2022-08-04 08:55:02
Link | Quote | Reply
 
Quetzalcoatl.Khajit said: »
Asura.Kuroganashi said: »
Quetzalcoatl.Khajit said: »
That code is entirely set to activate when you engage. The code is working entirely as intended.
It's not much work to copy that into a new function and put =/= instead of == for your disengaged sets and strip down all of that extra code. Although it probably won't change your bar when you first login.
thing is, didn't work when engaged........ so that is why i was thrown off.
Ah. No problem. There was some advice for that on the discord. I'll look it up when im actually awake. Main reason I haven't troubleshooted this is because im because I was busy ingame and being able to swap between engaged/disengaged is of dubious use to my characters/playstyle.

invite me to the discord XD
Offline
Posts: 38
By 1thenumber 2022-08-04 10:04:16
Link | Quote | Reply
 
Aliekber said: »
1thenumber said: »
Not sure if this is even possible to fix, but completely removing the macro palette and it's UI would be the best feature I could ask for.
You would probably not believe how much time I've spent trying to get around the need for the macro bar to be open in order for XIVCrossbar to work. Until I get native gamepad access and the ability to stop button event propagation (which will hopefully happen in Windower 5), there's not a whole lot I can do to get rid of it. The macro bar capturing button presses is literally the only reason this addon is possible in Windower without screwing up a lot of other stuff (like using the d-pad to navigate menus and select enemies).

The best advice I can give if you're having trouble switching targets a lot is to add a binding for "target npc" so you can switch targets without needing the macro bar to close.

Alternately, try changing whether your triggers are mapped to the macro bars in the native FFXI gamepad config. That is, if you have them mapped, unmap them. Or if you don't have them mapped, try mapping them. Personally, I don't have the triggers mapped, and I've never run into the issue you're describing.

Thanks so much for the reply and suggestion. I had the triggers mapped to the palettes per the screenshot, but I just unmapped them now and confirmed XIVcrossbar is still working as intended. I think this is going to fix my issue since the palette bars so far are disappearing immediately after any input. I'll let you know if the issue comes back, but so far so good, and thank you for the help!
[+]
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 415
By Quetzalcoatl.Khajit 2022-08-04 18:14:32
Link | Quote | Reply
 
Go to windower.net and look for a discord link.

Also
Code
player.status == something
probably 'Engaged' for the something but, have to check
but also
you'd need to do it in the proper event
which is aftercast
By Asura.Kuroganashi 2022-08-04 22:04:57
Link | Quote | Reply
 
Quetzalcoatl.Khajit said: »
Go to windower.net and look for a discord link.

Also
Code
player.status == something
probably 'Engaged' for the something but, have to check
but also
you'd need to do it in the proper event
which is aftercast
um..... might not work for all my stuff as I got A LOT of Custom functions.
 Fenrir.Jinxs
Offline
Server: Fenrir
Game: FFXI
user: Jinxs
Posts: 535
By Fenrir.Jinxs 2022-08-06 14:51:41
Link | Quote | Reply
 
Is there a quick way to hide the overlay without unloading the plugin? How about hiding it without disabling the features... like a stealth mode.
Offline
Posts: 17
By GhostyStar 2022-08-06 21:40:45
Link | Quote | Reply
 
I'm trying to set this up on my Steam Deck and not having much luck so far.

I've unbound ABXY and LT RT in FFXI Config, and those do nothing in-game when I launch it (as expected).

But when the mapping setup window comes up, that also isn't recognizing the buttons/triggers.

I enabled the Run plugin and added this line to my init.txt, but I suspect the python script is failing to launch - I can't find it in htop. If it is throwing errors I can't see them though, 'cause the game is fullscreen.
Code
run C:/Windows/System32/cmd.exe /c start /unix /home/deck/.local/share/Steam/steamapps/compatdata/2875277058/pfx/drive_c/Windower/addons/xivcrossbar/FFXI_Input.sh

Are there any extra python libs or other tools I need to install to get this working? And if so, inside the proton prefix or outside it?
Offline
Posts: 130
By Aliekber 2022-08-07 20:49:18
Link | Quote | Reply
 
Fenrir.Jinxs said: »
Is there a quick way to hide the overlay without unloading the plugin? How about hiding it without disabling the features... like a stealth mode.
Not currently, but a good idea. Adding to the list.
[+]
Offline
Posts: 130
By Aliekber 2022-08-07 20:54:14
Link | Quote | Reply
 
GhostyStar said: »
I'm trying to set this up on my Steam Deck and not having much luck so far.

I've unbound ABXY and LT RT in FFXI Config, and those do nothing in-game when I launch it (as expected).

But when the mapping setup window comes up, that also isn't recognizing the buttons/triggers.

I enabled the Run plugin and added this line to my init.txt, but I suspect the python script is failing to launch - I can't find it in htop. If it is throwing errors I can't see them though, 'cause the game is fullscreen.
Code
run C:/Windows/System32/cmd.exe /c start /unix /home/deck/.local/share/Steam/steamapps/compatdata/2875277058/pfx/drive_c/Windower/addons/xivcrossbar/FFXI_Input.sh

Are there any extra python libs or other tools I need to install to get this working? And if so, inside the proton prefix or outside it?
You may be missing evdev (sudo pip install evdev), which should be outside installed outside the prefix.

I should add that I've been having weird crashes on startup (for FFXI) ever since I upgraded SteamOS to 3.3, so if you're on 3.3 it could be that. I still don't know the cause.
Offline
Posts: 130
By Aliekber 2022-08-07 21:05:26
Link | Quote | Reply
 
@GhostyStar

Also, since you're here, have you given any thought to creating a way for other addons to register themselves with Balloon, so they can hide/show as appropriate when a dialogue balloon is open?

I'd love for XIVCrossbar to temporarily hide whenever a Balloon dialog is open (especially on Steam Deck, where UI real estate is at a premium), but I haven't found a clean/distributable way of knowing when Balloon has a dialog open.
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 415
By Quetzalcoatl.Khajit 2022-08-08 14:00:17
Link | Quote | Reply
 
How are you implementing the sneak attack+ws bindings? I have a slight suspicion that it's a hop, skip, and jump away from us being able to make rudimentary 3(?) line macros if we can be bothered to open up notepad to edit them? (eg, sch self skillchain macros, putting equip weapon macros into the same slot as //xp bar without having to figure out the gearswap code.)

And thanks for making those. It was a welcome surprise to see that on the todo list.
Offline
Posts: 130
By Aliekber 2022-08-08 14:31:41
Link | Quote | Reply
 
Quetzalcoatl.Khajit said: »
How are you implementing the sneak attack+ws bindings? I have a slight suspicion that it's a hop, skip, and jump away from us being able to make rudimentary 3(?) line macros if we can be bothered to open up notepad to edit them? (eg, sch self skillchain macros, putting equip weapon macros into the same slot as //xp bar without having to figure out the gearswap code.)

And thanks for making those. It was a welcome surprise to see that on the todo list.
Well, I'm currently thinking of autogenerating SA+<WS> actions in the WS binding list when your main or sub is THF. You definitely would be able to change those into arbitrary 3-line macros by manually editing the XML.

Actually, can I get your guys' opinion on something? Would you prefer that the Sneak Attack recast timer override the skillchain icon behavior of the combined macro, or should the skillchain icon + yellow marching ants border still appear, even when Sneak Attack isn't ready? I created an (anonymous) Google Forms poll to get everyone's opinions on this: https://docs.google.com/forms/d/e/1FAIpQLSfFeVnJgaf5BdXAa9M-dQxeEQRzqC7t_Ksx6mrc2k9qjT_oNQ/viewform?vc=0&c=0&w=1&flr=0
Offline
Posts: 17
By GhostyStar 2022-08-08 14:33:37
Link | Quote | Reply
 
Aliekber said: »
@GhostyStar

Also, since you're here, have you given any thought to creating a way for other addons to register themselves with Balloon, so they can hide/show as appropriate when a dialogue balloon is open?

I'd love for XIVCrossbar to temporarily hide whenever a Balloon dialog is open (especially on Steam Deck, where UI real estate is at a premium), but I haven't found a clean/distributable way of knowing when Balloon has a dialog open.

I see you already have it hiding on cutscenes, which I think should cover all the cases where you would want to hide it for a Balloon?
https://github.com/AliekberFFXI/xivcrossbar/blob/master/xivcrossbar.lua#L919-L925
Standard NPC dialogue out in the world also uses that same 'cutscene' status id.

Balloon pops up for NPC battle dialogue too, but I don't think you would want to hide the crossbar for those :p
Offline
Posts: 130
By Aliekber 2022-08-08 14:42:32
Link | Quote | Reply
 
GhostyStar said: »
I see you already have it hiding on cutscenes, which I think should cover all the cases where you would want to hide it for a Balloon?
https://github.com/AliekberFFXI/xivcrossbar/blob/master/xivcrossbar.lua#L919-L925
Standard NPC dialogue out in the world also uses that same 'cutscene' status id.
I could swear that there were times that there was a balloon dialog open at the same time as the crossbar while in town. /shrug

If I can replicate it, I'll send a screenshot.

GhostyStar said: »
Balloon pops up for NPC battle dialogue too, but I don't think you would want to hide the crossbar for those :p
Definitely not, haha
Offline
Posts: 17
By GhostyStar 2022-08-08 14:58:12
Link | Quote | Reply
 
Aliekber said: »
I could swear that there were times that there was a balloon dialog open at the same time as the crossbar while in town. /shrug

Ah, there is some NPC dialogue that doesn't lock you in place, and therefore doesn't change your status. They create balloons with a timeout... I'm not sure how you would want to deal with that, since your character is still fully controllable.

I guess you could check for the same things I do, and have a timeout setting to unhide after such messages. Then people could set that timeout in both Balloon and XIVCrossbar and things would line up.

It's an 'incoming text' event with message id 142, and with default Balloon settings that shows a balloon for 10 seconds then hides it. So you'd wanna do the opposite, if you wanted to switch out visibility.
[+]
 Quetzalcoatl.Khajit
Offline
Server: Quetzalcoatl
Game: FFXI
user: Khajit
Posts: 415
By Quetzalcoatl.Khajit 2022-08-08 15:12:54
Link | Quote | Reply
 
I chose option one because there's already going to be a "base" ws set of bindings that I can reference, my ws are organized by SC properties (and all of the major ones are lv2+ to make it easy to keep track), and I lose less from dropping sc properties than being unable to see the timers.
Eg. My base ws sets are on R+buttons. My TA+WS are on R->L+ buttons. So my ability to see ws properties if im unfamiliar is already present by default. If It's a matter of having to wait an extra second on recast, that actually is giving me information that is harder to track mentally and can make a difference. I can also check either via using L trigger (I hold down R trigger most of the time as that's where any actions I have to quickly ready with are set) thanks to this setup.
First Page 2 3 ... 7 8 9 10 11