Download
(77 Kb)
Download
Updated: 11/09/23 02:01 AM
Pictures
File Info
Compatibility:
Endless Archive (9.2.5)
base-game patch (9.1.5)
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Firesong (8.2.5)
Lost Depths (8.1.5)
High Isle (8.0.0)
Updated:11/09/23 02:01 AM
Created:02/28/21 08:18 PM
Monthly downloads:75
Total downloads:3,955
Favorites:2
MD5:
Categories:Group, Guild & Friends, TradeSkill Mods
FCO Guild Lottery (Raffle, guild members joined list, dice throws & history)
Version: 0.3
by: Baertram [More]
FCO Guild Lottery (Raffle, guild members joined list, dice throws & history)
This addon can be used as a dice throw addon and a guild sales lottery/raffle addon, based on the sales ranking of the guild's sales history data of the last x days (default 7, min 1, max 100).
You are also able to throw a random guild member # dice for a simple raffle.

It got 3 different types to roll dices:
  1. Normal dice throws (1 to 999 dice sides), and history
  2. Guild 1-5's member # dice throws (e.g. for a random guild member gift/present/whatever), and history
  3. Guild 1-5's sales-lottery dice throws (creat a ranking of the members having sold something and get the rolle seller's name), and history

Dependencies needed
You need the following libraries installed into your live/AddOns folder, each with their currently newest version available, in order to make this addon work:
LibAddonMenu
LibCustomMenu
LibHistoire - GuildHistory
LibDebugLogger (I can also recommand DebugLogViewer as an addition)


Chat commands vs. UI
The command /fcogl opens/closes the UI.
The command /fcogls opens the settings menu.

Please open the settings menu to read about the possible chat commands (slash commands).
e.g.
/dice <number>
/diceg1 to /diceg5
/glsnew, /gls and /glsstop, /glslast
/gmjnew, /gmj and /gmjstop, /gmjlast


Slash commands used as you got the UI open will update the UI as well.
Chat commands are also able to open the UI, e.g. after a dice was rolled, if you enable this in the settings.

Settings menu
Use the chat command /fcogls or the UI's "Open settings" button (see below), or just press ESC -> select AddOn settings and then "FCO Guild Lottery".
Be sure to read the descriptions and tooltips.

Explanation of the UI
Please check the images section of this addon for the relating images, containing the red marker bubbles with the numbers I refer to here in this texts!

Image 1) - General UI, and normal dice roll

1: Roll the dice / Throw the dice
2: Choose the number of dice sides. Will be automatically changed to the number of guild members if you change to a guild via 5 (guild selection box), or guild members having sold something if you enable a guild sales lottery
3: Start a new guild sales lottery. A popup will ask if you really want to start a new one if currently a guild sales lottery is already active
4: Stop guild sals lottery. Only visible if guild sales lottery is active ( see image 3) )
5: Guild dropdown. Select the guild (red entries do not have a guild trader active and cannot be used for a guild sales lottery).
If you change the box and a guild sales lottery is active it will ask if you want to reset it. If you choose yes it will switch to the other guild and start a new lottery for it. If no lottery was selected it will stop the currently active guild sales lottery and just enable normal dice throws.
The entry -> No guild <- will select no guild so you are able to throw random dices with up to 999 sides (chosen at the editbox 2).
6: The search field for the list 7
7: List of guild sales lottery ranking. Only filled if a guild sales lottery is currently active. Will fill up with the sales data provided by LibHistoire of the selected guild and timeframe
8: Shows the guild sales lottery tab -> Right click for a context menu
9: Toggle the right box "dice throw history" (show/hide)
10: Open settings menu
11: Close the UI (slash command /fcogl toggles the UI visibility)
12: Shows the currently selected dice history type. If no guild is selected it will be Normal history. If a guild is selected it will be guild history and if a guild sales lottery is active it will be the guild sales lottery history. A dropdown arrow at the right of this text will appear if there are different history dates to select from (see image 3) ).
Selecting any entry will reset the current guild sales lottery and switch to this saved one. Your next dice throws will go on in the selected guid sales lottery then.
13: Search box for the dice throw history
14: The list of dice throws, showing the number, date and time and @accountName (character name) doing the dice throw + the dice sides and the (throw result) of that throw. 1 line = 1 throw -> See 16.
15: The "clear list" button. Will clear the currently shown dice history list and delete all entries, if the security question dialog shown will be accepted by the "yes" button. The entries will be deleted but the guild sales lottery will be kept and you could add new dice throws to it!
16: The dice roll result. D<number> is the number of dice sides, and (<roll>) is the rolled result number.

Image 2) Guild member index # dice throws

A guild was seleted at the guild dropdown (image 1, number 5).
1) The number of members in the selected guild. Is not changable as long as a guild is selected.
2) The dice throw history shows the guild throws done. Each throw will present a guild member index # of the number of guild members.
Can be used for a guild random present/gift roll e.g. or similar rolls.

Image 3) Guild sales lottery dice throws

A guild was seleted at the guild dropdown (image 1, number 5) and the guild sales lottery was started (image 1, button 3).
1) The number of members having sold anyting in the guild's shop -> Guild sales history ranking. Is not changable as long as a guild is selected and the guild sales lottery is active.
2) The stop button for the active guild sales lottery. A security dialog will ask before.
3) The list of the guild sales ranking in the selected timeframe. The current timeframe is shown above the guild drop down box!
4) The dice roll history for the guild sales lottery, showing the seller names which were rolled.
5) This arrow will open the dropdown box of the guild sales lotteries started. See 6.
6) Each line is a date and time as the lottery was started for the selected guildId, and shows the #<history entries in this guild sales lottery> at the end of the line.
Selecting any date row there will ask if the currently active guild sales lottery should be reset and will re-select this guild sales lottery then.
After that the next dice throws will be "added" to this existing lottery data!

Image 4) Delete guild sales lottery data at the dice throw history

This shows the bottom of the dice throw history.
1) Clear list button to clear the currently shown list of the dice throw history. The entries will be deleted but the guild sales lottery will be kept and you could add new dice throws to it!
2) Click the multi-select dropdown to see the given guild sales lotteries, if a guild sales lottery is currently active! Select the ones to delete, close the dropdown and click on the "junk" button right of it (see 3) to delete the selected entries.
3) Delete the selected guild sales lottery entries from the history. This will delete the complete history data and you won't be able to add dice throws to them later again. Only the currently active guild sales lottery will be kept active and can add new dice throws.



Dice throws:
Normal dice throws
Just use the UI and select the -no guild- entry from the guilds drop down box. Then press the "roll the dice" button.
The chat and the dice history will show you the result. You are able to change the sides of the dice with the text edit box next to the roll the dice button. Either enter a number or use the up/down keys to in-/decrease the dice sides. The maximum is 999. Minimum is 1.


Guild member # dice throws
Select a guild from the guilds drop down box. Then press the "roll the dice" button.
The chat and the dice history will show you the result. The sides of the dice will be the member count of the selected guild and you cannot change it! The dice result will be the index of the member in your guild so that you can use it for e.g. normal lotteries or random gifts etc.


Guild sales lottery dice throws
Prerequisites:
If you do not know LibHistoire then please read the librarie's description. It will fetch guild history data for your so that addons only needs this single source of data and do not query the history "per addon" again and again. The lib stores the data in the SavedVariables and handles updates of the history for you. Addons like MasterMerchant rely on the same data and thus should be provding exactly same results if used for the same timeframe and data.

If you want to use guild sales lottery ranking you fully need to update and sync LibHistoire to the time frame you will select for the lottery! The standard timeframe is the last 7 days, just like MasterMerchant does show it's 7 days sales ranking.
If you do not know how to update the LibHistoire data please read LibHistoire's descripion and/or MasterMerchant's howto section.

Auto update of the guild history data by the server can be really slow, so you can try t speed it up manually bs opening the guild panel (press G), switch to the history tab, select LibHistoire sales entry of that guild and press the keybind/button for "Show more" to fetch more history data, until LibHistoire's UI is showing yellow progress bars (means finished! / unfinished: light blue color) and the synched/linked chain icon appears on the LibHistoire UI. Remember to click refresh or else LibHistoire will not refresh the logs! After that, a best, do a /reloadui to update all data properly on your disk/LibHistoire SavedVariables file.

Do not press the keybind/button too fast, only once every 2 seconds e.g. or the server might do nothing or kick you for message spamming!

Dice throws
Select a guild from the guilds drop down box. Click on the "Start new guild sales lottery" button.
If any guild sales lottery/guild members joined list was already active a dialog will ask if you want to reset the current and start a new one.

After the guild sales lottery is active you will see the "Stop guild sales lottery" button being shown and the left list shows the ranking of the sold items in the seleted timeframe.
Important: Changing the "days before" timeframe in the settings will need you to reload the UI!
Press the "roll the dice" button to roll the dice and find the member at the rolled sales rank.
The chat and the dice history will show you the result. The sides of the dice will be the member count of the selected guild who have sold anything (number of different sellers in the ranking) and you cannot change it!


Guild members joined date list dice throws
Prerequisites:
Same as explained at "Guild sales lottery dice throws" -> LibHistoire must be updted and all entries of the "Guild" need to be read!

Dice throws
Select a guild from the guilds drop down box. Click on the "Start new guild members joined list" button.
If any guild sales lottery/guild members joined list was already active a dialog will ask if you want to reset the current and start a new one.

After the guild members joined list is active you will see the "Stop guild members joined list " button being shown and the left list shows the ranking of the guild members who joined that guild in the chosen time frame.
Important: Changing the "days before" timeframe in the settings will need you to reload the UI!
Press the "roll the dice" button to roll the dice and find the member at the rolled joined rank.
The chat and the dice history will show you the result. The sides of the dice will be the member count of the selected guild who have joined in the timeframe and you cannot change it!



Thanks to
sirinsidiator for inventing LibHistoire and for all the help with the lib and this addon
FooWasHere for ideas, and all the testing done
-Changelog-

v0.3 - 2023-11-09
-Updated API and dependency versions
!Please update LibHistoire!
-Fixed ZO_ComboBox errors


v0.2 - 2023-02-03
-Fixed several bugs
-Fixed some translations
-Made compatible with PTS "Scribes of Fate" new resizeToFitDescendents changes

-Added Guild Member Joined list feature:
Show a list of the guild members joined in a chosen time frame (default: 31 days) and make it possible to throw dices for that list.
-> Works about the same like the Guild Sales Lottery
--Added new buttons to start/stop the guild members joined list
--Added slash commands
--gmjnew
--gmjstop
--gmj
--gmjlast
Check the description for details.
Archived Files (2)
File Name
Version
Size
Uploader
Date
0.2
77kB
Baertram
02/02/23 06:22 PM
0.1
63kB
Baertram
02/28/21 08:18 PM


Post A Reply Comment Options
Unread 09/10/23, 09:24 AM  
Alp
 
Alp's Avatar

Forum posts: 3
File comments: 50
Uploads: 0
Originally Posted by Baertram
Works fine who for me with pChat and FCOGL. Please disable all other addons and libraries and test it this fixed it.

Or are you able to rebuild that bug with only FCOGL and pChat enabled (+ needed dependencies)? Your pChat settings might be different then and I cannot see your settings. You'd have to send me your pChat SavedVariables file then please.

Originally Posted by Alp
Dice rolling seems broken with pChat. Any way to fix that?

Shows as:



If I copy paste the message I get this message:
[22:27:26] A'kaari rolls 2 with 1 x 2-sided die.
I just tested and seems to still happen with just the 2 addons enabled and all unnecessary libraries disabled. With just FCOGL enabled it works as it should so guess its something with pChat which is weird since I deleted the SavedVariables for it yesterday while reinstalling it.


I uploaded the files for both the addons here: https://drive.google.com/drive/folde...wd?usp=sharing
Report comment to moderator  
Reply With Quote
Unread 09/10/23, 01:13 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4965
File comments: 6033
Uploads: 78
Works fine who for me with pChat and FCOGL. Please disable all other addons and libraries and test it this fixed it.

Or are you able to rebuild that bug with only FCOGL and pChat enabled (+ needed dependencies)? Your pChat settings might be different then and I cannot see your settings. You'd have to send me your pChat SavedVariables file then please.

Originally Posted by Alp
Dice rolling seems broken with pChat. Any way to fix that?

Shows as:



If I copy paste the message I get this message:
[22:27:26] A'kaari rolls 2 with 1 x 2-sided die.
Last edited by Baertram : 09/10/23 at 01:14 AM.
Report comment to moderator  
Reply With Quote
Unread 09/09/23, 02:40 PM  
Alp
 
Alp's Avatar

Forum posts: 3
File comments: 50
Uploads: 0
Dice rolling seems broken with pChat. Any way to fix that?

Shows as:



If I copy paste the message I get this message:
[22:27:26] A'kaari rolls 2 with 1 x 2-sided die.
Report comment to moderator  
Reply With Quote
Unread 08/11/23, 02:34 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4965
File comments: 6033
Uploads: 78
Hi Randaras,

Maybe I just missunderstand the wording "ticket" here.
The addon is not providing any "tickets", it's just listing the results of the guild sales history ordered by "sold value", or it lists the guild members joined by date.
And than a random dice roll provides a number


Example of your request would be
Guild sales history
1. 1,000,000 Baertram
2. 670,234 Randaras
3. 500,000 xyz
4. 100,000 abc
5. 10,000 Hello World

So your request would be they can "join" the ordered guild sales history list by depositting gold to the guild bank, and if they e.g. deposited 20,000 gold they would be in the "guild sales history" at position 5 then, and "Hello world" would be 6 then?

Hm, actually the addon is not intended to be used like that. As I wrote it primary for another guild I will ask the guild leader if this would make it somehow wrong to be used for them.

And technically this is hard to achieve too as I would need to select all of the guild bank deposits from LibHistoire first and cache the data, and then select the guild sales history from the library afterwards. Could cause problems/waiting times/errors...

So basically I think it could be done but I cannot say when and if in near future. Got some other projects (real life) running too
Last edited by Baertram : 08/11/23 at 02:40 AM.
Report comment to moderator  
Reply With Quote
Unread 08/10/23, 07:05 PM  
Randaras

Forum posts: 0
File comments: 9
Uploads: 0
Request of feature

Hello there, first of all great addon.


I'd like to request a feature; Instead of it giving tickets based on the guild sales, is it possible to add a feature that people can buy tickets by depossiting a set amount of gold to the guild bank?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.