Yeah, with weapon tracking arcs using the code that we have. Basically you toss in the weapons that the ship is going to use, use the code to produce the hit distributions at optimum angle, and then use those hit distributions for the simulation. To save time, it would be reasonable to say that if a weapon has more than a 99.9% chance of missing (so, sum of the final and first cell of hit distribution is more than this) you discard it from the model.
I do not really know how to make a user interface or an application or what object oriented means so I am of limited help with these other problems. I do think it would be kind of interesting to learn and I even looked up a programming course but they literally
made me choose between that and abstract algebra and well, uh, it's not really a fair contest, sorry. Some day!
Here is an idea of how I think the program should flow:
1. User modes: test single weapon, test single ship layout, test collection of weapons, test collection of layouts, diagnose weapon / layout.
2. Import data from Starsector files
Process for modes 1-4:
3. Select ship layout that we are using and target ship
4. For our ship, find the weapons that we are using, their facing and their tracking ability.
Note if a weapon is in a hardpoint, since that will halve its spread.
For target ship, find ship width, shield width, horizontal number of armor cells, armor stat, hull hp, max flux, flux dissipation, shield upkeep, and shield efficiency.
Do we want the opponent to also have a layout including capacitors, vents and hullmods?
5. Using our code, find the weapon facing of choice for the AI (same method as optimum DPS but using weapon scores).
Compute hit distributions at this facing. Discard weapons that have more than 99.9% chance to miss.
6. For the weapons we are keeping, compute shot time sequences.
7. Run the combat simulation vs. target ship in discrete time. For each second:
- Calculate all incoming damage
- Block it with shield if you are able to and increase flux by shield damage * shield effectiveness.
If you did, dissipate only soft flux at rate flux dissipation - shield upkeep.
If you did not, dissipate soft flux, then hard flux after soft flux, at rate flux dissipation.
- If can't block with shield, deal damage to armor and then to hull.
- End simulation when hull hits 0 and record time to kill.
8. Repeat for the requested collection of items to be tested and opponents. Print time to kill statistics for the requested collection of items.
Process for mode 5:
3. Using weapon data, calculate and print the DPS spread at angles with an SD of 0, and, if the user requests, the time to kill for that weapon vs some variety of ships.
Process for mode 6:
3. Using weapon and layout data data, calculate the DPS at angles for the layout with an SD of 0, as well as an indicator of the facing the AI would choose, and,
if the user requests, the time to kill for that layout vs. some variety of ships.
There is, in fact, one more step. When the combat module is done, the adjustable parameter for SD should be calibrated vs. simulation data. It will likely be smaller than what I had due to our simulation being more accurate now.
However, you know much more about programs than I do, so I think it is smarter if you design what it should do and how it should go, and I'll help if I can!