Sep 04 2007

SWAG

Published by phrog


Addon Current Source:

CGI Current Source (See the ‘Interactive CGI’ link, below):

Evolution Saved Variables:


Overview

SWAG’s primary list mechanic is based on the excellent system first seen in the ‘Suicide Kings’ add-on, authored by Charles Eugene Crain II (aka Joehunk) and the guild ‘The Black Company’; more details can be found here.

SWAG is a World of Warcraft add-on designed to simplify the distribution of loot. It uses a very simple method to determine loot eligibility. When loot is to be assigned, the SWAG maintainer chooses an active SWAG ‘booty’ list and one or more filters, which results in an ordered set of player names. The player on top of the list can choose to take the item, or pass it to the next person in the list, who can either take it or pass it along, etc. etc. till someone takes the loot or the end of the list is reached.

In the event that a person takes a piece of loot, they are moved to the bottom of the current list, and all members below them are moved up one position – with one very important caveat: ONLY those members in the booty list that are in the CURRENT RAID move: all other members of the swag booty list maintain their current loot order.

SWAG makes the process as streamlined as possible. All players are added to a player roster – independent of the booty lists – in which we store class and level information, a history of all items assigned by SWAG, raiding history, etc. Players are automatically added to all eligible booty lists as they are added to the guild and/or raid; new booty lists are automatically populated by the player roster as the booty lists are added. Booty lists include a relatively comprehensive set of triggers and attributes that determine which players (by class and level) are eligible for a given list, as well as how players should be placed within a list upon addition (end, middle, start or ‘random’).

SWAG also manages the process of bidding for loot – items can be selected (by alt-click’ing item links or items in a loot window) for bidding; players in the current raid can whisper requests to bid (and retract issued bids) to the SWAG maintainer; SWAG will track the current top bidder and assign the loot upon bid closing.

SWAG is still in active development, and should be treated as ‘beta’ software. Most of the short-term work in SWAG is involved in moving various functions available to the command line utility into the UI; in particular, the creation of new booty lists, editing or review of the player roster, etc. When in doubt, check to see if the command-line utility does what you can’t find in the UI. And if that does not work, feel free to dredge through the lua code directly.

SWAG does NOT have the ability to synchronize data between SWAG clients – you need to pass the SWAG saved variables files between clients manually.

Installation

Grab a copy of the latest addon source here and untar/unzip it within your WoW add-on directory.

Initialization

SWAG starts with an empty player roster and no defined booty lists. To get started, issue:

/swag import defaults

which will add all current guild members to the SWAG player roster, as well as a number of default booty lists.

UI

The SWAG user interface can be called up and dismissed from the command line with the command:

/swag

The following is a shot of the primary SWAG UI. We have selected the ‘Main’ booty list, which in ‘our’ configuration contains all our current guild members:

main.png

Members can be selected within the list and them moved with the arrows that appear below the list border:

move1.png

Resulting in:

move2.png

Note that as players are moved, the ‘Undo’ button becomes active and the number within the button increments by one. Clicking ‘Undo’ will undo up to the the last 10 changes in order.

Here we have 4 members of the list flagged as ‘active’:

selected.png

Members of a selected booty list are automatically flagged as ‘active’ if they are members of a raid with the SWAG maintainer. Additional individual members can be flagged as ‘active’ by clicking on the the check-box to the left of their name in the list display, in those cases where you want to include non-present raiding members.

You can also remove current raid members from the active list by de-selecting the check-box next to their name. This will result in the member’s numeric position being displayed in RED, to indicate that they would have ordinarily been included in the list of active members if not explicitly removed.

Below, we have selected to filter the current list so that it displays only those members are flagged as ‘active’:

active.png

Note that the ‘index’ column now displays a second digit in parenthesis. The first digit is the index of the player in the current ‘active’ list – the second digit is the index of the player in the list overall.

SWAG allows further filtering by class. By clicking on the ‘>>’ button in the upper right, we display the ‘expanded’ options panel. Here we have opened up the ‘extended’ panel, and select to filter by ‘Warrior’. The displayed booty list now displays all current players of class ‘Warrior’ in the ‘Main’ booty list:

byclass.png

Both ‘active’ and ‘class’ filtering can be applied to a booty list, as shown below:

byactiveclass.png

This feature is useful if you need to assign loot to a few select classes from within a ‘general’ booty list (ie, one with many or all classes present). Class filtering makes it easy to limit, say, a piece of +shadow damage cloth armor to only Warlocks and Priests.

Loot can be selected for distribution by Alt-clicking loot icons within a loot frame or Alt-clicking item links in chat. Doing so pastes a link within the bottom of the SWAG UI, as seen below:

loot.png

From here, we can open bidding on the item, or directly assign it a player in the active list. Below, we have assigned the indicated loot to the player ‘Broughtpain’ (grats on that level 1 quest item, Brought):

assign.png

Note that ‘Broughtpain’ has been moved to the bottom of the list of active players. If we then take a look at the list as a whole (removing the ‘active’ filter) we can see the ‘SuicideKings’ list behavior:

results.png

Comparing the screen above with the first few screenshots of the ‘Main’ list, note that the four player names that were flagged as active have changed positions – but no other players have.

Command line

/swag import defaults

– adds all current guild members to the SWAG player roster, as well as a number of default booty lists.

/swag show lists

– dump contents of all lists

/swag show list Main

– dump contents of list ‘Main’

/swag select list Main

– define the default booty list as ‘Main’

/swag select raid Main

– define the default Raid list as ‘Main’ (DEPRECATED)

/swag import guild

– populates/updates swag with all the current guild members, online and offline. If you run this, you will probably never need to run other updates unless you have non-guild members present in a raid, or when you have new guild members added. We’ll probably tie the function to raid create / guild update / loot events so that it seldom if ever needs to be run manually.

/swag import raid

– populates/updates swag with all the current raid members

/swag update raid

– the ‘raid history’ feature is still in development.

– This command will add a ‘date last raided’ timestamp to all players in the current raid, tagged to the current zone that you (the person running SWAG) are presently in. We will eventually have an internal list to limit zones to specific instances, but for now it takes anything. Using it now has a tendency of adding timestamps for Ironforge’, etc. in all raid members history table, so use it sparingly.

– see ‘/swag show raid’ for details on the ‘original’ design of raid lists

/swag add player

– Adds the player character that you already have targeted. Outside of the ‘import’ functions, this is the best method for new player entry, as it automatically captures class and level. Ideally, you will never have to run this, as the update command should get most everyone of interest.

/swag give Ruin [Mystical Staff of Pwn]

(note: the assigned item should be added using a shift-click’d loot link. )

– ‘Suicides’ Ruin in the currently selected list. An entry is added to Ruin’s roster history, recording the action and the loot recieved.

/swag add list MyNewList class_filter=Warrior level_filter=65 add_method=random copy_from=Main

– Add a new class list called ‘Foobar’, which will be populated with the contents of the current ‘Main’ list (in the same order as the Main list). After initial creation, new entries to the list will be entered randomly (anywhere in the list). Other options are ‘middle’ (new entries wil be entered in the middle of the complete list) and ‘end’ (new entries are added at the end)

/swag show raids

– DEPRECATED: full raid lists were taking up a bit too much space, so instead we are simply storing a ‘last present’ date in the player roster. The ‘raid’ manipulation commands are still here for completeness, but not really functional .

– ‘raid’ lists work more-or-less like reverse ‘booty list’s. At the end of a raid, you will use a ‘/swag update raid’ command to move all the current active raid members to the absolute bottom of the currently raid list. (This is in contrast to booty lists, where movement is restricted to only those members of a list that are active – ie., present in the raid). This means that folks that have raided recently will be (generally) lower in the list than folks that have not. So when it comes time to raid again, you can order the list of current online guild members to show those ‘more eligible’ to attend the raid. That, at least, was the theory.

Chat Commands

/w [player name] swag

– If [player name] is running swag, swag will reply with:
– if you are in a raid with [player name], your position in the active raid list + the selected list as a whole.
– if you are not in a raid with [player name], your position in the current selected list.

/w [player name] swag lists

– returns your absolute position in all raid lists of which you are presently a member.

/w [player name] bid

– If bidding is active, registers a bid for the current item.

/w [player name] retract

– If bidding is active, and we have an active bid, retracts that bid.

Online Display

A very (very) crude CGI script is available for the online storage and display of the SWAG saved variable file, it is available here:

It requires an installation of perl, the perl CGI module, and some root-ish level access to the server’s httpd.conf. It does not come with nearly enough documentation, but if you’re mildly perl-aware you can probably make it work. Yes, it’s on the list.

6 responses so far

6 Responses to “SWAG”

  1. phrogon 26 Nov 2007 at 6:23 pm

    Whee! Page is already horribly out of date.

    Lots of updates, grab the latest version and take a look. Most significantly, I’ve added in a bunch of Ace libraries. Currently working on in-game sync between clients, with some success.

    To test, try:

    /swag sync lists [player name]

    … where [player name] is running swag.

    Be warned, we’re not going any validation or verification yet.

  2. Archarodimon 01 Dec 2007 at 8:27 pm

    Hi,

    This mod seems awesome :)
    Would you consider uploading it on wowace SVN? A lot of people could help you translate everything and help you optimize your code :)

    Thanks

  3. phrogon 12 Dec 2007 at 7:31 pm

    Re-created a hosting CGI, source code is avaliable:

    Sample installation:

  4. phrogon 12 Dec 2007 at 7:32 pm

    Archarodim: That’s the long term plan, just trying to get it to a stable release point first :)

  5. lpcgon 24 Feb 2008 at 4:24 pm

    How do we remove people from a list?

  6. drodon 20 Jul 2008 at 9:58 pm

    When I open a bid I no longer get any response from the mod when someone sends me a “bid”. Any idea? Seems to work fine though when no bid is open.

Comments RSS

Leave a Reply