Author Topic: ProtoMech Weapons Won't Fire  (Read 2946 times)

Kojak

  • Major
  • *
  • Posts: 4612
  • Melancon Lives!
ProtoMech Weapons Won't Fire
« on: 14 July 2015, 01:50:18 »
I just encountered an incredibly frustrating issue and after a good deal of testing, I'm at a loss as to how to solve it. I have a ProtoMech variant I tried to use in a game earlier tonight, and its weapons refuse to target anything. Everything else shows up properly, so I didn't discover this until I got the unit in range and found it was unable to actually do anything during the Firing Phase. I've attached the file to this post: if anyone can help me figure out what, if anything, I've done wrong, I will be forever indebted.

EDIT: Keep in mind that the actual file is a .blk...I just can't upload it that way, so I saved a separate .txt version. It's otherwise identical to the .blk file.


"Deep down, I suspect the eject handle on the Hunchback IIC was never actually connected to anything. The regs just say it has to be there."
- Klarg1

A. Lurker

  • Major
  • *
  • Posts: 4641
Re: ProtoMech Weapons Won't Fire
« Reply #1 on: 14 July 2015, 02:44:46 »
It's not you, it's a genuine bug in MegaMek -- specifically, in the code that checks which weapons on a quad ProtoMech can fire into a secondary arc. That gets handed an index number which the same method for other units uses to look up the weapon in question in the unit's equipment list...but for quad Protos, for reasons unknown, the lookup refers to the separate weapons list instead. That one's necessarily shorter for units that mount a mix of weapon and non-weapon equipment (and their indices would only match up by sheer luck anyway), so if the index used just so happens to exceed its length you get an exception and the game grinds to a halt with most buttons disabled. I suspect that hasn't been discovered before because (a) there aren't that many quad protos in MegaMek to date and (b) I don't believe many of them even mount non-weapon equipment, presumably leading to both lists being basically identical and so masking the bug.

(I was about to nitpick at having both the iHML and the light TAG in the main gun mount, but looking at my copy of Wars of Reaving it seems that for ultra quads having up to two weapons there is in fact legit. Learn something new every day. :) )

Anyway, a fix for this should be in the repository now.

 

Register