Garry's Mod

Garry's Mod

Lythos Mapvote (TTT & co.)
Tygron 20 Sep, 2020 @ 1:55pm
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 = {}
}
Last edited by Tygron; 20 Sep, 2020 @ 1:57pm
< >
Showing 1-10 of 10 comments
Lytho  [developer] 20 Sep, 2020 @ 2:38pm 
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 22 Sep, 2020 @ 9:26pm 
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?
Last edited by Tygron; 22 Sep, 2020 @ 9:46pm
Lytho  [developer] 12 Oct, 2020 @ 2:53am 
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 12 Oct, 2020 @ 9:59am 
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  [developer] 5 Nov, 2020 @ 2:03am 
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 27 Mar, 2021 @ 10:24am 
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  [developer] 31 Mar, 2021 @ 7:15am 
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 2 Apr, 2021 @ 2:37pm 
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  [developer] 4 Apr, 2021 @ 11:04am 
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 4 Apr, 2021 @ 11:27am 
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_" ] }
Last edited by Tygron; 4 Apr, 2021 @ 11:27am
< >
Showing 1-10 of 10 comments
Per page: 1530 50