The tables are the reason why I have been working on this for 7 months. To be honest, I only worked on it like 7 days, and didn't want to touch it the other 7 months. But I eventually just pushed through and did it. Honestly, if I could go back and do it all over again, which I won't, I'd do it all different and save myself the trouble. The range, speed, enc and whatever tables weren't that bad. But the god damn damage locations murdered me. I used structs with a constructor to make all of them. Here is what one of them looks like:
damloc NeckSpine(
{ { 3, 4, 5, 2H, 2H, 2H, 2H}, { 5, 17, 6H, 8H, 8H, 8H, 8H}, { 54, 60, 3K, 3K, 3K, 3K, 3K}, { 1H, 5K, 6K, 6K, 6K, 6K},
{ 2H, 9K, 1T, 1T, 1T, 1T}, { 3H, 1T, 1T, 1T, 1T}, { 7H, 3T, 3T, 3T, 3T}, { 1K, 5T, 6T, 6T}, { 2K, 1X, 1X, 1X}, { 3K, 2X, 2X, 2X}},
{ 35, 36}, { 7, 7},
"Neck - Spine", ShockSpine, { 5, 6, 6, 5, 4, 4, 4, 3, 3, 3});
Oh yeah, literals too. Caues I couldn't type that crap out any more.
And I still have to add weapons, at least the most popular ones.
But yeah, I got character generation and the complete rules from firing a weapon to hitting a target, and their recovery roll/death, minus blind fire, but that's just basically burst fire anyway. I'd have to check, but I think I have a semi-complete stub for super long range shots when bullets take a decent amount of time to land.
I might do mechanized combat as well, but I think I just want to put this up on github in some form or another first, so everyone can laugh at my pathetic code. I can't help it. I didn't touch this in so long, and in the time between doing that, I forgot all about it, so I basically started doing macros cause I can't remember what half of the stuff does anyway or how it's supposed to work, unless I think about it too much. And believe me, the last stretch of adding 2/3rds of the damage locations was all 'Just don't think about it, it will soon be over'.
EDIT: A bit more in detail on how exactly I handle the damage locations and the tables. The tables aren't that bad, I basically have 2 arrays/vectors, one which holds the index, let's say range, and the other that holds the value. I have a function that basically retrieves the index of the range that is closest to the number inputted, IE (retrieves the index of range 500, if you put in 450) and then retrieves the value at the other array, using that index.
Damage location was the real bitch, it ended up being a matrix, and that's without counting the tables for the weapon DC and PEN before the bullet hits. So there was only final DC, EPEN, and damage value. Luckily, DC doesn't change and neither does the EPEN index, so all I had to do was plug in the numbers for the damage, and use the earlier described method on a 2D vector, which I initialize in the constructor. If I had to do the advanced damage tables, I would probably just shoot myself in the head twice and end the suffering. But you never know. I used to say 'If I had to code up the advanced rules for Phoenix Command, I'd just shoot myself in the head twice and end the suffering' yet here we are.
EDIT EDIT: I may do some final refactoring of the indexes, so that I can actually reference what the hell is going on with that effective accuracy modifier. Right now, I just plug in a variable that is just a value, so there's no real way to know what exactly the modifier IS, other than it's value. I'll just std::map that, and allow it to be pulled up as a string.