Page 1 of 1

Trying to understand the start up sequence

Posted: August 29th, 2010, 6:52 pm
by owenisred
Ok I read a cube scripting tutorial saying
if config.cfg doesn't exist:
only then do we execute data/defaults.cfg
this will - at regular quit of engine -
be written into config.cfg

if config.cfg exists:
execute it

execute data/menus.cfg

if autoexec.cfg exists:
execute it
If you run the RPG batch file, I assume it searches for config_rpg.cfg and not simply config.cfg?

Re: Trying to understand the start up sequence

Posted: August 31st, 2010, 6:31 am
by RonnieNeeley
Wow, no one has replied to this yet? I guess that shows the knowledge and/or consistency of our support team..

I'm not much of the coding guy, but I believe simply "config.cfg" refers to maps, because every game mode has a suffix of the game mode (so config_fps.cfg, etc.). (Even though I'm pretty sure you know that).

I can't assure my statement is 100% valid, but I hope I've helped.

Re: Trying to understand the start up sequence

Posted: August 31st, 2010, 7:34 am
by owenisred
Confused
"config.cfg" refers to maps
config.cfg doesn't exist does it?

Sorry I'm quite slow today lol,

Thanks,
Owen.

Re: Trying to understand the start up sequence

Posted: August 31st, 2010, 9:02 am
by Hirato
examine src/engine/main.cpp
I've quoted the relevant bits from it
(note, this is the current SVN version and there has been significant alterations since 2.5.0)

Code: Select all

    if(!execfile("data/stdlib.cfg", false)) fatal("cannot find data files (you are running from the wrong folder, try .bat file in the main folder)");   // this is the first file we load.
    if(!execfile("data/font.cfg", false)) fatal("cannot find font definitions");

    execfile("data/keymap.cfg");
    execfile("data/stdedit.cfg");
    defformatstring(confname)("data/%s/std.cfg", game::gameident());
    execfile(confname, false);

    formatstring(confname)("data/%s/sounds.cfg", game::gameident());
    if(!execfile(confname, false))
	    execfile("data/sounds.cfg");

    execfile("data/brush.cfg");
    execfile("mybrushes.cfg", false);

    #ifdef NEWGUI
    execfile("data/newui.cfg");
    #else
    execfile("data/menus.cfg");
    formatstring(confname)("data/%s/menus.cfg", game::gameident());
    execfile(confname, false);
    #endif

    if(game::savedservers()) execfile(game::savedservers(), false);

    formatstring(confname)("config_%s.cfg", game::gameident());
    if(!execfile(confname, false))
	    setdefaults();

    execfile(game::autoexec(), false);

    formatstring(confname)("data/%s/game.cfg", game::gameident());
    execfile(confname, false);

    if(execfile("once.cfg", false)) remove(findfile("once.cfg", "rb"));

Re: Trying to understand the start up sequence

Posted: August 31st, 2010, 9:09 am
by owenisred
Hirato you come to my aid once again :)

Thanks, thats fantastic, ill get it from there :)

Re: Trying to understand the start up sequence

Posted: August 31st, 2010, 12:56 pm
by klimyriad
RonnieNeeley wrote:Wow, no one has replied to this yet? I guess that shows the knowledge and/or consistency of our support team..

I'm not much of the coding guy, but I believe simply "config.cfg" refers to maps, because every game mode has a suffix of the game mode (so config_fps.cfg, etc.). (Even though I'm pretty sure you know that).

I can't assure my statement is 100% valid, but I hope I've helped.

Excuse me The support team is volunteer only and we can not answer every question we see. (And it would help if Leo, Arc or any other member of the support team was on).

Re: Trying to understand the start up sequence

Posted: August 31st, 2010, 1:02 pm
by owenisred
Klimyriad - your work is appreciated man - its is admittedly frustrating when it takes a while to get information, but thats no fault of yours or the rest of the support team, you are doing sterling work - keep it up.

Re: Trying to understand the start up sequence

Posted: August 31st, 2010, 1:04 pm
by klimyriad
yea i know but i just saying.