Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Return to lobby if preferences unavailable" #4308

Closed
wants to merge 6 commits into from

Conversation

Incoming5643
Copy link
Contributor

@Incoming5643 Incoming5643 commented Jul 31, 2014

Adds a new option to how the game handles a situation where a player doesn't qualify for any jobs they have set. Previously you could only have it set to play a random job (risky and potentially unfun) or play assistant (greytide).

Players that use this but fail to qualify for anything they want get returned to the lobby. Because of how the game handles antag selection a player who is disqualified in this way is available for antagonist roles that choose before job handling (malf/nuke ops/wizard), but not for ones that choose after (everything else). Going forward with a little work monkey/blob (the other two "the job doesn't really matter" modes) antags could be added to the other list if so desired.

I feel that this would almost completely remove all the roundstart suicides/greytide by providing a "way out" for people who would otherwise get shunted into roles where they would have no desire to play the game and/or just be an asshole. It would also keep crew sizes down on hyper bloated servers.

🆑
add: You now have the ability to automatically "back out" of a round if you miss your chance at all the jobs you have set to low or higher. This is found on the toggle at the bottom of the jobs window
add: Due to a quirk of game mode code this option will fail to work if you've been selected as an antag, but then, you've been selected as an antag! In this situation, you'll be assigned a random job.
experiment: Whatever your previous selection for this field was has been lost, so be sure to update it.
/:cl:

Adds a new option to how the game handles a situation where a player doesn't qualify for any jobs they have set. Previously you could only have it set to play a random job (risky and potentially unfun) or play assistant (greytide).

Players that use this but fail to qualify for anything they want get sent in as an observer in the same way they would if they had just hit observe. Because of how the game handles antag selection a player who is disqualified in this way is availible for antagonist roles that choose before job handling (malf/nuke ops/wizard), but not for ones that choose after (everything else). Going forward with a little work monkey/blob (the other two "the job doesn't really matter" modes) antags could be added to the other list if so desired.

I feel that this would almost completely remove all the roundstart suicides/greytide by providing a "way out" for people who would otherwise get shunted into roles where they would have no desire to play the game and/or just be an asshole. It would also keep crew sizes down on hyper bloated servers.

I know the freeze is still on, but I'm posting it now due to how it may synergize/antagonize with tgstation#4306 . Obviously neither should be merged until the freeze is over either way.
@Cheridan
Copy link
Contributor

Cheridan commented Aug 1, 2014

I think this would be better if it just kicked you back to the lobby instead of setting you as observer. From there, you could select a job from the latejoin options or choose to observe.

Good idea though.

@Incoming5643
Copy link
Contributor Author

It did at first but if it kicked you back to the lobby you could potentially get selected for latejoin antagonist, which would be double dipping.

@Cheridan
Copy link
Contributor

Cheridan commented Aug 1, 2014

I don't see how it would be double-dipping. Antag is passed out after Jobs, so if you didn't get your job preference the first time, then you'd get sent to Lobby without getting the first 'dip'.

Additionally I don't think it would be easy to try to exploit this intentionally somehow, since your job prefs being available or not is based on other people's settings.

@GunHog
Copy link
Contributor

GunHog commented Aug 1, 2014

How does this affect round type and antagonist scaling?

Example: I wish to be the AI the next round, and not join as a human. I then set "AI" to "High" and everything else to "NEVER". 20 players are ready when the round starts. I do not recieve the AI job, thus I am returned to the lobby/ghosted. Would that affect the round type selection?

Another example - I am returned to the lobby / ghosted and 60 players were ready at round start. The round type is Blob. Will there be one or two blobs?

@Incoming5643
Copy link
Contributor Author

@GunHog
Example 1: Checks to see if the round runs seem to be locates only in can_start() which runs more or less first, before any sort of job stuff, the round could be any one of the rounds that require 20 or fewer people to play, even if someone bailed out with this.

Example 2: round(num_players()/players_per_core is the code for this and players per core is set at 30, so two cores would actually be a assured at 46 people (and maybe 45 depending on what round() does with .5) But in any case this takes place in pre_setup() which for blob takes place AFTER jobs have been passed out. Since num_players() is called and that counts only people who are ready, it would not count whoever was removed by this metric.

To summerize: Pop checks happen before anything in this pull as far as I can tell. The individual game pre_setup is only relevant in cases where it runs before job select, which happens in Wizard, Nuke Op, and Malf.

The only actual problem I could see arising from that is that nuke ops might get points for people who get removed before the game start by this if that's handled in pre_setup. If it's handled in post_setup (or moved there) it won't be a problem)

@Incoming5643
Copy link
Contributor Author

@Cheridan My hesitation was that people would intentionally use this option not as a fallback, but as an antag roll for wizard/malf/nuke op, then "roll again" for late join antag.

There AREN'T late join antags for any of those modes, so they wouldn't actually gain any statistical benefit doing what basically amounts to two "half rolls", but since on the surface it LOOKS like you're gaming the system I was afraid people might try to use it like that.

There are some problems as Gunhog pointed out with rounds starting with less than their minimum number of players if they happened to just clear the threshold to run, the gamemode would still run fine, but if a LOT of people were doing this balance could be affected in some specific edge cases. This is something that should almost never come up if people are being honest with their settings or the server is properly populated, but if 10 out of 20 people are doing this, things could get stupid.

@Cheridan
Copy link
Contributor

Cheridan commented Aug 1, 2014

The only actual problem I could see arising from that is that nuke ops might get points for people who get removed before the game start by this if that's handled in pre_setup. If it's handled in post_setup (or moved there) it won't be a problem)

No problem there, tc scaling is performed upon first scanning for nearby consoles.

@@ -261,7 +261,7 @@ var/global/datum/controller/occupations/job_master
// Hand out random jobs to the people who didn't get any in the last check
// Also makes sure that they got their preference correct
for(var/mob/new_player/player in unassigned)
if(player.client.prefs.userandomjob)
if(player.client.prefs.userandomjob == 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the "magic" numbers to constants and change the variable name "userrandomjob" to something that suits the new option; it obviously is more than just a boolean now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was afraid fucking with anything in prefs would break saves so I worked around it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change instances of

if(magic == 1)
else if(magic == 2)
else if(magic == 3)

to

#define SORCERY 1
#define NECROMANCY 2
#define PYROMANCY 3

if(magic == SORCERY)
else if(magic == NECROMANCY)
else if(magic == PYROMANCY)

@Giacom
Copy link
Contributor

Giacom commented Aug 1, 2014

Please re-open after the feature freeze.

@Giacom Giacom closed this Aug 1, 2014
@Incoming5643
Copy link
Contributor Author

@Giacom you're going to have to reopen it for me, I can't reopen what a collaborator closed

@Giacom Giacom reopened this Aug 7, 2014
@Giacom
Copy link
Contributor

Giacom commented Aug 8, 2014

It's open now.

@ghost
Copy link

ghost commented Aug 8, 2014

This should really put you back in lobby instead of making you an observer. It's misleading and would be very frustrating for people.

@Incoming5643
Copy link
Contributor Author

Seems like the kind of mistake you'd only make once.

But I mean I had it not go back to lobby because I thought you'd guys would be against it, if no one is I can totally make it do that.

@ghost
Copy link

ghost commented Aug 9, 2014

"return to lobby if preferences unavailable" would be a much better feature imo. This wording you're using is kind of vague. it should say 'observe if preferences unavailable.' That's what will frustrate people.

@Aranclanos
Copy link
Contributor

This is the wrong way to handle the issue, making the player not play is just bad.
The job preferences should be revamped instead.

…y if no job found

Changed the var from userandomjob to joblessrole to better show what it means now
Changed savefile sanitation to make sure the new setting is actually considered a rational choice
Removed Magic Numbers
@Incoming5643 Incoming5643 changed the title "Do not play if preferences unavailable" "Return to lobby if preferences unavailable" Aug 14, 2014
…o DoNotPlay

Conflicts:
	code/modules/mob/new_player/new_player.dm
@Incoming5643
Copy link
Contributor Author

Updated to resolve conflicts and fix complaints

@Aranclanos
Copy link
Contributor

Thanks for trying to help here, but, again, I believe this is a bad way to tackle this issue, we don't have to prevent the player from playing (yes, while it's optional and the player still can join afterwards, it still makes you doubt and reconsider if you want to play or not).
We aren't there yet.

The issue that you're trying to tackle is real, not a big one, but it's still there, again, the correct way to handle this is to revamp how the preferences are done, I still haven't think about them a lot, but they could easily have more options and preferences of what do you want to play. While making them, you also have to think on 50 players at the same time.

Please don't take it bad, I appreciate this work but I believe it handles the issue in a different way than it should be.

@Aranclanos Aranclanos closed this Aug 15, 2014
@optimumtact optimumtact reopened this Jul 18, 2016
@optimumtact optimumtact added Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts Feature Exposes new bugs in interesting ways Stale labels Jul 18, 2016
@Incoming5643
Copy link
Contributor Author

Just a wee bit

…o DoNotPlay

# Conflicts:
#	code/game/jobs/job_controller.dm
#	code/modules/client/preferences.dm
#	code/modules/client/preferences_savefile.dm
@Incoming5643
Copy link
Contributor Author

Incoming5643 commented Jul 18, 2016

Pull is ready but preferences_savefile.dm is being difficult and I cannot fix it

@optimumtact
Copy link
Member

Update your editor and git configuration to leave the line endings alone when they're already set you meme

@Iamgoofball
Copy link
Contributor

2014

@ChangelingRain ChangelingRain removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Jul 18, 2016
@Incoming5643
Copy link
Contributor Author

PR cancelled due to failure to computer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Exposes new bugs in interesting ways
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants