WoW Application Messaging

From Sirikata Wiki
Jump to: navigation, search

WoW SendAddonMessage Function

Sends a message to the hidden addon channel.

SendAddonMessage("prefix", "text", "type", "target")

Parameters

prefix 
String - Message prefix, can be used as your addon identifier.
text 
String - Text to send.
type 
String - AddOn channel to send to. Valid types are "PARTY", "RAID", "GUILD", "BATTLEGROUND", "WHISPER".
target 
String - Used only for "WHISPER" communication - the player to whisper to.

Example

SendAddonMessage( "CTRA", "User Data: XYZ", "RAID" );

Notes

  • Calling this function results in the event CHAT_MSG_ADDON being invoked on:
    • <target>'s client if <type> is "WHISPER" or
    • all clients in the <type> chat channel, otherwise
  • Messages sent to <type> when you are not in the specified community will not be delivered.
  • The message will not be affected by the player's level of drunkenness.
  • The tab character ("\t") is used as a delimiter between the prefix and the message text
    • because of this, \t can not be used as part of prefix
    • The combined length of message and prefix can be at most 254 characters (255th is the tab character used to delimit the two)
    • length above 254 will disconnect you.
  • except NULL (ASCII dec-ID 0) all characters (decimal ID 1-255) are allowed (in opposition to SendChatMessage where many characters are disallowed)

AceComm Library Settings

A commonly used library called AceComm is a wrapper around the above API function because of some of the difficulties in using it. Below are AceComm settings that give you an idea of the hoops that application developers have to jump through to ensure that they play nicely.

ChatThrottleLib.MAX_CPS = 800       -- 2000 seems to be safe if NOTHING ELSE is happening. let's call it 800.
ChatThrottleLib.MSG_OVERHEAD = 40   -- Guesstimate overhead for sending a message; source+dest+chattype+protocolstuff
ChatThrottleLib.BURST = 4000        -- WoW's server buffer seems to be about 32KB. 8KB should be safe, but seen
                                       disconnects on _some_ servers. Using 4KB now.
ChatThrottleLib.MIN_FPS = 20        -- Reduce output CPS to half (and don't burst) if FPS drops below this value

Example Application Use

EPGP

Epgp.jpg

EPGP is an Effort/Gear reward system and addon for World of Warcraft.

It is a DKP system, described below:

Dragon kill points or DKP are a semi-formal score-keeping system (loot system) used by guilds in massively multiplayer online games. Players in these games are faced with large scale challenges, or raids, which may only be surmounted through the concerted effort of dozens of players at a time. While many players may be involved in defeating a boss, the boss will reward the group with only a small number of items desired by the players. Faced with this scarcity, some system of fairly distributing the items must be established. Used originally in the massively multiplayer online role-playing game Everquest, dragon kill points are points that are awarded to players for defeating bosses and redeemed for items that those bosses would 'drop'. At the time most of the bosses faced by the players were dragons, hence the name.

EPGP uses the messaging system to send information between users of the addon about the values of loot. For example, if an item drops for the first time, the "loot master" might assign a value to the item. This value is then shared with other people using the epgp addon.

Summary

  • small message size
  • very infrequently sent
  • must be delivered

Gatherer

Gatherer.jpeg

Gatherer is an addon for herbalists, miners and treasure hunters in World of Warcraft. It's main purpose is to track the closest plants, deposits and treasure locations on your minimap.

In WoW, players can gather resources. The resources are spread across the world and spawn in what seems to be a randomized fashion. In fact, though, the spawn locations are actually preset, so this addon tracks the location where users find resources to make it easier to find later.

Gatherer uses the messaging system to share the location of found resources between players. For example, when you find a resource, you can have it automatically share the location with your guild members. This way, if many people in your guild use the addon, you will get a nice compiled database of resource locations.

Summary

  • small message size
  • medium send frequency
  • not important if messages are delayed
  • not important if some messages are completely lost

Recount

Recount.jpg

Recount is a graphical damage meter.

In WoW, players fight bad guys. To do this, they have to deal damage. A metric for evaluating players is to look at the amount of damage they deal per second (DPS).

Every action that players within your party take is logged, which includes actions that result in damage being dealt. However, you only get log information for players that are within a short range of you. Because of this, in some encounters, some players might be too far away from you for their actions to be logged.

To make the meter more accurate, Recount uses the messaging system to aggregate logging data about damage being done.

Summary

  • Medium size messages
  • Heavy traffic load during encounters (about 10 seconds to 6 minutes)
  • Latency effects instantaneous accuracy during an encounter
  • Syncing algorithm still works if some messages are lost