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

[RFE] CamOps Initiative Modifier #4600

Closed
IllianiCBT opened this issue Aug 10, 2024 · 9 comments · Fixed by #5257
Closed

[RFE] CamOps Initiative Modifier #4600

IllianiCBT opened this issue Aug 10, 2024 · 9 comments · Fixed by #5257
Labels
Errata This covers officially produced CGL errata that the programs need to implement. (RFE) Enhancement Requests for Enhancement, new features or implementations Utility A new utility function or developer tool

Comments

@IllianiCBT
Copy link
Collaborator

IllianiCBT commented Aug 10, 2024

CamOps includes a lot of modifiers applied to initiative rolls made during scenarios. These can result from using a WMD or poor morale, to use the two examples that jump immediately to mind.

Due to the interactions needed with MegaMek, this falls outside my immediate skillset. So I'm putting out this RFE in the hope someone else is willing to take a shot.

Requirements

  • An initiative modifier int saved in campaign with setter and getter, and a third method that allows you to increment/decrement the modifier. This will need to be marshaled and unmarshaled to xml.
  • The ability to pass that initiative modifier into a scenario and have it apply to initiative rolls made for the duration of that scenario

Implementing the various CamOps systems that would take advantage of this functionality I will be doing myself, so no need to worry about that side of things.

@IllianiCBT IllianiCBT added (RFE) Enhancement Requests for Enhancement, new features or implementations Utility A new utility function or developer tool labels Aug 10, 2024
@Saklad5
Copy link
Contributor

Saklad5 commented Aug 16, 2024

Based on this ruling, MekHQ needs to communicate two things to MegaMek: the total initiative modifier, and the single highest positive modifier. For instance, if there are two +1 initiative modifiers, the total would be +2 but the highest (which acts as a cap) would be +1. In this case, a -1 initiative modifier applied by something in MegaMek would still result in an effective modifier of +1. If MegaMek applied a +2 modifier, however, the effective modifier would be +2.

TLDR: MegaMek needs an extra lobby option for the "starting cap" of initiative. The method MekHQ uses to increment the total modifier should update that starting cap if the provided increment is higher, and then pass that cap to MegaMek using the new option.

@HammerGS HammerGS added the Errata This covers officially produced CGL errata that the programs need to implement. label Aug 16, 2024
@Saklad5
Copy link
Contributor

Saklad5 commented Nov 29, 2024

@HammerGS Was the initiative cap implemented?

@HammerGS
Copy link
Member

@HammerGS Was the initiative cap implemented?

I have no idea, I just push the code not write it.

@Saklad5
Copy link
Contributor

Saklad5 commented Nov 29, 2024

@HammerGS Was the initiative cap implemented?

I have no idea, I just push the code not write it.

I'm not sure this should be closed, based on the pull request.

@IllianiCBT
Copy link
Collaborator Author

@HammerGS Was the initiative cap implemented?

This would be a question for DM0000

@DM0000
Copy link
Contributor

DM0000 commented Nov 30, 2024

Cap was not implemented in MehHq -adding now. MegaMek already had the constantInitBonus for Players which I'm using to pass the bonus value to MegaMek from MekHq.

Adding two methods to set Maxbonus -
1st regular setter
2nd setter that checks against current bonus and takes highest

adding checks in initiativeBonus setter and incremental setter to not exceed maxBonus

@DM0000
Copy link
Contributor

DM0000 commented Nov 30, 2024

Correction adding applyInitBonus that checks and sets maxBonus before applying makes more sense then a seperate maxBonus setter and checker

@Saklad5
Copy link
Contributor

Saklad5 commented Nov 30, 2024

The max bonus may also be influenced by things in MegaMek.

@DM0000
Copy link
Contributor

DM0000 commented Nov 30, 2024

new PR (#5260)

Would Campaign modifiers be treated the same as scenario ones? For example does it make sense for a mekwarrior getting a 5 kill spree getting +5 bonus to carry over after battle or be limited to the +1 modifier(ate at company kitchen)?* examples based on nothing.

Maybe a scenarioMax and campaignMax?

Thinking more about it now there would need to be a way to time out bonuses. Maybe MaxBonus isn't even needed just array of bonuses then bonus cant be higher then highest value. This was bonuses could be removed and old maxes remembered. It all really relies on how Illani wants to apply the bonuses(one and done,weekly/monthly) and if they timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Errata This covers officially produced CGL errata that the programs need to implement. (RFE) Enhancement Requests for Enhancement, new features or implementations Utility A new utility function or developer tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants