|
Post by Herr Kodax on Dec 22, 2014 19:45:10 GMT 1
Edit: Old info, scroll down to huge text for full data on speed and passability.
HOLY SHIT, I THINK I GOT IT!
Early tests are extremely promising, and I believe I can calculate the loss of speed of a vehicle over terrain.
As far as I can tell, the terrain passability parameter determines the loss of speed of a unit when it moves through said terrain, while the unit's passability parameter determines the actual loss of speed.
Example to make things easier (also, the way I'm running my tests).
You have a Sherman driving on asphalt. It's speed is set at 10 and it's passability at - say - 0.4. Asphalt's passabilty is usually set at 1, so no loss of speed. Sherman happily drives at full speed (10).
Now, the Shermnan has to cross a field (let's say the 'garden' tileset). Garden's passability is set to 0.7.
That means: Sherman's speed = Speed x Tp (Terrain passability) = 10 x 0.7 = 7
Meaning we have a 30% (3) speed reduction. Which is where the Unit passability kicks in.
Sherman has 0.4 passability, so instead of losing 3 speed, it'll lose 60% of the would be speed loss = 0.6 x 3 =1.8
So, it'll be driving at 8.2 speed over a terrain with 0.4 passability.
Crap, it all seems so very messed up. But I just worked it out, and - until now - it's working (tested with tracked vehicles, dunno if wheel/halftrack/humans get any bonuses/penalties).
I'll try to work out a formula of some sort, try to make it simpler. Give a shout if you try it.
Edit: Seems to apply for wheels/halftracks as well, but infantry...damn. Seems to be a different story.
|
|
|
Post by Major Pain on Dec 22, 2014 21:12:13 GMT 1
Well it sounds promising... and it appears you have finally come up with a way to make sense of all of this.
My own testing did not evolve to this level, so my hat is off to you sir.
You have basically developed a formula.
Expanding:
SpeedLoss = VehicleSpeed - [terrain passibility (1.00 - 0.70 = .30) times the vehicle passiblity (1.00 - 0.40 = .60)]
Note: 1.00 would be 100%. We are talking about percentages here when you look at it closely. So when you think about this, a terrain passibility is set to a percentage of the speed. So the garden allows 70% of the vehicle speed, or a 30% reduction, which is multiplied by the vehicle passibility, again 40% of 100% speed for a offset of 60%.
Vehicle speed is 10. The SpeedLoss is as follows...
Speed = 10 - (0.30 x 0.60)
Speed = 10 - 1.80 <-------- Speedloss is 1.80, which is subtracted from Vehicle Speed 10.
Speed = 8.2
Infantry is unaffected by terrain passibility... seems like BS to me... when you think about it.
|
|
|
Post by Herr Kodax on Dec 22, 2014 21:32:49 GMT 1
Thanks MP. I was indeed working on it as percentages, while also taking down notes (helps visually). I managed to dumb it down to this formula: Fs = Tp x Us + [Us - (Us x Tp)] x Up Fs: Final speed Tp: Terrain passability Us: Unit speed Up: Unit passability Which at long last makes sense (if you set either Up or Tp at 1, you just get the unit's speed, as it indeed happens ingame). Every test so far also confirms said formula it with exception of infantrymen, but you say Tp does not affect them, which seems to be true with my preliminary tests. BS indeed. Also sad. I really suggest you (actually, anyone who cares) run a few tests, see it work in game. Set your parameters, create a test field and fire away. Also beacause I need others to confirm this formula works, and give me a pat in the back...
|
|
|
Post by Major Pain on Dec 22, 2014 21:58:02 GMT 1
Did i give you my Distance and Range Calculator? It helps you make sense of the way BK uses sight and range versus drive speeds.
|
|
|
Post by Herr Kodax on Dec 22, 2014 22:41:41 GMT 1
I believe you did (a spreadsheet, not the actual calculator if it's what I think it is) after asking you in the not-so-distant past, but the HD ia had it stored decided to take a huge shit on me and died (surprise!), taking much stuff with it, your stuff too. I've been to embarassed to ask you for it again ever since. :/
Speaking of sight, I think I may take another look at the sight/sightpower/camouflage parameters. With the passability BS almost outta the way (need to test infanty, too tired now), I may be able to solve that riddle too.
|
|
|
Post by iLeeT_PeeP on Dec 22, 2014 23:35:40 GMT 1
All you have to do is ask... Herr Kodax friend. There are plenty of Veteran's around with alot of experience surrounding BK and the way its engine works, who I am sure would try their best to answer any questions you may have. Dont bust yer brain over this Herr Kodax... Unless yer into that sort of thing. Good games! -iLeeT_PeeP
|
|
|
Post by Major Pain on Dec 23, 2014 0:13:12 GMT 1
Check your email in a bit and you'll find the Distance/Range Calculatr. It does not Calculate Actually, it is a Chart that provides the distance and range based on BK. 30 Sight distance is only 45 meters. We know we can see further than that. At the same time, 30 is used for virtually every weapon range... except the big artillery. So again we know a rifle has a range of at least 92 meters or 100 yards,
The longest sniper kill shot was 2,475 meters in 2009. That is about 1.5 mile. But on a BK Map... the map size would have to be at least a 52 x 52, making it impossible in our game.
A 32 x 32 map is about 5,036 meters squared. So just under a square mile of ground.
Basically the Range and Sight Data let's you work within the BK map so you can at least extrapolate the data based a the scale.
By setting up a start and stop location on the grid, you can calculate speeds. To check your terrain data, use your gird overlay to set the start and stop locations, then time the vehicle in run mode. Since you know the scale distance, you can calculate the vehicle speed by using distance / time.
I tested various vehicles and types on a asphalt pavement to see if I could work out the Scaled Speeds using a formula. i could not find any constants that worked. You analysis clearly shows there are two constants that affect speed... I knew there was purpose, but didn't work from that angle. Now that you have solved that, perhaps the other can be solved.
I am truly impressed with your findings... the time you spent on this will benefit all of us... and the time I did not spend on this let me build models.
I think you might be the BK Scale Math Wizard.
MP
|
|
|
Post by Herr Kodax on Dec 23, 2014 11:11:57 GMT 1
I may be a lil' bit ahead of you Major (not). Speed might prove a bit tricky to calculate (from older tests, I believe 1 unit of BK speed equals tp 1.3-1.4 kph), not to mention we have no acceleration whatsoever for vehicles (unless there is a way to implement?). I'll be sticking to sight/camp/sightpower for now (again). Also, that is exactly your stuff I had lost, thanks for sharing (again)! Update: Infantry is also affected by Tp/Up, but at a seemingly different scale (because they are sprites?). That's all I needed, another setback. Great....
|
|
|
Post by Herr Kodax on Dec 24, 2014 9:42:35 GMT 1
Could you please point me to it Nephilim?
|
|
|
Post by Herr Kodax on Dec 24, 2014 23:34:16 GMT 1
Man, many thanks Nephilim! That's quite a read there! Tons of useful stuff, and it gives me the impression that my findings might be far more beneficial in the long run than I had originally imagined. Thanks again.
Speaking of findings, I am 95% sure I'll have the answers about infantry passability/terrain speed(s) on our table in the next 24 hours.
|
|
|
Post by Herr Kodax on Dec 25, 2014 17:06:15 GMT 1
Okay, I promised answers, and answers I'll give. And great way to give answers, is to accompany them with visual aid, so here we go: Some explaining. The green numbers are used to highlight Tp or Terrain passability. It is a parameter located in the Terrain\sets\1-2-3-4 .xml file, and determines how rough or smooth is said terrain (1-2-3-4 are the different seasons' folders, and every season has different terrains). The red numbers highlight Up or Unit passability. This parameter if found in every unit xml. file, and determines said unit's ability to handle rough terrain (doubt if it has any effect on aviation). The yellow numbers are speed percentages. We'll talk more about it below. S will be standing for Speed. Determines a unit's speed (in BK scale). Sc, or Speed change is calculated using Tp and Up and used to determine Vs and Is. It's calculated like this: Sc = Tp + (1- Tp) * UpNow, where to start... Speed in Blitzkrieg is calculated by taking into account 3 parameters. The unit's speed, Tp and Up. Unfortunately, it is calculated differently for vehicles and infantry (which is why you see two different data tables), but I'll cover both infantry and vehicle speed calculation. Starting with vehicles. Vs is what we'll be calling a vehicle's total speed over rough terrain. Vs = S * ScVs = S * [ Tp + (1- Tp) * Up] Easy stuff, for example, a vehicle with S=35, Up=0.42 moves over a field with Tp=0.76. It's total speed while cruising over said field will be: Vs = 35 * [ 0.76 + (1 - 0.76) * 0.42] = 35 * (0.76 + 0.24 * 0.42) = 35 * (0.76 + 0.1008) = 35 * 0.8608 = 30.128 Infantry speed, or Is is calculated differenly. the rule of thumb is this: ( Vs / 10)² or Vs²/100 (note the color: PERCENTAGE) Take a look at the tables above. Say you have a tank with Up=0.4 moving through a field with Tp=0.6. It'll be moving at 76% of its total speed. Apply same values to an infantryman, and he'll be moving at 57.76% of his speed over the same field. I'd post a formula to calculate Is, but Goddamn, it seems to be...not right. I'll get back to it.And the formula to calculate Is is: Is = S * Sc² Is = S * [ Tp + (1- Tp) * Up]² Example: Infantry man with S=5 and Up=0.75 moves through a snowed field with Tp=0.34. We have: Is = 5 * [ 0.34 + (1- 0.34) * 0.75]² = 5 * (0.34 + 0.66 * 0.75)² = 5 * (0.34 + 0.495)² = 5 * 0.835² = 5 * 0.697225 = 3.486125 Notes: Tp can't go below 0, or the terrain will be unpassable. Up on the other hand can. Setting either Tp or Up at 1, will result in no speed change whatsoever. Finally, the BS with the speed and passability is over. Now I can rest knowing I can calculate these parameters accurately to my needs. Hope this info will prove useful to others too.
|
|
|
Post by Herr Kodax on Dec 26, 2014 12:23:33 GMT 1
Bumping, because lots of edits were made (sorry).
|
|
atlas555
General
I know not what course others may take. As for me, give me liberty or give me death.
Posts: 1,069
|
Post by atlas555 on Dec 26, 2014 15:28:35 GMT 1
Very impressive Herr Kodax. One doesn't normally do this for fun, so I am curious where all this will lead. You have my attention.
Best of luck!
|
|
|
Post by Herr Kodax on Dec 26, 2014 16:04:17 GMT 1
Many thanks atlas. I did this because I wanted to undestand how stuff is calculated in Blitzkrieg, and put than knowledge to use creating my mod (needless to say, with this new data I have to do a complete overhaul on everything I have altered so far - again). Also, sharing such info, can help others too, and hey! - maybe encourage someone to create his mod too.
Now, with this subject outta the way (finally), I'm working on the sight, sightpower and camouflage parameters, see if I can figure out how the work with one another.
Then you have the accuracy of various weapons, which is affected by dispersion, Coverbonus, Dispersionbonus and Lyingsoldiercover. but more on that some other time.
|
|
atlas555
General
I know not what course others may take. As for me, give me liberty or give me death.
Posts: 1,069
|
Post by atlas555 on Dec 26, 2014 17:44:45 GMT 1
Rock on!
|
|