MQ2DanNet

From the wonderful RedGuides Wiki
MQ2DanNet
A serverless peer networking plugin, allowing you to control and monitor several characters at once.
View details
Authors dannuic, Knightly, plure
Software type Plugin
Config file MQ2DanNet.ini


Maintained Yes and supported
Links

🏠Resource (review)
🥤Quick start •🤝Support •🛠️Repository

This plugin is designed to be a serverless peer network, which allows you to control and monitor many accounts at the same time. It is (hopefully) mostly plug and play, and should automatically discover peers for most local network configurations. /dgza /wave 👋

Commands

Syntax Description
/dexecute <name> <command> Executes a command on peer's client. Short version: /dex
/dgaexecute <group> <command> Executes a command on all clients in a group (including own). Short version: /dgae
/dgexecute <group> <command> Executes a command on all clients in a group (except own). Short version: /dge
/dggaexecute <command> Executes a command on all clients in your current in-game group (including own). Short version: /dgga
/dggexecute <command> Executes a command on all clients in your current in-game group (except own). Short version: /dgge
/dgraexecute <command> Executes a command on all clients in your current in-game raid (including own). Short version: /dgra
/dgrexecute <command> Executes a command on all clients in your current in-game raid (except own). Short version: /dgre
/dgtell <group> <text> Echo text on console for all peers in group. Short version: /dgt
/dgzaexecute <command> Executes a command on all clients in your current in-game zone (including own). Short version: /dgza
/dgzexecute <command> Executes a command on all clients in your current in-game zone (except own). Short version: /dgze
/djoin <group> [all|save] Join a group, and optionally write to [General] or [server_character] (all or save, respectively)
/dleave <group> [all|save] Leave a group, and optionally write to [General] or [server_character] (all or save, respectively)
/dnet [<arg>] Set variables such as network interface, change settings in the config file, toggle debug mode, and output group/peer information. No option will
/dobserve <name> [-q <query>] [-o <result>] [-drop] Add an observer on name and update values in result, or drop the observer.
/dquery <name> [-q <query>] [-o <result>] [-t <timeout>] Execute query on name and store return in result.
/dtell <name> <text> Echo text on peer's console. Short version: /dt

Settings

Here's an example MQ2DanNet.ini,

[General]
Groups=|bgroup|laptop
; a "|" delimited list of groups for all characters to auto-join, default empty
Debugging=off
; on/off/true/false boolean for debugging output, default off
Local Echo=true
; on/off/true/false boolean for local echo, default on
Command Echo=on
; on/off/true/false boolean for remote and local command (/dgex, &c) output, default on
Full Names=on
; on/off/true/false boolean for displaying fully-qualified names (on means that all names are displayed as server_character), default on
Front Delimiter=off 
; on/off/true/false boolean for putting the | at the front for the TLO output of DanNet.Peers &c, default off
Query Timeout=1s
; timeout string for implicit delay in /dquery and /dobserve, default is 1s
Observe Delay=1000
; delay in milliseconds for observation evaluations to be sent, default is 1000
Evasive=1000
; timeout in milliseconds before a peer is considered evasive, default is 1000
Evasive Refresh=off
; on/off/true/false, default off
Expired=30000
; timeout in milliseconds before an unresponsive peer is dropped, default is 30000
Keepalive=30000
; timeout in milliseconds to ping the main thread to keep it fresh, default is 30000
Tank=war|pal|shd|
; short-name class list to auto-join the tank channel, default is war|pal|shd|
Priest=clr|dru|shm|
; short-name class list to auto-join the priest channel, default is clr|dru|shm|
Melee=brd|rng|mnk|rog|bst|ber|
; short-name class list to auto-join the melee channel, default is brd|rng|mnk|rog|bst|ber|
Caster=nec|wiz|mag|enc|
; short-name class list to auto-join the caster channel, default is nec|wiz|mag|enc|
[server_character]
Groups=|healrot|rizlona
; a "|" delimited list of groups for this specific character to auto-join, default empty

EQBC to DanNet Cheat Sheet

If you're used to MQ2EQBC and are looking for similar usage with DanNet, here's are some concepts/commands that are similar:

Channels vs Groups

  • /bccmd channels group1 raid1 -- Ugh! Requires the full list of channels any time you want to join a new channel.
    • /djoin group1 save -- join group1 group, store settings in MQ2DanNet.ini under [server_character]. Character will automatically join this group for future sessions.
    • /djoin tanks save -- join tanks group, store settings in MQ2DanNet.ini under [server_character]. Character will automatically join this group for future sessions.
    • /dleave raid1 save -- leave raid1 group, save settings in MQ2DanNet.ini under [server_character]. Character will NOT automatically join this group for future sessions.

Rather than adding peers to a group manually, you can use existing commands to add a temporary in-game group/raid setup to a new DanNet group -

  • /dgga /djoin mytempgroup -- join all peers in your current in-game group (including own) to the mytempgroup group. Adding save will store and automatically join this group for future use.
  • /dgra /djoin mytempraid -- join all peers in your current in-game group (including own) to the mytempraid group. Adding save will store and automatically join this group for future use.

Echos

How to echo something in EQBC and DanNet
EQBC DanNet
/bct <name> //echo something cool /dt <name> something cool
/bct <channel> //echo something cool /dgt <group> something cool

EQBC to DanNet Commands

Sending commands to your characters
EQBC DanNet
/bct <name> //command /dex <name> /command
/bct <channel> //command /dge <group> /command
/bcg //command /dgge /command
/bcga //command /dgga /command
/bcz //command /dgze /command
/bcza //command /dgza /command

With DanNet all commands above are built-in, whereas EQBC requires additional plugins.

Use

There are two basic uses,

1. Set up an observer
  • Methods of setting up an observer
    • /dobserve <name> -q <query> [-o <result>]
  • Reading an observer's data: ${DanNet[<name>].Observe[<query>]} or ${DanNet[<name>].O[<query>]}
  • Dropping an observer: /dobserve <name> -q <query> -drop
  • result is optional if no out variable is needed (or not executing from a macro)
2. Single-use direct query
  • Submitting a query: /dquery <name> -q <query> [-o <result>] [-t <timeout>]
    • Combines /delay with /varset
    • timeout is optional, and the default can be configured
    • result is optional, will just write out the result to ${DanNet.Q} or ${DanNet.Query} if omitted
    • If not run in a macro, ignores result and just writes out to the TLO

Queries

A query is simply a normal TLO access from the perspective of the peer with the external ${} stripped Examples:

  • Me.CurrentMana
  • Target.ID
  • Me.Current$\{thing} -- this will evaluate ${thing} on the peer before sending a response

Names

A fully-qualified name is <server>_<character>, but if you only intend to communicate on your own server, you can ommit the first part and use just <charactername> in all these commands. Examples:

  • Locally talk to fatty: /dtell fatty You smell.
  • Talk to fatty on the test server: /dtell test_fatty I can still smell you from this server!

The server name must be a short name.

Troubleshooting

  • Some complicated network topologies won't be supported (a server interface is a better solution)
  • If for some reason the peers aren't self-discovering on a local network
    • check the output of /dnet interface
    • set one of the discovered interface names with /dnet interface <name>
    • after you do this you need to unload and then reload mq2dannet on everyone /multiline ; /plugin dannet unload; /timed 10 /plugin dannet load
    • then doing a /dnet interface you can verify everyone sees the same one
    • The arrow is pointing to your currently selected interface device - if you have no arrow, you have nothing selected.
    • then a /dnet info should show all your toons
    • failing that, I'll have to look into why, so contact support with as much info as possible
  • Proper workgroup permissions are needed for different network groups across PC's (specifically windows 10 with windows 7 machines)
  • ZeroMQ has structural issues if something externally closes the TCP sockets that it is using for inter-process communication. If you are getting unexpected crashes after some time running, check your antivirus/firewall software to ensure that it's letting eqgame exist peacefully. Kaspersky is known to close these sockets.
  • If you are experiencing crashes loading MQ2Dannet or when zoning, check that your Windows 10 is v1903 or greater (Build 10.0.18362). The MQNext version of MQ2Dannet uses Unix sockets for IPC. Support for this was added to Windows 10 in 2018, but after the v1803 public release. As a result the stack crashes when setting up network communications.

See also


Top-Level Object(s)

TLOs added by MQ2DanNet:

TLO Data Type(s) Description
DanNet DanNet DanObservation Holds datatypes for DanNet that can query fellow peers and provide information on settings

Forms. Typical usage, /echo ${TLO}

Type TLO Description
DanNet DanNet[<peer>] Will provide information on the specified peer when used with certain members, such as "Observe". e.g. ${DanNet[peer_name].Observe[query]}

Members. More may be available if inherited. Typical usage, /echo ${TLO.Member}

TLO Data Type Return Type Member Description
DanNet DanNet bool CommandEcho command echo (incoming commands)
Debug debugging flag
EvasiveRefresh if evasiverefresh is on
FrontDelim use a front delimiter in arrays
FullNames print fully qualified names
LocalEcho local echo flag (outgoing echo)
ObserveSet short version: OSet determine if query has been set as observed data on peer, or as an observer on self if no peer specified
DanObservation Observe[<query>] observe accessor, accessed like: ${DanNet[peer_name].Observe[query]}
  • short version: O
  • if only the query is specified, list all peers that have registered that query as an observer on self
  • if fully specified, attempt to retrieve the data specified on the remote peer
Query query accessor, for last executed query short version: Q
Query[<query>] If both peer and query indexes are provided, will return the specific query result. e.g. ${DanNet[mytank].Q[Me.PctHPs]} If either index is missing, it will return the result of the last query. short version: Q
int Evasive time to classify a peer as evasive (in ms)
Expired keepalive time for non-responding peers (in ms)
GroupCount number of all groups
JoinedCount number of joined groups
Keepalive keepalive time for local actor pipe (in ms)
ObserveCount short version: OCount count observed data on peer, or count observers on self if no peer is specified
ObserveDelay delay between observe broadcasts (in ms)
PeerCount number of connected peers
int64 ObserveReceived[<query>] Returns timestamp of last received observation. short version: OReceived
QueryReceived[<query>] Returns the timestamp of last received query. short version: QReceived
string Groups list of all groups (this includes hidden groups used internally! use Joined if you want only groups that are visible)
Joined list of joined groups
Name current node name (fully qualified)
Observe observe accessor, accessed like: ${DanNet[peer_name].Observe}
  • short version: O
  • if no indices are specified, lists all queries observers have registered
  • if only the peer is specified, list all queries that self has registered on peer
Peers List of connected peers
Peers[<${GroupName}>] List of connected peers in the ${GroupName} group
Timeout timeout for implicit delay in /dquery and /dobserve commands
Version current build version
DanObservation int64 Received Timestamp of last received query or observation, e.g. ${DanNet.Query.Received} You can get a more specific result by providing the query and peer, e.g. ${DanNet[tankname].Query[Me.PctHPs].Received} or ${DanNet[clericname].Observe[Target.ID].Received}