This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code - Large crew requirements?
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
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.
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.
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. 
That code used to be in MHQ itself, but I've since moved it into MM. I believe I placed it in
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.

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

Forum Jump:

Users browsing this thread: 1 Guest(s)