Posts: 976
Threads: 46
Joined: Mar 2013
Reputation:
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.
Posts: 872
Threads: 144
Joined: Dec 2013
Reputation:
0
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.
Posts: 976
Threads: 46
Joined: Mar 2013
Reputation:
2
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.
Posts: 1,685
Threads: 85
Joined: Aug 2011
Reputation:
0
That code used to be in MHQ itself, but I've since moved it into MM. I believe I placed it in Compute.java
Posts: 872
Threads: 144
Joined: Dec 2013
Reputation:
0
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.