Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 14:49

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Using gslist in VB.net application
PostPosted: 11 Nov 2009 19:28 

Joined: 11 Nov 2009 19:22
Posts: 7
Hello,
I am working on a game launcher for ArmA2, a military simulation game.

I would like a multiplayer server browser built-in to the program. I have seen at least 2 other launchers that use gslist.exe to retrieve server information. I am not sure what programming language they are written in, I have been unable to contact the authors of the software.

What would be the best way to use gslist in my vb.net application? Compile the source code to dll, or interface with the executable in some way? Any help would be appreciated. Thank you.


Top
 Profile  
 
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 11 Nov 2009 20:44 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
without doubts calling it as an external process is the better way in any case (and avoids trouble of recompiling, reinterfacing and moreover possible compatibilities with the GPL license).

gslist has all the needed options for dumping the retrieved servers list in various ways.
the following example is valid for arma2 and shows how to dump all the fields used by the arma2 servers of which I'm aware (so choose those you prefer):
Code:
gslist -n arma2pc -X \gamever\hostname\mapname\gametype\numplayers\numteams\maxplayers\gamemode\timelimit\password\param1\param2\currentVersion\requiredVersion\modequalModRequired\gameState\dedicated\platform\language\difficulty\mission\gamename\sv_battleye -o %temp%\dump.txt
so you launch gslist with those arguments, wait its termination and then you can parse the dump.txt file located in the temp folder of the current user.

nice eh? :)


Top
 Profile  
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 11 Nov 2009 22:18 

Joined: 11 Nov 2009 19:22
Posts: 7
Fantastic, sir. Thank you very much. I'll try this out tonight. If I have any questions I'll be back, but this looks very straightforward.


Top
 Profile  
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 12 Nov 2009 00:04 

Joined: 11 Nov 2009 19:22
Posts: 7
Is there a way to change the format of the dumpfile? For example, one server per line?


Top
 Profile  
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 12 Nov 2009 00:15 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the dumpfile is already one server per line:
Code:
IP:port \parameter\value\parameter\value...\parameter\value
IP:port \parameter\value\parameter\value...\parameter\value
...


Top
 Profile  
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 12 Nov 2009 01:00 

Joined: 11 Nov 2009 19:22
Posts: 7
My apologies. When I opened it in a text editor with word wrap turned off, it doesn't seem that way. I realize I was wrong.


Top
 Profile  
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 21 Oct 2010 11:07 

Joined: 21 Oct 2010 11:02
Posts: 3
Hello
How can i get the list of servers from one of the game's group rooms, eg. US Central using gslist?


Top
 Profile  
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 21 Oct 2010 15:19 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
the rooms you see in the game are handled in the peerchat server so are on a different layer.
I guess that the master server doesn't track them, indeed the room is not in the informations contained in the replies of the servers when you query them manually one-by-one


Top
 Profile  
 
 Post subject: Re: Using gslist in VB.net application
PostPosted: 21 Oct 2010 17:25 

Joined: 21 Oct 2010 11:02
Posts: 3
Thank you for a quick reply.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: