Config for TTT has no effect.

Hi, I’m using TTT to test addons I’m creating, thus I need a simple set of config variables to ease the testing. ttt_debug_preventwin 1, amongst them. However, no matter what .cfg file I put it in, it has no effect ingame. I have put commands like sv_password and bot_mimic and they all work just fine, but the ttt variables does jackshit ingame. I’m running a listenserver with multiplayer, if it matters.

Just edit the convar default value in ttt source code?

I was hoping I wouldn’t have to do that. Isn’t there any other way?

try putting it into server.cfg

[editline]19th October 2013[/editline]

Also, you can just bind it to a key, or make a lua script for that matter

I got it in both server.cfg, game.cfg, config_default.cfg. No difference.

The problem probably that the cfg is executed before the TTT convars are created. Check your console.

“changing the ttt source code” isn’t nearly as scary as it sounds. Go to gamemodes/terrortown/gamemode and find init.lua

then open it in notepad++. notepad will work fine if you don’t have it. CTRL+F and search for “preventwin”. the convar will be the only result that turns up. change the “0” on that line to a “1”. Make sure all the syntax is the same, only change the number. then his save, and restart your server.

I know how to edit the commands in the sourcecode, I just want to leave it intact for updates.

I ended up making this script in autorun:
[lua]local str = file.Read(“cfg/server.cfg”, “GAME”)
for k,v in pairs(string.Explode("
“, str)) do
RunConsoleCommand(unpack(string.Explode(” ", v)))