Zero1UP / FinalFantasyXIRichPresence

4 stars 2 forks source link

[Feature] Compatability with HorizonXI #2

Closed FrUct1s closed 1 week ago

FrUct1s commented 1 week ago

Hey, just wanted to ask if it's possible to make it compatible with HorizonXI?

data.json looks good {"server_id":0,"name":"Raznar","zone_id":235,"main_job_level":13,"main_jobId":6,"party_count":1} (HorizonXI doesn't have a Server Choice - only one single Server) But DiscordRichPresence says "Not currently logged in"

Server is play.horizonxi.com (66.85.159.114)

Maybe a checkbox to remove the ServerName lookup or write our own Server name (Private Server) - I believe because it can't offset lookup the server name it's defaulting to error/not connected

Zero1UP commented 1 week ago

Hey, just wanted to ask if it's possible to make it compatible with HorizonXI?

data.json looks good {"server_id":0,"name":"Raznar","zone_id":235,"main_job_level":13,"main_jobId":6,"party_count":1} (HorizonXI doesn't have a Server Choice - only one single Server) But DiscordRichPresence says "Not currently logged in"

Server is play.horizonxi.com (66.85.159.114)

Maybe a checkbox to remove the ServerName lookup or write our own Server name (Private Server) - I believe because it can't offset lookup the server name it's defaulting to error/not connected

I don't play private servers but from my understanding their client already does discord rich presence.

FrUct1s commented 1 week ago

There is a Plugin for HorizonXI but unfortunately it's not for Windower but for Ashita

https://github.com/Xenonsmurf/Ashita-4-Plugins-and-Addons/tree/master/DiscordRPC

I'll keep messing around in your code and maybe I get it to work - or not haha

Zero1UP commented 1 week ago

There is a Plugin for HorizonXI but unfortunately it's not for Windower but for Ashita

https://github.com/Xenonsmurf/Ashita-4-Plugins-and-Addons/tree/master/DiscordRPC

I'll keep messing around in your code and maybe I get it to work - or not haha

The issue would be here: https://github.com/Zero1UP/FinalFantasyXIRichPresence/blob/90e3a7afd2dd6b4a543d299e5b97a20495fa9a7f/FinalFantasyXIRichPresence/frm_Main.cs#L46

Since the serverId being returned is 0 it doesn't have one when it does the lookup: https://github.com/Zero1UP/FinalFantasyXIRichPresence/blob/90e3a7afd2dd6b4a543d299e5b97a20495fa9a7f/FinalFantasyXIRichPresence/Collections.cs#L25

I could add an option to override this or to allow the user to write in their own.

FrUct1s commented 1 week ago

Yeah that's what I am trying right now - changed the Form to include a checkbox and a textbox but I struggle in the code to force the textbox input as the server

FrUct1s commented 1 week ago

Guess I did it somehow... image

image

Just losing the Timer when it's using the Textbox input

Zero1UP commented 1 week ago

I've updated it to handle custom names: https://github.com/Zero1UP/FinalFantasyXIRichPresence/releases/tag/v1.2.5

FrUct1s commented 1 week ago

It works beautifully! Thank you very much <3