Author Topic: Ditching Server.conf and Context.xml  (Read 2355 times)

Theremin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +48/-18
  • Worst Server Owner
    • View Profile
    • Visit my YouTube channel
Ditching Server.conf and Context.xml
« on: February 08, 2016, 04:53:13 pm »
Is it possible to ditch Server.conf and Context.xml? I just want to discuss about it, either if it's possible to do it, in what way, and if it's worth it. This is what I tried long ago: I edited the content.xml so that I left only the loading script bit. I used one script to control most of the server settings, the script itself would load all the other script files, the first thing I tried setting was a spawnscreen via the appropriate function, but it didn't work as it should, upon starting the server the console would warn me about the missing Server.conf, and to make that script load properly I had to load it from the console each time.

The reason why I'd want to do this is for having everything I need accessible by scripts.

Now if you don't mind I grab my shield, and get prepared to critics, after all it's also the purpose of this topic. Share your opinions if they are negative, I want to know different point of views about how and why I should or shouldn't do this.

Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
Re: Ditching Server.conf and Context.xml
« Reply #1 on: February 08, 2016, 09:48:44 pm »
I have two Questioned this. I would prefer to have full control over these files that should be in the xml, and instead place them in the script, Then you can set values for instance in class selection script you can change the values

// Change this to 1 if you want to show team names instead of skin names
const _TEAM_MESSAGE = 0;
// Change this to 0 if you want to show big messages instead of small messages
const _SMALL_MESSAGE = 1;

This would be nice to do with way more than just values. Less folders, Less junk in your server directory. You would be able to just open your script section that would allow you to change the values. This can all be done but I have NO CLUE on how to add the scripts to load. The xml in this case is kind of like a .dll that injects the scripts into the game. Now if there could be a update that would manually automatically allow a script folder say called “Main” to automatically load without the content.xml. Then Problem solved. But spawn screens I have no clue on script side, Ankris has a custom spawnscreen he may have in his script, he could help maybe by giving a simple example of a spawnscreen, That would be up to him "if I am correct on his spawnscreen"

This is not a dumb idea Btw
I have been working as well to have full control over everything in the scripts. if not i may change this to be a .ini instead. kinda like Extended_Garages by stoku

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Ditching Server.conf and Context.xml
« Reply #2 on: February 10, 2016, 12:21:13 am »
Well, all I can suggest right now, is leave a default, empty, or very basic Server.conf in your server directory, then update all information inside scripts.

Just about all the server.conf values are accessible and editable by scripts.

This is just a thought, but maybe delete Server.conf, and start the server with a batch file or something that creates it temporarily, then deletes it once server is running?

Theremin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +48/-18
  • Worst Server Owner
    • View Profile
    • Visit my YouTube channel
Re: Ditching Server.conf and Context.xml
« Reply #3 on: February 12, 2016, 12:14:45 am »
Well, all I can suggest right now, is leave a default, empty, or very basic Server.conf in your server directory, then update all information inside scripts.
I admit not having thought about this, and I'm quite sure it would work fine, talking about the empty file

Just about all the server.conf values are accessible and editable by scripts.
This is true, but the reason why I would prefer not having Server.conf is, I'd prefer not to edit some preset values and have the possibility to define them only when needed, else just not having them set. Still as far as it sounded obvious, I never thought about simply removing some for me useless settings in the Server.conf. I know I sound dumb now, but sometimes I need someone to tell me the obvious things, while I'm too busy looking for difficult solutions ><

So overall the main question here for me remains: Is it really worth ditching them? Let's say, Vortrex, would you ditch them?

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Ditching Server.conf and Context.xml
« Reply #4 on: February 12, 2016, 12:17:15 am »
So overall the main question here for me remains: Is it really worth ditching them? Let's say, Vortrex, would you ditch them?

No, I wouldn't. Just leave a minimal Server.conf file, and when the server starts, have the scripts set new values.

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Ditching Server.conf and Context.xml
« Reply #5 on: February 13, 2016, 11:03:00 pm »
So overall the main question here for me remains: Is it really worth ditching them? Let's say, Vortrex, would you ditch them?

No, I wouldn't. Just leave a minimal Server.conf file, and when the server starts, have the scripts set new values.
Pretty much this.

What my team did on our older server versions awhile back was just have these files load the very basics required by LU itself, and then use scripted changes to handle all of the other details or values that were optional specifications, where applicable. Certain things related to your server's settings will still need to be set in these files, however, so you cannot completely get rid of them.

 

© Liberty Unleashed Team.