I am from a programming background and trying to write a game for fun.
I am trying to write a battle calculator and which ever way I think about it I seem to run into trouble.
Basically the scenario is this:
Both the attacking force and the defending force have, lets say soldiers. Each side can have, but not always, lets say mercenaries to help. Each side holds an arsenal of 10 possible weapons, each of which give a different hit force. Each side also has a small random force to bring in an element of luck.
After the battle I need to work out how many of the total kills were made by both player and mercenaries (if they join in) on both sides.
My simple approach to this so far is to work out the best possible weapons each side can have. That might be 50% weapon 7, 20% weapon 6 and the rest weapon 5 for example. I then calculate the total hit force this give and divide by the total number of soldier to give an average. I add any other hit mods the player qualifies for and use that to work out the kill amount. So if the total hit force is 3.6 I divide 3.6 by 100 then use number of soldiers * my hit force to give number of kills. I am sure this isn't the best way to do it though.
I am not expecting anyone to do this for me however handy that might be. On the face of it it seems a relatively simple calculation and maybe it is for someone who totally understands maths. I am at a loss to know what kind of maths I should be looking at. Can anyone make a suggestion as to how to approach this?
If anyone know of a website I can go to pay for this to be done for me I would be interested.