Garry's Mod

Garry's Mod

Lythos Mapvote (TTT & co.)
Tygron 2020 年 9 月 20 日 下午 1:55
Issues with mapvote configuration
Essentially i'd like to add the "gm_" and "ge_" prefixes because I have a couple of maps that have been given the TTT treatment but for some reason retain their original names. They do not show up in the mapvote and I would like them to. I have made changes in the past to try to do this, but failed. This is now happening on a completely fresh server. I went through and made sure all my files were up to date, and then re-built the server from the ground up.



Below is what my config.txt contains.

{
"1": [
"ge_"
],
"mapRevoteBanRounds": 12.0,
"mapsToVote": 10.0,
"voteTime": 20.0,
"mapPrefixes": [
"ttt_"
],
"mapExcludes": []
}

There's that "ge_" section that i'm not finding, and i'm also noticing in what i'm pretty sure is the call to create the defaults for this file in sv_mapvote (line 128) I see nothing about that and doing a search of every other LUA file doesn't have anything about "ge_" in there.

Below is the function at line 128 where as far as I can tell config.txt is supposed to get its parameters from. But i'm also noticing that "mapRevoteBanRounds" is different between the two. I have deleted the lythos_mapvote folder and started the server and the above is what I get out of it not the code below. I can't seem to find where these discrepancies come from at all.


function MapVote:InitConfig()
local defaultConfig = {
voteTime = 20,
mapsToVote = 10,
mapRevoteBanRounds = 4,
mapPrefixes = {"ttt_"},
mapExcludes = {}
}
最后由 Tygron 编辑于; 2020 年 9 月 20 日 下午 1:57
< >
正在显示第 1 - 10 条,共 10 条留言
Lytho  [开发者] 2020 年 9 月 20 日 下午 2:38 
Hey,

{
"mapRevoteBanRounds": 12.0,
"mapsToVote": 10.0,
"voteTime": 20.0,
"mapPrefixes": [
"ttt_"
],
"mapExcludes": []
}

you can change
"mapPrefixes: ["ttt_"] into "mapPrefixes: ["ttt_", "ge_"]

The function is reading all the map prefixes from this value.
Tygron 2020 年 9 月 22 日 下午 9:26 
So the config.txt doesn't do anything? Alright i'll give that a shot. Thanks man.

Edit: Just gave it a little test, it doesn't seem to have any effect. There's a chance the maps just didn't show up, but I started and stopped the vote several times to try to get one of them to show and they just don't seem to be appearing.

Would commenting out the line for prefixes disable that or is that line expected to be there and things won't work without it?
最后由 Tygron 编辑于; 2020 年 9 月 22 日 下午 9:46
Lytho  [开发者] 2020 年 10 月 12 日 上午 2:53 
sorry for late response. Did you figured it out? The config should be generated. If not I need to take a look into this. Maybe GMOD changed something
Tygron 2020 年 10 月 12 日 上午 9:59 
It's alright man you got stuff you're doing lol. I in no way expect anyone to just drop everything for something like this.

No I didn't get it figured out, adding those prefixes didn't seem to change anything. When changing the code, the config file generated still populates as what I posted in the initial message.

Putting the prefixes in either the code itself or the config file doesn't seem to change anything, and the config file always reverts to how it was after a restart.

There's a chance the maps in question, I only have a couple, didn't show up in the map vote. But I sat here for a few minutes just starting and stopping the vote to get a new list and I saw none of them.
Lytho  [开发者] 2020 年 11 月 5 日 上午 2:03 
Yeah no problem. Would be cooler from steam to drop be a notification even with "sub" xD

I tested it and everything works on my local server. The addon is creating a config.txt in the data folder of garrysmod. And I can modify the config as I need.
Kirays 2021 年 3 月 27 日 上午 10:24 
Good day.

I'm experiencing the same issue: I can't add additional prefixes nor exclude certain maps without the config file reverting back to defaults. The rest appears to be working fine.
Lytho  [开发者] 2021 年 3 月 31 日 上午 7:15 
Added u, maybe we can look into this more in detail. I did a clean install and had no issues, only found another small thing xD
Tygron 2021 年 4 月 2 日 下午 2:37 
The only thing I noticed was that the code says one thing and the file it creates says another. But i'm not sure why it would be doing that, and I don't think there's another mod causing it. It's been a hot minute since I last messed with it, but I think I tried it on a fresh test server with just this thrown in and it still behaved that way.

But i'm willing to help any way I can.
Lytho  [开发者] 2021 年 4 月 4 日 上午 11:04 
Hey,

can u show me a screen from ur config? A possible problem could be a wrong format. The config follows the JSON rules. `mapPrefixses` and `mapExcludes` are JSON arrays.

Here is an example config:

{ "mapRevoteBanRounds": 4.0, "mapsToVote": 10.0, "voteTime": 20.0, "mapPrefixes": [ "de_", "ttt_", "gm_" ], "mapExcludes": [ "de_dust2", "de_dust", "de_inferno" ] }

I will add a config setup to ULX so u don't need to touch the raw config file.
Tygron 2021 年 4 月 4 日 上午 11:27 
What gets created in my config.txt file is below. If any change gets made it just reverts to this.

{ "1": [ "ge_" ], "mapRevoteBanRounds": 12.0, "mapsToVote": 10.0, "voteTime": 20.0, "mapExcludes": [], "mapPrefixes": [ "ttt_" ] }
最后由 Tygron 编辑于; 2021 年 4 月 4 日 上午 11:27
< >
正在显示第 1 - 10 条,共 10 条留言
每页显示数: 1530 50