ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

Repair - Improve location of repair interaction points

Open Ivanowicz opened this issue 2 years ago • 12 comments

When merged this pull request will:

  • Fix #9558
  • Add names of hitpoints with depends parameter to the name of the hitpoint they depend on
  • Expand ignored hipoint list to include armor parts, sideskirts and missing slats

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

Ivanowicz avatar Oct 25 '23 15:10 Ivanowicz

The only helicopter I'm still having issues with is the RHS AH-1Z, the hull and tail hitpoints are missing. Those hitpoints have empty selection strings, but mi-8 config is also missisng them and the hitpoints do show up, so I'm currently out of ideas.

Ivanowicz avatar Oct 25 '23 15:10 Ivanowicz

The only helicopter I'm still having issues with is the RHS AH-1Z, the hull and tail hitpoints are missing. Those hitpoints have empty selection strings, but mi-8 config is also missisng them and the hitpoints do show up, so I'm currently out of ideas.

IIRC they use armorComponent

LinkIsGrim avatar Oct 25 '23 15:10 LinkIsGrim

The only helicopter I'm still having issues with is the RHS AH-1Z, the hull and tail hitpoints are missing. Those hitpoints have empty selection strings, but mi-8 config is also missisng them and the hitpoints do show up, so I'm currently out of ideas.

IIRC they use armorComponent

Yup, exactly, that's why it's so weird that Mi-8 works. My best guess is that there's something weird in the config that causes it to skip over the check in fnc_getSelectionsToIgnore.sqf at line 100, but I just can't figure out what.

Ivanowicz avatar Oct 25 '23 19:10 Ivanowicz

Added hull and engine to hitpoints using AveragePoint - I feel that those seem to work better in most cases. This can't really be used for all hitpoints, since it causes way more overlapping interaction points than the old method.

Fixed an error related to full repair of vehicles that return an empty getAllHitPointsDamage array - there are a few (less than 10 I think) vehicles like that in CUP. Should we handle them in some way to allow full repair?

Also finally figured out what was the issue with AH-1Z - there are some hitpoints which have depends specified, but the specified hitpoint is ignored (no selection or armorComponent), causing the hitpoint with depends to be unrepairable. In this case it's the tail rotor which can be damaged, but it depends on tail, which is ignored.

Ivanowicz avatar Nov 29 '23 16:11 Ivanowicz

empty getAllHitPointsDamage array - there are a few (less than 10 I think) vehicles like that in CUP. Should we handle them in some way to allow full repair?

Another item to the TODO list to fix in CUP, which they must do.

rautamiekka avatar Nov 29 '23 17:11 rautamiekka

The latest commits should solve the problems from the 2 reviews above. Since now depends are properly handled, they don't have to be always added to ignored hitpoints, which also means there's no need to make those multi-hitpoint names.

I noticed some RHS tanks have smokelauncher hitpoints - should they be left repairable?

Ivanowicz avatar Dec 03 '23 16:12 Ivanowicz

I noticed some RHS tanks have smokelauncher hitpoints - should they be left repairable?

Why not ? TBF I could see rearming doing it simultaneously and it really being useful while rearming (depending on whether rearming is only possible with a rearm vehicle), but it shouldn't hurt having the option regardless. At least it gives modders another way to expand, if anything.

rautamiekka avatar Dec 03 '23 16:12 rautamiekka

Why not ?

I noticed some of them had complex depends, so I wanted to make sure if it was worth digging into it. And now that I look closer, not only do most of them have multiple parents but they also have depends in a chain, e.g. smoketube_1_hitpoint depends = "era_22_hitpoint + smoketube_2_hitpoint"; smoketube_2_hitpoint depends = "era_22_hitpoint + smoketube_3_hitpoint";

Not sure how to handle that to be honest.

Ivanowicz avatar Dec 03 '23 17:12 Ivanowicz

Why not ?

I noticed some of them had complex depends, so I wanted to make sure if it was worth digging into it. And now that I look closer, not only do most of them have multiple parents but they also have depends in a chain, e.g. smoketube_1_hitpoint depends = "era_22_hitpoint + smoketube_2_hitpoint"; smoketube_2_hitpoint depends = "era_22_hitpoint + smoketube_3_hitpoint";

Not sure how to handle that to be honest.

Ahhh, fair enough, no wonder, then.

rautamiekka avatar Dec 03 '23 17:12 rautamiekka

Added handling of depends with complex parents (e.g. HitEngine depends = 0.5 * (HitEngine1 + HitEngine2)). Also did some cleanup (mostly changing hitpoint to hitPoint for consistency), I hope it's not too out of scope for this pull request.

I tested RHS, CUP and vanilla, but I don't have any of the CDLCs so those still need checking. Here's a script for saving unique depends - parent pairs, so finding any weird ones should be quick. https://pastebin.com/Q6yMz7Cv

Ivanowicz avatar Dec 09 '23 16:12 Ivanowicz

I hope it's not too out of scope for this pull request.

It really is, too many files were changed for what was actually changed, can't properly see what you've actually modified. I'm going to revert a number of variable name changes, as they make the PR harder to review.

johnb432 avatar Jul 23 '24 14:07 johnb432

Understood, will clean it up and hopefully have it ready for review over the next week or two (IRL issues finally cleared up).

Ivanowicz avatar Jul 30 '24 12:07 Ivanowicz