Jump to content

Even out the job assignments?


Moleculor

Recommended Posts

So I was just in a round where there were no less than six engineers, and no more than two people in science. No AI, one cyborg, very little if any civilian staff (there WAS a chef!), etc.


I was an 'Engine Technician' (Engineer). It, along with AI, Roboticist, and multiple other roles around the station are preferences I have set to 'medium'.


Engineering was *way* overstaffed (I literally had nothing to do or work on), science had no roboticist, there was no station AI, and most of the other roles I had selected for 'Medium' preference were unfilled.


Meanwhile, I was sitting next to six+ engineers, all quite eager and capable of doing engineering-related tasks..


Short version? I was superfluous. I had nothing to do, no part to play. It was boring enough that I eventually cryo-ed out. I would have much rather ended up in one of my other 'Medium' roles rather than end up as the sixth (possibly seventh?) wheel on a four-wheel car.


So, to my suggestion: Even out the job assignment distribution somehow. If there are two engineers and no roboticists and no AI, and I have all three set to medium, *don't* drop me in as an engineer. There are already two engineers, we don't need more.


EDIT: Multiple replies have indicated that I apparently wasn't clear enough in this suggestion, so I'm adding in additional information.


1. This suggestion applies to JOB PREFERENCES set as part of character setup before the shift begins. This means that 'crew manifests' are not available to use judgement calls on where to join. I"m suggesting that the JOB PREFERENCES system spread out people based on their JOB PREFERENCES. I thought that mentioning my job preference settings would make this clear, but this is me making it clearer. This only applies, obviously, to before-round-start distribution, not after-round-start joining.


2. This suggestion does not mean you're forced outside of your job preference roles. If there's still room in a department that you have set to medium (or high or whatever, not sure if you can have multiple 'highs'), you'll be dropped into it even if it's highly staffed already, SO LONG AS none of your other 'medium' or higher preferences are less populated. You'd only be dropped into a 'low' preference in the event of all of your high and medium roles being entirely unavailable, and if even your 'low' preferences are unavailable your standard 'Unavailable' option will kick in.


EDIT2:


Basically (if I'm reading the code right, have actually found y'all's Github, etc) this is a suggestion to alter the "FindOccupationCandidates()" function contained with in job_controller.dm to run through a list of *positions* instead of a list of players and assign players to those positions over and over again until the player list is empty OR to add an additional condition inside the function that skips a job if the player has other jobs at the same 'preference level' that have been filled by fewer people than the job it was about to try to assign you.


If that communicates that I'm trying to say correctly. I dunno, haven't coded in years, that might be the wrong function to slip that code into, etc.

Edited by Guest
Link to comment

It's a random number, I believe. There's no "distribution" to it, unless we want to add unneeded code. Most players keep their characters to one job, so they're usually the same job every round. All I can tell you is to pick a job that isn't staffed, if you feel like it.

Link to comment
It's a random number, I believe. There's no "distribution" to it

 

Riiiight. Hence this suggestion.


Since there's no distribution, you have situations where you have a completely empty Cargo department, major other roles missing, lack an AI, but you have an overstaffed Engineering.


The lack of distribution is what I'm suggesting be changed.

 

unless we want to add unneeded code.

 

Uhwhat? Code that is written to perform a function is, by its very defintion, not 'unneeded'. Code is required for things to be accomplished.

 

Most players keep their characters to one job, so they're usually the same job every round.

 

Well, I enjoy both variety and being able to fill in where needed.


I don't see any way of having the character I play be randomly selected based on the job I'm assigned by the preference system, and even if such a thing existed the lack of distribution would still be an issue.


I don't enjoy sitting around staring at nothing doing nothing accomplishing nothing with no goal, all because there's five+ other people doing what I'd normally be doing.


If I had been dropped into an AI role, or Robotics role (a cyborg was specifically asking for one repeatedly, none were on station), or Quartermaster role or anything other than the highly-overstaffed Engineering department, I would have had something to do.


Lets illustrate this another way: What if it had been Engineering that hadn't been staffed at all and Medical was instead the one overstaffed? Station loses power, because no one knows how to set up the power grid. Each department should (if sufficient population exists) have at least one or two members in it so that every department has *some* staff. It's not like NanoTransen should be 'forgetting' to send engineering staff or a Quartermaster to the station.


For those that only play one department, this code would hopefully not mess with them in any way. Their preferences would be set to their preferences, and since they only have one job set as preferred, they should probably get priority in that over someone who has multiple roles set.

 

All I can tell you is to pick a job that isn't staffed, if you feel like it.

 

I'm not sure how to do that when Readying up in the lobby. Is there some window that will let me see where people are choosing to play in advance, so I can alter my job preferences and de-emphasize departments that will be overstaffed?


Or do I just have to 'join late' every round? And how do I 'join late' as an AI or Cyborg?

 

you can set to one job, then have the game bounce you back to lobby if you don't get it under preferences

 

I'm not sure how that would have helped me in this situation. If I had 'only' had engineering set, it still wouldn't have bounced me back to the lobby. I still would have ended up in an overstaffed department while other departments had no one in them.

Link to comment

Forcing people into things they don't ready set up for? A definite no from me, because of this


http://aurorastation.org/wiki/index.php?title=NanoTrasen_Occupation_Qualifications


If your department is overstaffed, accept it and find something to do. There is never a shortage of work, and complaining because one job of many is done by another is a very weak attitude to take.


Engine Techs can still build/modify/repair things. There is a supermatter core setup on the engineering outpost, and plenty of improvements that can be done to increase the output of the singularity engine itself (even while on). Not to mention shielding you can build etc. Saying "My job is done" when you have a literal sandbox to play in is little more than an excuse to complain

Link to comment
Forcing people into things they don't ready set up for? A definite no from me, because of this

 

That's not at all what this suggestion is suggesting. If you don't have a preference set for a job, this suggestion wouldn't spontaneously force you into that position (unless you have that random job option enabled, I guess?). I can't even figure out how you've reached this conclusion.

 

If your department is overstaffed, accept it and find something to do. There is never a shortage of work, and complaining because one job of many is done by another is a very weak attitude to take.

 

Uh. The round I'm discussing, I was given the *literal* job of 'wander the maintenance halls looking for broken things to fix'. Short of blown lightbulbs (a janitorial job), that's never going to actually lead to work to do, especially not two minutes into the round.

 

Engine Techs can still build/modify/repair things. There is a supermatter core setup on the engineering outpost, and plenty of improvements that can be done to increase the output of the singularity engine itself (even while on). Not to mention shielding you can build etc. Saying "My job is done" when you have a literal sandbox to play in is little more than an excuse to complain

 

If I had remembered that existed (never actually seen it) I might have gone to mess with it, but still would have preferred to be in a needed role than a superfluous one.

Link to comment

Don't ready up, wait for the game to begin, then press Ready up. You'll still be in the lobby, but two new options will pop up showing the crew manifest.


If you're worried about a job being taken, don't ready up.

Link to comment

Okay. When doing that, how do I join as an AI or cyborg? (And before you say 'well, get the roboticist to turn you into one', remember, the example round *had* no roboticist, and I've very rarely if ever seen a new AI constructed.)


I'm honestly still not understanding what the resistance to this idea is. Everyone who wants to play a specific role still gets to play a specific role. If six of you only want to be doctors, and there are six spots open, all six of you are going to be doctors even if that means there are no engineers and the station loses power. It means I *won't* be taking that doctor spot from you if there are already five doctors and I can instead be something with far more slots open.


More people get the jobs they want, when they want, without bouncing out because of unavailable slots AND the station is better staffed AND slots stay open in more populated departments for those people who really want that role even if they forgot to ready up in the lobby. What's exactly is the problem with all of that, and why is it a bad idea?


I would have thought that a suggestion that enabled more people to play the exact roles they specifically wanted while those of us who care far less move out of their way and fill in into less popular roles would be a popular idea.

Link to comment

Waiting for the round to start isn't always an optimal solution, because you miss out on antag roles, risk losing your job slot, and there always need to be a minimum of people readying up for most roundtypes to begin.


This is a change that I could certainly see as beneficial. Is it something that's needed urgently? I don't know. But while I understand that certain coders might simply not be interested in coding it, it is definitely something worthwhile to look into, if there's any interest.

Link to comment
Guest Marlon Phoenix

While waiting for roundstart is a viable option, I understand that you still want the possibility of being antag and getting into your department without the risk of it filling up. I don't know coding, but I think evening out the departments - which works if enough people have multiple preferences - could be a good thing. The decision would have to be how much it overrides job preferences - If I'm set for "High" doctor, and 4 doctors spawn in medbay, "Medium" chef, which is empty, and "low" engineer, which has 2 slots full, which would I get?

Link to comment
The decision would have to be how much it overrides job preferences - If I'm set for "High" doctor, and 4 doctors spawn in medbay, "Medium" chef, which is empty, and "low" engineer, which has 2 slots full, which would I get?

 

As usual, you would get doctor, unless there are too many and you're pushed out, then chef unless its full, engineer unless it is full and finally, whatever you chose as the option nothing above can be chosen. The point of preferences is what you want to play more, because of this, server should always fit you into the highest job preference and not the lesser one if that's what the server needs.


A different example would be if all three roles were set to 'Medium', then you would get chef because the number of chefs will always be zero. This raises another problem. How will the server know what roles are similar or not?


If we go role on role basis, then unique roles will always be filled first. If you have three options set inside one department, for example security, which would be IAA, Officer or HoS, you will almost never get HoS or Officer, because people who set it to high will always get in first and you'll be assigned IAA because that is what the server lacks. With this sorting system, the server will look to fill every role in the list before adding another scientist, engineer or officer.


Results would go even more wild if it went on between department basis.


My point is, simply adding 'function(if count(A) = 0 than be_A else be_B)' wouldn't work, because the server wouldn't know what the fuck its doing. A much more complicated sorting list needs to actually fill the roles properly, but I guess the above function should fix 'some' of the issues the OP had.

Link to comment

Oh thank science.


I was beginning to think I was crazy.

 

Just that, this system is probably managed in a pass manner, so it's going to be interesting to code.

 

YEAH. I'm puzzled by how it'd be coded, but I haven't actually touched code (short of a tiny smidge of Visual Basic) in about a decade, and I don't know the language SS13 runs on, and I'm not entirely sure how the job preference code currently works.


Possible psuedo-code:

 

0. Make a list of all players who need a job assigned, and are ready for the round. Maybe you can assign antag roles right now and remove them from this 'master list of players' once they're assigned an antag role that also assigns them a job, like MalfAI or NukeOps. Standard traitors would still need a job, so they wouldn't be removed, right? (If captainship is ever 'forced' you can assign it here too IF no one has it selected as a job preference?)


1. Make a list of jobs that have the highest preference not processed yet (this ENTIRE (1-7) loop goes through High first, then Medium, then Low) selected by people. For example, if people don't have Chef set to High, Chef won't be in the list of jobs for High preferences, so it won't try to assign Chef to anyone during the High preference job selection. If seventeen people have Janitor set to High, Janitor will appear in the list once. (The method you gather the jobs to put into the list might be important? If you pick a very non-destructive popularity sorting method, picking the jobs to put into the list by iterating through departments might end up with a nice distribution through different departments, not just through different jobs?).


2. Sort that list of jobs, placing jobs with the fewest number of people selecting that job (one person, in most cases) preference at the top, and the most popular choices for the current preference at the bottom. (Any job not selected as 'High' by anyone won't be on this list. Really popular roles would be at the bottom, so that the system processes it 'last' each time it iterates through the list, so if you have any less-in-demand options selected, it'll assign you to those first.) (If the sorting method doesn't disrupt the original order of jobs too much, and you originally gathered the list so that the list 'distributes' through departments, this might result in easy distribution between departments as well as jobs.)


3. Use the 'master list of players ready and waiting' to make a list of players who have selected something in the currently processing preference level (anyone who hadn't selected something for 'High' won't even be an option for 'High' preference jobs, and so won't be in the list during High processing), and sort that list with people who have selected the fewest number jobs at that preference at the top, most at the bottom (so the hardest-to-match people are matched first). (Don't remove them from the 'master list of players' yet!)


4. Starting with the top (least popular) job, run through the list of players (the preference list) and find the first person who has that job selected as a preference level that's currently being processed. Assign them to that job, remove them from the list of players in the list of people currently being assigned a job AND the master list of players waiting for assignment, then move down the job list one entry and begin again at the top of the player list.


5. (Perhaps remove job entries once they're full? Perhaps remove job entries once no one on the list of players has that job selected at that preference level? Don't do anything with the job list to change it as you loop through it? I'm not sure which is the most efficient or intelligent. Possibly the last option?)


6. Once you reach the bottom of the job list, loop back to the top. (This is where removing jobs might be useful, but instead it might be a good idea to have a sanity checker in the loop, where at the START of the list it says HAS_ANYONE_BEEN_ASSIGNED_IN_CURRENT_JOB_LOOP = 0 and then any time it assigns someone to a job in the list, it flips that to 1 (it resets to 0 when the job list loops back to the top to run through the job list again), and have an escape from the loop so that if that variable is EVER 0 at the end of the loop of jobs, it knows it can't assign anyone else ever in this preference level (the remaining people have preferences selected that aren't available jobs), so it never runs through the list without assigning anyone more than once. Obviously it'd also stop running if it runs out of people to assign at this preference level.)


7. If you're processing High or Medium currently, loop back to step #1 and process the next lower preference level. If you just finished Low, move on to #8.


8. Anyone left on the 'master list' that hasn't had a job assigned yet is assigned a job based on the option they selected for when their preferences are all full. (Assistant, random job, whatever.)


Eh, that's probably inefficient as hell. There's probably a far cleaner way of doing it. And I'm not sure that's 'ironclad' enough to make sure people favor their High and Medium preferences over their Medium and Low ones. The 'sort by number of preferences you have selected for whatever category is being run through' code might not be enough for that? Or maybe it is, and I just doubt my problem solving skills? I don't know.


I'm definitely curious how it would be coded.

 

If I'm set for "High" doctor, and 4 doctors spawn in medbay, "Medium" chef, which is empty, and "low" engineer, which has 2 slots full, which would I get?

 

Well, for starters, I think it's important to point out that 'spawning' probably wouldn't happen under this system until everyone had a job assigned.


I'll re-ask your question with the sections I change underlined. The changes to the question may actually do more to answer your question than any answer I could give.


"If I'm set for "High" doctor, and the job preference system has already assigned 'Doctor' to four other people who had doctor set to High, "Medium" chef, which no one had picked as a High or Medium preference (but low might have been picked by some people), and "low" engineer, which no one selected as High or Medium and hasn't had anyone who picked 'Low' assigned to it yet because the system is probably still only working on assigning High preferences and hasn't even started assigning Medium preferences yet, but does have two people with Engineer set to 'Low' who don't have anything else set to any other preference of any kind (or everything they do have set to High or Medium fills up somehow before they get it), which would I get?"


If there are doctor slots available (I don't know the limits), you'd be a doctor.


If there aren't, it would then it would assign you as a chef (or whatever the lowest population medium preference you have) and then work through the rest of everyone else's Medium preferences.


If your Medium (and High) preferences are all filled before you're assigned one, then it'd start trying to spawn you as a the least populated Low preference job that you have selected (Engineer if everything else you selected as Low already has two or more people assigned to it, or you had nothing else set to Low).

Edited by Guest
Link to comment
A different example would be if all three roles were set to 'Medium', then you would get chef because the number of chefs will always be zero. This raises another problem. How will the server know what roles are similar or not?

 

I would hope that there are no roles on the station 'similar enough' to each other to step on each other toes. I wouldn't expect a Janitor to be doing an Engineer's job, or a Geneticist to be mixing Chemicals. The issue this would be trying to fix would be too many of the *same* roles (too many Engineers, too many Doctors) and to make sure that people who *want* the CMO job (high) but can work as a doctor (medium) don't get bumped back to the lobby by someone else getting the CMO, and then others who get doctor jobs (medium) but would have been happy in another medium role.

 

If we go role on role basis, then unique roles will always be filled first. If you have three options set inside one department, for example security, which would be IAA, Officer or HoS, you will almost never get HoS or Officer, because people who set it to high will always get in first and you'll be assigned IAA because that is what the server lacks. With this sorting system, the server will look to fill every role in the list before adding another scientist, engineer or officer.

 

I'm.. not actually sure that's the case? Or if it's any different from the current status quo? Or maybe I'm not understanding your description, or maybe you see something I don't.


Do you mean 'filled' as in 'run out of slots' or 'filled' as in 'someone in one of the slots available'?


The way I see it being done (and I could be wrong about this being a smart/right way of doing it), the least in-demand 'High' roles would have someone in them first (though not necessarily filled, unless there's only the one slot) rather than the most in-demand. Because if you focus on putting people into the most in-demand slots first, you're pushing more of the population into that department rather than spreading out the population.

 

Be mindful that the systems you are suggesting will probably drastically increase roundstart lag.

 

Eh. Maybe? Maybe not.


Most lag I've seen in BYOND involves tile changes and updates (I'm not an expert!), or any time a lot of people have to download the map. I'm not sure if spawning the characters induces the same kind of lag (they aren't updating what are known as 'turfs', I believe), or where the most of the round-start lag originates from, but if it's from merely iterating through lists and comparing values, BYOND is weaker than I ever imagined.


I'd take a guess that this wouldn't actually increase roundstart lag significantly (and in fact some of the work could be done during the lobby countdown, possibly), but a couple extra seconds of lag might be worth increasing everyone's chances of getting roles they're happy with?

Link to comment
×
×
  • Create New...