Jump to content

Question - Command Line Builder


yaright

Recommended Posts

My question, is there a way to extract the options from the customer created portion of the command line builder, so they can be implemented at different places along the command line, so as to override a required option.

 

example:

required parts of starting command line

+set fs_savepath "" +set dedicated "" +set net_ip "" +set net_port "" +set sv_maxclients "" +set ui_maxclients "" +exec server.cfg +map_rotate

 

user options

+set fs_game mod/custom

+exec custom.cfg

 

ending command line

+set fs_savepath "" +set dedicated 2 +set net_ip "" +set net_port "" +set sv_maxclients "" +set ui_maxclients "" +set fs_game mods/custom +exec server.cfg +exec custom.cfg +map_rotate

 

this would allow customers to run there own custom created .cfg that would not be overridden by the server.cfg that is required to start the server.

If this is not possible, is it possible to have a script check for the presence of the custom .cfg and replace server.cfg with it, so the custom.cfg file will start the server?

Link to comment
Share on other sites

Use the %usercmdline% variable in the commandline within the custom commandline in the game config. Place that variable in the commandline wherever you would like the user commandline options to be placed.

Link to comment
Share on other sites

please look at my first post, as you will see there are 2 different places that the customer options are. They are not together as the %usercmdline% groups them.

 

If the custom.cfg is before the server.cfg, then the server.cfg overrides the custom.cfg.

If the mod/custom is after the server.cfg the server fails to run.

 

Need to be able to use the server.cfg or custom.cfg so the server will start of the customer wants to use custom configs

 

here is an example:

 

%usercmdline% +exec server.cfg

this would run

+set fs_game mod/custom +exec custom.cfg +exec server.cfg

this overrides the custom.cfg

 

another option

+exec server.cfg %usercmdline%

this would run

+exec server.cfg +set fs_game mod/custom +exec custom.cfg

the custom.cfg runs and everything is fine

 

if the customer did not elect to use +exec ie custom.cfg

then it would run this

+exec server.cfg +set fs_game mod/custom

the server will not start

 

Hope I am able to get you to see what is needed

Link to comment
Share on other sites

You can only put the %usercmdline%

in one spot of the commandline not two or more.

 

If you need to change commandlines with more than one set of variables in different locations within the commandline you would need to open the Service Settings for that game server and use the over ride commandline feature which will allow you to specify whatever you like for a commandline. However, that feature is only availible to an admin, not to a user.

Link to comment
Share on other sites

The customer needs to be able to edit some aspects of the server command line, custom mods need to be able to run a separate .cfg file otherwise the customer would have to FTP files and/or namechange, any time the mod needs to be changed or the default server run.

 

It appears this is a limitation of the software, grouping the customer options into one variable does not really make sense, but that is just my opinion. A better way would be to store each customer option separately in the database so each one can be used to create a custom command line, and set in such a way that the customer options override the uneditable (hardcoded) options. Just thinking out loud :)

 

examples:

 

customer editable options could be stored as

%usercmdline1% = +set fs_game ""

%usercmdline2% = +exec ""

this way they could be used separately (shown in first post)

 

 

Thank you for the information on this issue.

Link to comment
Share on other sites

As Doug said the %usercmdline% variableis simply where the commands get placed in the line. You can create as many commands as you like. They simply get added one after another in the commandline.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 10 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use