MQ2G15: MQ2 G15 LCD Support

brainiac

I like pie
Joined
Mar 6, 2007
Messages
1,065
Reaction score
2
Points
38
The MQ2G15 Plugin v1.0

titlescreen.jpg


After many hours of development, I am pleased to announce the first beta test of my MQ2 G15 LCD Support plugin to lifetime premium members of MMOBugs. If you have a Logitech G15 Keyboard, I know you've been eagerly anticipating a plugin such as this. If you don't have one, I strongly encourage you to spend some money and pick one up, because these keyboards are awesome.

This plugin is fully configurable via an XML based configuration file, allowing for the display of game information limited only by your imagination. Each instance of EQ that you run will have its own MQ2G15 applet, identified by the current character's name.

Basic Usage

To use the plugin, make sure the plugin (MQ2G15.dll) and the configuration file (MQ2G15Config.xml) are in your MacroQuest directory. Simply load the plugin using "/plugin MQ2G15".

NOTE: You must use the MMOBugs Loader, as a valid Lifetime subscription is required to use this plugin.

If you are not in game, your screen will look like the photo at the top of this post displaying the MMOBUGS MacroQuest logo.

If you are in game, you will be greeted by a screen that looks something like the following. This is the "Default" built-in page.

defaultpage.jpg


This is the default display and behavior of the plugin. Without any further configuration, it will display your name, class, level, hitpoints, mana, endurance, experience, aa experience, and aa count.

In the case that you want more information, the option to write a custom configuration is available. See the section below entitled G15 Configuration.

Currently, this is the only built-in page, but the possibility for more exists and is only limited by the amount of time I have available!


Plugin Commands


Of course, no plugin is complete without its array of commands. These are the commands that have been implemented so far:


  • /g15 reload - reloads the plugin and its configuration
  • /g15 page <pagename> - switch immediately to a lcd page by name
  • /g15 next - switch immediately to the next lcd page
  • /g15 prev - switch immediately to the previous lcd page
  • /g15 list - displays a list of currently loaded lcd pages.
  • /g15 screenshot [filename] - takes a screenshot of the current mq2 g15 display and saves it to your mq2 directory.
G15 commands are only available while in game, and only affect the EverQuest session they are run from.



G15 Configurations

This is where things start to get interesting. The plugin supports an unlimited number of custom, user created pages. Each page is described in the configuration xml.

This is what a sample xml configuration layout looks like:
Code:
<Config>
    [COLOR=Lime]<PageLayout [COLOR=DeepSkyBlue]Name="Demo1"[/COLOR]>[/COLOR]
        [COLOR=SandyBrown]<Element [COLOR=LemonChiffon]Type="Text"[/COLOR]>[/COLOR]
[COLOR=YellowGreen]            <Position>
                <X>50</X>
                <Y>0</Y>
            </Position>[/COLOR]
[COLOR=LightBlue]            <Text>[COLOR=White]This is page 1[/COLOR]</Text>[/COLOR]
[COLOR=LightBlue]            <Align>Right</Align>
            <Length>80</Length>
            <Scrolling>False</Scrolling>[/COLOR]
        [COLOR=SandyBrown]</Element>[/COLOR]
        [COLOR=SandyBrown]<Element [COLOR=LemonChiffon]Type="Gauge"[/COLOR]>[/COLOR]
[COLOR=YellowGreen]            <Position>
                <X>0</X>
                <Y>12</Y>
            </Position>[/COLOR]
[COLOR=LightBlue]            [COLOR=Yellow]<Size>
                <Width>100</Width>
                <Height>5</Height>
            </Size>[/COLOR]
[/COLOR] [COLOR=LightBlue]            <Value>[COLOR=White]${Me.PctHPs}[/COLOR]</Value>
            <Style>Filled</Style>[/COLOR]
        [COLOR=SandyBrown]</Element>[/COLOR]
    [COLOR=Lime]</PageLayout>[/COLOR]
</Config>
A breakdown of what each XML element and property does follows:

The Config tag is the root of the document. All other tags go inside of this one.

Each page is defined by the contents of a PageLayout tag. Every PageLayout tag is required to have a Name property. This property is how each page is identified.

Each Page Layout has zero or more Element tags. An Element represents something that is displayed onto the screen. Each Element tag is required to have a Type property, which defines what kind of Element it is.

Each Element Type has its own set of tags for defining its behavior. Currently, there are only two types, but I'm planning on adding more:

  • Text - This is a text element. It will display text on the screen.
  • Gauge - This is a graphical gauge.
Each type of element has a Position element that defines where that element will be displayed.

The following listing describes the available configurations specific for each Element type.

Text Properties

  • Text - This is the text that will be drawn. This can be macro data, but to use macro data you must set the text as dynamic (see below).
  • Dynamic - Specifies that this text is based on macro data and updates every frame. Valid values are "True" or "False". Default is False.
  • Align - This is the text alignment. This can be either "Left", "Center", or "Right". Default is "Left".
  • FontSize - Size of the font. Currently, values can be either "Small", "Medium", or "Big". Default is "Small"
  • Length - This is the length of the text field. Text that draws beyond this size will be cut off. Length is also used to determine the margin for Center and Right alignment. If no value is specified, length will be adjusted to the right edge of the screen.
  • Scrolling - This will cause the text to scroll right to left. Valid values are "True" and "False"

Gauge Properties


  • Value - This is a number or a macro expression that evaluates to a number. Valid ranges of numbers are from 0 - 100. This number represents the value of the vauge as a percent (such as ${Me.PctHPs}).
  • Size - This is expressed as a Width and Height, and defines the size of the guage on the screen.
  • Style - Values are "Cursor" or "Filled". Filled will show a solid bar. Cursor will show a cursor that marks the current value of the gauge. Default is Filled.

Adding your own pages is really easy. A few samples are in the default configuration that I am distributing.

To access your new page, you can use the command /g15 page <pagename> or you can use the first two lcd buttons to cycle between available pages.


Sample Configuration

This is a sample configuration and a photo of what it looks like on the keyboard.

Code:
<Config>
    <PageLayout Name="Demo1">
        <Element Type="Text">
            <Position>
                <X>0</X>
                <Y>0</Y>
            </Position>
            <Text>Time: ${Time}</Text>
            <Align>Left</Align>
            <Length>60</Length>
            <Dynamic>True</Dynamic>
            <Scrolling>False</Scrolling>
        </Element>
        <Element Type="Text">
            <Position>
                <X>80</X>
                <Y>0</Y>
            </Position>
            <FontSize>Medium</FontSize>
            <Text>This is a test of page 1</Text>
            <Align>Right</Align>
            <Length>80</Length>
            <Scrolling>True</Scrolling>
        </Element>
        <Element Type="Text">
            <Position>
                <X>0</X>
                <Y>11</Y>
            </Position>
            <Text>HP</Text>
            <Length>15</Length>
        </Element>
        <Element Type="Gauge">
            <Position>
                <X>15</X>
                <Y>12</Y>
            </Position>
            <Size>
                <Width>100</Width>
                <Height>5</Height>
            </Size>
            <Value>${Me.PctHPs}</Value>
            <Style>Filled</Style>
        </Element>
    </PageLayout>
</Config>
configdemo.jpg


Note that the text "This is a test of page 1" will scroll over time


Future Development & Feature Requests

Here is a list of features I hope to add in the future:

  • Support for additional element types such as bitmaps, geometric shapes, lines, etc.
  • Conditional options for pages to display information for certain events such as specific zones, classes, etc.
  • Programmable buttons to allow behavior user configurable by page or configuration file.
  • Support for G-Key key bindings, allowing the G keys to be used in game to execute commands.
  • Additional preprogrammed pages (such as the Default page) that are capable of features not capable by the user configured pages.
If you have additional suggestions please let me know them and I will see what I can do.

Troubleshooting

This plugin was developed using the logitech g15 lcd sdk. I have not tested what happens when you use this plugin without the keyboard.

I developed this plugin using Visual Studio 2005 Professional. In the event that the library fails to load, you may be missing appropriate runtime libraries.


Release History

2009-05-14 - v1.2

  • Removed lifetime subscription requirement.
  • Increased frame redraw delay to 200ms (5fps)
  • Included target indicator arrow which points to your current target.

2009-01-20 - v1.1
  • Added /g15 screenshot
  • Added target tracking arrow to main page

2008-09-12 - v1.0
  • Added new main page layout
2008-08-09 - v1.0 beta

  • Initial release


I write these plugins for personal enjoyment and do not expect financial reimbursement, however if you want to support me and my work please consider making a donation by clicking Here
 

Attachments

  • MQ2G15.dll
    336 KB · Views: 62
  • MQ2G15Config.xml
    1.7 KB · Views: 70
Last edited:
Fucking brilliant. It's always amazing to see people bring these new creative gems into the community.

And bravo on locking the plugin to Lifetime only.
 
Awesome man. Can't wait to try it out. Thanks.
 
looks very cool and i think i will now buy a g15 :)

Great work.
 
Well, I planned on getting a G15, now I'm really going to get a G15 hehe..Think there might be a way for this to work with EQ2 as well?

EDIT: Can anyone reccommend me any nice Trackball mice with good responsiveness for gaming?
 
just picked one up for 68.99 (that's shipping added in) brand new off ebay cant wait to check this out later in the week

thanks brainiac
 
/sniffle FINALLY someone did it. I'd been tooling around trying to figure a way to throw this stuff onto the g15, but I never thought of using mq2 to do it. <3
 
How would i take out where it says your level and class , and instead have HoTT there?
 
How would i take out where it says your level and class , and instead have HoTT there?

The default page is pre-programmed, but a custom page could easily be written with what you want it to show.

Everybody is going to want something different so its hard to guess what to put on it, so thats why I made it customizable.
 
We should probable have a thread devoted to pages people have createed and are willing to share...I foresee this this getting very big hehe
 
The plugin should still work after this patch. I'll upload a new version when I get home from work later this evening with some updates.