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

Modifiers for salvaging a component #1075

Closed
inqistor opened this issue Feb 11, 2019 · 2 comments · Fixed by #1233
Closed

Modifiers for salvaging a component #1075

inqistor opened this issue Feb 11, 2019 · 2 comments · Fixed by #1233

Comments

@inqistor
Copy link

Modifiers for salvaging a Mech component were the same in all MekHQ versions I have checked so far, but closer inspection of StratOps on page 191, gives example in fourth paragraph, indicating that time & modifier should be based on percentage damage to component, so using Repair part of MASTER REPAIR TABLE, not Destroyed part, as it is now (there is +3 difficulty, and 240 minutes now, for all locations).

The overall description is quite lacking in limbs reclamation department, but I wonder, if by analogy to Blown Off Arms with destroyed Left/Right Torso, shouldn't all parts attached to Central Torso albo become Blown Off when CT is destroyed?

@inqistor
Copy link
Author

I took a quick glance how to repair first issue, you have to change two parts of MekLocation.java:
You have to exchange line 380 return 240;
with lines 393-400

               if (percent < 0.25) {
			return 270;
		} else if (percent < 0.5) {
			return 180;
		} else if (percent < 0.75) {
			return 135;
		}
		return 90;

with probably adding check for destroyed component
if (percent==1.00) return 240;
, or some logical check for IsDestroyed if it is already defined.
Same change for Difficulty by changing line
409 return 3;
with lines 422-429


		if (percent < 0.25) {
			return 2;
		} else if (percent < 0.5) {
			return 1;
		} else if (percent < 0.75) {
			return 0;
		}
		return -1;

with same additional check for destroyed component:
if (percent==1.00) return 3;

That should make salvaging of limbs consistent with StratOps

sixlettervariables added a commit to sixlettervariables/mekhq that referenced this issue Jul 23, 2019
- Updates repair and salvage times and difficulties based on StratOps p191
sixlettervariables added a commit to sixlettervariables/mekhq that referenced this issue Jul 23, 2019
…dates repair and salvage times and difficulties based on StratOps p191
@sixlettervariables
Copy link
Contributor

Okay I've got a pull request up which should resolve this issue. MekHQ uses MissingMekLocation to handle the percent == 0.0 logic (percent is not the percent destroyed, but rather the percent intact).

sixlettervariables added a commit that referenced this issue Jul 26, 2019
…t-repair-times

Update 'Mech location repair and salvage times to match StratOps #1075
neoancient pushed a commit that referenced this issue Aug 9, 2019
…epair and salvage times and difficulties based on StratOps p191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants