Jump to content

Recommended Posts

how do I move the gunsight on my HUD ? Where are the default coordinates ? Which folder/file ? What are the format of coordinates when I want to change them ?

Or is it created with the cockipit model and it's fixed there into the cockpit LOD ?

Thank you.

Edited by UllyB

Share this post


Link to post
Share on other sites

You want the cockpit INI file for the given aircraft for the gun sight. Additional HUD elements are in the aircraft's avionics INI file.

For example the following is from the F-15A_Cockpit.ini file. Each aircraft will have its own defaults setting.

[GunsightFront]
HasGunsight=TRUE
GunsightMilSize=50
GunsightName=F-15A_sight.tga
GunsightRollTabsName=F-15A_rolltabs.tga
GunsightRangeBarName=F-15A_rangebar.tga
RangeBarOrientation=6TO12
RangeBarHasGunRange=TRUE
RangeBarUseWeaponRange=FALSE
RangeBarMax=6096.0
RangeBarMin=914.4
RangeBarMaxGun=2032.1
RangeBarMinGun=304.8
LeadComputing=TRUE
MinLeadRange=300
MaxLeadRange=1300
DefaultLeadRange=500
MaxDepression=245
DefaultDepression=50

Edit: That is for SF2, I did not notice that the thread was in the SF1 section when I posted.

Edited by KJakker

Share this post


Link to post
Share on other sites

well I wanted the coordinates in order to change its position. I think it's hardcoded in the LOD, cause in cockpit.ini , where I first checked , it's not.

Share this post


Link to post
Share on other sites
1 hour ago, UllyB said:

I think it's hardcoded in the LOD, cause in cockpit.ini , where I first checked , it's not.

No, it has nothing to do with a LOD files. :no:

Share this post


Link to post
Share on other sites

I thought about it for a while... I don't think it's in the dll. And I will explain why:

The HUD.dll is for stock planes only , right ? That cockpit is a third party one (so the gunsight itself and its coordinates must be something specific to that very COCKPIT and for that  very cockpit, the LOD is the only one specific to it), so it's IMPOSSIBLE to be there locked, so it has to be the LOD. Even if it would be a HUD gunsight model there (into the dll), it should have a fixed coordinates pair, right ? Those pair can not coincide with something that a thrid party designed (let alone that this was after years built), so that is why I don't think the gunsight coordinates are in the HUD.dll, they must be in the LOD of the cockpit. If I am wrong , I am really anxious to find out the truth about this mistery.

Maybe someone who knows more than us will be happy to share with us the explanation.

Edited by UllyB

Share this post


Link to post
Share on other sites

HUD dll is for the "game HUD", the readouts on the screen .. ownship data, targeted enemy/object data and all that...

Share this post


Link to post
Share on other sites

so what you are saying is that the gunsight coordinates for a third party cockpit are not in the HUD.dll ? if so, do you know where they are please ?

Edited by UllyB

Share this post


Link to post
Share on other sites

Sight 0 pos is on the axis of the "view" ahead...  cockpit center

To move the sight, move the 0 Point of View  ..  with the  Offset=  line

Share this post


Link to post
Share on other sites
13 hours ago, UllyB said:

I don't think it's in the dll ...The HUD.dll is for stock planes only , right ?

It's exactly in the DLL. First, when I talked about the DLL files, I did not mean specifically the HUD.dll file. Secondly, DLL files take priority not only for stock planes, but for everything that exists in the game. Because DLLs - this is what is usually called the "game engine".

Turn on your logic.  If the majority of gaming airplanes are content with stingily settings like these...

[GunsightFront]
HasGunsight=TRUE
GunsightMilSize=80
GunsightName=LWRevi3D_Gunsight.tga
LeadComputing=FALSE
MaxDepression=0
DefaultDepression=0

...this means that the basic settings (common to all) are laid elsewhere. But there is nothing like this in the LOD of the cockpit!

And, in fact, the game does not adapt to third-party mods, but all mods obey the game engine.

 

 

 

Edited by Crawford

Share this post


Link to post
Share on other sites
13 hours ago, Crusader said:

Sight 0 pos is on the axis of the "view" ahead...  cockpit center

To move the sight, move the 0 Point of View  ..  with the  Offset=  line

This is the wrong way! :no:

As far as I understood UllyB, he wanted to move the crosshair in the cockpit, but not move the cockpit relative to the aircraft!:biggrin:

Maybe you meant the ViewAngles= line, not the Offset= line?

Edited by Crawford

Share this post


Link to post
Share on other sites

Its not the wrong way.

Position= moves the cockpit

Offset= moves the "point of view 0 position" in the cockpit

Share this post


Link to post
Share on other sites

ok let's suppose you are right. The gunsight view , theoretically, can be moved, so one can move it (if so, where are its coordinates, they are not in plane sight at all as one can notice??) in ANY plane or it's fixed. If it's fixed, its coordinates have to be related to the objects/files that contain the gunsight coordinates. Even if the gunsight coordinates, for each stock HUD would be in a stock DLL , they would be just a fixed one, default for every stock plane, AT BEST, right ? My hunch is that its coordinates are FIXED, by the author and embedded somewhere in its files. The cockpit gunsight in this helicopter (it's about a third party helicopter) is in the right side of the HUD, somewhere down. How could the game's engine DLLs be responsable for a set of coordinates created AFTER these DLLs  by a person who could, virtually put the gunsight coordinates anywhere on the HUD area ??? It's ilogic. The coordinates lay somewhere in the third party helicopter files (for the simple reason that its gunsight is placed different than ANY other stock aircraft!!! )! And the only files which point to the HUD features is its LOD and the cockpit.ini,  but the cockpit.ini, as you pointed out has NO coordinates of the gunsight at all. So , the coordinates of the gunsight, on the 2 dimension HUD, for the helicopter area, ARE NOT in any of the stock game's engine DLLs. As you said, open your logic and you'll see that I am right or... please bring evidence, proof that the coordinates of a third party 3D object, created long after the stock's DLLs, are in those very DLLs you are saying. The last phrase I wrote its absurd in itself when one reads it...LOL (you can't have something created in the future, in a  file created BEFORE  the future has happened!!)

 

PS - the view angle doesn't move the gunsight, it just moves up or down the "pilot" view.

Edited by UllyB

Share this post


Link to post
Share on other sites
15 hours ago, Crusader said:

Sight 0 pos is on the axis of the "view" ahead...  cockpit center

To move the sight, move the 0 Point of View  ..  with the  Offset=  line

I want to move the gunsight icon position, not the view.

Edited by UllyB

Share this post


Link to post
Share on other sites
On 22.01.2019 at 4:03 PM, UllyB said:

The gunsight view , theoretically, can be moved, so one can move it (if so, where are its coordinates, they are not in plane sight at all as one can notice??) in ANY plane or it's fixed. If it's fixed, its coordinates have to be related to the objects/files that contain the gunsight coordinates ...etc

All this is interesting theoretical reasoning, but ... the fact remains. All things you write about are governed by the game engine (i.e., DLL files). And you can't fight facts. No, the moderator who creates the 3D cockpit, of course, makes the aiming frame and assigns the sight textures, but the game engine is responsible for the behavior of all this in the game. However, you can ask those who make cockpits.
By the way, you may have noticed that some planes and helicopters in the game have no any references to the sight in the cockpit LOD files. But a crosshair appears in the game ...

And what are we talking about? Why do you want to move the gunsight icon? Moving will make it unsuitable for aiming. Probably the easiest way for you - to remove the gunsight icon completely.

P.S. I am now trying to solve an even more difficult task: I want to teach my virtual protagonist to look out of the cockpit (just as it is in FPS games: Lean to the Left/Right). But the game engine shows me the middle finger and says “You want too much of me!”  :biggrin:

Edited by Crawford
  • Like 1

Share this post


Link to post
Share on other sites

My friend, this becomes an interesting debate. Let's see your arguments one by one...

1) all my helicopter cockpits HAVE gunsight and they were not put there by...me, but by their authors.

2) let's see what a DLL really is and means.

"Typically, a DLL provides one or more particular functions and a program accesses the functions by creating either a static or dynamic link to the DLL. A static link remains constant during program execution while a dynamic link is created by the program as needed. DLLs can also contain just data. A DLL can be used by several applications at the same time. Some DLLs are provided with the Windows operating system and available for any Windows application. Other DLLs are written for a particular application and are loaded with the application."

Now , let's translate and adapt to our case: so, a DLL, in SF1 series games, has NO data whatsoever for something particularely created by a third party (a gunsight for instance), but that third party set of data, which builds a 3D model,  CAN USE a DLL which is written for it (in our case , all the DLLs created by TK in his SF1 games). So, in other words, a third party HUD uses a pattern provided by the DLL functions to build, in the game, that particularely HUD. It's like a frame of the car. Frames are almost the same, just de dimensions variates and the number of parts. But based on those frames I can build cars that won't perform the same or look like the same, right ? The frame for car is the DLL. The final "form" of each car, which is UNIQUE is the third party gunsight pattern.

Was I clear enough ? :)

3) I want to move the gunsight because I changed the view angle ( I wanted to see 100% of the radar image), so I have to move it down, proportionate with the distance changed in order to see the full radar image.

4) I already asked that, here by starting this thread :)

Edited by UllyB

Share this post


Link to post
Share on other sites

Have you tried actually moving the mesh part ? 

Share this post


Link to post
Share on other sites

You mean mesh part for the gunsight ? If so, how do you move it ? I know you can hide it, but move it...how ?

Share this post


Link to post
Share on other sites

Yep that's what I mean, I know to hide something you usually move it right out of sight of the pit itself, so I suppose to move it you would need to move the mesh by just a small ammount.

I'm not 100% sure on this so please back up your stuff before you screw up your pit altogether........hopefully some of the more experienced pit guys will chip in here.

  • Like 1

Share this post


Link to post
Share on other sites

so one can move a mesh, modifying the 3D cockpit model !?...I didn't know it's possible. How can I do that ? If you know how to do it, please tell me how exactly. I am a fast lerner.

Share this post


Link to post
Share on other sites

Have a look at my A-4PTM mod. I've used it a lot to mod the cockpit the way it is. There are also hints in the naming, on what axis it affects. You actually can move stuff only in one direction at a time, so if you need all 3 axis to move, than just add the mesh 3 times and move them one after the other. The "REMOVE_..."-bits in the cockpit.ini do not work in SF1 afaik, as the "Type=inactive" isn't available here...you have to move those just out of sight for SF1.

The mod is for SF2, but I guess the moving stuff works for SF1 too.

Malaysian Skyhawks

Edited by Nyghtfall
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks , I'll give it a try and I'll return with the results.

UPDATE

Well, first, as you said, that stuff is for SF2 series ONLY, unfortunately. I thought you have a mod or something in that package to use in my endeavour. The cockpit LOD is not present and that is expected for SF2 (TK locked them all because of pirating resons, which is understandable). I need to move (down) a gunsight in a cockpit LOD, not to improve its texture . You said that you move , step by step the texture in one direction. I don't get it how EXACTLY I can do that using your built aircraft for SF2. My guess is that you changed here and there, in the cockpit folder, some files to improve instruments texture, nothing new here, we all do that if we can. Is there anything else that I missed and I could use ? Or did I missunderstand your post ?

Edited by UllyB

Share this post


Link to post
Share on other sites

Okay, okay)) I'm not a debater and not a theoretician. I am a practician with a very sweet temper. Therefore, in order not to be a brawler in your eyes, I will pretend that I agree that any LOD files take precedence over the game engine. :biggrin:  Maybe we are just talking about different things. The language barrier, and we cannot do anything...

Quote

The cockpit LOD is not present and that is expected for SF2 (TK locked them all because of pirating resons, which is understandable). I need to move (down) a gunsight in a cockpit LOD, not to improve its texture .

Sorry, have you ever heard of the existence of the Extractor utility? But the cockpit LOD will not help you if you don't have the original 3D model of the cockpit.

Edited by Crawford

Share this post


Link to post
Share on other sites

You just should open the A-4PTM-cockpit.ini and a stock A-4F-cockpit.ini and see the difference. You will notice, that this is not just a repainting of stuff...instead it can be a solution for your problem. You decide.

Maybe this helps with you understanding the workings.

cockpit.thumb.jpg.6917a2b0a40e1742dbb7d7ba17c424f6.jpg

Just look at the pic. It's the same LOD (A-4F-pit.lod). I just moved stuff around with changing things in the cockpit.ini of the plane.

I recommend making a new "plane"...make a copy of a plane and change the name in the according plane's ini to use the ...-pit.lod instead the planes lod....that way you can load the Cockpit into LOD-viewer, wich will help you getting the mesh-names to move around and a first guess on distances.

An example (You just need to change the green bits, all other entries are of no interest at all.) - the plane-folder is called "_TA-4J Cockpit":

[AircraftData]
AircraftFullName=_TA-4J Cockpit --> thats the Name of the "Plane" and it's folder.
AircraftShortName=A-4
AircraftDataFile=A-4G_data.ini
LoadoutFile=A-4G_loadout.ini
CockpitDataFile=TA-4J_cockpit.ini
LoadoutImage=A-4G_loadout.tga
UserList=A-4G_UserList.ini
HangarScreen=A-4G_hangar.jpg
LoadingScreen=A-4G_Loading.bmp
AvionicsDLL=Avionics60.dll
AvionicsDataFilename=A-4G_avionics.ini

[LOD001]
Filename=A-4B_pit.lod --> change to the Cockpit-lod you want to use.
Distance=100

[Shadow]
CastShadow=TRUE
ShadowCastDist=10000
MaxVisibleDistance=800

[DamageTexture]
DamagedPostFix=_Holes.DDS

 

Edited by Nyghtfall

Share this post


Link to post
Share on other sites

As for the above axample:

The following is from the stock A-4F-cockpit...the only thing for "Radar-Altimeter" in there:

[RadarAltimeter]
Type=RADAR_ALTIMETER
NodeName=needle_radaralt
MovementType=ROTATION_Y
ValueUnit=FEET
Set[01].Position=-180.00
Set[01].Value=0.0
Set[02].Position=-139.90
Set[02].Value=50.0
Set[03].Position=-100.30
Set[03].Value=100.0
Set[04].Position=-57.40
Set[04].Value=200.0
Set[05].Position=-16.30
Set[05].Value=400.0
Set[06].Position=8.6
Set[06].Value=600.0
Set[07].Position=39.9
Set[07].Value=1000.0
Set[08].Position=60.50
Set[08].Value=1500.0
Set[09].Position=81.60
Set[09].Value=2000.0
Set[10].Position=106.20
Set[10].Value=3000.0
Set[11].Position=137.50
Set[11].Value=5000.0

 

And that's from the A-4PTM-cockpit.ini -> as you can see, there are 2 more things for the RadarAltimeter:

First one is the same as above.

[RadarAltimeter]
Type=RADAR_ALTIMETER
NodeName=needle_radaralt
MovementType=ROTATION_Y
ValueUnit=FEET
Set[01].Position=-180.00
Set[01].Value=0.0
Set[02].Position=-139.90
Set[02].Value=50.0
Set[03].Position=-100.30
Set[03].Value=100.0
Set[04].Position=-57.40
Set[04].Value=200.0
Set[05].Position=-16.30
Set[05].Value=400.0
Set[06].Position=8.6
Set[06].Value=600.0
Set[07].Position=39.9
Set[07].Value=1000.0
Set[08].Position=60.50
Set[08].Value=1500.0
Set[09].Position=81.60
Set[09].Value=2000.0
Set[10].Position=106.20
Set[10].Value=3000.0
Set[11].Position=137.50
Set[11].Value=5000.0

The next 2 are to actually move the Instrument on the X-axis and 2nd on z-axis...as you can only move in 1 direction at a time.

The "type" should be of a type, you don't actually use or have in that cockpit, otherwise you can get strange results I guess. Nozzle_position_indicator here, because the Skyhawk doesn't have a nozzle to change.

The values are for on and off, that's why there are 2 values...but they are the same, so just use it that way and it will work.

The position-stuff is what you have to find out...trial and error here...a lot. It's very time-consuming, as you have to fire up SF every time you change something to check. LOD-viewer won't work here.

Also X-,Y- and Z-axis may differ from item to item...you just have to find out. Usually it's +X moves to the right, -X moves to the left, +Y moves to the front, -Y moves to aft, +Z moves up, -Z moves down.

In the example I moved the Radar-Altimeter-Casing(*) a bit to the left and a small bit down:

(*) = Always use the parent-node of an instrument to move (usually the case_...), to include all child-nodes in the move - you will find out about the structure in LOD-viewer.

[MOVE_CaseRadarAlt_X]
Type=NOZZLE_POSITION_INDICATOR
NodeName=case_radaralt
MovementType=POSITION_X
Set[01].Position=-0.22
Set[01].Value=0.0
Set[02].Position=-0.22
Set[02].Value=1.0

[MOVE_CaseRadarAlt_Z]
Type=NOZZLE_POSITION_INDICATOR
NodeName=case_radaralt
MovementType=POSITION_Z
Set[01].Position=-0.005
Set[01].Value=0.0
Set[02].Position=-0.005
Set[02].Value=1.0

Edited by Nyghtfall

Share this post


Link to post
Share on other sites
11 hours ago, Crawford said:

Okay, okay)) I'm not a debater and not a theoretician. I am a practician with a very sweet temper. Therefore, in order not to be a brawler in your eyes, I will pretend that I agree that any LOD files take precedence over the game engine. :biggrin:  Maybe we are just talking about different things. The language barrier, and we cannot do anything...

Sorry, have you ever heard of the existence of the Extractor utility? But the cockpit LOD will not help you if you don't have the original 3D model of the cockpit.

The extractor utility, for SF2, can just READ the LOD, in fact it read the ini file. You cannnot extract any stock LOD from SF2 series. Third party maybe.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..