.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Utility: PyEye1.33 dom-III client. Now 3.20 compliant. (http://forum.shrapnelgames.com/showthread.php?t=36618)

WraithLord October 28th, 2007 12:03 PM

PyEye1.33 dom-III client. Now 3.20 compliant.
 
2 Attachment(s)
This is a GUI client that tells you the status of TCP games. Like which nations have already played turns, which are AI controlled, how much time left for host etc.

Check the screenshot to get an idea what's it about.

The zip contains two dirs
If you're using windows you need to copy the PyEyeGui_Windows to wherever you like.
Then run the exe in bin directory, the one named py_eye_gui.exe.

Linux/Unix/MAC need to install python and tkinter (python GUI infrastructure) and run the PyEyeSource\py_eye_gui.py file.

To configure the client go to settings and enter game path (where dom is installed), flags if you want, path to backup turn files (optional) and whether or not you want to autosave your turns.
Then you go to games to Add/Remove/Edit a game. Its should be straightforward to configure.

Now that you've got it all configured you can either:
1. Query for turn status.
2. Play your turn, the client will fire up dominions (and connect it to server), you'll play your turn. When you quit the client will save your turn (if you configured it to do so).

Ver 1.3.3
Support for new nations

Ver 1.3.2
Fixed bugs:
-> Fix a tiny bug of unexpected exception when server was down
-> Nation number 95 instead of 80 (Thanks Ich) so turn status will work well for 3.14

Added:
-> Bogarus, (Indie flag for now)

Ver 1.3.1,
This is hopefully the last version.
Fixed bugs:
-> Auto save settings is now saved between sessions

Added:
-> Source code distribution under GPL license (so that free source programmers could use it).
The source code is in the attached file in directory PyEyeSource. Linux/Unix/MAC users should just copy this directory to a desired location, make sure they have python > 2.5 on their system and run python py_eye_gui.py.


ver 1.3, This is a major version with better quality (lots of bugs got scrubbed and new functionality)

Fixed bugs:
-> Lots of bugs that had to do with error conditions, server down, wrong configuration etc got fixed.

Added:
-> Auto save (setting->Auto save on/off) after playing turn
-> All games report screen.


ver 1.2
Fixed bugs:
-> Saving or launching game disabled querying server

Added:
-> Menu for saving games. First set directory to save to under settings.

ver 1.1
Added:
-> Settings menu
-> Play turn menu


Ver 1.02
Fixed bugs:
-> Some conditions led to wrong AI tooltip
-> midgard icon fix
-> turn # and time to host got mixed http://forum.shrapnelgames.com/images/smilies/happy.gif

Added:
-> help->usage

Yeah, I've noticed by now there are a couple of those available which is a good thing. However, I wanted a to have a cross platform client and besides it was a loose end I wanted to tie after writing the CLI right when dom-III came out ( PyEye CLI ). The name pyEye is a homage of sorts to dom-II god's eye client http://forum.shrapnelgames.com/images/smilies/happy.gif

Anyway, work on the client is coming along nicely and I expect to have it ready by the end of this week. Attached is a screenshot, of course comments at this early stage of its development are welcome as they'll allow me to adjust rapidly.

The client is written in python and I intend to test it under windows, Linux and cygwin. It should work for Mac as well but I can't test it since I don't have access to one.
I will release an exe for windows and the source code with an install routine for the ??NIX systems.

It supports all the nations up to 3.10 and modded nations can be added easily via a configuration file.

I want to thank zepath for allowing me to use his beautiful nation icons.

updates will follow.

WraithLord October 30th, 2007 07:20 AM

Re: GUI for probing turn status
 
Windows exe is ready. Actually that are two of those, a normal one and a debug version one (for those volunteers that would like to help me troubleshoot issues).

The exe is attached to the first post. To install do the following:
1. Extract the attachment
2. Copy PyEyeGui_Windows to Program Files or where ever you want it to be (for the debug version copy PyEyeGui_Windows_Debug).
3. Run bin/py_eye_gui.exe, I've found creating a shortcut and putting it on the desktop to be convenient.

Usage:
Games menu allows to add/remove/edit games.
Query menu allows to query status of game servers

WraithLord October 31st, 2007 05:43 AM

Re: GUI for probing turn status
 
1 Attachment(s)
Fixed a few small bugs and added a screenshot.

WraithLord October 31st, 2007 11:04 AM

Re: GUI for probing turn status
 
I found it tedious to maintain desktop shortcuts for launching games so I've added a "Play game" to version 1.1.

Use settings to configure path to dom-III exe on your system and whatever flags you'd like for it to use. Then use "Play turn"->your game to connect to your game server.

Next I think I'll implement a save functionality and then pick up on the Linux/MAC distribution thing (I haven't had much success so far with python packaging API)

WraithLord November 1st, 2007 01:30 PM

Re: GUI for probing turn status
 
New version 1.2 adds the capability to save the turn files. For that you need to configure settings->set turns backup path
and then before/after playing your turn hit the save turn->your game and the turn will be saved.

I assume that some ppl did indeed download the thing. I wonder what comments if at all they may have (hopefully it didn't format their hard drives). In any case comments and or request for additional functionality are welcomed.

I will upload ver 1.2 once I've had some chance to run it through BATS.

WraithLord November 3rd, 2007 08:14 PM

Re: GUI for probing turn status
 
FYI
Just found out that the 1.1 functionality of launching a game has a bug that don't allow to query the server status after launching a game. It is fixed in ver. 1.2 that I will upload tomorrow after completing testing it (and also has the save turn functionality).

WraithLord November 4th, 2007 06:41 AM

Re: GUI for probing turn status
 
I was entraining some thoughts about adding functionality to pull/send turns from mail accounts (GMAIL, pop3/IMAP) but OtOH I'm quite anxious to start on the combat SIM, so unless I hear requests for additional features I will stop at that point.

Jurri November 4th, 2007 07:57 PM

Re: GUI for probing turn status
 
This is a really sweet little program. I'm only in one server game, yet I still use it since it's much faster probing the server than the game itself is! Definitely recommended for folks who play a lot of server-games. Even if the server has email-notification: removing the need for separate shortcuts is quite convenient.

The package has a number of pre-configured games by the way. (Thanks for saving me the trouble on configuring Invisible Swarm2 http://forum.shrapnelgames.com/image...ies/tongue.gif ) They are easy enough to remove of course, but you might want to remove them for aesthetic reasons.

WraithLord November 5th, 2007 04:58 AM

Re: GUI for probing turn status
 
Thanks for the feedback Jurri. Good note about the pre-configured games, I will remove them on the next release.

I'm glad you're using the invisible swarm configuration, hopefully my hidden trojan will perform well in sending me reports on your turns, they will be well used by the inquisition http://forum.shrapnelgames.com/images/smilies/wink.gif

Seriously now, is there any additional feature you'd like to see in this program?

Jurri November 5th, 2007 08:22 AM

Re: GUI for probing turn status
 
I can't really think of anything: this does what it's designed to do perfectly. http://forum.shrapnelgames.com/images/smilies/happy.gif The only thing missing is the program actually playing my turn for me.

Well, if you want to bloat it here's some ideas: for someone who had more than one server game ongoing, maybe a function for checking all of them with a single click would be useful? Then perhaps a summary page that shows which games need his turn and how much time there's left. (You'd need to add the nation played in the configuration for this.)

The save-turn function doesn't seem to work, now that I try it... It doesn't seem to actually copy the turn files at least to the specified directory. A feature that might be nice for it would be autosave, so that you didn't need to manually save each turn if you should want to back them all up.

Also: knowing of the threat in Invisible Swarm is quite removed from actually avoiding it! So spy all you want, it won't save your bacon http://forum.shrapnelgames.com/images/smilies/evil.gif

WraithLord November 5th, 2007 09:55 AM

Re: GUI for probing turn status
 
1 Attachment(s)
Your suggestion for checking the status of all games is a good one and I'll add it to my todo list.

Same goes for the auto save feature.

As for the save turn not working. First, please note that it doesn't actually copy the turns. It creates a bzip2 tarball containing the turn puts it at the location specified in settings under directory "game name"/"turn number". Then if all that is successful it shows a message similar to the one attached to this post.

Jurri November 5th, 2007 12:11 PM

Re: GUI for probing turn status
 
Ah, you had configured the game wrong! http://forum.shrapnelgames.com/images/smilies/happy.gif (A typo in the game's name.) Works fine after correcting it.

While figuring that out I noticed that the log-file is quite cluttered with your debugging. You might wanna empty that, again for the aesthetics http://forum.shrapnelgames.com/images/smilies/wink.gif

WraithLord November 5th, 2007 05:15 PM

Re: GUI for probing turn status
 
You're right about the type, I have stumbled into the same error and failed to mention that earlier. sorry for that.

About the log file, are you sure you aren't running the debug version of the program?- If you are sure then you see the log because of some uncaught exception in the code (I only write severe logs in the non-debug version). So if the log bothers you, just erase it and you won't see any logs again.

Jurri November 5th, 2007 06:52 PM

Re: GUI for probing turn status
 
It's not the debug-version. (Unless they are mixed up in the package http://forum.shrapnelgames.com/images/smilies/happy.gif ) When I tried to save my turn with the invalid path and quit the program, it did report that it wrote something in the log (py_eye_gui.exe.log). It shouldn't? Well, I don't really care now that it works http://forum.shrapnelgames.com/images/smilies/wink.gif

And what I mean with clutter is that said log-file is like 800 K in size already in the zip. I don't think you intend to have it there at all, since it's just a bunch of logs from when you tested the program or something. Not that it matters, of course, but it's prettier without.

WraithLord November 5th, 2007 07:52 PM

Re: GUI for probing turn status
 
I have fixed the issue of failing to save turns by handling it gracefully. Now instead of an error log message the program will open a window with a message that it can't save the game. The fix will be included in the next release (with your recommendation added)

ok, now I understand your comment about the log. You're right of course, thanks for the heads up.

PashaDawg November 6th, 2007 09:26 PM

Re: GUI for probing turn status
 
Sounds great!

Geez, maybe I can beg a Mac-using programmer to follow your lead! http://forum.shrapnelgames.com/images/smilies/happy.gif

WraithLord November 7th, 2007 05:07 AM

Re: GUI for probing turn status
 
Hey Pasha,

The program also works for MAC, though I haven't tested it on one. It is working for Linux and Cygwin. My intention was to release a source distribution but I have some learning to do before I can make that work and, as it so happens, I'm on family vacation with limited access to my development environment. But next week when I'm back I'll make this happen so that MAC and Linux users could also use the program.

Jurri November 8th, 2007 01:27 PM

Re: GUI for probing turn status
 
1 Attachment(s)
Hey, attached is an icon for the program if you want one. (Since I'm so shallow, I couldn't bear seeing it without one, as it's a program I use every day http://forum.shrapnelgames.com/images/smilies/wink.gif ) The motif is that lovable scamp, Umor, hugging an eyeball.

WraithLord November 8th, 2007 04:48 PM

Re: GUI for probing turn status
 
Wow, its a very nice icon indeed, Thank you!

But how does attaching an icon to a program work in windows anyway?

Jurri November 8th, 2007 05:22 PM

Re: GUI for probing turn status
 
Well, I just made a shortcut to the program on my desktop: that one can have an icon assigned to it via properties. I have no idea how one would attach it to the actual program, though http://forum.shrapnelgames.com/images/smilies/happy.gif

WraithLord November 8th, 2007 06:02 PM

Re: GUI for probing turn status
 
Oh cool, I figured that much already but I reckon there is a specific way for windows to make this part of the program. I'll check this.

BTW, my efforts on source distribution are going surprisingly well considering my limited access to my dev env. Also the auto save is on its way and I reckon the all games summary screen will follow soon http://forum.shrapnelgames.com/images/smilies/happy.gif

WraithLord November 8th, 2007 06:35 PM

Re: GUI for probing turn status
 
ok, some digging into tkinter manual has provided the answer of how to associate your icon with the program. Next version will not require you to do this manually.

WraithLord November 18th, 2007 07:14 AM

Re: GUI for probing turn status
 
Major version 1.3 (probably last major version) is ready.
It adds auto save as well as single screen report for all games and many bug fixes.

The source distribution (using python distutils) has an issue that it doesn't package the programs depependencies (such as Tkinter). I'm working on this in the hopes of making the program available to MAC and Linux users as well.

Here are two screens, screen 1
screen2

Jurri November 18th, 2007 01:12 PM

Re: GUI for probing turn status
 
Sweet, I was looking forward to this!

Does it save the autosave-configuration, though? It seems to turn it off when I close the program.

WraithLord November 18th, 2007 01:30 PM

Re: GUI for probing turn status
 
Good catch Jurri, I simply forgot to save the "auto save" configuration http://forum.shrapnelgames.com/images/smilies/happy.gif
I will fix this of course, but wait a bit before I upload a new version in the hopes of catching more bugs in the process (I haven't started using this version yet, only programming it and testing it according to test plan)

WraithLord November 22nd, 2007 12:21 PM

Re: GUI for probing turn status
 
The bug is fixes in v 1.31.

Also, I have given up on creating an installer with dist utils because I have found out that it works well for either dumb installation or very complex ones, but for medium complex installation its just more bothersome than useful. So I have packaged the source code and dependencies in a way that it can be ran from a single directory (PyEyeSource in the first post attachment).

I have tested under Linux what I could (queries) but since I don't have a Linux with dominions installed I couldn't test the play and save functions. I could not test at all for MAC since I don't have access to one. In all these I'm counting on users inputs to determine what is broken so I can make fixes.

My next project will be a combat simulator. This can either be fairly simple or very complex depending on what exactly I'll try to do. When I'll start on it I'll open a thread for "design" because on this one I'll surely need help from the community here. My reference is Saber Cherry's sim which at the end turned out to be quite big.

Jurri November 22nd, 2007 02:58 PM

Re: GUI for probing turn status
 
Thank for your hard work!

Maybe I'm doing something wrong, but I can't get the autosave to work: the pull down menu has 'Auto save', but there's no longer an indication whether it's on or off as in the previous version. Clicking the menu-option seems to do nothing, and auto saving doesn't seem to happen.

WraithLord November 22nd, 2007 04:22 PM

Re: GUI for probing turn status
 
Thank you for being so patient with my bugs http://forum.shrapnelgames.com/images/smilies/happy.gif

I'm sorry this one slipped through. I have tested this recently but made a small change today that broke it. I'll release a fix soon.

WraithLord November 25th, 2007 07:16 PM

Re: GUI for probing turn status
 
The bug is already fixed but no time today to package and U/L it. I hope to get be able to do it soon, tomorrow preferably.

WraithLord November 26th, 2007 06:33 AM

Re: GUI for probing turn status
 
Bug fixed, attached in first post.

Jurri November 26th, 2007 09:56 AM

Re: GUI for probing turn status
 
Sweet! I'll put it to test tonight http://forum.shrapnelgames.com/images/smilies/happy.gif

Hey, I thought of a feature that might be fun. (Maybe you wanna close the books on this one already though, seeing how I'm probably the only user http://forum.shrapnelgames.com/images/smilies/wink.gif ) Anyway, it's this: how about adding a password field for the games? I mean, I have my passwords in a text-file on my desktop , but that's not pretty and well, I launch my server-games through this program anyways. So the query-screen for each game would be a natural place to have the password, or maybe have it show it when you select the play game -option? Anyway, just a thought, certainly the benefit would be limited to such shallow folks like me http://forum.shrapnelgames.com/images/smilies/happy.gif

WraithLord November 26th, 2007 10:21 AM

Re: GUI for probing turn status
 
You are *very* wrong about being the only user, in fact, I estimate there are *two* users to the program http://forum.shrapnelgames.com/images/smilies/wink.gif

The passwd field is cool, I also have the same awkward solution for my passwords. For this however there are two options:
1. Not safe, save the passwords in plain text
2. Safer, ask for a master password and encrypt the game passwords according to it. The master password will not be saved (duh) and hence is less convenient, but OtOH its safer.

My intuition tells me to go for the 2nd option, but I'm very interested to hear your opinion.

Jurri November 26th, 2007 11:07 AM

Re: GUI for probing turn status
 
Hah, at least a 100% error in my guess then!

Of course, I know jack about these things, but how would it be a security risk at all even without any fancy encryption? The text-file with the passwords wouldn't be transmitted anywhere, would it? (Or can you make it input the password via command-line or something? I think not, but that would be even more convenient.)

And anyways, I would say that there's not really any need for security even if there was some scenario where the passwords could be mined: I mean, it's just passwords for games is all it is http://forum.shrapnelgames.com/images/smilies/happy.gif Thus, certainly my preference would be for the most convenient and hassle-free option: of course, you could make it optional to encrypt them to side-step the issue by providing both options. That's extra work, though, so in the end you should go with the option you feel more like doing http://forum.shrapnelgames.com/images/smilies/wink.gif

WraithLord November 28th, 2007 05:52 PM

Re: GUI for probing turn status
 
Yeah, I guess you're right. Its just that years working on encrypting stuff can kinda make one a paranoid.

I'll add passwords to the next version, but this will take time since lately work is taking its toll on me.

WraithLord February 1st, 2008 08:37 PM

Re: GUI for probing turn status
 
I'm experiencing some issues with the client when working with 3.14 hosts. Mainly it gets confused about nations status. It probably has to do with the upgrade changing something in the protocol itself (not very likely) or on the nations information (numbers for example).

I'll try to get more information on the changes brought by 3.14 and get a fix done (and also add bogarus)

lch February 1st, 2008 10:06 PM

Re: GUI for probing turn status
 
Funny, my remote stats script does get the nation status just fine, but it doesn't get the turn number right anymore. http://forum.shrapnelgames.com/images/smilies/happy.gif

WraithLord February 2nd, 2008 05:56 AM

Re: GUI for probing turn status
 
Darn, I just noticed my script doesn't show the right turn number any more as well.

Bad bad script http://forum.shrapnelgames.com/images/smilies/mad.gif

Maybe I'll try to contact IW and ask about possible changes to the protocol.

WraithLord February 5th, 2008 08:45 AM

Re: GUI for probing turn status
 
I have made some more tests with the client against 3.14 server. I could confirm that all the functionality is working except that for human controlled nations it does not display whether or not their turn was played. I'm currently debugging the utility and will release a fix soon.

This fix will also support the nation of Bogarus.

BTW, mod writers that would like their nations to be supported by the utility can PM me or post here with nation #, name, description and a flag icon.

lch February 5th, 2008 02:46 PM

Re: GUI for probing turn status
 
Quote:

WraithLord said:
Darn, I just noticed my script doesn't show the right turn number any more as well.

Bad bad script http://forum.shrapnelgames.com/images/smilies/mad.gif

Maybe I'll try to contact IW and ask about possible changes to the protocol.

Well, I had a quick look why my socket-based PHP script still got the number of players which played their turn versus those that didn't play their turn right - I just counted the Ones for that. Then it dawned on me why the other stuff doesn't work anymore. They didn't change anything about the protocol at all, but they added more nation slots! Instead of 80 possible nation numbers, there's now room for 95. So the tables scale a little differently. Once you change the code to have tables with 95 nations instead of 80, everything is working like it used to. http://forum.shrapnelgames.com/image...ies/tongue.gif

Off-topic, it's good that they increased the number of nations, but on the other hand, why only so little? 15 more nations, from 80 to 95, that's just raising the bar a widdle bit higher. That's like saying "ok we acknowledge that now it's getting crowded with all the nation slots so we're going to add some more slots, but not too many because we're cool like that". Why not raise it to a sensible power of 2?

Endoperez February 5th, 2008 03:33 PM

Re: GUI for probing turn status
 
Good question. You should ask Illwinter, though. http://forum.shrapnelgames.com/image...ies/tongue.gif

WraithLord February 5th, 2008 06:29 PM

Re: GUI for probing turn status
 
Quote:

lch said:

Well, I had a quick look why my socket-based PHP script still got the number of players which played their turn versus those that didn't play their turn right - I just counted the Ones for that. Then it dawned on me why the other stuff doesn't work anymore. They didn't change anything about the protocol at all, but they added more nation slots! Instead of 80 possible nation numbers, there's now room for 95. So the tables scale a little differently. Once you change the code to have tables with 95 nations instead of 80, everything is working like it used to. http://forum.shrapnelgames.com/image...ies/tongue.gif

Off-topic, it's good that they increased the number of nations, but on the other hand, why only so little? 15 more nations, from 80 to 95, that's just raising the bar a widdle bit higher. That's like saying "ok we acknowledge that now it's getting crowded with all the nation slots so we're going to add some more slots, but not too many because we're cool like that". Why not raise it to a sensible power of 2?

My god lch , you're a genius http://forum.shrapnelgames.com/images/smilies/happy.gif
Thank you!

I've fixed the value in my protocol parser and all is working perfectly now. I'll post the fixed version as soon as I have some free time to package it.

WraithLord February 7th, 2008 10:53 AM

Re: GUI for probing turn status
 
Ver 1.3.2
Fixed bugs:
-> Fix a tiny bug of unexpected exception when server was down
-> Nation number 95 instead of 80 (Thanks Ich) so turn status will work well for 3.14

Added:
-> Bogarus, (Indie flag for now)

lch February 7th, 2008 01:39 PM

Re: GUI for probing turn status
 
Do you have some info on how to interpret the version number from the protocol to check if it's an old server with 80 nations or a >= 3.14 version with 95 nations? I didn't bother to find this out yet. The alternative would be to just read all the data and then decide how many nation slots there are based on the response size, divided by three...

WraithLord February 7th, 2008 04:10 PM

Re: GUI for probing turn status
 
There is a field called "network protocol version" in the server status packet. The field is of type integer and is located prior to status, game name and era. I was never really interested in this field so I don't actually know what value it contains. Other than that, I don't have any knowledge of a version being sent from server.

lch February 7th, 2008 04:16 PM

Re: GUI for probing turn status
 
Quote:

WraithLord said:
There is a field called "network protocol version" in the server status packet. The field is of type integer and is located prior to status, game name and era.

Yes, I know, but I didn't check yet how exactly the values in there correspond to server OS and patch level. I hoped that you would have had some more knowledge on this than I do. http://forum.shrapnelgames.com/image...ies/tongue.gif

Hully February 28th, 2008 10:31 PM

Re: GUI for probing turn status
 
Hi

I've just down load the program, installed and put the very nice icon in as well...

I'm currently in a MP game call FruitBat being hosted at www.llamaserver.net so far so good.

I will be quite honest and say I have not got a clue on some of the setting could you possibly help?

Ok 3 settings:

Game Name: FruitBat
Game Host: www.llamaserver.net (the game is being hosted here, but do I put the full name in?)
Game Port: not got a clue, so what’s this about?

Having read the entire thread I'm feeling a little foolish, as I seem to be missing some basic knowledge. Hmmm

Any help would be appreciated thanks


Hully

lch February 28th, 2008 10:36 PM

Re: GUI for probing turn status
 
This program is for checking up on network games. llamabeast hosts PBEM games and has his own game stats on his web server.

WraithLord February 29th, 2008 04:55 AM

Re: GUI for probing turn status
 
Isn't llamaserver a PBEM host server?

For TCP servers the settings are:
game name, mainly so that save turn will work properly
game host, IP address or name that can be resolved to one (DNS)
game port, to connect to an IP address you need also a port. Port is a number that can either be fixed for certain programs (21-ftp, 23-telnet) or selected from a range.
In general for TCP hosted games the host will specify the port as well as the address.

I hope this helps.

EDIT, oops, missed Ich's response, I think he's got it right .

Hully February 29th, 2008 10:16 AM

Re: GUI for probing turn status
 
Yep, feeling very foolish

Many thanks


Hully

WraithLord December 31st, 2008 01:07 PM

Re: PyEye1.33 dom-III client. Now 3.20 compliant.
 
New version is up.
PyEye1.33 dom-III client. Now 3.20 compliant.


All times are GMT -4. The time now is 07:36 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.