PDA

View Full Version : Utility Dominion 3 Server Monitor Tool


MarcinM
November 14th, 2006, 12:27 AM
Here's my attempt at a Dom3 server monitor tool.

It's Windows only, requires .NET, and as all software that doesn't go through Q&A, may crash your PC http://forum.shrapnelgames.com/images/smilies/happy.gif That said, I've been using it myself for a while.

Simply enter your server and port and hit "Get Status". The dropdown list should populate when you disconnect, and on all subsequent uses of the tool.

http://www.damodred.net/cms_images/gallery_76_65.jpg

Next version will include the ability to delete servers from the list, and I'm hoping to get the nation flags in there as well.

Without further ado ... the Dom3 Server Monitor tool. (http://froggyfish.net/dom3tool.zip)

Please email me any suggestions or bug reports, as I'm not sure how often I will check back here - this tool is mainly written for me, and I'd thought I'd share.

Gandalf Parker
November 14th, 2006, 01:01 AM
Looks great. Thanks for that.

I guess I should get back to work on a server-side (web based) status screen.

MarcinM
November 14th, 2006, 01:39 AM
You should? (http://froggyfish.net/squidz/)

http://forum.shrapnelgames.com/images/smilies/wink.gif

MarcinM
November 29th, 2006, 12:43 AM
Version 1.0.0.8 of the Dom3 Tool is up, this one includes the launcher capability (i.e you can launch into a network game directly from the tool). (http://froggyfish.net/dom3tool.zip)

There's a couple of quirks. You can only add the path to the executable once you're connected - this is to prevent adding of executables to non-working servers.

Also, you need to specify an executable PER server - this is to enable those folks who are playing different game versions on different servers from a single machine.

Hopefully the fact that the buttons go inactive when ... well, inactive ... will help make things clear. It's really not that hard:

1. Select "NEW" from the dropdown to add a new server.
2. Type in server info, server URL (or IP) + port as before.
3. Hit "Get Status" as before.
4. Once connected, hit "Browse for executable" and navigate to your dom3 exec file.
5. Hit "Disconnect". The "Launch" button should light up.

You only have to set servers up ONCE.

Once you have all of your servers configured, simply select what you want from the dropdown and hit Launch.

Please PM or email me the bugs, I don't check back here too often http://forum.shrapnelgames.com/images/smilies/happy.gif As always, disclaimers as to the software melting your face etc. apply (I've tested it plenty though).

GwyrgynBlood
November 30th, 2006, 02:36 PM
Gives me lots of issues. Main one is that if I make a server and then quit and reload, the server is not in the list. Selecting 'NEW' after that gives the following error:

<font class="small">Code:</font><hr /><pre>
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Cannot find table 0.
at System.Data.DataTableCollection.get_Item(Int32 index)
at MyApp1.Form1.serverSelect_SelectedIndexChanged(Obj ect sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChang ed(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Mes sage&amp; m)
at System.Windows.Forms.ComboBox.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
</pre><hr />

The serverlist.xml file only contains this:

<font class="small">Code:</font><hr /><pre>
&lt;?xml version="1.0" standalone="yes" ?&gt;
&lt;servers xmlns="serverlist" /&gt;
</pre><hr />

So it seems to be outputting the data wrong.


Second, when I try to connect to the server, the whole app locks while trying to do so (Not Responding state, that is). You should probably put the task of connecting to the server on a seperate thread and update the status in the log panel, it's just generally nicer to do that than freeze the thing (plus then the user can cancel mid-connect attempt).

MarcinM
February 8th, 2007, 12:34 AM
The tool now lists the amount of time remaining until the server hosts. If there is no timer set, it displays 0hrs. It also lists the number of the nations playing.

I'll address the above concerns at some point as well ... well, the first one anyway. Starting a new thread sounds ... advanced.

For the moment, I can't duplicate the first issue, after deleting the XML file by hand and rebuilding it 5 times from the tool.

Could you please provide step by step description of how you get it to crash?

paradoxharbinger
April 1st, 2007, 05:24 PM
the links are all dead is this till available?

lch
April 2nd, 2007, 08:56 AM
I guess this here is it (v1.0.0.9): http://www.mediafire.com/?2nawnfyzjyj

Dunno if it really works, because I can't use Windows binaries which require .NET

JayThomas
April 3rd, 2007, 12:23 PM
I really like this tool.

Dedas
April 3rd, 2007, 12:39 PM
Is it possible for you to port this to linux? I would really like to use it but don't want to mess with Wine and .NET. Thank you. http://forum.shrapnelgames.com/images/smilies/happy.gif

lch
April 3rd, 2007, 01:29 PM
Only MarcinM has the source code, so only he would be able to port it unless somebody programs something similar. I'd be quite interested to see some info on the Dom3 server/client protocol, just for very basic stuff like nation and turn info as shown here, because I'd use it for my PHP server info pages and I'm too lazy to reverse-engineer the protocol myself... http://forum.shrapnelgames.com/images/smilies/tongue.gif

Gandalf Parker
April 3rd, 2007, 02:38 PM
Its not too hard to create an info page for your own games on your own server. Unless you want to show status from other servers.

But if you really want the server-to-client packet info then you can probably email Johan and ask him. As long as you show that you can "speak programming" in terms that arent specific to a particular language then he seems to respond well.

MarcinM
April 17th, 2007, 10:17 PM
paradoxharbinger said:
the links are all dead is this till available?



My apologies, I moved several sites off of shared hosting onto my own - and some files didn't get moved. It should be back in place now.

I can certainly post the C# source files as well, if there is interest. The only reason it's on a Windows platform is ... because I wanted to see what C# was like http://forum.shrapnelgames.com/images/smilies/tongue.gif I don't have the time to port it right now, but that's not a bad idea - I'll let you know in a few weeks http://forum.shrapnelgames.com/images/smilies/wink.gif

Making your own info page on your OWN server is ridiculously easy. Just send your server output (just by using dom3 &gt; textfile) to a text file and parse it - it's much easier than querying the server directly.

lch
April 18th, 2007, 08:04 PM
MarcinM said:
I can certainly post the C# source files as well, if there is interest.


There definately is interest in that! http://forum.shrapnelgames.com/images/smilies/stupid.gif

lch
April 30th, 2007, 12:49 PM
Well, getting this to be compatible with *nix was now my first C# assignment, too... http://forum.shrapnelgames.com/images/smilies/tongue.gif

http://i15.tinypic.com/6ge7ty9.png

I made some changes to the program to make it compatible with *nix environments. What I changed was...
... path for the dom3tool_serverlist.xml file. The original program wants to access the %APPDATA% directory for that, if that environment variable does not exist (like on my Linux system), it bails out. Now it tries %APPDATA% if it's set or the current directory (aka ".") otherwise.
... "Open file" dialog to find the Dom3 executable. I have added an option for the usual dom3 executables: dom3_* and dom3*.exe and used that as default value. Changed the "All files" file mask, too, because otherwise it wouldn't show the *nix executables.
... launching the Dom3 executable. Maybe Windows launches the program successfully if the working directory is set to the directory where the executable is in, but that didn't work for me, so I used the full absolute path instead.
I didn't change any other code, even though the program doesn't validate its input enough. If you abort the program on the first start you can mess up your settings XML file and fill it with bad uninitialized values, which results in subsequent crashes when you open the program again. You'll have to delete the XML file in that case. There might be other trouble lurking somewhere, too.

Attached is the binary which works with Mono 1.2.2.1 and upwards and should work on Windows systems with the original .NET framework without modifications, too. (Could I get a confirmation for that, maybe?)

lch
May 2nd, 2007, 08:25 PM
A little bugfix release:
added nations Lanka, Tir na n'Og and Eriu introduced in the patches 3.04 and 3.08
early age Arcoscephale didn't show up before, it does now
nations are now sorted by nation number, not by status (makes it easier to find them if they stay at the same place in the list all the time)
connected players are now shown by uppercase status letters
connecting to a server shifted the game name to the right - fixed; the game name is left-oriented now
If anybody wants any new features or bugs fixed (there are a couple) then ask for it. I might rewrite this eventually.

Daedalus
September 26th, 2007, 04:29 PM
When I run this, I can't enter a server name - everything is greyed out except for the dropdown that has "- NEW -" in it.

When I select that, I get the following error:

----------------------------------------------------
Unhanded exception has occurred in your application. If you click continue, the application will ignore this error and attempt to continue. If you click Quit, the application with close immediately.

Cannot find table 0.
-------------------------------------------------------

If I click continue, nothing changes - the dropdown is still the only thing not greyed out.

Any ideas?

Running on Win xp with .net 1.1, 2, &amp; 3 installed.

lch
September 27th, 2007, 06:59 AM
Have you read this that I wrote?

lch said:
I didn't change any other code, even though the program doesn't validate its input enough. If you abort the program on the first start you can mess up your settings XML file and fill it with bad uninitialized values, which results in subsequent crashes when you open the program again. You'll have to delete the XML file in that case. There might be other trouble lurking somewhere, too.


Are you using the original executable from the first post or mine from the attachment in the last post of the first page?

Daedalus
September 27th, 2007, 11:11 AM
I do not know which one I am using; I have downloaded both, installed both, but they appear to be the same. They both say "Dom 3 Tool_1_0_0_9". I have uninstalled/reinstalled both versions, they both give me the same error.

I can find no XML file that it creates.

lch
September 27th, 2007, 11:59 AM
Enter %APPDATA% into the address field of your windows explorer, look for the serverlist.xml and delete it.

Daedalus
September 27th, 2007, 04:00 PM
That worked like a charm! Thanks so much!

http://forum.shrapnelgames.com/images/smilies/happy.gif

lch
October 10th, 2007, 12:18 AM
Updated page 1 to reflect the 3.10 changes for new nations...

Remmy
October 29th, 2007, 04:42 PM
Thanks a lot, this is a great little tool.

evilketchupcow
December 12th, 2007, 12:38 PM
If your willing to give some c# source code, i would try to convert it to mono(open source .NET), the easy linux fix.

lch
December 12th, 2007, 09:37 PM
I already did the "to Mono" / Linux thing. Mono just interprets .exe files compiled with VS.NET/Mono, they still compile as exe, use them by: $ mono "Dom3 Status Monitor.exe"

evilketchupcow
December 16th, 2007, 04:26 PM
I cant find Dom3 Status Monitor.exe in any of the downloads, and the Dom 3 Tool.exe cant be launched by mono, Maybe im just stupid.

lch
December 17th, 2007, 03:16 PM
No, I am an idiot... &gt;_&lt; I attached my server-side status script for PHP by mistake, must have been a long day. Try again, this time it should be the right executable.