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

Gamemaster mode can edit unit during game #4576

Merged
merged 5 commits into from
Jul 16, 2023
Merged

Conversation

pakfront
Copy link
Collaborator

@pakfront pakfront commented Jun 30, 2023

This allows a player with the Gamemaster (GM) role to use the right click menu to:

  • open the UnitEditorDialog to add or remove damage from an Entity. This will update ammo counts and weapon usability but will NOT trigger unit immediate effects such as death, ejection, explosions, etc. (this is an issue with editing damage in the lobby as well.)
  • open the CustomMechDialog (aka Configure dialog) to change pilot name and stats, change prone/hidden, everything you can do from the lobby except changing deployment zones.

To do this, the player will have to become a Gamemaster by

  • using the /gm command
  • then having all other human players /allowGM.

FYI adding support for editing pilot health, buildings and hexes will take a bit more work but is possible in another PR

@pakfront pakfront added (RFE) Enhancement Requests for Enhancement, new features or implementations In Development (Draft) An additional way to mark something as a draft. Make it stand out more. labels Jun 30, 2023
@pakfront pakfront changed the title GameMaster mode can edit unit during game Gamemaster mode can edit unit during game Jun 30, 2023
@pakfront pakfront marked this pull request as ready for review July 1, 2023 03:59
Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

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

Nice.

I think this may have some unintended effects if the unit has been damaged; we'll want to test around that, especially things like blown-off limbs, ammo explosions and crew effects.

@pakfront pakfront self-assigned this Jul 1, 2023
@BLR-IIC
Copy link

BLR-IIC commented Jul 3, 2023

Nice.

I think this may have some unintended effects if the unit has been damaged; we'll want to test around that, especially things like blown-off limbs, ammo explosions and crew effects.

I wonder how this would work with units being carried on other units, like mechanized BA, infantry in APCs, or dropships docked with jumpships...

@pakfront
Copy link
Collaborator Author

pakfront commented Jul 4, 2023

I think this may have some unintended effects if the unit has been damaged; we'll want to test around that, especially things like blown-off limbs, ammo explosions and crew effects.

This is expected with the current PR. I think this is useful enough that we could put it in as in. We should create new PR to handle the effects, as it's fairly complex. For example, currently if you edit the damage:

  • destroying a side torso does not disable the corresponding arm
  • destroying the CT will not disable the unit.
  • marking ammo as damaged does not trigger ammo explosions
  • damaging the head does not trigger damage rolls on the pilot

@pakfront pakfront removed the In Development (Draft) An additional way to mark something as a draft. Make it stand out more. label Jul 4, 2023
@pakfront pakfront requested a review from NickAragua July 4, 2023 17:43
@pakfront
Copy link
Collaborator Author

pakfront commented Jul 4, 2023

I added the Configure/CustomMech dialog as well. Lots of cool stuff you can do with it mid-game as GM such as change pilot names (surprise, it's Natasha!), unhide Princess units, hide units mid-game (not legal, I know, but great for RP)

Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

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

Looks fine code-wise.

I don't think we need to trigger ammo explosions or anything else that comes as the effect of doing "normal" damage, but damaged sections will definitely need to be disabled - or we can prevent setting the structure below 1.

@SJuliez SJuliez merged commit 7d4e2fd into MegaMek:master Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(RFE) Enhancement Requests for Enhancement, new features or implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants