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

[49.18 Nightly] Princess: Weapon Selection - choosing ammo weap over energy weap at same range brackets against high TMM enemy #5229

Closed
Thom293 opened this issue Mar 7, 2024 · 20 comments · Fixed by #5248
Assignees

Comments

@Thom293
Copy link
Contributor

Thom293 commented Mar 7, 2024

FYI This build is from 2.22. Ill upgrade tomorrow.

A Thunderbolt shooting at an enemy vtol with 4 or 5 TMM. TBolt ended previous turn at 0 heat.

Tbolt shoots its SRM2 and LRM15 at the Warrior, but not its LL or ML. That seems...off. Something to do with targeting logic maybe?

Screen below, and log and save and custom attached.

image

TBOLTnofirelaser.sav.gz

Mine.zip

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 7, 2024

fyi played another 6 rounds. He never fired his lasers again. No weather conditions.

If it matters, he is landlocked and cant advance further toward the battle, but the enemies are in LL and ML range for certain.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 7, 2024

It's more likely to do with the heat-to-damage calculation; if it wasn't cool enough to fire all weapons, it would probably just choose the lowest-heat ones.
The targeting code should actually favor energy weapons over ammo-based weapons when targeting high-TMM enemies, as ammo attacks have a higher bar to clear due to the ammo conservation code.

I'll confirm, though.

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 7, 2024

Ok. I checked its heat though and even turns where it had zero heat it wasnt firing the lasers. Just odd .

I didnt report it because I dont have a save or screen but I saw a turret not shoot when it could easily hit me over multiple turns. Its almost as if it gets "stuck" deciding not to use a particular weapon for some reason.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 7, 2024

It's a good report, just not sure if it's a bug-bug or a weird emergent behavior stemming from various new code acting "correctly" but producing the wrong choices.

@Sleet01 Sleet01 self-assigned this Mar 7, 2024
@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 14, 2024

It looks like the Thunderbolt in the posted picture actually split its fire between two targets, and according to the debug log it fired four weapons. Now, that might have been 2 MGs and the SRM2 at the Warrior, followed by the LRM15 at the Stinger (out of the picture) but due to the way we log split fire from Princess, I can't see for sure. Actually, that unit in particular does not report its firing plans to the same degree of detail as all the other Princess-run units; was it added in a particular way, or did it join after the initial battles started? I don't know why its reporting behavior is different.

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 14, 2024

I'm not at computer, but he was allied liason or officer unit added by stratcon.

The screen shows his full firing report. So if the log shows he is firing it does not appear in the report.

I think TBolt has the Multi-Trac quirk which removes 2nd target penalties? Maybe he is doing a second calculation or perhaps that quirk is bugged? Maybe that's why he displays a different firing behaviour? I can check tomorrow.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 14, 2024

I think TBolt has the Multi-Trac quirk which removes 2nd target penalties? Maybe he is doing a second calculation or perhaps that quirk is bugged? Maybe that's why he displays a different firing behaviour? I can check tomorrow.

I was just typing that I think it's tied to Multi-Trac when I saw your reply! Yeah, I think so - I'll try to confirm tonight.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 14, 2024

Turns out it's a combination of things:

  1. The Multi-Trac logic isn't working exactly correctly,
  2. The new per-ammo logic is skipping beam weapons, similar to the infantry weapon issue.

This will take a little bit more time to fix as I've got to create the patch on an older revision, move up to the latest, apply the patch, and merge the changes with the updates made for the infantry issue, but should be done today.

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 14, 2024

Fan-damn-tastic! Thank you for addressing. Looking forward to it.

@HammerGS
Copy link
Member

If looking at lasers VSP have variable damage with range.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 14, 2024

If looking at lasers VSP have variable damage with range.

I'll see if I can find a Multi-Trac unit with VSPs for extended testing.

@HammerGS
Copy link
Member

If looking at lasers VSP have variable damage with range.

I'll see if I can find a Multi-Trac unit with VSPs for extended testing.

Thunderbolt TDR-9Nr

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 14, 2024

Looking much better:
image

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 15, 2024

Great job sleet. Thanks. So, does this effect all enegry weapon units, or only those with multi-trac? Going to play on the new build (before this is merged) a bit tonight and wanted to know what not to report.

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 15, 2024

Ok. Ill give some allied an enemy units multi-tasker in my upcoming battles and see how they do. Thank you.

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 15, 2024

Looks like Multi Tasker may be effected too. This panther only shot its SRM intead of its PPC.

image

megamek.log

let me know if you need a save.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 15, 2024

(Reconstituting my prior comment)

Great job sleet. Thanks. So, does this effect all enegry weapon units, or only those with multi-trac? Going to play on the new build (before this is merged) a bit tonight and wanted to know what not to report.

The current dev code contains a separate fix to ensure that all Bay Weapons can fire, even if they don't have / track ammo, which seems to be working in my testing. I believe the separate issue of Bay weapons only firing at Short Range is also fixed. So only units that use the multiple-target fire control code by default should need double-checking:

  • Units with MultiTrac quirk,
  • Pilots with the Multi Tasker SPA,
  • Units with crews large enough to engage more than one target without penalty

I've checked MultiTrac, so the 2nd and 3rd on that list could probably use some testing.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 15, 2024

Looks like Multi Tasker may be effected too. This panther only shot its SRM intead of its PPC.

let me know if you need a save.

This looks like the code previous to the fix, so it should be resolved by #5248 - if not then I could use that save, please.
I will confirm if multi-turret vehicles and SH Tripods are properly able to multi-target with the fix.

@Thom293
Copy link
Contributor Author

Thom293 commented Mar 15, 2024

Sorry yes that's from last night's build.

@Sleet01
Copy link
Collaborator

Sleet01 commented Mar 15, 2024

Multi-Trac quirk, Multi-Tasker SPA, and large-crew units all appear to be able to target multiple enemy units without restriction or penalties, so I believe this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants