MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
133 stars 171 forks source link

RFE: TO&E "On Leave" force designation. #4775

Open Nikarus2370 opened 2 months ago

Nikarus2370 commented 2 months ago

With the expanded fatigue rules, it may be required that a player regularly cycle personnel out of active duty for "leave" to deal with fatigue problems.

This is currently rather click intensive, as putting a pilot on leave unassigns them from their unit, and when putting them back on active duty, it's several clicks to put them on duty, and reassign their mech.

My suggestion. Allow us to set forces in the TO&E on Leave. This would be a right click setting for a force that would set them to a status similar to "on leave" but without unassigning units and etcetera.

That way, if a lance has been in heavy combat for a few weeks, you can quickly give them a break with 2 clicks, and put them back on with 2 more.

Further, if just 1 pilot/unit has had it a bit rough, perhaps a lot of extra fatigue due to injuries, the player could make a specific "off duty" lance, and just drag that 1 pilot/machine over. I don't know if it's possible, but forces with this tag could also perhaps be treated as not actually part of the TO&E with regards to unit rating, and encounter generation via stratcon/atb?

IllianiCBT commented 2 months ago

This is a good idea, but would be pretty complex to implement. The biggest issues would be the ‘not treated as part of the TOE’, and the manner in which we handle personnel statuses. Basically, personnel statuses are checked for parsing the individual in question. We would need to do that and then also check whether they’re part of a convalescence lance.

Neither is impossible, but both would take a good chunk of code to get working.

Nikarus2370 commented 2 months ago

Well, at the very least, a quick QOL change to the UI could be: Personnel Tab>Right Click>Status>On Leave. Move that to the second option in the Status list, as it's probably going to see a bit more action than most of the other options. Maybe something similar with moving Inactive Personnel to the 3rd option in the "Personnel Type: " dropdown.

Nikarus2370 commented 2 months ago

A slightly different suggestion that may be easier (or harder) than my initial.

Checking "Edit Personnel Log" it seems that each pilot tracks unit assignments and force assignments (although automatic company generation doesn't appear to add initial assignments to this log, might be worth making company generation include that).

Perhaps a new right click option in the Personnel tab. "Put on leave" and if the person is on leave "Return to active duty".

Hitting put on leave could open a number input where you can set a number of weeks that the selected person/persons will be put on leave (perhaps defaulting to what they'd need to remove all current fatigue), this acts roughly like the current Status>On Leave button, removing the pilot from their unit, and the unit from their force. However, after however many weeks when time is up, or if the player explicitly clicks the "Return to Active Duty" option, game checks the Personnel Log for the unit they'd been assigned as well as the force they had been assigned to.

This window could show something like a table, 1 column is personnel, Second is "Unit assignment". Unit assignment cells could attempt to default to the last unit that the person was assigned to (which may be pulled from the Personnel Log), and/or a list of units that are currently undercrewed that the person has the skills to crew. Also could just have a none option. After unit assignments are made, another window opens for force assignment, bringing in the units that recently had crew assigned, that are not part of any force. Acts similarly to the previous screen, where you can assign units that are freshly crewed with people returning from leave, to forces in a dropdown... with the system attempting to default units to the force they were previously assigned.

This would be a fairly click intensive option, but I feel that the UI could be a better overall display for what the player is trying to accomplish, than going through right click menus in Personnel/Hangar tabs for unit assignment, and TO&E for the force assignments. But it would also encapsulate the operations you're trying to do off in their own windows, without having to dig in and mess with the existing Personnel/Hangar/TO&E code. The window would just generate a list of pre-existing assignment functions and then run them on completion.

IllianiCBT commented 2 months ago

I'm a little groggy to read through all of that, but the general gist seems much more doable.

Regarding the tracking of previously assigned units. We actually don't track that data, we just make a note of it in the personal log and that's basically it. However, adding that tracking wouldn't be terribly difficult.