True LOS - Realistic Battle Distances

This is where our experts try to teach you the very flexible modding system for our previous release - SOW Gettysburg and its add-ons. It's powerful, but dangerous. Post your tips and your questions.
User avatar
RebBugler
Reactions:
Posts: 4238
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

True LOS - Realistic Battle Distances

Post by RebBugler »

True LOS - Realistic Battle Distances
Version 1.1

Update 1.1, August 11, 2019, fixes some formation errors More Info

True LOS (Line of Sight) expands 4 to 1 scaled distances to real distances, in proportion to troop sprites and map objects.

All execution distances are affected:

Engagement - musket and artillery ranges, canister implementation distance
Auto Charge - minimum distance from enemy before charge triggers
Auto Retreat - minimum distance from approaching enemy before artillery automatically retreats*
Retreat - distance units retreat
Withdraw - distance units withdraw
Objective Activation Radius

Improved AI Response - AI has more time to react since enemy is further away when receiving AI LOS tactical response data.

In Modifications prioritize "True LOS" in the lowest position. Exceptions are mods with Unitglobal or Drills files. These files must be modified, run and walk speeds in Unitglobal, row and column distances (halved) with custom formations in Drills, to conform with "True LOS" data, and, their mods positioned below "True LOS".

The Bugles & Flags mod is compatible with "True LOS", its custom formations having been included and edited. Prioritize B&F above "True LOS".
ATTENTION...folks not using Bugles & Flags MUST rename or delete the 'gui' file located in the Logistics folder of "True LOS".

Unzip and copy to the Mods folder:
True LOS - Realistic Battle Distances.zip
(80.86 KiB) Downloaded 37 times
Performance Note
Since LOS distances are increased expect more demand on computer performance. To offset this demand and establish better FPS rates adjust 'Max Terrain Draw Distance' to a lower level in 'Options', page 2.

Determining True Distance

Realistic distances were made possible by adjusting the 'UnitPerYard' setting in the Map.ini files (51 map .ini files included, all I could find for now). The original number of '=30' was adjusted to '=62' by the following procedures:
1) the game was started and two infantry opposing units were set so that their engagement range was 100 yards
2) screenshot - center camera between both units wide enough to include the flags of both engaged units
3) open screenshot in Paint.net (or any graphics program that displays pixel measurements)
4) measure the height of an infantry sprite in one of the engaged units
5) measure the distance between engaged units' flags
6) divide height of infantry sprite in half (this establishes how many pixels per yard, figuring sprite height at 6 feet, or two yards), after dividing that number, now representing 1 yard, divide it into the distance between engaged units
7) the goal then (by tweaking the 'UnitPerYard' number) is to get that last divided number (now representing yards) as close to 100 as possible (I went with 90 considering the average height of men of that era was quite a bit under 6 feet - The average man during the American Civil War was around 5'6" or 5'7", according to Wiki)
These seven steps result in a fairly accurate map distance of 100 yards in proportion to the size of troop sprites and map objects; end result setting for the map.ini file: UnitPerYard=62.

Determining Marching (walk) Speed for True Distances

As noted by a recent post by MarkT, for centuries the accepted normal speed of marching infantry is three miles per hour. The following steps established this ‘walk’ speed:
1) edited a ‘move forward’ command on the B&F toolbar to 880 yards (1/2 mile)
2) opened the game and used this command to move 1/2 mile (Kansas map, no movement impediments)
3) based on the 3 miles per hour speed, it takes 10 minutes to walk 1/2 mile, the officer’s journey was timed as so, tweaking the walk speed until the 1/2 mile destination was reached in 10 minutes
4) walk speed was established at 3 using this process
5) all other walk and run speeds in the unitglobal file were based on this established walk speed

The Eureka Moment and Formation Adjustments

This mod evolved from another quest: Finding a path to real distance readouts, primarily, engagement distances, to enable SR1 (1:1 sprite ratio) play that displayed accurate (true) distances. Previous mods that lengthened engagement distances were a bust as far as I was concerned because they only addressed that one fix, all other distance data being ignored, thus inaccurate.

The Eureka Moment came as I discovered 'UnitPerYard=30', and changed it to 'UnitPerYard=90', with Immediate results - ranges were greatly increased, but way too far. Followed up by changing it to 'UnitPerYard=60' and tweaked it from there as discussed above.

However, formations were distorted due to the increased ranges. Fortunately they were fixed by simply reducing all row and column distances by half (multiplying by 0.5). I say simply, but still a long and tedious process since all the individually altered sprite locations within each formation had to be adjusted also. The main row and column adjustments were relatively fast by applying the 0.5 formula to the row and column width columns of the Drills file.

Maps

As mentioned earlier there are 51 modded map.ini files included with this mod. I tried to include every map available for this game. For new maps or maps I missed folks can mod them themselves and include them in this mod in the Maps folder. In these cases please notify through this thread and they’ll be included in a future update.
Note: In the Sandbox map selection window you’ll see two map names of each map when this mod is enabled. Select either map for play, I’ve found no issues by selecting either. Please report any anomalies otherwise.


*Auto Retreat - minimum distance from approaching enemy before artillery automatically retreats

This should address an artillery ‘vulnerability to capture’ issue, making artillery more difficult to capture. The original release of this game allowed artillery to go into retreat mode while limbering, this also made artillery difficult to capture. However, after realistic considerations and negative feedback thereof, an official patch changed this so artillery could be captured while limbering. While making the MP gamers happy, this change made enemy AI artillery easy fodder for capture with SP play, obviously weakening AI effectiveness. Now, with this mod enabled, the longer distances should provide for more escape time for the AI’s artillery, thus making the AI more competitive for SP play.

Conclusion

The short engagement distances have always bugged me. Having been in marching bands and being a marching band director for much of my life I knew that the engagement distance wasn’t even close to the length of a football field and a half plus 10 yds. (160 yards), it looked closer to a third of that. I realize that the game engine was scaled for SR4 play, but that scaling method consequently messed up historic realism placing troops too close during engagements causing an abundance of melees, bunching up of engaged units and the overlapping of line formations. This mod fixes many of these non-historic occurrences along with other distance associated issues, and above all, gives the game, and player, a more historic perspective of how 19th Century battles were actually fought.

Although initially an SR1 quest, I feel this mod could easily replace how folks play SOWGB. Regardless, it’ll at least demonstrate historic 19th Century warfare more accurately…Or, that’s at least its designed purpose.

Now I’ve gotta learn how to build or adapt maps for SR1 play so historic battlefields and battles can be depicted even more realistically, at least up to Division level considering performance limitations of this game engine. This mod appears to open the final door to such future pursuits…

And yes, of course, a Waterloo version of this mod will be in the works soon. :)
Last edited by RebBugler on Mon Aug 12, 2019 6:16 am, edited 1 time in total.
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: True LOS - Realistic Battlefield Distances

Post by Davinci »

Now I’ve gotta learn how to build or adapt maps for SR1 play so historic battlefields and battles can be depicted even more realistically, at least up to Division level considering performance limitations of this game engine.
Interesting "Reb"

My solution have always been to increase the musket ranges for all of the units to start firing at a greater range from each other.

I think that I messed around with those figures once and it caused all of My formations to bunch up, quickly abandoned that decision.

Question - Why would you have to alter the existing maps in order for this to work, wouldn't that require a major-undertaking on your part?

Either way, interesting idea!

davinci
The only true logic is that, there is no true logic!
User avatar
RebBugler
Reactions:
Posts: 4238
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

Re: True LOS - Realistic Battlefield Distances

Post by RebBugler »

Now I’ve gotta learn how to build or adapt maps for SR1 play so historic battlefields and battles can be depicted even more realistically, at least up to Division level considering performance limitations of this game engine.
Interesting "Reb"

My solution have always been to increase the musket ranges for all of the units to start firing at a greater range from each other.

I think that I messed around with those figures once and it caused all of My formations to bunch up, quickly abandoned that decision.

Question - Why would you have to alter the existing maps in order for this to work, wouldn't that require a major-undertaking on your part?

Either way, interesting idea!

davinci
Yeah, if you lower the number of 'UnitPerYard=30' not only will the formations bunch up but the engagement distance will be shorter...A mod I don't think anyone would be interested in. Fortunately I raised the number so saw its potential immediately. Then it was just a matter of tweaking and testing to get it right for historical engagement distances.

Concerning your "alter the existing maps" question, I'm following the most recent 'map making' thread and its making a lot of sense. Expect me to join in with my own questions. I think taking existing 2.5 maps and enlarging them for SR1 play will be a good start for learning how the 'map making' process works.

Thanks in advance for any help along the way!
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

Re: True LOS - Realistic Battlefield Distances

Post by Marching Thru Georgia »

Interesting idea but doesn't this also shrink the size of the map? A 5 mile map is now 2.5 miles in size since the number of pixels/yd. has doubled.
Wouldn't it be better to shrink the sprites instead? Currently they are 12 feet tall. So halving the size values in the gfx file would make them 6 feet tall. That would make the enemy look smaller at 100 yd.
I can make this march and I will make Georgia howl.
User avatar
RebBugler
Reactions:
Posts: 4238
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

Re: True LOS - Realistic Battlefield Distances

Post by RebBugler »

Interesting idea but doesn't this also shrink the size of the map? A 5 mile map is now 2.5 miles in size since the number of pixels/yd. has doubled.
Wouldn't it be better to shrink the sprites instead? Currently they are 12 feet tall. So halving the size values in the gfx file would make them 6 feet tall. That would make the enemy look smaller at 100 yd.
Hey Kevin, great to hear from you, it's been a long time since we've communicated...

Frankly, I didn't know what that function of the map.ini file did. I just tweaked it upwards and it provided for longer engagement distances, along with all other distance related functions. So far by my play testing it's worked perfectly for these purposes, the only drawback being a performance hit, which can be nullified by selecting a lower 'Max Distance' option.

I tried the smaller sprite scaling idea years ago with TC2M and ran into a lot of issues I couldn't figure out how to fix. Since I know more about how things work now maybe I could fix those issues but it would also still require the scaling down of all map objects. Since I am a map know-how ignoramus scaling down map objects is beyond my expertise. So presently I just do what I can do, or stumble on something successfully. This mod is of the "stumble on something successfully" variety.

Your suggestion would probably be the best alternative in the long run and would undoubtedly solve the performance hit, however, it would take a lot more work, and especially, expertise. In the meantime, this mod works as advertised, as uncomplicated as it is, and provides for 'historic distances' gameplay.

If you have the time give it a run and shoot back an honest opinion.

As always, thanks for the feedback :)
Last edited by RebBugler on Tue Jul 30, 2019 5:14 am, edited 1 time in total.
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

Re: True LOS - Realistic Battlefield Distances

Post by Marching Thru Georgia »

I suppose you could reduce the movement speeds by half to make the maps "seem" like they are still their original size.

As far as the map objects go, the buildings are already too small for the 12 foot giants. Smaller figures would actually help here, I think. The vegetation sizes could easily be reduced where needed, just like the sprites.
I can make this march and I will make Georgia howl.
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: True LOS - Realistic Battlefield Distances

Post by Davinci »

I tried the smaller sprite scaling idea years ago with TC2M and ran into a lot of issues I couldn't figure out how to fix. Since I know more about how things work now maybe I could fix those issues but it would also still require the scaling down of all map objects.
Yes, I think that every single Modder has tried the Smaller Sprite at one time or another over the past ten plus years.

The biggest problem that I remember was that even with the smaller sprites, the game would still read 40yds as if the sprites were the default value.

But, if "You" have actually changed the "LOS" and the units are no longer reading those default values the smaller sprites would work!

The Structures would probably be the easiest part of Converting the Map, the fences on the other hand would be a real pain, since there would be twice as many of them.
As far as the map objects go, the buildings are already too small for the 12 foot giants. Smaller figures would actually help here, I think. The vegetation sizes could easily be reduced where needed, just like the sprites.
The vegetation would also be a Major hit on the FPS - since it will change the "Density" too twice the default values.
The woods would also have to be doubled, but the impact might not be as great since the trees can have under-growth applied to them to sort of fill in the gaps.

This will probably keep "Reb" busy for quite a while!

davinci
Last edited by Davinci on Tue Jul 30, 2019 7:38 am, edited 1 time in total.
The only true logic is that, there is no true logic!
User avatar
RebBugler
Reactions:
Posts: 4238
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

Re: True LOS - Realistic Battlefield Distances

Post by RebBugler »

I suppose you could reduce the movement speeds by half to make the maps "seem" like they are still their original size.

As far as the map objects go, the buildings are already too small for the 12 foot giants. Smaller figures would actually help here, I think. The vegetation sizes could easily be reduced where needed, just like the sprites.
Thanks for the quick response :)

I did some more tests comparing the sprite heights with map objects (especially the heights of doorways in houses) and the distance between map objects, while turning this mod off and on...I see no differences. Your statement earlier that the map.ini change shrinks the map size by half just doesn't compute by my observations. If that's the case why aren't the sprites and map objects twice as large when this mod is enabled? The map.ini change only affects scripted distances, row and column distances in formations, engagement distances, etc., as far as I can tell.

You're rarely wrong when it comes to stuff like this but I'm still declaring this mod "as advertised". Still, I'll keep testing, maybe different map sizes are producing different results.

Regardless, Much Appreciated!
Last edited by RebBugler on Tue Jul 30, 2019 9:10 am, edited 1 time in total.
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
User avatar
RebBugler
Reactions:
Posts: 4238
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

Re: True LOS - Realistic Battlefield Distances

Post by RebBugler »

Davinci

Thanks for the feedback! :)

You're perfectly right, making the sprites smaller to address engagement distances and such is not a simple solution as it opens up a myriad of map changes that must be be addressed. Better just starting from scratch.
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: True LOS - Realistic Battlefield Distances

Post by Davinci »

OK, Simple Test - from a Saved Game!

Default 30 - Units can't see each other at the distance that they are from each other.

Changed 60 - Enemy Units appeared on Map and started engaging each other.

Changed 30 - Units can't see each other, again!

I didn't change any other values, ( 60 ) didn't mess up the formations, only caused them to spread out farther apart. Now a Regiment, Brigade takes up more space.

First Conclusion - Completely Confused, here!

It appears that a higher number brings the units closer together, Not farther apart!

Need A Lot More Testing, too fully understand this!

davinci
The only true logic is that, there is no true logic!
Post Reply