Since this thing got necrobumped I figured I would chime in on it with some insights I had regarding a roleplaying game system ive been working on (pen+paper) and also a general overview design for a what-if computerized version (and tactical, which means it could host something like xcom).
This isnt code but it could be implemented as such.
For a multi-projectile attack, including Bursts the way my rpg system handles it is assuming that the full attack represents 1 Hurtful Maneuver against the target. Its not getting hit a bunch of times, its one big hit that hurts alot. This way players dont have to resolve rolling damage against something 3, 5, or 8+ times depending on how central this dynamic (tricked out) it is to their character.
To give an example of how it works in my rpg system currently, it uses a logarithmic system to keep multipliers easily applied as simple bumps to a single die roll:
There is only one damage roll, its either 1d20+Damage Modifier or 1d6x3 + Damage Modifier.
For Burst attacks (but not shotguns, unless they're firing more than once) you make 2 Attack Rolls. The first one gets a bonus toHit for volume of fire. If you hit then that means you hit at least once. The second attack roll confirms extra shots hitting the target, to score extra hits you've got to score extra degrees of success on that one (if the gun has heavy recoil, you get a penalty for this roll, if it has light recoil or no recoil like a gatling laser you get a bonus, but the default assumption is "some recoil" thus no modifier to hassle the players with). Any shots which miss count as "missed shots" which can potentially hit bystanders near the line of fire, as determined by the evil dungeon master.
Shotguns cause about +14 damage modifier, but they also get +4 Dots of Antipersonnel modifier. Every range increment beyond the first reduces the damage by 4 but it also reduces the antipersonnel modifier by 1 dot. For shotguns, twelve gauge in any case, the power/range reduction occurs up to 3 times (up to -12damage and -3Dots antipersonnel)
Bursts add +3 damage for every shot that hits including the first one (so get shot twice and its +6 damage, but get shot three times and its +9 damage). It also adds +1Dot Antipersonnel if you score multiple hits... but only one. Every 5 Shots that hits gets consolidated into a separate damage roll if it goes that high.
(and Miniguns already have their stats set to assume for their base damage that 5 shots were inflicted, unless its suppressive fire, which only hits for a single bullet.)
Antipersonnel doubles all armor values but only up to +5 armor points per dot. So 4 Dots of antipersonnel doubles armor up to 20 Armor points. However only a single dot would provide only +5 Armor unless their armor was lower than that.
However the behavior of an autofiring Shotgun compounds with Bursts such that getting hit with a 12 gauge combat shotgun twice is going to cause 20 damage modifier and 5 Dots antipersonnel (notice that armor is only doubled, but will yield up to +25 armor if you've got that much)
This is in contrast to Dots of Armor Piercing which pretty much just bypass 3 Armor for every dot it has (armor works like damage reduction), which is like free damage but only if the target had the armor to start with. Which can make armor piercing attacks rather weak against tough characters unless they have alot of natural armor chitin plates (since AP dots work against natural armor too).
Because of how antipersonnel works, given this is a simple boardgame, the difference is if you have okay armor but not alot of it - having a high volume of hits will still slaughter you even if your armor could stop probably 50% of the damage of a single one.
Getting hit with a volley of arrows can still hurt you pretty good even if your chainmail would normally get rid of at least half of the damage. Likewise getting shot by an unreal tournament Flak Cannon is going to splatter you even if you've got combat armor that could generally stop most of the damage its flak chunks cause.
The reason I made that judgement call, aside for simplicity to keep multiplication out of the game, is because multiple hits means its more likely its going to find weaknesses in the armor or the sum of those projectiles will dig into it and make it easier to penetrate in that one area of the armor. Blunt Force Trauma is a thing too... Tactical armor will NOT stop a shotgun blast at point blank range from crushing your ribs, its still causing damage even though the projectiles dont get through.
The only instance where this doesnt follow reality is when you're working with Forcefields which do not have weak spots, or if the reason the projectiles are causing damage has nothing to do with blunt force trauma (still even something that only splashes you like acid is going to find alot of spots to seep into the cracks of the armor, so it still makes sense for acid and chems).
And AP/Antipersonnel dots cancel each other out. So if you combine armor piercing things like flechettes or beam weapons with multi-hit damage its just going to obliterate someone, its alot of free damage.
Whats more, energy attacks like Lightning or Magic Projectiles do not bestow antipersonnel dots when they score extra hits. The force combines to increase both damage and penetrative capability, more literally is better, which provides a tactical layer to the rpg to "not get hit with alot of crap at the same time"
(given that its a logarithmic damage system it means characters have a Toughness value to overcome - a soak value, and any damage that they get above that causes them wounds. But the amount it exceeds toughness starts really amplifying the number of wounds because it represents "how bad you got hit" - so this does not dilute the power of the attack in any way just because it only got a damage bonus. It literally has almost the same effect as if multiple damage rolls had taken place, and in fact its even more potent than that because targets with a really high Toughness value, such as the Baron Of Hell from doom as an example... can be hurt by getting hit a bunch of times even if the attack normally had no capability to overcome their toughness)
Under the exponential system to be used for a computerized version...
Shotguns/multi projectile spigot would have damage listed for a single projectile. When the attack is called it counts how many times the target got hit. This multiplies the Damage caused by the projectile by a certain amount (a formula) before damage is rolled, based on how many hit.
For example if the exponential system is based on a Cube Root model then that means to multiply the damage of a shot by 2 you must multiply its firepower by 8. GURPS and Fallout use a Square Root model but Xcom uses a Cube Root model so thats why I use this example.
So you would take the total number of hits that struck the character, take the Cube Root of that number, and multiply the Damage (and Armor!) by that amount.
Some guy gets hit with 6 Pellets that do 20 damage... thats 1.82x or 36 Damage they're getting rolled at them. If they had 5 Armor it is raised to 9 against that.
(Though... ive found that by fine tuning... there should be a bonus incentive for multiple projectiles due to how much more it hurts, but thats besides the point for this exercise.)
I think you get the idea here.
Only the location that was hit by the Ideal Trajectory of the shot cone is considered for the locational armor (ie, the shooter makes the shot, the trajectory is remembered, shotgun pellets are randomly fired with the equivalent of choke/spread deviation from that trajectory - hits may ensue even if the shooter technically missed with the ideal trajectory). If the ideal trajectory missed, then it just sticks to whichever one hit first.
Displaying multiple projectiles, among other things...
The key to avoiding trying to Extend a commonly used current algorithm is to not use it at all, and instead divert to creating an Overlay graphic of some kind that follows the intended scripted rules.
For a Shotgun thats damn easy, and it could be extended to burst attacks too (if an option was included for an item to make it behave that way).
Just spray a bunch of Projectile graphic from the weapon in a random trajectory that corresponds to the weapon. They dont have to hit the exact place where the actual attacks went. You can do hit collision for each path if you want (pretty much replicating a Sight check) just to make sure nothing looks funky like projectiles moving through walls.
Emit a spray of these not all at once but over a course of time depending on the kind of attack. For a shotgun blast it emits as many projectiles over the course of 0.2 Seconds and a burst would time the projectiles over the course of 1.2 Seconds (it would also force the character to play the weapon-extended-in-firing-position graphic for at least that long). These could be global variables?
So what you'd see for a shotgun is a volley of projectiles released with only a single sound effect and impact sound played, they'd all come out really quick but they wouldnt be in one solid horizontal line either. Thats important and the reason they'd be timed, even though in real life it would be a swarm. If there were 5 shotgunpellets then they'd emit at a rate of one every 0.04 seconds for example.
And with Bursts this also opens the door for giving the weapon/item a special Burst Sound Effect for firing a burst of attacks. To correspond to a minigun chewing away at the scenery over the course of 1.2 Seconds as a dazzling hail of projectiles gets emitted.
In either case you would have shot-following turned OFF for these options so it would only display this action relevant to wherever the camera was (the current shot following of the shotgun attacks is so jumpy its potentially spasm inducing anyway). Thats where the player would notice a discrepency between the projectiles being emitted and the fact all the projectile hits were tallied instantly when the attack was made.
But oh well, this is a graphical presentation overlay.
Making Big Units better... and more bigger...
HWPs, 2X2, 3X3 and other large units for example are a pain to design because they are built around a dirty hack of relying on them being composed of 1x1 tiles, this was always the case even back in vanilla (its 1994, you're making xcom, you have a limited amount of time to figure this out in programming terms, and a limited amount of processing resources. Oh wait, we'll just treat it like its in 4 different tiles).
However thinking outside the box, while they take up a certain amount of real estate, they are NOT 1x1 size objects at all and should not be handled as such or an extension of them.
Instead of drawing them using that routine, just figure out where their "Center" is and OVERLAY a graphic, indexed to the proper rotation (and uhh... shaded properly based on darkness).
The object itself is invisible, it does not have a tile graphic. This is something else being applied to it.
That what-if game design of mine wouldnt even consider large objects to be bound to Tile Sizes, it would have a collision box attached to it based on tile-decimal dimensions (how about a Delivery Truck thats 3x6 Tiles in size?) and then as it moved it would take up Tiles based on its current position on its movement path.
Much like Font Rendering does to check whether a pixel should be shaded based on how much of the vector wireframe is present in enough quantity within a given pixel. The actual "Tiles" which are "Affected by the position" of this thing are interpolated.
Though mine would have some extra rules for clipping objects, whenever one of those interpolated movements involved an occupied tile it would even be able to throw a "Collision? but not blocked" event, making a car-sideswipe crunch and generating sparks (and possibly a damage roll of some kind to both objects) but not stopping movement.
I would even keep the motion realistic based on how many rotations the object had, if it only had 16 or 24 or 32 rotations - it could only move in those direction arcs but whenever it intercepted a compatible arc to reach the target location - it would rotate 1 increment over to match that and move.
This prevents unwanted zig-zagging motion and ALSO prevent using "the nearest equivalent rotation" which could make the motion look kinda not-straight. Having a car moving and make a slight turn midway to reach a given location looks realistic enough, it looks like the driver made a little course correction inbetween.
In terms of Xcom you can even do other creative things with this like give it multiple frames for varying levels of damage (in place of walking animations, if it does not have those). And additional rotations such as 16, 24, or 32 directions, but these are just examples of adventurous extensions.
It would be nice to have a tank that looks like its on its last legs (25% or less Health remaining) after it got shot with a plasma weapon, holes in the armor, pieces dangling off.
This is a big post but I didnt want to double post.