Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
65 user(s) are online (32 user(s) are browsing Forum)

Members: 0
Guests: 65

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +30€

Current balance: -190€
(last updated 04/2017)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 27 users playing Freelancer on 37 servers.
September. 23, 2017

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Launching game directly on a server?
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3446
Offline
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.

Posted on: 2016/8/31 0:39
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Launching game directly on a server?
Just can't stay away
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 490
Offline
Very good idea! This would indeed save some time. Maybe if not via hooking it would work using AutoIt?

Posted on: 2016/8/31 9:01
Top
Re: Launching game directly on a server?
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3446
Offline
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.

Posted on: 2016/8/31 15:38
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Launching game directly on a server?
Just can't stay away
Joined:
2010/8/9 17:45
Group:
Registered Users
FLServer Admins
Posts: 309
Offline
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...
Greetings

J.R.

Posted on: 2016/8/31 18:44

Edited by J.R. on 2016/8/31 20:33:48
ENIGMA V.4 ATG HOMEPAGE/FORUM
Top
Re: Launching game directly on a server?
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
Autoconnect. Here's the usage (from Autoconnect.cpp):

Code:
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 Freelancer.ini has a [Login] section, with name, pwd and char values. Naturally it didn't work, so I had to do it the hard way.

Posted on: 2016/9/1 8:59
Top
Re: Launching game directly on a server?
Just can't stay away
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 490
Offline
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

Posted on: 2016/9/1 10:40
Top
Re: Launching game directly on a server?
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3446
Offline
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.

Posted on: 2016/9/1 14:01

Edited by FriendlyFire on 2016/9/1 18:45:00
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Launching game directly on a server?
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3446
Offline
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.

Posted on: 2016/9/1 21:52
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Launching game directly on a server?
Starport Admin
Joined:
2008/2/26 20:36
From Germany
Group:
Webmasters
Registered Users
Posts: 1709
Offline
The legend delivers as usual Great job!

Posted on: 2016/9/1 23:02
Top
Re: Launching game directly on a server?
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
Updated. The ecx problem was a bug (I only tested for a single server and neglected to test non-matching) and I handled wstring differently, using Freelancer's import of wstring::assign.

Added automatic character selection, vis [email protected]. BTW, in case you haven't realised, you could do [email protected] to automatically select the first server and the first character.

Had another look at how [Login] char is used and that enabled the adding of -A and -N to automatically load the autosave or start a new game (i.e. load Restart.fl).

Posted on: 2016/9/3 12:23
Top
Re: Launching game directly on a server?
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3446
Offline
Did you update the source as well? Redownloaded the zip and it appears identical.

Posted on: 2016/9/3 16:11
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Launching game directly on a server?
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1770
Offline
Oops. Now it's updated.

Posted on: 2016/9/4 1:27
Top