Trouble with autoexec.cfg and shrub


(Blackrock) #1

I put a few binds in an autoexec.cfg file and put it in etmain folder. It works fine, unless i get on a server running shrub, then they don’t load. I looked in my Enemy Territory folder and theres a shrub, shrubmod, and shrubet folder, and also a ET_Tourneymod folder and they all have “profiles” folders containing my profile folder which have etconfig.cfg files in each. I tried copying my autoexec.cfg file into these folders but they still don’t load. What am I missing here? How can I have my autoexec.cfg settings load all the time?

thanks


(Depth_Charge) #2

just bind stuff in game on a shrub server :skull:


(Blackrock) #3

Thanks. But do I have to type all the binds each time i join a server? or can I run a file from the console?

I’d look this up on the et for dummies site but it seems to be down.

thanks


(Loffy) #4

Hi!
I have a simple textfile, with the extension .cfg. The file is called loffy.cfg. It is in my … Well, Im at work. and I dont remember where it is (in what folder).
:slight_smile:
Maybe the etmain folder?
Anyhow, when I have entered a server, I just pull down the consol and type /exec loffy. And all my bind and commands are executed.
(I’ll post there here later.)
// Loffy


(Kendle) #5

The autoexec.cfg file doesn’t get excuted when you join a modded server automatically, but you can execute it manually in the console (/exec autoexec.cfg) and it’s contents will get written to the etconfig.cfg file in the mod folder and so be remembered next time you join a modded server.

However, this only applies to key binds, not scripts using custom variables (vstr).

One thing to note is that the mod will execute the autoexec.cfg if there is no etconfig.cfg in the mod\profile folder. So just delete the etconfig.cfg file from all folders other than etmain\profile[i]yourname[/i] and autoexec.cfg will take effect automatically. You’ll need to do this every time you make changes to autoexec.cfg (or any other configs executed from it).


(Blackrock) #6

What if you want scripts with vstr and setting variables?

One thing to note is that the mod will execute the autoexec.cfg if there is no etconfig.cfg in the mod\profile folder. So just delete the etconfig.cfg file from all folders other than etmain\profile[i]yourname[/i] and autoexec.cfg will take effect automatically. You’ll need to do this every time you make changes to autoexec.cfg (or any other configs executed from it).

Do I put the only copy of autoexec.cfg in etmain or etmain/profiles/myprofile ?

Also, which etconfig file will it load? The one in etmain or the profiles? And when you make a change using the interface, it’s the one in that profile that gets changed?


(Kendle) #7

OK, this is my understanding of how it all works.

autoexec.cfg gets executed when you start ET. Any key binds it contains get copied to etmain\profiles[i]yourname[/i]\etconfig.cfg. When you join a server ET executes the etconfig.cfg in etmain\profiles… IF it’s a standard un-modded server, if not it executes the copy of etconfig.cfg that exists (if any) in the mod\profiles… folder.

Now, IF there is NO etconfig.cfg in the relevant mod folder, ET copies the one from etmain\profiles…. So, this means stuff in autoexec.cfg ONLY gets used IF you’re playing on a non-modded server OR there is no etconfig.cfg in the corresponding mod\profiles… folder.

Therefore, to ensure autoexec.cfg ALWAYS gets used, delete any instances of etconfig.cfg you can find, in all folders. You could also delete the one in etmain\profiles… (ET re-builds it anyway) but that depends on what you put in autoexec.cfg in the first place. Personally I have everything in autoexec.cfg, key binds, cvar tweaks, scripts using vstr etc., so continually deleting etconfig.cfg (and all copies of it) is not a problem.

If you don’t use scripts, or you have made changes to your environment via the in-game menus (that will be lost if you delete etconfig.cfg) then just delete the copies of etconfig.cfg that exist in the mod\profiles… folder(s) and leave the one in etmain\profiles….

To summarise:-

  • autoexec.cfg goes into etmain only, no-where else.

  • The etconfig.cfg file in etmain is not used and can be safely deleted.

  • The only copy that gets used is the one in etmain\profiles… OR mod\profiles… depending on what type of server you join.

  • The copy of etconfig.cfg in etmain\profiles… gets copied to mod\profiles… BUT ONLY IF it doesn’t already exist. If it does already exist, it is NOT updated.

  • If you make a change via the in-game menus the copy of etconfig.cfg that gets updated will be the one relevant to the server you’re on (if any), or the one in etmain\profiles… if you’re not on a server at the time. So you could change a key bind in the menus when on a Shrub server and find that when you next play on a standard server the new key bind doesn’t work (and vice versa).

Does that make sense? :???:


(Loffy) #8

Hm, is this the reason why my spawntimer script does not work sometimes? It has vstr stuff in it, if I remember correctly.

I have been wondering why the script work sometimes and simply refuses to work other times.

So, I just delete all etconfig.cfg (including the ones in mod folders) before i start ET. Then I exec my config (exec loffy.cfg), and then, finally, I join the server. Then my spawnscript should work? Will try it.
// Loffy

PS. Thanks!


(Sauron|EFG) #9

I used to have this problem and just bound Insert to execute my config. Since it did remember the bind all I had to do was to press one key to enable my scripts.

However, somehow, at some point in time even my custom variables have been added to both my ETPro and my Shrub profile, so now I only have to press Insert when I have changed something in my config.

So I’m like :???: but :clap:.


(Rippin Kitten) #10

Heh, I’m like that all the time. =)

RK


(Kendle) #11

Yes, because vstr definitions aren’t stored in etconfig.cfg (any of them), only the key they are bound to.

Yes, because the etconfig.cfg in etmain\profiles… was copied to the Shrub / ETPro folders the first time you joined a server running them (and the vstr definitions are in autoexec.cfg which gets executed when you start the game and so remain in memory. Key binds, on the other hand, get over-ridden by the mod’s etconfig.cfg (which doesn’t store vstr definitions and so can’t over-ride what’s in autoexec.cfg)).


(Sauron|EFG) #12

No, I don’t have a file called autoexec.cfg, it’s called sauron.cfg. And yet I don’t need to exec my config because (as I tried to say :smiley: ) the custom variables have been added to my profile.

This is from etconfig.cfg in my ETPro profile:

bind F12 "vstr demotogg"
...
seta demotogg "vstr demoon"
seta demooff "stoprecord; set demotogg vstr demoon; echo ^3Recording ^2stopped"
seta demoon "autorecord; set demotogg vstr demooff; echo ^3Recording ^2demo"

:eek3:


(Kendle) #13

That’s interesting! :eek2:

That’s different from RTCW in that case, although I already knew that seta was broken in ET.

i.e seta command value in autoexec.cfg (or any other .cfg) doesn’t work UNLESS seta command some-other-value already exists in etconfig.cfg, so how your seta variablename value statements got there is a mystery to me.

Maybe ET does work differently, or maybe bani has fixed it?