Author |
Message |
Jiri-Fojtasek
Site Admin
Joined: Feb 02, 2003
Posts: 1737
Location: Slovakia
|
Posted:
Sun Apr 25, 2010 10:29 pm |
|
During some years i got lots of requests to made an interface than will enable ability to use external extensions than will improve some features of games we are playing. I have done an initial version (1.0) of application interface (api) than will enable extended functionality of the hyperlobby supported games.
This initial version of the Hyperlobby Games EXtensions Api (later in text HLGEXA) enabling some adwanced features to game, mods developpers, and power users. HLGEXA evelopment is still in progress so feel free to post any ideas you have to improve HyperLobby cooperation with speciffic game/mod requirements. In future releases HLGEXA will be used to define complette intetrfeace betwen HyperLobby and any game will come out. HLGEXA is and will be designed to be always backward compatible with any prevoius speciffications.
HLGEXA version 1.0 features and speciffication
HLGEXA 1.0 implementing basic event interface to run game extensions that will improve game functionality and report to end user actions via the HyperLobby chat interface. Supported events are before game starts, after game end, classified in to client/server game sessions. Extensions should be third (or main) party application, to whish can be passed predefined commandline parameters and whish should be executed by some predefined rules and order.
This initial concept are warpped in to existing HyperLobby infrastructure by this way:
- HLGEXA configuration file (hyperlobby.ini) must be placed in to the game installation folder(folder from what the game starts). Any extensions must be placed in this folder or its subfolders.
- Before and after HyperLobby do anything with the game (creating client/server session) will look for that configuration file and process all the configured events. The game itself is executed by old way whish cannot be changed or altered in current 1.0 speciffication of HLGEXA.
- This is example template for the hyperlobby.ini with comments (beginning with ";")
Code: | [Configuration]
;Version, do not modiffy !
version=1
;Maximize chat window
maxchat=1
[client-before]
;Run events before client game session start
;
;Syntax is commom for any event type
;x_exec will run extensions without waiting to exit in order (x from 1 to 10) .
;x_execw will run extensions with waiting until extension exit in order (x from 1 to 10)
;x_execp will run extensions and redirect their output in to the hyperlobby chat
;x_msg will send message in to hyperlobby chat before the extension run
;x_wait will wait number of seconds after the extension run
;orders (x) must be continuous !
;
;Extension will be executed within game installation path. Relative path can be used too (eg. ext1\extension1.exe ...)
;
;Extension command line parameters <serverip> <serverid> <clientid> will be replaced by hyperlobby
;with corresponding values
;Valid parameters used in client sessions are: <serverip> <serverid> <clientid> <serverport>
;Valid parameters used in server sessions are: <serverid>
;Prameters description:
;<serverip> is ip of the server client trying join
;<serverport> is port of the server client trying join
;<serverid> is playerid (callsign) of player hosting the server
;<clientid> is playerid (callsign) of player trying to join
;
;Some handy examples:
1_msg=<clientid>, please wait extension1 preparing your client session
1_exec=extension1.exe <serverip>:<serverport> <serverid> <clientid>
1_wait=1
2_msg=Starting extension 2 and waiting for 5 seconds
2_exec=extension2.exe <clientid>
2_wait=5
3_msg=<clientid>, please wait until extension3 prepare your client session
3_execw=extension3.exe <serverip> <serverid> <clientid>
4_msg=Starting extension 4
4_execw=extension4.exe <clientid>
;Content of the pingtest.cmd script:
;@echo Pinging server %1 - %2
;@ping %2
5_msg=Starting extension 5 and capturing their output
5_execp=pingtest.cmd <serverid> <serverip>
6_msg=Starting the game ...
[client-after]
;Run events after client game session end
;...
[server-before]
;Run events before server game session start
;...
[server-after]
;Run events after server game session end
;... |
HLGEXA is available from HyperLobby version 4.1.0 |
_________________
Last edited by Jiri-Fojtasek on Sun May 02, 2010 7:42 pm; edited 8 times in total |
|
|
|
veqlargh
Post Newbie
Joined: Apr 13, 2010
Posts: 6
|
Posted:
Mon Apr 26, 2010 5:55 am |
|
Excellent Jiri, thanks. I'll give it a spin and report when I have some results.
Thanks again!
Cheers
UPDATE: I have tried it with limited possibilities because of my current internet connection and must host dedicated IL2 host in order to get the configuration files as wanted. But your extensions did fire and that is success. I have a little additional request Would you be able to include that process output to be shown in hl window as well? Just to offer some feedback to the user what executed. No console is shown and it is hard to tell if actions were executed ok or not.
Cheers.
Z |
|
|
|
|
Jiri-Fojtasek
Site Admin
Joined: Feb 02, 2003
Posts: 1737
Location: Slovakia
|
Posted:
Mon Apr 26, 2010 2:06 pm |
|
veqlargh wrote: | Excellent Jiri, thanks. I'll give it a spin and report when I have some results.
Thanks again!
Cheers
UPDATE: I have tried it with limited possibilities because of my current internet connection and must host dedicated IL2 host in order to get the configuration files as wanted. But your extensions did fire and that is success. I have a little additional request Would you be able to include that process output to be shown in hl window as well? Just to offer some feedback to the user what executed. No console is shown and it is hard to tell if actions were executed ok or not.
Cheers.
Z |
Ok i will create new event handler x_execp whish will create pipe betwen console application output and HL chat window. Maybe there will be posiblity to create this pipe bidirectional, so HL will not only capture output but will have posiblity to redirect input from the chat. There is also posiblity to maximize chat window (ALT+B keyboard shortcut). I will made also an option for this. |
_________________ |
|
|
|
veqlargh
Post Newbie
Joined: Apr 13, 2010
Posts: 6
|
Posted:
Mon Apr 26, 2010 5:40 pm |
|
Much appreciated, as always
Cheers. |
|
|
|
|
Jiri-Fojtasek
Site Admin
Joined: Feb 02, 2003
Posts: 1737
Location: Slovakia
|
Posted:
Tue Apr 27, 2010 7:31 am |
|
updated, added feature allowing redirect output from console application on to the HL chat, added posiblity to maximize chat. |
_________________ |
|
|
|
veqlargh
Post Newbie
Joined: Apr 13, 2010
Posts: 6
|
Posted:
Tue Apr 27, 2010 8:27 am |
|
Excellent. One part works flawlessly But I have to bug you for one more. The catch is that autoconfigurator that I'm working on for IL2 series requires input format in form IP:Port and i can only find <serverip> parameter. Is there already a way to get the form i need into the application? You are calling IL2 exe with IP:Port, correct?
Excellent stuff here, thanks. |
|
|
|
|
Jiri-Fojtasek
Site Admin
Joined: Feb 02, 2003
Posts: 1737
Location: Slovakia
|
Posted:
Tue Apr 27, 2010 11:03 am |
|
veqlargh wrote: | Excellent. One part works flawlessly But I have to bug you for one more. The catch is that autoconfigurator that I'm working on for IL2 series requires input format in form IP:Port and i can only find <serverip> parameter. Is there already a way to get the form i need into the application? You are calling IL2 exe with IP:Port, correct?
Excellent stuff here, thanks. |
Ooops i forgot that. Port definiton is used only in IL2 game, i will made new parameter <serverport>, so you will have to use this parameter combination:
<serverip>:<serverport> |
_________________ |
|
|
|
veqlargh
Post Newbie
Joined: Apr 13, 2010
Posts: 6
|
Posted:
Tue Apr 27, 2010 12:05 pm |
|
Thanks
Cheers. |
|
|
|
|
Jiri-Fojtasek
Site Admin
Joined: Feb 02, 2003
Posts: 1737
Location: Slovakia
|
Posted:
Tue Apr 27, 2010 1:44 pm |
|
updated, added option <serverport> |
_________________ |
|
|
|
veqlargh
Post Newbie
Joined: Apr 13, 2010
Posts: 6
|
Posted:
Tue Apr 27, 2010 8:42 pm |
|
And it works like a charm now
Excellent work! |
|
|
|
|
veqlargh
Post Newbie
Joined: Apr 13, 2010
Posts: 6
|
Posted:
Thu Apr 29, 2010 6:53 am |
|
Hi Jiri.
We have come across a potential problem. Can you share something with me. Do you modify IL2 serverName parameter when user starts his server in HL in any way? Do you write/set server name from HL into and IL2 file? The problem is that one way of getting mods info is from serverName parameter in confs.ini in IL2 DS. There are other ways to modify that, one is by setting this name in it's server.cmd file.
So there could be few possible solutions as:
- a switch that would tell HL not to overwrite serverName for IL2 dedicated servers
- longer server name field that could allow adding of the string that we need to server name
Sorry to bother you again. |
|
|
|
|
Jiri-Fojtasek
Site Admin
Joined: Feb 02, 2003
Posts: 1737
Location: Slovakia
|
Posted:
Thu Apr 29, 2010 11:25 am |
|
veqlargh wrote: | Hi Jiri.
We have come across a potential problem. Can you share something with me. Do you modify IL2 serverName parameter when user starts his server in HL in any way? Do you write/set server name from HL into and IL2 file? The problem is that one way of getting mods info is from serverName parameter in confs.ini in IL2 DS. There are other ways to modify that, one is by setting this name in it's server.cmd file.
So there could be few possible solutions as:
- a switch that would tell HL not to overwrite serverName for IL2 dedicated servers
- longer server name field that could allow adding of the string that we need to server name
Sorry to bother you again. |
HL do not touch those values. Values of interest are only:
NET\speed
NET\localPort
NET\localHost
Is posible than server parsign commandline parameters serverid itself. Ill try made a soultion. |
_________________ |
|
|
|
Jiri-Fojtasek
Site Admin
Joined: Feb 02, 2003
Posts: 1737
Location: Slovakia
|
Posted:
Fri Apr 30, 2010 3:18 pm |
|
Ok how about this, i can export <serverdescription> variable and allow override <serverid> variable whish is passed in to the game server commandlline, so there will be new option in both server sections:
serverid=<serverid> ;default as now
and if you will need override it you should use:
serverid="<serverdescription>"
or anything else. Quotes are there because il2 server should need it if there are whitespace characters. |
_________________ |
|
|
|
|