Mark50 wrote:I`m trying to understand how certain values were implemented in the original game so as to know how to implement new units optimally.

To be honest there doesn`t seem to be a great strategy involved, but I thought to ask and see if I`m missing something.
Welcome to the club! I know a few things, but I haven't found the system behind the values, just some general guidelines.
1. Is the unit price tied to anything? There are some odd values in the original game. For example why does the Panzer IIIL cost 411 and not 410? Why is the Marder IIA 262 and not 260? Are these numbers completely subjective (and strange!) or was there some logic that has to do with experience, replacements or something else?
I haven't found anything substantial. One of the problems is that the currency unit (prestige) is not really representative of anything. It can reflect things like combat ability, rarity, manufacturing cost, or a combination. I took a good look at units which have only very small stat differences, but this has lead to more questions than answers. Examples:
PzIIIE -> PzIIIF (+1 HA for 13pr)
PzIIIG -> PzIIIH (+2GD, +2AD for 27pr)
PzIIIH -> PzIIIJ (-5fuel, +1GD, +1AD for 12pr)
PzIVE -> PzIVF (-5fuel, +1GD, +1AD for 30pr)
I think that you can't simply apply a certain amount of prestige for a specific stat value. Most wargaming unit design uses costs that are dependant on relative ability and scaling.
For example, assuming the rest of their stats are equal, a slow well-armoured vehicle will be about as expensive as a faster, lightly armoured unit. But make the same vehicle well-armoured
and fast and the total cost might triple or quadruple. And due to the way combat results are calculated, adding 1 GD to a very lightly armoured vehicle will be more worthwile than to a unit that already has 40 GD. Adding 10 fuel to a long-range recon unit with 200 fuel should be less expensive than adding it to a Tiger tank with only 31. Speaking of fuel...
2. Should the value for max fuel be tied to the max. movement value so that it can be divided perfectly? It doesn`t appear to be so in vanilla. For example the Panzer Ia has 36 fuel and 5 movement. What does this mean? That it will move 5 times, be left with 0.1 fuel and have to resupply?
Yes (I assume you mean 1 fuel point left in your example). Only with units that have very low fuel numbers will this effect be very noticable; often you will end up with odd numbers anyway, because you might move less than a full move in a turn (due to combat or movement restrictions). Personally, I see no need or reason for a perfect number, I just look at the real-world range of the unit and adjust for reliability.
BTW, I don't know if you already know this, but to be sure: the fuel consumption for air units works differently. The airplanes also lose a unit of fuel for each move point used, but they have a minimum fuel consumption for every turn that they are not next to an airfield. This fuel consumption is equal to half their movement, so a plane that has move=12 loses 6 fuel minimum every turn, even if you move it less than 6 hexes or don't move it at all. So if you move a move=12 aircraft 10 hexes further it uses 10 fuel, but move it 6 hexes or less and it will use 6 fuel.
And more food for thought: normally all units lose a unit of fuel for each point of movement they use. So if you move a tank into a mountain, which costs all of its move, it will move only a single hex but loses its total movement points in fuel. This actually makes slow tanks more fuel efficient in poor terrain!

So I'm trying to tackle that problem as well.
3. Also, what is the logic behind the max ammo value? The Ba-64 has 31 max ammo (according to wikipedia it had a machine gun with 1260 rounds); the Panzer Ia has a max ammo value of 6 (wikipedia notes two machine guns with 2,250 rounds); the Matilda I has max ammo 8 (wikipedia notes a machine gun with 4,000 rounds). Do these in-game numbers correlate with something? More importantly, how do you get from the 31 ammo of the Ba-64 to the 6 of the Panzer Ia? Is it just because the first one is a recon and the second one a tank?
Ammo seems to have no logic with some units. With PzC tanks, it seems to be roughly equal to the number of cannon shells carried divided by 10. This is already strange: Some tanks guns could be fired very rapidly, depending on the loader, if we look at the max quoted numbers these 10 shells could theoretically be fired in less than a minute with some tanks, but some types were very slow. But if a bigger gun fires less shells, what will the equivalent firepower be? So this 10-round rule doesn't work well. And the timescale is weird as well, sustained combat would in reality have almost all tanks depleted after a few hours, so already ammo seems very generous because it will often last many turns.
So I just tried to come up with a logical approach for other types based on viewing everything in a more abstract way. It's not 'correct' but it gives some rough numbers for comparison. If I just assume that a tank cannon can fire 10 rounds in a certain time frame (equal to a round of combat in PzC), what will the ammuntion expenditure be of another weapon system in the same time? To give a baseline, a benchmark PzC figure of 10rpm for a medium tank gun looks about right, so this will be the basis of comparison for a single round of combat. We can adjust all figures from here.
For automatic weapons (MG's, automatic cannon), I use 'sustained rate of fire', which basically means firing in short burst so the gun won't overheat and pausing to reload. For a modern belt-fed, air-cooled, medium caliber machinegun, this is about 100 rpm, water-cooled can be much higher. The heavier .50 cal Browning M2 is commonly quoted as 'less than 40 rpm'. Light semi-automatic cannon should be in between this and the 10rpm baseline.
Within the scale of the game, this doesn't matter much but some units are odd and need tweaking. OK, time to try and get some numbers: Lets take the BA-64 and the Panzer I.
BA-64: a single 7,62x54r DT model 1929 machinegun, cyclic rate of fire 550-600rpm, air-cooled, fed by 60-rnd 'pan' (horizontal drum) magazines (some sources claim 63 rounds per drum). Very average, it will be a bit slow to reload because the gunner will have to get the drums out of the ammo racks and reload often. Wikipedia agrees and and puts a nice round figure of 'up to 100rpm' for sustained fire. 1260 rounds total (20 or 21 drums), Russian version of the page claims this was reduced to 1071 rounds when a radio was carried in the vehicle (about half of BA-64 production was equipped with one).
So, as 'up to 100rpm' leaves room for tweaking, I'm going to try and divide by 100 (the quoted number) and by slightly less, say 80 (80rpm). So ammo consumption will be slightly more than 10 times the 'regular' PzC benchmark: which means the large ammo load would be used up in 13 combats, maybe a little more (say 15). The radio version would last 11-13 combats. All these numbers are usable, lets take the average of 12 as our guideline. So the BA-64 unit can be given 12 ammo. If I don't like this number I could try to 'up' the rate of fire to 200rpm, as long as I'm consistent. This would give an average of 6 ammo. Not bad either.
Panzer I: two 7,92mm MG-13, cyclic rate 600rpm, air-cooled, fed by 25-rnd magazines. Lots of changing, but having two separate guns means one can fire while the other cools. Roughly comparable in firepower to the single MG on the BA-64, maybe a little better over time due to having two barrels reducing wear. Wiki says 2250 rounds total, some sources quote 1525. So this is a bit of a guess. If I use 100rpm, I get 15-23 ammo, if I use 200 it would be 8-11 ammo.
Based on this I would probably use the 200rpm numbers, and adjust the number within the calculated ranges to model things like reliability and tactics, and then apply them to other similar vehicles as well, like the Matilda I, L3/35 and TKS. Vehicles like the Panzer II can be difficult, because it has an automatic cannon with 180 rounds total (10 rnd magazines). I could try to use the 'in-between' value of 20rpm, this would give 9 ammo. This would than be used for the recon cars with similar armament as well.
All these numbers can only be used to give stats that are usable relative to each other, but can be adjusted quickly. With the flexible scale of the game, I think this is more important than trying to get historically accurate figures for each unit. I only use this system for units that carry their ammo on board, for towed units it is much more difficult. Airplanes are tricky as well, but I use very low numbers for those anyway.