|
Post by sparrowhawk on May 17, 2004 19:25:28 GMT
As requested by several people, here is the first draft of the XML-format games output. You will need to be logged in to M/MU to access it. www.westhaven.uklinux.net/vmidnight/games_xml_output.phpThis will currently only show your own lords/garrisons, for obvious reasons! Please post change requests within this thread only. Best viewed in IE due to it's built in XML facilities. If you view it in, eg Firefox, you will get what looks like a space delimited list of data - just view the source for full XML layout.
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on May 18, 2004 0:15:03 GMT
Ok, I dropped this in and here are my first comments.
1) I would like to get the games info seperate of drilling down into the game data. The main reason being size of return file. SOmeone who has 30 games on the go and the file is going to get big.
2) I would like to get the game data per game; something like
games_xml_output.php?id=145
And my last point is... I can't currently work out a way of getting this data into the app!!!
In Ie you cannot save as!!!! for some reason the XML will not save.
Programatically, the problem is the session connection. All data stream handling that I could normally use, fail because they have not connected through the login and got a session.
Using a webrowser control I can login and then connected to the page, but I'm currently working out how to extract the info I need.
But almost there. Cheers so far.
Anyone doing dot net programming?
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on May 18, 2004 7:16:40 GMT
OK, I worked out a way of getting at the XML. It involves loading it in to a hidden page using the web browser control, and then getting and the innertext that way!
|
|
Natmus
Morkin Admin
Fight the power!
Posts: 4,518
|
Post by Natmus on May 18, 2004 7:33:00 GMT
I tried looking at it, but it seems very confusing at first sight. I don't mean the information for each character and garrison, they are easy enough to decipher, but the sheer volume of it is daunting, as I have 13 active games.
But I can see the use for it, if you really need to look into something. Of course, it can't tell you of any enemy positions, so the tactical use is somewhat limited. More a bookkeeping tool, but I could imagine it can be refined later on.
Especially if you can select just one game and just have the output from that particular game, like Chris suggests.
One thing is that I could see my starting position in a game that is still pending, waiting accept from Taeorn. Using this tool before accepting games could make it possible to foretell one's starting position in games you are invited to, and decline it if the position isn't to your liking. That shouldn't be possible, IMHO.
Conclusion: Nice start, but it's only a start.
|
|
|
Post by sparrowhawk on May 18, 2004 7:58:54 GMT
OK, thanks for the comments so far.
I will add the ability to extract single game id's, and also just game info without lords. Here are game level fields that I think might be useful that are currently not there:
Current Player Game created by (user name) Start Date End Date (need to check whether I'm actually populating that one!) Game parameters (allow lords to disband, etc)
|
|
|
Post by sparrowhawk on May 18, 2004 8:00:11 GMT
Actually, ignore the end date - ended games have no lord records so cannot be analysed anyway
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on May 18, 2004 9:41:22 GMT
Another piece of info that I wanted from the game info which I mentioned in my email but not in my early post. I would like the opponents - obviously without detail. I just want their short name. Mads point about starting position is valid, and for the reasons I need the data, I would happy lose all lord information until the game is started. Infact I don't even need the game info for a game that hasn't started. mads: the xml is better read in another package that turns it into a table, like excel etc... Or a support tool like MidnightMU/ Campaign Manager!
|
|
|
Post by sparrowhawk on May 18, 2004 11:19:30 GMT
Yes sorry, I meant to add that Mads' comment was good too, just forgot to type that in. I will do this and the opponent info.
thanks
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on May 18, 2004 12:03:04 GMT
Shortname and Id would be handy for the lords.
|
|
|
Post by sparrowhawk on May 18, 2004 12:12:47 GMT
Wilco.
Do you want the in game id (which changes every game), or the original template id?
ie, Luxor's "template" record has an id of 1, but in any given game he could be 100, 234, 102343, etc.
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on May 18, 2004 12:30:44 GMT
In game Id... the one you use to select lord.
Actually, for completeness sake why not write both.
<lord id="" > using template id <gameid>1234</gameid> </lord>
|
|
|
Post by sparrowhawk on May 18, 2004 13:27:41 GMT
Right, I've modified the xml (version 0.2, so that we can keep track this is now an attribute of the root element). Changes in 0.2: - Only shows games that are started - Includes all players and whether they are alive or not - Includes game creation date and id of player who created game - Includes id of player who's turn it is - Includes lord id's (see above) and short name - Can pass gameID parameter to limit result set - can pass lords parameter to specify whether to show lords or not (values are Y or N. If none passed, N assumed) The other fields which I suggested (eg victory conditions, game parameters) are not currently included. Does anyone actually need them? If not I won't bother adding them. Below is an example with both parameters specified: www.westhaven.uklinux.net/vmidnight/games_xml_output.php?gameID=110&lords=YOnly Ringy and myself will get any data for this, since it is a game that we are playing 1-vs-1. Just change the gameID parameter to one of your game ID's to see details.
|
|
|
Post by sparrowhawk on May 18, 2004 13:32:52 GMT
OK, I worked out a way of getting at the XML. It involves loading it in to a hidden page using the web browser control, and then getting and the innertext that way! Ideally I should provide this as a web service!
|
|
|
Post by sparrowhawk on May 18, 2004 13:35:47 GMT
A thought: for courage and strength, rather than the underlying numbers, would you prefer the text (eg "Utterly Courageous" rather than "8", "Utterly Invigorated" rather than "100")?
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on May 18, 2004 13:43:52 GMT
A thought: for courage and strength, rather than the underlying numbers, would you prefer the text (eg "Utterly Courageous" rather than "8", "Utterly Invigorated" rather than "100")? I am easy either way.
|
|