Chalsean / XFaction

Enable cross faction roster visibility and communication between guilds of a confederate
8 stars 2 forks source link

Confederate Config Prototype #204

Closed Zoombara closed 2 years ago

Zoombara commented 2 years ago

Hey Chalsean, I put this together as a prototype to see if its worth integrating. Its an XF config builder. I had noticed some of your comments in constants about remaining EK settings (teams), plus the recent commits around compression and it gave me the idea that you could compress the settings and store in the guild info! So I thought I would put another prototype together and test a bit.

Here are my results: Current config: total characters 290

XFn:Eternal Kingdom:EK
XFc:EKXFaction:pineapple
XFg:5:A:Eternal Kingdom:EKA
XFg:5:H:Eternal Kingdom Horde:EKH
XFg:5:A:Endless Kingdom:EnK
XFg:5:A:Alternal Kingdom:AK
XFg:5:A:Alternal Kingdom Two:AK2
XFg:5:A:Alternal Kingdom Three:AK3
XFg:5:H:Alternal Kingdom Four:AK4
XFa:Grand Alt

Compressed: total characters 190

XF:95Cppimiqay4Ft(1YTXqrImQdmrGuUujbpAO14g)296qtB0MoDdVp3b2d27gjbnJyH8PQthPUq(f0OR3mYwEAK(2XyMG(iH(((eov6GlGyR1eZv1F1QtLlbKrQvNGcjCyy1ji9svK(9fe7vRUhFYm54(MNfez1PLV6gkz(DHrNNqE4AXtHQJDw73:XF

With a larger config like this: total characters 601

XFn:Eternal Kingdom:EK
XFc:EKXFaction:pineapple
XFg:5:A:Eternal Kingdom:EKA
XFg:5:H:Eternal Kingdom Horde:EKH
XFg:5:A:Endless Kingdom:EnK
XFg:5:A:Alternal Kingdom:AK
XFg:5:A:Alternal Kingdom Two:AK2
XFg:5:A:Alternal Kingdom Three:AK3
XFg:5:H:Alternal Kingdom Four:AK4
XFa:Grand Alt
XFt:A:Acheron
XFt:C:Chivalry
XFt:D:Duelist
XFt:E:Empire
XFt:F:Fireforged
XFt:G:Gallant
XFt:H:Harbinger
XFt:K:Kismet
XFt:L:Legacy
XFt:M:Mercenary
XFt:O:Olympus
XFt:R:Reckoning
XFt:S:Sellswords
XFt:T:Tsunami
XFt:Y:Gravity
XFt:U:Unknown
XFt:ENK:Social
XFt:ENKA:Social
XFt:ENKH:Social
XFt:CC:CC

Compressed: total characters 394

XF:9fzZUnimqq4NP(3L9gIabvYpsHeP0liCnBbRywJSHGYfE2Rr2OKMgLtWmZhZAVK)sE2XycI6qnXKJfPcQQu1arPJFEmMBFEmMX7ekcAfeYABL4usf8be8Oplyon5FPJfjkDjAHsUPcQuIgZnvqPxtdK3pHGNLowSFqzrE95m1AeTuVD9O(aQyvV2c9(eedwQzu5yHLBs3nvmVg1kYjdHWAXzMuFXPxal6rPW4PJGOMwHgDQyi2((pkDfw6CwclzsjJ84jqct)T9GGANrkKkmnOpEfScRyC)OwdRrnhj28S3cBLxAA7no5oyhYpPiBDoJmidLsZG9FHhzpS30tSgHt(10T9SOZ33b4aDIud(RA0MuitXf2L1So4EJK)yeA3oH55)(:XF

I modified the TimerEvent to look for the new config first and load if its there, otherwise old method fallback.

Here is the UI side: Confederate

Related PR https://github.com/Chalsean/XFaction/pull/203

Of Note: I saw the comments about the deflate not playing nice. I had issues with the raw compress having non-standard characters and it wouldn't save correctly, running with the encode/decodeforprint functions made all the difference. Not sure if something like below would work for the messages.

local _Serialized = SerializeMessage(inMessage, inEncodeUnitData)
local _Compressed = XFG.Lib.Deflate:EncodeForPrint(XFG.Lib.Deflate:CompressDeflate(_Serialized, {level = XFG.Settings.Network.CompressionLevel}))
Chalsean commented 2 years ago

We would want to lock this down to only those users who can edit guild information tab. But I'm not sure the officers want to see compressed text in the guild info. @mesato will have to comment on that. I'll look at the deflate because that would be huge saving on the bnet side!! This would be absolutely huge to get working, the compression rates are significantly better with deflate. The more compress, the less data needs to be transmitted, which means the less messages. I've been concerned over "too much" data because Blizz will DC a user if it deems it sending too much data via addon eye roll

Chalsean commented 2 years ago

you were right on the deflate for print thing :)

Zoombara commented 2 years ago

The idea behind this page was that the finished product would describe the fields needed by an XFaction config at the top and be preloaded with a dummy example similar as seen. For the compress buttons (pardon the current names) a description below them would state something like 'XFaction supports both native and compressed formats in the Guild Information section.' Ideally this was to allow moving teams info out of code, but the page wasn't intended to actually modify the Guild Information directly.

Glad it worked!

Chalsean commented 2 years ago

I'm kind of wanting to leave the confederate name, what guilds are included, the channel and password in the guild info. that way the officers have control of such things and someone outside the guild cannot start listening in. it also allows them to make a change and everyone gets it without asking hundreds to update their configs (which wont happen). its been hard enough just to get everyone to upgrade to 3.X line.. we do have a request to make teams configurable from another guild, so looking to include your changes. is it possible to store the native/compressed in the guild information if they have the ability to modify guild information? the nice thing about the compression is that it would theoretically make it harder for people to know the channel password. it wont be encrypted but at least it wont be plain text

waggz81 commented 2 years ago

I might be confused, but I took this proposal initially as just having a builder in the addon that could then output a string that would be posted in the guild info. Benefits being that we're limited by characters currently and an encoded string would allow us to shove more configuration data in the limited space. Not that any configuration would be read or stored in the addon itself for individual users.

Chalsean commented 2 years ago

you're correct, i was just making a few mind jumps and not bringing the audience along (i tend to do that). if we're going to provide an interface style configuration, then we can get away from the XFg or XFc style, thats just for engine parsing. as a user you should be able to select Stormrage or Proudmoore. also its not a leap to have it auto upload to guild info if the user has permissions, saving a copy/paste. but since on a timeline, you're right in that this can probably just get pulled in as-is and work on a more long term, user friendly version later

Zoombara commented 2 years ago

Hey sorry I didnt reply as I was out for a few days. yeah this was pretty much what @waggz81 mentioned. If I get some time Ill see what it can do as far as saving to guild info.

Chalsean commented 2 years ago

Included PR in 3.4.0 alpha build

Chalsean commented 2 years ago

Implemented in 3.4