Jump to content
Eternal Lands Official Forums
Wind_of_Change

Adding/Modifying Game Command Line Options

Recommended Posts

Hi,

 

when looking at the source the today for the first time, I was wondering why there are different "el.ini" files for each server. Does anyone use this option? I thought that one could alternatively make a global "el.ini" file and add a command line option to use a different configuration file. This would simplify the treatment of the command line arguments in the code (look at the "check_server_id_on_command_line" function in "main.c"). Some additional thoughts:

  1. Add an "--help" option, which would display a short help text
  2. Make the server name an extra option, which also could be added to "el.ini"
  3. Show some info about the game and where to find the error log on each start

I will do the changes myself, if they may be implemented.

Share this post


Link to post
Share on other sites

I use different ini files and config directories for different servers, different characters and different settings. It's also very useful when we have a new client to test, when you need to point to completely different data. IMHO the current system works OK and I'm not really sure what additional benefit you're suggesting changing this will have. There are certainly some complications with all the different uses that the current system allows. That said, there's always room for improvement. :P

Share this post


Link to post
Share on other sites

Ok, I can see that you might want to use a different configuration for testing. That's what the alternative configuration file would be used for. But since it would bring no significant improvement there is no need to implement it.

My (little) point is that a very first thing the client has to do is to find out the server it should connect to in order to load the correct configuration file. So if a server selection window is implemented at some time it must be displayed at the very beginning and the user will have no option to change from one server to another afterwards. But since you can't get back to the login-screen once you're in game there's no real point in that right now.

So I tried to implement a function which enables you to switch to another player when in game. I submitted it as a patch to Berlios. Hopefully someone can have a look over it.

Share this post


Link to post
Share on other sites

Actually Radu would love a way where you select the server before the game really starts, and then reads in the right el.ini for it. He posted so a few month ago. so if you have a good way of doing it that would be great

Share this post


Link to post
Share on other sites

Interesting.

As I see it now it is not very easy to implement because for example the window system isn't setup yet, so you have to draw the selection screen explicitly with OpenGL and you have to write a message loop for this purpose.

But wouldn't it be inconvenient for all those players who just use the main server to click away the server selection window each time they start the client?

For example, it would be easier to add a button to the login screen which shows a server selection window, because then you can use the window system. The only problem would be the configuration. Maybe one can still apply the changes at this stage.

Just some thoughts...

Share this post


Link to post
Share on other sites

Here I am again...

 

Removing per server configuration files would simplify the code somewhat. For your legimate reasons to have a per server configuration one could use scripts like:

#!/bin/sh
ln -f ~/.elc/test/el.ini ~/.elc/el.ini
el $@ test

If you use more than one client at the time, you should however only change settings in the last client you have started...

Alternatively one could add an option to use a different configuration file and change the script to something like:

#!/bin/sh
el $@ --config=~/.elc/test/el.ini test

(Adaptions to other platforms are left as an easy exercise to the reader...)

 

As said before an early server selection window would likely involve several hacks, because nothing is initialized at that time. I would prefer a startup like:

  1. Load and initialise stuff
  2. Optionally: Show language window
  3. Optionally: Show rules window
  4. Optionally: Show server selection window
  5. Try to connect to server
  6. Show login window

Then it would be no problem to go back to the server selection to change servers.

 

What do you think?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×