Author Topic: Megamek can't exit attack phase using fighter squadrons  (Read 1811 times)

Icewraith

  • Recruit
  • *
  • Posts: 11
Am I doing something wrong?

Step 0:  Enable "Capital Fighters" and space map.
Step 1:  Make a game, add 1-6 fighters, turn them into a squadron.
Step 2:  Connect to game, add a dropship with weapons.
Step 3:  Drop units within shooting distance of each other.
Step 4:  Accelerate units towards each other (advanced movement enabled) for "realism".
Step 5:  Have squadron shoot dropship.  Megamek resolves firing and goes to the next phase.
Step 6:  Arrange units so dropship can shoot squadron.
Step 7:  Have dropship shoot squadron.
Step 8:  The game will not move to the next phase.

Is there another option I need to have checked, or is this actually a feature not yet implemented?

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4142
    • MegaMek Website
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #1 on: 23 April 2017, 10:07:13 »
Need the log to check for errors.  In the logs folder, also need to know what version your running.
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

sadlerbw

  • Captain
  • *
  • Posts: 1679
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #2 on: 23 April 2017, 13:21:18 »
Just to confirm, I get this same bug in 0.42.1. The error was an arrayIndexOutOfBounds in the damageEntity call. It was pretty simple to replicate as it happened the first time any squadron took damage. I don't have the full log hand, but I can dig it up if it would help.

Icewraith

  • Recruit
  • *
  • Posts: 11
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #3 on: 23 April 2017, 13:42:34 »
0.43.1

Exception in thread "Packet Pump" java.lang.IndexOutOfBoundsException: Index: 5, Size: 5
   at java.util.ArrayList.rangeCheck(Unknown Source)
   at java.util.ArrayList.get(Unknown Source)
   at megamek.server.Server.damageEntity(Server.java:21018)
   at megamek.common.weapons.WeaponHandler.handleEntityDamage(WeaponHandler.java:1077)
   at megamek.common.weapons.WeaponHandler.handle(WeaponHandler.java:623)
   at megamek.server.Server.handleAttacks(Server.java:34184)
   at megamek.server.Server.handleAttacks(Server.java:34113)
   at megamek.server.Server.endCurrentPhase(Server.java:2945)
   at megamek.server.Server.changeToNextTurn(Server.java:3267)
   at megamek.server.Server.endCurrentTurn(Server.java:2313)
   at megamek.server.Server.receiveAttack(Server.java:12788)
   at megamek.server.Server.handle(Server.java:29997)
   at megamek.server.Server$PacketPump.run(Server.java:355)

Icewraith

  • Recruit
  • *
  • Posts: 11
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #4 on: 23 April 2017, 16:02:35 »
Squadrons in general kind of need some help, or I do.  Or both.

I can't load squadrons as squadrons into dropships/warships with fighter bays.  This wouldn't be a problem except I can't figure out how to form groups of individual fighters into squadrons after launch- there's a "join squadron" option that's persistently greyed out so I think that one's on me.  There's a "load" option for fighters that lets you select other fighters but it doesn't seem to work.

Oh, and the bay launch dialogue doesn't have a scroll bar, so for certain designs with large amounts of units in a single bay (cough cough Thera) the launch window becomes taller than the screen.  Fortunately that one can be dealt with by checking off some fighters and then hitting tab and enter repeatedly, it will cycle through the rest of the fighters without checking them and gets to "OK" before "Cancel".

However, most of that other stuff I can work around to a limited extent (designate squadrons to enter before certain turns for instance).  But the scenario I want to run involves a Thera, and I'm not crazy enough to run a Thera with individual fighters instead of squadrons at all.

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4142
    • MegaMek Website
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #5 on: 23 April 2017, 16:54:14 »
If you have a save game can you please add it to this bug report.

https://github.com/MegaMek/megamek/issues/542

Thanks
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

ralgith

  • Captain
  • *
  • Posts: 2251
    • Dylan's BattleTech Emporium
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #6 on: 23 April 2017, 16:57:36 »
Squadrons in general kind of need some help, or I do.  Or both.

I can't load squadrons as squadrons into dropships/warships with fighter bays.  This wouldn't be a problem except I can't figure out how to form groups of individual fighters into squadrons after launch- there's a "join squadron" option that's persistently greyed out so I think that one's on me.  There's a "load" option for fighters that lets you select other fighters but it doesn't seem to work.

Oh, and the bay launch dialogue doesn't have a scroll bar, so for certain designs with large amounts of units in a single bay (cough cough Thera) the launch window becomes taller than the screen.  Fortunately that one can be dealt with by checking off some fighters and then hitting tab and enter repeatedly, it will cycle through the rest of the fighters without checking them and gets to "OK" before "Cancel".

However, most of that other stuff I can work around to a limited extent (designate squadrons to enter before certain turns for instance).  But the scenario I want to run involves a Thera, and I'm not crazy enough to run a Thera with individual fighters instead of squadrons at all.

Join Squadron only works when there already is a squadron and you're forming up on it. There's no "Create" Squadron. Also, all fighters joining a squadron have to be in the same hex.

sadlerbw

  • Captain
  • *
  • Posts: 1679
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #7 on: 23 April 2017, 20:09:51 »
If you have a save game can you please add it to this bug report.

https://github.com/MegaMek/megamek/issues/542

Thanks

Log file added.

sadlerbw

  • Captain
  • *
  • Posts: 1679
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #8 on: 04 May 2017, 20:58:21 »
FYI, I posed a comment on the bug with what I believe is the solution to it. I haven't touched java in years though so I might be a bit off. I don't have the JDK set up anywhere to make an attempt at actually recompiling and seeing if it works, so I don't want to commit a change to the code. While I'm pretty sure I'm right, I don't feel comfortable committing anything without testing it first.

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4142
    • MegaMek Website
Re: Megamek can't exit attack phase using fighter squadrons
« Reply #9 on: 05 May 2017, 09:19:54 »
FYI, I posed a comment on the bug with what I believe is the solution to it. I haven't touched java in years though so I might be a bit off. I don't have the JDK set up anywhere to make an attempt at actually recompiling and seeing if it works, so I don't want to commit a change to the code. While I'm pretty sure I'm right, I don't feel comfortable committing anything without testing it first.

I know Arlith mentioned he was going to have to look when he had some time.  I should note only Dev's have commit privileges.  If you wanted to make a patch, you can create a pull request on Github the code would be reviewed and we can add it to the project.

MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

 

Register