Please make it so map votes have a minimum of 2 options

For feedback on the game code and design. Feedback on server rules and playstyle belong in Policy Discussion.
Post Reply
Imitates-The-Lizards
Joined: Mon Oct 11, 2021 2:28 am
Byond Username: Typhnox

Please make it so map votes have a minimum of 2 options

Post by Imitates-The-Lizards » #653347

As much as I love joking about the map votes being north korean in nature, there should probably be 2 options minimum for map votes.
Image
Image
User avatar
Nabski
Joined: Thu Oct 20, 2016 5:42 pm
Byond Username: Nabski
Github Username: Nabski89
Location: TN

Re: Please make it so map votes have a minimum of 2 options

Post by Nabski » #653368

No Comrade. You will be going to the Ice Box.
User avatar
Rohen_Tahir
Joined: Wed Jun 05, 2019 1:00 pm
Byond Username: Rohen Tahir
Location: Primary fool storage
Contact:

Re: Please make it so map votes have a minimum of 2 options

Post by Rohen_Tahir » #653388

Image
VexingRaven
Joined: Sat Aug 15, 2020 6:33 am
Byond Username: VexingRaven

Re: Please make it so map votes have a minimum of 2 options

Post by VexingRaven » #653435

Pretty sure this would just mean blocking map votes if there's only 1 valid option. Which is probably not a bad idea, so people don't waste the 1 (I guess 2) map votes the server gets.
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Please make it so map votes have a minimum of 2 options

Post by oranges » #653444

the answer is to simply not hold the vote if there's only one option remaining.
User avatar
san7890
In-Game Game Master
Joined: Mon Apr 15, 2019 8:12 pm
Byond Username: San7890
Github Username: san7890
Location: here
Contact:

Re: Please make it so map votes have a minimum of 2 options

Post by san7890 » #653534

oranges wrote: Wed Oct 05, 2022 1:19 am the answer is to simply not hold the vote if there's only one option remaining.
https://github.com/tgstation/tgstation/pull/70340

FYI if you want more than zero/one map options it becomes less of a matter of code and more of a matter of how the map config is set up. Policy Discussion time, I suppose.
Simultaneously making both the best and worst jokes on the internet. I like looking at maps and code. Learn how to map today!. You may rate me here.
Imitates-The-Lizards
Joined: Mon Oct 11, 2021 2:28 am
Byond Username: Typhnox

Re: Please make it so map votes have a minimum of 2 options

Post by Imitates-The-Lizards » #653560

So maybe I'm missing something here, but what exactly is causing map ineligibility? Like, okay, I know Delta has a pop minimum, and Kilo has a pop maximum, but arent the other 3 maps playable under all circumstances?
Image
Image
User avatar
san7890
In-Game Game Master
Joined: Mon Apr 15, 2019 8:12 pm
Byond Username: San7890
Github Username: san7890
Location: here
Contact:

Re: Please make it so map votes have a minimum of 2 options

Post by san7890 » #653596

Imitates-The-Lizards wrote: Thu Oct 06, 2022 11:33 am So maybe I'm missing something here, but what exactly is causing map ineligibility? Like, okay, I know Delta has a pop minimum, and Kilo has a pop maximum, but arent the other 3 maps playable under all circumstances?
We track the last three played maps via SSPersistence, which writes the names into a file in the server's data folder. On the initialize of the next round, the server (via the Persistence subsystem) can see if any map has been played for two (out of three) prior rounds. So, if MetaStation was played the last two rounds, it'll be automatically removed from the vote on initialize since it's been too common, thus forcing a "map rotation" of sorts. Another example would be if you're currently on DeltaStation, and the last few maps were MetaStation, IceBoxStation, and MetaStation- it would filter out MetaStation on the next map vote.

This was broken after a refactor of the vote subsystem a few months ago, and we just recently fixed it again.
Simultaneously making both the best and worst jokes on the internet. I like looking at maps and code. Learn how to map today!. You may rate me here.
Imitates-The-Lizards
Joined: Mon Oct 11, 2021 2:28 am
Byond Username: Typhnox

Re: Please make it so map votes have a minimum of 2 options

Post by Imitates-The-Lizards » #653626

san7890 wrote: Thu Oct 06, 2022 10:47 pm
Imitates-The-Lizards wrote: Thu Oct 06, 2022 11:33 am So maybe I'm missing something here, but what exactly is causing map ineligibility? Like, okay, I know Delta has a pop minimum, and Kilo has a pop maximum, but arent the other 3 maps playable under all circumstances?
We track the last three played maps via SSPersistence, which writes the names into a file in the server's data folder. On the initialize of the next round, the server (via the Persistence subsystem) can see if any map has been played for two (out of three) prior rounds. So, if MetaStation was played the last two rounds, it'll be automatically removed from the vote on initialize since it's been too common, thus forcing a "map rotation" of sorts. Another example would be if you're currently on DeltaStation, and the last few maps were MetaStation, IceBoxStation, and MetaStation- it would filter out MetaStation on the next map vote.

This was broken after a refactor of the vote subsystem a few months ago, and we just recently fixed it again.
Okay, so, let's say delta is ineligible because it's lowpop, and meta is ineligible because it was played 2 of the last 3 shifts.

Shouldn't the vote options then be kilo, ice box, and tram? Where are the other two ineligibilitys coming from to cause a one map vote?
Image
Image
User avatar
san7890
In-Game Game Master
Joined: Mon Apr 15, 2019 8:12 pm
Byond Username: San7890
Github Username: san7890
Location: here
Contact:

Re: Please make it so map votes have a minimum of 2 options

Post by san7890 » #653668

Whoops, I just found a new comment in the code. We check for the three maps in SSPersistence PLUS the current ongoing round.

So, here's what we have on production /tg/ servers:
► Show Spoiler
So, let's say that it's a lowpop server under 25pop, and it's been that way for four consecutive shifts. This means that both Delta and Tram are filtered out during /datum/vote/map_vote/create_vote. Now, out of three, you have Meta, IceBox, and Kilo:

Let's say that the current shift is IceBox. The previous three maps in SSpersistence's files read: "MetaStation, IceBoxStation, MetaStation". Thus, when the map vote initializes on the server booting up /datum/vote/map_vote/New, it will find that MetaStation and IceBoxStation are both filtered out, because they were present in two out of four recent rounds (including the one currently running) because SSpersistence passes that as the blocked_maps.

So, you will only have the choice of KiloStation. The shift after that, you should be able to choose between Meta and Kilo again, but you'll have to mind that potential gap. This doesn't change the underlying fact that this is a config/server operator issue (map voting itself must specifically be turned on in the config settings), and shouldn't really be minded by the codebase (given that any headmin term can touch the population maxima and minima at their will).
Simultaneously making both the best and worst jokes on the internet. I like looking at maps and code. Learn how to map today!. You may rate me here.
Post Reply

Who is online

Users browsing this forum: No registered users