-
Notifications
You must be signed in to change notification settings - Fork 1
GUI for ApsCalc
License
AoKishuba/ApsCalcUI
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ApsCalcUI: a calculator for optimizing shells for the Advanced Projectile System in From the Depths. Written by Ao Kishuba: [email protected] Special thanks to HerpeDerpeDerp and MrNukealizer, without whom this project would not have been possible. For update notifications and useful links to my other documents, join my Discord repository server: https://discord.gg/GJ794YxSxj ---- HOW TO RUN ---- This package requires .NET 8.0 to run. https://dotnet.microsoft.com/en-us/download/dotnet/8.0 If running from the downloaded .zip file, run the executable "ApsCalcUI". The link to download is available in my Discord repository, linked above. ---- TEST PARAMETERS ---- NOTE: Results for each test will be written to a .csv file in the ApsCalcUI folder. Open using a spreadsheet program, such as LibreOffice Calc, using UTF-8 encoding. If "Comma Decimal Separator" is checked, use semicolon column separators; otherwise, use comma separators. Filenames are automatically generated from current time. An example filename is "2021-07-04_09-12-11-12". Barrel Count: number of barrels. APS cannons can have anywhere from 1-6 barrels. Additional barrels help cooling, but impose an accuracy penalty and limit max gauge. At low calibers, barrel count is a cosmetic choice. Minimum Gauge: smallest gauge to be tested, in mm. Must be greater than 18 mm. Maximum Gauge: largest gauge to be tested, in mm. Must be greater than or equal than Minimum Gauge and less than or equal to 500 mm (or the max allowed by the barrel count, whichever is less). DIF Checkbox: Check if the inputs will be mounted directly to the firing piece, as opposed to using clips. This is known as Direct Input Feed, or DIF, and allows for longer shells (10 000mm in vanilla; 20 000mm with 1 000mm APS mod), but limits the gun to 4 inputs max, and doubles reload time. 1 000mm APS Mod: if checked, allows the max gauge to be set as high as 1 000mm. This gauge is not possible ingame without mods. Impact Angle: Angle of impact from perpendicular, in °. Kinetic damage is multiplied by the absolute value of the cosine of this angle: a 0° impact angle is a perfect hit against a flat surface (beams), and will deal full damage against such a surface. Note that this stacks with angles from slopes: a 45° hit against a beam slope (45°) will add up to 90° impact angle (a miss), dealing no damage. A 90° hit against a beam slope (45°) will add up to a 135° impact, dealing about 70% damage. Note also that, as of Alpha 3.5.0 (2022-04-26), Sabot head uses 3/4 the angle for Kinetic damage calculation purposes. Hollow point head and CIWS (kinetic with AC 20) ignore impact angle. Head Indices: modules to be put at the front of the shells to be tested. The frontmost module on a shell is weighted in certain calculations, and can have a large effect on shell performance. Some heads, like the Disruptor Conduit, add functionality. Any module other than the dedicated base modules can be put at the front of a shell, although the dedicated "Head" modules offer the best performance for any shell type. Note that while the optimizer does not include Squash Head (HESH), the Shaped Charge Head (HEAT) works as a substitute for calculations. The damage numbers will not match HESH damage numbers, but the configurations will be otherwise identical. Base Module: module to be put at the back of the projectile (the part of the shell which hits the target - excludes gunpowder and railgun casings). The base modules add functionality or modify performance, and in general I recommend using some kind of base; test with Base Bleeder versus no base if no additional functionality is required. Visible Tracer: prompts Rate of Fire input. Visible tracer bonus to inaccuracy scales with rate of fire. Fixed Modules: modules to be included with every shell. n.b. The input validation for fixed modules is not perfect. Please double- check to ensure the total fixed module count adds up to 18 or less (17 if using a base). Variable Module Indices: the optimizer will test every possible combination of variable modules. Examples would be Solid Body and Sabot Body for kinetic shells, or Solid Body and Frag Body for APF pendepth. Clips Per Loader: number of clips connected directly to loader. Clips cost less than loaders and can hold more shells, but are more fragile and difficult to Tetris. Inputs Per Loader: ammo Feeder Inputs per loader/clip cluster. Ammo Ejector: check to include Ammo ejector, which ejects shells when a clip or loader is destroyed. Automatically checked if Emergency Defuze is checked, but can also be included without one (used for GP kinetic shells). n.b. Beltfed loaders cannot use Ammo ejectors; this option has no effect on them. Max Gunpowder Casings: maximum allowed number of GP casings. Note that GP casing length is adjustable up to two decimal places, although a decimal casing counts as a complete module for module count limit purposes. GP Interval: Propellant amount can be varied by increments of 0.01. By default, every possible increment will be tested (ie, 0.00 through Max GP Casings, adding 0.01 casings between tests). Larger intervals, up to 1 casing, skip shells but greatly speed testing. Max Railgun Casings: maximum allowed number of RG casings. RG casings increase the max rail draw of the shell, but are not part of the projectile, and so do not reduce the shell velocity for a given amount of charge. This means a shell with RG casings can be "supercharged" to go faster than it would under its own max draw. Max Rail Draw: maximum allowed rail draw. Note that the shell itself will have a max draw (to simulate the maximum force the shell could withstand). This "physical" limit is determined by the size of the shell (gauge and number of components other than GP casings), and the optimizer will take it into account automatically, regardless of the user-input max draw. Min Shell Length: minimum length of the shell, exclusive. Max Shell Length: maximum length of the shell, inclusive. Must be greater than the smallest possible shell - ie, one with the minimum gauge, made up only of fixed modules (the form automatically enforces this restriction). Minimum Velocity: minimum shell velocity. Note that a high minimum velocity may be impossible to meet within the casing and rail draw restrictions. Minimum Effective Range: effective range is the distance a shell will travel in its "lifetime", after which it will become useless. Particularly small shells may have an effective range of less than 1 km, and may not be suitable for use on certain craft. Maximum Inaccuracy: the inaccuracy value the optimizer will use to calculate required barrel length. Only enabled if the Limit Barrel Length Checkbox is checked (see below); has no effect otherwise. Limit Barrel Length Checkbox: enables barrel length limits. Every shell has a Barrel Length for 0.3° Inaccuracy and a Barrel Length For Max Propellant Burn. Enabling length limits will cause the optimizer to discard any shell whose required minimum barrel length (for inaccuracy or propellant burn) exceeds the limit. The number entered can represent a fixed length (select "m" from the dropdown) or a multiple of the gauge (select "calibers"). Pendepth Checkbox: enables the Target Armor Scheme controls. With the box checked, the optimizer will only count shells which are capable of destroying the target armor configuration using either kinetic or thump damage. Target Armor Configuration Dropdown and Buttons: allows the user to input the configuration of the target armor. Note that all slopes are assumed to be built with the airgap facing outwards, away from the center of the craft. Additionally, each sloped block has a "shallow" and a "steep" option, for shells hitting parallel or perpendicular to the slope. Shallow angles are nearer parallel with the surface of the block, and thus will have a more severe kinetic damage reduction and a greater ricochet chance. Damage Type: damage type to optimize. Kinetic. Prompts entry of target AC value(s). Note that more than one AC value can be entered; each will be run as a separate test. EMP, Munition defense, and HE speak for themselves, but note that it is not possible to convert between the damage types due to the complex damage application models used for each type. Frag. Prompts entry of Frag Cone Angle in °, as shown in the ingame APS controller. HEAT. Calculates HEAT damage for a shell. Note that the resulting configurations will be optimal for every pen metric and special factor, and even for HESH shells; however, the damage numbers will only match what is shown ingame for HEAT shells with a special factor of 1 and a penetration metric of 0.5. Shield Disruptor. Automatically replaces user-given Head List with the Disruptor Conduit Head, which is required for shield disruption. Measures EMP damage and shield reduction percentage (displayed in the printout as a decimal, where 1 = 100% shield strength reduction). Also enables Minimum Disruptor Strength field, which sets the cutoff strength below which the optimizer will reject shells. Smoke. Calculates smoke strength. Incendiary. Calculates fuel, assuming default settings. Test Type: whether to optimize for DPS per Volume or DPS per Cost. "Volume" and "Cost" are both marginal - they include the volume (or cost) only of components which scale linearly with number of loaders. That is to say, components like the APS firing piece, barrels, gauge increases, &c, are not counted, because their proprotion of the cost depends on the size of the gun and the Tetris skill of the builder. The components which are counted are the loader, input, recoil absorbers, coolers, and rail chargers. Test Interval: the duration in minutes for which the gun will fire. This does not affect the cost of the gun itself (loader, recoil, charger, cooler, recoil absorber, &c), but does affect ammo and fuel consumption and storage. Storage Type: the type of containers which will be used to store materials. The Cargo container is the most efficient, but is bulky; generic storage is more flexible but slightly less efficient; coal has higher health and armor but is the least efficient at storage. PPM: Power Per Material of the engine which will supply power for railguns. Shown ingame on the engine UI. Disabled unless Max Rail Draw > 0. PPV: Power Per Volume of the engine which will supply power for railguns. Shown ingame on the engine UI. Disabled unless Max Rail Draw > 0. PPC: Power Per Cost of the engine which will supply power for railguns. NOT SHOWN INGAME -- must be calculated manually by dividing power output by block cost. Disabled unless Max Rail Draw > 0. Fuel Checkbox: Check if the engine supplyning power for railguns is of a type which requires Fuel access (as shown on the default tab of the V menu). This includes Fuel engines and Custom jet engines. Disabled unless Max Rail Draw > 0. Verbose Output Checkbox: Check to show detailed volume and cost statistics (see end of Output section below). Useful mostly for debugging or for advanced users trying to do additional analysis using raw shell stats. Raw Number Output Checkbox: By default, all numbers are rounded to the number of decimal places shown ingame when output to .csv. Note that rounding takes place AFTER all calculations and does not affect test accuracy. Check this box to output unrounded values. Note that calculated values (DPS, volumes, DPS / volume, costs, DPS / cost, cost / volume) are always raw because they have no ingame equivalent. Comma Decimal Separator Checkbox: Check if your computer uses commas to indicate decimals (if "five and three tenths" appears as '5,3' instead of '5.3'). The output file is in .csv format, which by default uses commas to separate columns in the spreadsheet; however, this does not work if your system is already using commas to separate decimals. Checking this box will cause the optimizer to output using semicolon column delimiters instead. ---- OPTIMIZER OUTPUT ---- The optimizer output always begins with the test parameters entered by the user at runtime. Below that are the top shells for each loader length for which any shells were generated (depending on length and gauge restrictions). Each shell stat cluster starts with the shell length. Gauge (mm): shell diameter; caliber. Total length (mm): length of the entire shell. Used to determine loader size. Length without casings (mm): length of the part of the shell which will (hopefully) hit the target. Total modules: total APS modules used by the controller. GP casing: number of gunpowder casings, if any. Decimal casing counts can be set by adjusting the "Propellant" slider in the APS ammo controller. Not shown for tests with 0 max GP casings. RG casing: number of railgun casings, if any. Not shown for tests with 0 max RG casings. Solid body/Sabot body/HE body/&c: number of each type of body module. Head: the module at the head of the shell (at the bottom of the controller). Rail draw: rail draw, if any. DPS per cost/DPS per volume: the most important stats, shell damage per second divided by total cost (and volume) for the duration of the test interval. Velocity (m/s): muzzle velocity. Effective range (m): range at which velocity decreases dramatically. Barrel length for inacccuracy (m): minimum barrel length to achieve desired inaccuracy (default 0.3°). Note that, unlike the ingame UI, the optimizer includes bonuses from Base Bleeder and Visual Tracer in the calculation, so this number may not match what is shown in the APS Shell Editor. Barrel length for ful propellant burn (m): same value as shown ingame. Damage: Kinetic shells will show raw damage, AP, reduction due to impact angle, and effective damage after applying AC reduction. Munition defense shells show damage and explosion radius. Frag shells show frag count, damage per frag, and total damage. HE shells show raw damage (which should match ingame value), explosion radius, and an approximation of applied damage equal to raw damage multiplied by explosion volume (divided by 1000 to make the resulting figures more manageable). Note explosion radius is capped at 30m. Incendiary shells show fuel (which should match ingame value with default settings) Other chemical shells will show damage of their respective types. Disruptor shells will show EMP damage and shield reduction (decimal%). Shell reload time: Base reload time, as shown in ammo customizer. Cluster reload time: Effective reload time, as shown on loader. Uptime: Percent of the time during which the loader will be providing shells to the firing piece. DPS: Damage per Second. Volumes and Costs (only shown if "Verbose Output" is checked) The various volumes and costs shown are the hypothetical amounts of each type of block needed to support a single loader. The values -- cubic metres for volume, and materials for cost -- will almost always be decimals because they are hypothetical and are meant to scale with the gun: rounding errors aside, the shell with the highest DPS per volume with one loader will have the highest DPS per volume with 1 000 loaders; small guns, however, will not have the same actual DPS per volume or cost stats, because it is not possible to place 0.3338 cubic metres of gauge cooler. Loader volume: cubic metres taken up by loader, clips, inputs, and ejector. If the Emergency Ejection Defuze checkbox is checked, all non-beltfed loaders will get an ejector (2 volume, 10 cost). Cooler volume: volume of gauge coolers. Not shown for shells with no GP casings. Charger volume: volume of rail chargers. Not shown for shells with no rail draw. Engine volume: volume of engine needed to keep up with rail charge. Not shown for shells with no rail draw. Fuel access volume: volume of fuel tanks/beams needed to keep up with rail charge. Not shown for shells with no rail draw, or if the "Fuel" checkbox is not checked. Fuel storage volume: volume of material storage containers needed to hold the materials the engine will burn as fuel. Fuel access tanks/beams hold enough materials to run themselves for 10 minutes, so this number will be 0 if the testing interval is <= 10 minutes. Not shown if the shell has no rail draw. Recoil volume: volume of recoil absorbers. Will always be 0 if "Recoil absorbers" is unchecked. Ammo access volume: volume of ammo crates needed to keep up with ammo consumption. Ammo storage volume: volume of material storage containers needed to hold the materials the gun will use as ammo. Ammo access crates hold enough materials to run themselves for 10 minutes, so this number will be 0 if the testing interval is <= 10 minutes. The costs are the same as the volumes, with three exceptions: Fuel burned: the amount of materials consumed by the engine to power the rails. Will always be 0 for shells without rail draw. Ammo used: the amount of materials consumed by the gun as ammunition. Cost per volume: total cost divided by total volume.