All ammo types into graph on one click
Feature request
It would be cool if I could compare multiple ammo on current ship and current weapon in graph on "one click".
Expected behavior:
It should be possible to add new series (line) into graph based on selected ammo. Just select an ammo by menu and add series (line) with current fit + selected ammo.
Actual behavior:
If I want compare what the best damage and range is I have to do this: I have to do many copies of the same fit but with different ammo. For example for Executioner with Dual Light Beam Laser II I have to create let say 7 fits with crystals (Mulifrequency S, Imperial Navy Mulifrequency S, Radio S, Glem S, Aurora S, Xray S, Infra S, ...) then I have to drag and drop those fits into graph.
Detailed steps to reproduce:
With this new feature It should be like this:
- open graph -> window with graph is open
- drag your tested fit into graph (or more fits) -> new fit in list view is displayed
- right click on any fit -> popup menu is displayed
- click on menu item "add fit with ammo ..." -> sub menu with ammo is open - the same submenu as when you want change ammo in your weapon
- click on desired ammo -> now selected fit is cloned in background but ammo on primary weapon is used by selected ammo (from clicked menu item)
- new series (line) with this "background fit" is added to the graph
- repeat this for all ammo you need to see in graph
Possible problems
If selected fit contains more than 1 type of weapon: (for example 4 energy turrets, 2 missile launchers, 1 rocket launcher) then take only one - the primary weapon - (it is weapon where count of the same weapons is highest). This solution is enough make this problem solved - because in practice you want compare only 1 weapon with this tool - the strongest one.
Fits involved in EFT format (Edit > To Clipboard > EFT):
any fit
I considered it as a few people requested it already. This might be very complex to implement and/or very costly performance-wise, because:
- Pyfa at the moment has no concept of "inviisible" fit. Every fit you add has its own DB entry. If you do not add fit to DB session then you lose ORM-managed relations between fit and its items which is likely very hard to recode to get rid of ORM dependency.
- Pyfa has no partial attribute recalculation, so with every change you have to recalculate whole fit. Currently you do it once per change in fit. If you have graphs open with multiple ammos selected, it means that you will have to recalculate fit (1 regular recalc + amount of extra ammo types selected + 1 recalc to revert to initial ammo used) times, which is rather expensive CPU-wise.
However, I did not look into details, maybe it might be possible with some set of hacks like I used for scram application, battery/caprech effect on cap regen in cap column, etc. Those are very specific and are rather cheap to calculate.
Thanks for reply Dark.
I would not be worried with cost of CPU because when I compare time needed for CPU versus time needed to do this all work manually by user then I can say that CPU cost is nothing.
But the second point - DB session/ORM - yes it can be difficult. I believe so. But maybe if so, then creating a solution with "temporary fit" marked by some "isTemporary=true" attribute can be affordable hack? All fits with this attribute can be deleted automatically when graph is closed/open and manually if graph is still open and fits are removed one by one.
I think when SW is old then hacks are only (economically reasonable) way :-)
FYI it's quite often requested feature, so i started to work on it in ammo_graph branch. My idea is the following:
- user RMBs fit in attacker fit list, clicks
Plot with Different Ammo...menu item, ammo picker dialog is opened - dialog shows all:
- damage-dealing modules which can load ammo (shows even if module currently has no ammo, but is in state to deal damage - i.e. if loading proper ammo would make it to deal damage). Modules are grouped by loadable ammo type (i.e. 650mm t2 arty and 720mm t2 arty will be in the same group, but t1 650mm t2 arty and 650mm t1 arty will not).
- drone section. It lists all damage-dealing, webbing and TPing drone stacks. You can select stacks with checkboxes, or add custom stack composed from available drones (useful for e.g. 2 heavy + 2 med + 1 light combo used on ships like vexors)
- damage-dealing and webbing fighter squadrons section, same as drones. Only fighters which have abilities which deal damage or web are shown (even if fighter itself is inactive)
- user will be able to choose one of module groups, OR drone section, OR fighter section via radio button. Below section headers, user can select proper ammo/drones/fighters via checkboxes. So hierarchy is kinda similar to fit export dialog
- upon confirmation, fit will be duplicated for graphing purposes, and will be applicable to dps graph only. User will be able to remove variations as he desires, or "root" fit, which will remove all variations as well
- this will affect only dps graph, variations will disappear when you switch to another graph (maybe they will reappear if you switch back, idk)
So far I've completed this concept and coded context menu entry, dialog frame and grabbing correct modules/drones/fighters (which turned out to be not so trivial). When I finalize UI and integrate it with graphs code, we will see what kind of performance disaster it will be.
This is how it looks so far:


I am yet to add custom drone/fighter set picker, but this should give understanding of how it will look.
And yeah, no actual calculation support has been added yet, but I think UI is a bigger challenge for me.
I got stuck with making decent UI for drones.
Today I decided to merge the ammo_graph branch to re-use functionality implemented for it, in another feature related to adding ammo.
I will try to finalize it at some point, but for now it will be disabled.