Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code - Large crew requirements?
#1
Designed a new variant of the lee (minus lostech) and calculated the crew to be 8 base plus 13 gunners. HQ has the crew at 18 though (ship hasn't arrived so not sure of actual crew to gunners). As large craft are not fully there I think i might be able to at least fix this (or maybe more??) but do not know where in the code (or which project) the calculations are being made.

HELP! Just need someone to point me to the right project and source files please Smile
Reply
#2
I don't know where the code is myself, however when I find myself in these kinds of situations, I find out where the numbers get used and then work backwards.  Find somewhere in the GUI where it might display that kind of information, and then find where in the GUI code the value gets used, and then find where the value comes from, etc.  I would guess for the hangar tab, it needs to know when you can assign more crew/gunners to a vehicle, so somewhere in the right-click context menu it's going to have to check if the crew is currently full.
Reply
#3
A good way to do it, but does require a little more knowledge of the code than I have at the moment. For now anyway.

Will see if I can hunt it down.
Reply
#4
It's also a good way to get to know the code.  Another thing you can do is run MHQ in debug mode in Eclipse.  You can setup your run/debug configuration to break on main, which will cause the debugger to halt as soon as the program starts, and then you can start stepping through the code from there, to get a feel for where the code "starts."  For instance, there's going to be some main class that runs, starts up the MHQ main menu, then when you load your campaign it'll create and display the main campaign GUI. 

For the most part, when I've look at MHQ, the packages and class names were pretty self explanatory and made it easy to figure out where different parts were. 

At the end of the day, exploring the code is how you get familiar with a project. 
Reply
#5
That code used to be in MHQ itself, but I've since moved it into MM. I believe I placed it in Compute.java
Reply
#6
My bad, I was calculating it wrong. I thought I had read in the rules section a change to aero unit gunner formula being 1 per 6 per arc (which gave me the 13) but after double checking the errata and not finding the thread I went back and 18 does seem to be the correct number. I did manage to find the code for crew calculations though as well as some other nifty things to poke at.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Temp Crew? ErikModi 1 217 11-03-2019, 11:32 AM
Last Post: Hammer
  AtB: (help please) Vehicle crew death, how do I deal with this? Jesterr 4 398 05-18-2018, 02:44 PM
Last Post: Jesterr
  Code review - Time in Service and Refurbishment pheonixstorm 17 2,033 02-01-2016, 01:49 PM
Last Post: BeeRockxs
  Where do I find the repair bay code? pheonixstorm 12 1,639 08-01-2014, 12:59 AM
Last Post: ralgith
  Dropping zero minute techs - code questions pheonixstorm 5 933 06-09-2014, 04:26 AM
Last Post: pheonixstorm
  Saperate Screen for Opposition Crew Capture SirMegaV 2 628 05-23-2014, 01:13 AM
Last Post: SirMegaV
  Warship Crew Injuries SirMegaV 5 1,175 05-02-2014, 02:21 PM
Last Post: SirMegaV
  Astech requirements not met NotoriousDAVE 3 1,163 12-04-2013, 07:34 PM
Last Post: NotoriousDAVE

Forum Jump:


Users browsing this thread: 1 Guest(s)