Closed DrGirlfriend closed 9 years ago
I think this is actually working correctly, but paging @meishuu just in case, he knows that code a lot better than I do.
Can you tell me what level your Armor Piercing Rounds and Explosive Rounds (and Railgun) are?
I will let you know today what the values are. The UI reset on my game rig when I logged into steam from my work computer. I don't remember seeing Rail Guns as an option when I wrote this last night. Armor Piercing Rounds was at something like 37. Explosive Rounds were at either at 0 or very low (under 5)
At level 132 this is what I have with todays script
upgrade_cost = FloorToMultipleOf( 10, CalcExponentialTuningValve( current_upgrade_level, upgrade.base_upgrade_cost, upgrade.cost_exponential_base ) ) damage_per_gold = dpg = (scene.m_rgPlayerTechTree.base_dps * result.boost / clickFrequency) / result.cost;
base_dps and clickFrequency are the same for both, can be ignored.
=============================Current AP level============================= Armor Piercing cost = FloorToMultipleOf( 10, CalcExponentialTuningValve( 36, 200, 1.2 ) ) = 141,760 Armor Piercing Round damage_per_gold = result.boost / cost = 1 / 141760 = 0.00000705417 Explosive Round cost = FloorToMultipleOf( 10, CalcExponentialTuningValve( 9, 10000, 2.2 ) ) = 12,072,690 Explosive rounds damage_per_gold = result.boost / cost = 10 / 12072690 = 0.00000082831581
armor_piercing_dpg = 0.00000082831581 explosive_round_dpg = 0.00000705417
armor_piercing_dpg < explosive_round_dpg
explosive currently prioritized, as expected & as shown in screenshot
=============================Previous AP level============================= For armor_piercing_level to be 36 at this point, dpg of level 35->36 must be greater than explosive_round_dpg from level 9->10
explosive_round_dpg = 0.00000705417 Armor Piercing cost = FloorToMultipleOf( 10, CalcExponentialTuningValve( 35, 200, 1.2 ) ) = 118130 Armor Piercing Round damage_per_gold = result.boost / cost = 1 / 118130 = 0.00000846525
armor_piercing_dpg = 0.00000846525 explosive_round_dpg = 0.00000705417
armor_piercing_dpg > explosive_round_dpg
AP currently prioritized, as expected & as shown in screenshot
So... Seems to be prioritizing fine, unless I'm mistaken? Closing the issue for now. Comment again if you feel this is incorrect.
Seems that Armor Piercing is getting upgraded the most only supplying 10 DPS per upgrade where as Explosive Rounds and Advanced Targeting give you 100 DPS per upgrade costing less per upgrade for the amount of DPS. Auto Fire Cannon (10 DPS per upgrade) has stopped at 10 upgrades total.