Launching game directly on a server?
-
So I know this may sound a bit strange or far-fetched, but one thing I’ve been wishing for for a very long time would be the ability to start the game directly connected to a server of your choice. Basically, skip the main menu and server selection.
This would be a huge time saver for modding and could be used to make an external server browser and various other nifty features.
Has anyone ever looked into this? Would anyone be interested in trying? I’m afraid that that’s quite a bit beyond my own skill set.
-
Very good idea! This would indeed save some time. Maybe if not via hooking it would work using AutoIt?
-
The problem is that you’d still have to wait for the server to show up on the browser, click on it, wait for all the animations, and you still need the window in focus for AutoIt to work right?
At this point I’m pretty much on autopilot already when it comes to starting the game and connecting to a server, but the transitions and waiting for the server list are still valuable seconds lost each time, dozens/hundreds of times a day.
-
It would be a nice feature if this would be possible. But to show something as an example, this is how my Enigma Mod-Launcher works so far regarding the connection: (btw. completely coded with autoit)
1.
Pressing the “start/compatibility-check”-button is doing a
download of a temporary “crc.ini” file from a FTP-Server with the crcs of some server/client-files of the latest version and additional data like the current Server-IP and much more…
The Mod-Launcher is comparing these crcs to verify the clients data and so on…2.
If all checks have been successful and maybe additional clientside-settings have been made —> pressing start is launching the game with the extention “-s ser.ver.ip.dat.a” to make the GLS-Info redundant when neccessary (due to GLS is down maybe)… The hacks for “preselect www” and “show only compatible builds” are included, so there is only the Enigma V.4 ATG - Server on the list… whatsoever.Works pretty good so far but I know this has “nothing” to do with the function/hack you´ve asked for.
To skip the “un-neccessary” step selecting the server on the list would be a great thing to have… dunno if there´s a way to do this… maybe adoxa could be helpful… as usual.
But for my taste there should be a way to have the “options” available/keep the main-menu intact… Just pressing the “Multiplayer” button should connect directly with the server specitied in the command-line…
GreetingsJ.R.
-
Autoconnect. Here’s the usage (from [c]Autoconnect.cpp[/c]):
Add "-I[server[:password]]" (internet) or "-L[server[:password]]" (LAN) to automatically connect to that server. Server may be either the name or address; only a prefix is necessary (whatever matches first). If password is absent, it will be prompted as usual. ```I should have said it must be capital option letters, but _server_ ignores case. It only works on the initial launch, after that it's business as usual. I s'pose you want autocharacter now, too (which I probably should have done, anyway)? It seems this was supposed to be part of Freelancer itself, as [c]Freelancer.ini[/c] has a [c][Login][/c] section, with [c]name[/c], [c]pwd[/c] and [c]char[/c] values. Naturally it didn't work, so I had to do it the hard way.
-
Wow, thanks a 1000 times! Now when I start FL out of Visual Studio it directly connects. This is really helpful!
And yes, if you also could say a number of the character slot to be selected this would make it even more convenient. But it already is a lot better now so if it is too complicated don’t bother with it I would say.
Thanks again
-
Oh my, you’ve just made my day Adoxa. Thanks, as usual!
EDIT: Worth mentioning for future implementers: this source code only works with VC6. I’m trying to derive a variant that doesn’t rely on VC6 wstrings.
-
Here’s a modified Autoconnect.cpp to handle VC6 incompatibilities - this should work regardless of compiler version since it doesn’t rely on STL binary compatibility, but it’s messier.
The one thing I’m confused by is that I absolutely had to put both ecx and eax on the stack before calling SvrTest and pop them afterwards, otherwise the game would crash after the first execution. I don’t think that’d be affected by compiler versions, but there you go.
-
Updated. The [c]ecx[/c] problem was a bug (I only tested for a single server and neglected to test non-matching) and I handled [c]wstring[/c] differently, using Freelancer’s import of [c]wstring::assign[/c].
Added automatic character selection, vis [c]char@server[/c]. BTW, in case you haven’t realised, you could do [c]-L@[/c] to automatically select the first server and the first character.
Had another look at how [c][Login] char[/c] is used and that enabled the adding of [c]-A[/c] and [c]-N[/c] to automatically load the autosave or start a new game (i.e. load [c]Restart.fl[/c]).
-
Did you update the source as well? Redownloaded the zip and it appears identical.