Skip to content

MQ2DanNet

MQ2DanNet

A serverless peer networking plugin, allowing you to control and monitor several characters at once.

Authors: dannuic, Knightly, plure • Config: MQ2DanNet.ini

Resource Download Support Repo Quick Start

This plugin is designed to be a serverless peer network. It is (hopefully) mostly plug and play, and should automatically discover peers for most local network configurations.

Some notes about setup

  • 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>
    • failing that, I'll have to look into why, so contact me with as much info as possible

Use

There are 2 basic uses

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>]}
${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).

Single-use direct query

Submitting a query:

/dquery <name> -q <query> [-o <result>] [-t <timeout>]

Features:

  • 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!

Commands

/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)

/dtell <name> <text>
Echo text on peer's console. Short version: /dt

/dgtell <group> <text>
Echo text on console for all peers in group. Short version: /dgt

/dexecute <name> <command>
Executes a command on peer's client. Short version: /dex

/dgexecute <group> <command>
Executes a command on all clients in a group (except own). Short version: /dge

/dggexecute <command>
Executes a command on all clients in your current in-game group (except own). Short version: /dgge

/dgrexecute <command>
Executes a command on all clients in your current in-game raid (except own). Short version: /dgre

/dgzexecute <command>
Executes a command on all clients in your current in-game zone (except own). Short version: /dgze

/dgaexecute <group> <command>
Executes a command on all clients in a group (including own). Short version: /dgae

/dggaexecute <command>
Executes a command on all clients in your current in-game group (including own). Short version: /dgga

/dgraexecute <command>
Executes a command on all clients in your current in-game raid (including own). Short version: /dgra

/dgzaexecute <command>
Executes a command on all clients in your current in-game zone (including own). Short version: /dgza

/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.

EQBC to DanNet Cheat Sheets

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

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

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 -- add everyone in your current group to mytempgroup (add save to join in future sessions as well)
  • /dgra /djoin mytempraid -- add everyone in your current raid to mytempraid (add save to join in future sessions as well)

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

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 (requires netbots) /dgze /command (does NOT require netbots)
/bcza //command (requires netbots) /dgza /command (does NOT require netbots)

With DanNet all of the above are built-in, whereas EQBC requires extra plugins.

TLO Members

DanNet adds DanNet with the following members. See Queries for use.

string Name

current node name (fully qualified)

string Version

current build version

bool Debug

debugging flag

bool LocalEcho

local echo flag (outgoing echo)

bool CommandEcho

command echo (incoming commands)

bool FullNames

print fully qualified names

bool FrontDelim

use a front | delimiter in arrays

bool ShowGroups

show groups?

string Timeout

timeout for implicit delay in /dquery and /dobserve commands

int ObserveDelay

delay between observe broadcasts (in ms)

int Evasive

time to classify a peer as evasive (in ms)

bool EvasiveRefresh

if evasiverefresh is on

int Expired

keepalive time for non-responding peers (in ms)

int Keepalive

keepalive time for local actor pipe (in ms)

int PeerCount

number of connected peers

string Peers

List of connected peers

string Peers[GroupName]

List of connected peers in the ${GroupName} group.

int GroupCount

number of all groups

string Groups

list of all groups (this includes hidden groups used internally! use Joined if you want only groups that are visible)

int JoinedCount

number of joined groups

string Joined

list of joined groups

DanObservation Observe[query]

observe accessor, accessed like: ${DanNet[peer_name].Observe[query]}

  • short version: O
  • if no indices are specified, lists all queries observers have registered
  • if only the query is specified, list all peers that have registered that query as an observer on self
  • if only the peer is specified, list all queries that self has registered on peer
  • if fully specified, attempt to retrieve the data specified on the remote peer

int ObserveCount

short version: OCount

  • count observed data on peer, or count observers on self if no peer is specified

bool 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

int64 ObserveReceived[query]

Returns timestamp of last received observation.

  • short version: OReceived

DanObservation Query

query accessor, for last executed query

  • short version: Q

DanObservation 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

int64 QueryReceived[query]

Returns the timestamp of last received query.

  • short version: QReceived

INI Entries (MQ2DanNet.ini)

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

Known Issues

  • 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.

Discussions that link here