Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4449276 - 11/18/18 08:24 AM Tracer.mpf  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
The 160 source code has routines relating to tracers that involve a modulus function which calculates the remainder when a division is done.
For example 30 mod 7 = 2 because 30/7 = 4 with a remainder of 2.
The equivalent of the modulus number (7) is hard coded in the exe.
There are also some division routines that involve two hard coded denominators.
I have just compiled an exe that reads a "Tracer.mpf" file if present. The file has three values which are the modulus number and the two denominators.
If the file is present then it is read and the values in it are used in the routines.
If it is not present then the default values are used.
By using this file I can easily see the effects of changing these values on tracer display, without having to recompile the exe smile


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
Inline advert (2nd and 3rd post)

#4449286 - 11/18/18 11:37 AM Re: Tracer.mpf [Re: MrJelly]  
Joined: Nov 2001
Posts: 24,029
oldgrognard Offline
Administrator
oldgrognard  Offline
Administrator
Lifer

Joined: Nov 2001
Posts: 24,029
USA
Way beyond my knowledge. I have neither the time, interest, or background to do modding. But I respectfully gaze at what you who have the skill do.


Good people sleep peaceably in their beds at night only because rough men stand ready to do violence on their behalf.

Someday your life will flash in front of your eyes. Make sure it is worth watching.
#4449289 - 11/18/18 12:21 PM Re: Tracer.mpf [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
There were a lot of data values which were hard coded in the "eaw.exe". Many were in tables, including formation data, TMod data, and tilenames.
The only way to modify even just one of these values was to modify the "eaw.exe".
However, if the exe can be programmed to read data from external files, such as "TMod.dat" and "Frmation.dat" then these files can be edited without having to modify the "eaw.exe".
UAW160 uses quite a large number of editable external data files, and this is one of its great strengths.
"Tracer.mpf" is just another editable external file, and it is basically a text file with three numbers in it which are easily edited in "Notepad".
Files like this are great for investigating how things really work

wink Jel


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4449304 - 11/18/18 03:25 PM Re: Tracer.mpf [Re: MrJelly]  
Joined: Apr 2018
Posts: 516
RIBob Offline
Member
RIBob  Offline
Member

Joined: Apr 2018
Posts: 516
This is interesting, and any new Modder tools are always welcomed, as such enhance the ability of the Modder to create/modify things.

As a User, I naturally look at such things from my own perspective, although I'm not unmindful of the perspectives of others.

Does this new tool add any User control over the tracers in their game? Or is it something that you use in the course of your work?

#4449305 - 11/18/18 03:59 PM Re: Tracer.mpf [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
It is not a tool smile
To try to simplify the concept suppose there is a line in the program that reads "Y = X/7"
The line is modified to read "Y = X/Z"
Elsewhere in the program the value of Z is set as 7, and immediately after that the exe is programmed to look for an external file (like "Tracer.mpf") containing the value of Z.
If the file exists the value of Z in the file is read and used.
If the file does not exist the default value of 7 is used.

This way we can easily change the value of Z in the external file to see what effect it has on the game.
Currently I am experimenting with the three values read from "Tracer.mpf" to see how they effect the number of tracers that you see, and the lengths of the coloured lines that you see, particularly from machine guns.
Different code may apply to the display of cannon fire, depending on some of the "eaw.ini" settings.


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4449334 - 11/18/18 07:36 PM Re: Tracer.mpf [Re: MrJelly]  
Joined: Apr 2018
Posts: 516
RIBob Offline
Member
RIBob  Offline
Member

Joined: Apr 2018
Posts: 516
Originally Posted by MrJelly
It is not a tool smile
To try to simplify the concept suppose there is a line in the program that reads "Y = X/7"
The line is modified to read "Y = X/Z"
Elsewhere in the program the value of Z is set as 7, and immediately after that the exe is programmed to look for an external file (like "Tracer.mpf") containing the value of Z.
If the file exists the value of Z in the file is read and used.
If the file does not exist the default value of 7 is used.

This way we can easily change the value of Z in the external file to see what effect it has on the game.
Currently I am experimenting with the three values read from "Tracer.mpf" to see how they effect the number of tracers that you see, and the lengths of the coloured lines that you see, particularly from machine guns.
Different code may apply to the display of cannon fire, depending on some of the "eaw.ini" settings.


Thanks for the response. And the explanation, as well.

The duration of the trace element, be it Early War smoke, or later visible trace, is an element of the particular round being used. The larger the caliber of the round, all things being equal, the more trace compound it could carry; but this can be carried too far if comparing similar rounds being used by different countries. IOW, a German 20 mm cannon shell, due to lack of proper resources, might have less of a trace, or a shorter one, than a directly comparable one mfd in America, which did not lack resources. To explain further, a 50.cal Tracer round might contain "X" amount of tracer compound, while Armor-Piercing, Tracer (APT) and Armor-Piercing, Incendiary, Tracer) , (APIT) rounds might have a different weight/volume of tracer compound. The trade-off always involved the terminal ballistic effect of the particular round (effect it had on the target), and the ability of the pilot to see the trace in order to aim the rounds.

As far as duration of trace, IOW distance over which it is visible goes, this all was specified in original ammo specs, by country. US and Brit wartime specs are presumably fairly stable, although subject to revision. Soviet specs are highly questionable, as are all their stats. German and presumably other European Axis countries stats are highly questionable as the components for tracer compounds became scarcer for Axis powers as time went by, and German Chemical industry came under bomber attack. IOW, what they started out with for aircraft ammo was not likely what they ended with. Not to mention that the preferred calibers of the ammo expended increased considerably. IOW, the Germans went towards cannon (and other projectiles) in an attempt to shoot down the bombers. Presumably the fighters accompanying the bombers were dealt with by fighters whose armament was configured to deal with the more vulnerable allied fighters.

On further inspection, I have found the Trace-Range/distance of WWII 50 cal rounds It is 1969 Yds (1800M) Source: http://www.inetres.com/gp/military/infantry/mg/50_ammo.html That's a long ways. Note also that this stat concerns [I]only[/] WW II tracer rounds, and is not necessarily the trace duration of the other WW II rds which included Tracer compounds in their "mix".

It's fair to think that smaller rounds, such as .303 Brit, and .30-'06 American tracers would necessarily have shorter trace duration/range. I will investigate, as time allows.

#4449988 - 11/22/18 03:14 PM Re: Tracer.mpf [Re: MrJelly]  
Joined: Apr 2002
Posts: 12,497
MrJelly Offline
Veteran
MrJelly  Offline
Veteran

Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
Testing 160 with the "Tracer.mpf" file.
For the purpose of this comparison the tracer frequency was set to 1 (every bullet) to get several tracks on the side view screenies.
The Dora was used as it has a mix of 20mm ad 30mm cannon with different coloured tracks

VelDenom=1 the longest tracks
[Linked Image]

VelDenom =50, virtually a ball
[Linked Image]

Back to VelDenom=1 but the tracer frequency re-set to 5 (the default value)
[Linked Image]
It is difficult to get more than 1 track pair on the screen from this angle, because they are widely spaced smile

The "Tracer.mpf." system is working well wink


Fly EAW online at GameRanger: GameRanger Site

FaceBook Pages
UAW 160 downloads
EAW Club

Mark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.

I am now of an age at which I no longer need to suffer fools gladly
#4449998 - 11/22/18 03:57 PM Re: Tracer.mpf [Re: MrJelly]  
Joined: Aug 2000
Posts: 7,427
Moggy Offline
EAW Old Timer and Bodger
Moggy  Offline
EAW Old Timer and Bodger
Hotshot

Joined: Aug 2000
Posts: 7,427
A slit trench at RAF Gravesend
thumbsup


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
CD WOFF
by Britisheh. 03/28/24 08:05 PM
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0