Jump to content
Velo

Question about cockpit interactive light

Recommended Posts

Hi, i`m learning to make a cockpit. Now just have a prototype for study.

I stuck in interacive light. I dont kown where  i wrong, either texturing in 3dsmax or coding in INI file. Here `s my work.

 

------------------------------------

I try to make 3 lights in my cockpit. "A" indicates AA weapon, "B" for AGweapon, and "C" for hook. These symbols are already made in my TGA file, which of course in alpha channel. See my game and 3DSMax screenshot.

Now the light just show the ABC, no interactive funcation at all. So ,there are 3 questins:

 

1, Am I wrong in texture setting in 3dsmax? 

2, The code is not correct? How to fix it ?

3, What is "Position=0.0" stand for? and what is the meaning of Value=0,1,2   ?

 

I put my INI and Max file here.  Hope someone can help.

 

COCKPIT_test.zip

 

--

 

post-36141-0-18373100-1423139220_thumb.jpg

 

post-36141-0-76917600-1423139203.jpg

 

 

-----------

and here is my code. I am sure NodeName are correct.

Instrument[002]=MARM_AA
Instrument[003]=MARM_AG
Instrument[004]=HookLight

[MARM_AA]
Type=HUD_MODE_INDIDCATOR
NodeName=AALight
MovementType=LIGHT
Set[01].Position=0.0
Set[01].Value=0
Set[02].Position=1.0
Set[02].Value=1
Set[03].Position=0.0
Set[03].Value=2

[MARM_AG]
Type=HUD_MODE_INDIDCATOR
NodeName=AGLight
MovementType=LIGHT
Set[01].Position=0.0
Set[01].Value=0
Set[02].Position=0.0
Set[02].Value=1
Set[03].Position=1.0
Set[03].Value=2

[HookLight]
Type=ARRESTING_HOOK_INDICATOR
NodeName=HookLight
MovementType=LIGHT

 

Edited by Velo

Share this post


Link to post
Share on other sites

Do you have instrument[001]=   there ?

If not game will not pick position entry  for instruments 2,3 onward.

 

Positions and values stands for movement type- rotationx,y,z and position x,y,z. For light it is not needed. Maybe shouldnt be there.

Share this post


Link to post
Share on other sites

What they mean based on my understanding of cockpit operations

 

[MARM_AA]
Type=HUD_MODE_INDICATOR
NodeName=AALight
MovementType=LIGHT
Set[01].Position=0.0    <------ means Light OFF
Set[01].Value=0          <------ Navigaton mode
Set[02].Position=1.0    <------ Light ON
Set[02].Value=1          <------- AA mode
Set[03].Position=0.0    <------- Light OFF
Set[03].Value=2          <------- AG mode

 

So in theory should work correctly.

 

An other thing noticed, which might cause your issue.

The system names should follow each other without any system functions interrupting them. I advise you to look up any of the 3rd party cockpit.ini-s you will see how should be done.

 

 

Instrument[001]=AirspeedIndicator
Instrument[002]=MARM_AA
Instrument[003]=MARM_AG
Instrument[004]=HookLight

 

Then the individual items

[AirspeedIndicator]
Type=AIRSPEED_INDICATOR
NodeName=needle_speed
MovementType=ROTATION_Y
ValueUnit=KNOTS
Set[01].Position=0.0
Set[01].Value=0.0
 
etc
etc
 
 
You also have typing error for the aa/ag lights Type entry
 
Type=HUD_MODE_INDIDCATOR   <---- should be Type=HUD_MODE_INDICATOR
 
 

If the above list correction still not results working lights you can try thy following without the parameters part:

 

[MARM_AA]
Type=AIR_TO_AIR_MODE_INDICATOR
NodeName=AALight
MovementType=LIGHT
 
[MARM_AG]
Type=AIR_TO_GROUND_MODE_INDICATOR
NodeName=AGLight
MovementType=LIGHT

Share this post


Link to post
Share on other sites

Much appreciate !

 

After check other aircraft cockpit and follow your clue, it is fixed.

The key is Type=WEAPON_TYPE_SELECTOR

 

It will determine the meaning of "Position" and "Value"

Position means Ture or False

and

Value means the current weapon type, 2=heat

 

also, ItemNumber=2 set the weapon type to sidewinder

As far as i test, it works.

 

Do i have any mistake here ?  I `m afraid there are something i dont kown despite it seems work apparently.

Edited by Velo

Share this post


Link to post
Share on other sites

Position indicates where node will be moved after action.

In (for example radar altimeter) position will be rotation angle of needle.

Value wil be set for example  1000 for position -30 and 1500 for position -60 etc.

 

In two position switch (like master arm or weapon selector) you can set position (example) rotation_X - 30degree. it will rotate node 30 degree up/down when activated weapon.

value will be 0 off and 1 for on.

 

 example

 

[weaponStationR3]
Type=WEAPON_STATION_SELECTOR
NodeName=Switch_R-Wing-out
MovementType=ROTATION_Z
Set[01].Position=0.0
Set[01].Value=0
Set[02].Position=-30.0
Set[02].Value=1
ItemNumber=6

 

Item number (in weapons selector) is related to weapon station in main aircraft_data.ini.

So if weapon station (your example) IRM / sidewinder station is weapon station ID 2, then in cockpit ini file it will be Itemnumber=2, and for example bomb centerline station is weaponstation ID=3 then in  cockpit it will be item number=3

 

Mirage factory A-7 and F-8 are good reference to know how it works.

Share this post


Link to post
Share on other sites

Position indicates where node will be moved after action.

In (for example radar altimeter) position will be rotation angle of needle.

Value wil be set for example  1000 for position -30 and 1500 for position -60 etc.

 

.........

 

Much appreciate for your patient explanation ! Both them are so valuable to me !

 

I used to consider the ItemNumber as a game engine preset value indicating weapon type, now i see my mistake.

I will contiue to test the light indicators and switch

 

Things getting alive !

Share this post


Link to post
Share on other sites

Sorry for reviving that old thread, but my question is somewhat related I guess.

 

I have separated a weapons station in a bomb-only-part (StationID=1, Group=1) and a missile-only-part (StationID=2, Group=1) and my cockpit has "ARM"-lights for each station. My problem now is, that I have to use 1 "ARM"-light for both separated stations (as both still refer to the same pylon). I tried it with no luck. Is there anything I missed or that I can do about it? Cockpit is a stock one, so not available for 3D-work.

Share this post


Link to post
Share on other sites

Thats the way it is.

Each mesh in the cockpit ( for a light or indicator/needle of any type) can only be used one time, not for multiple functions or tied to

multiple stations.

 

Thats what makes building modern cockpits with MFDs such a nightmare (well.. depends on the individual modders patience..), they have

hundreds of single mesh nodes for lights to cover all possibilities for the stores ...

Share this post


Link to post
Share on other sites

Thats the way it is.

Each mesh in the cockpit ( for a light or indicator/needle of any type) can only be used one time, not for multiple functions or tied to

multiple stations.

 

Thats what makes building modern cockpits with MFDs such a nightmare (well.. depends on the individual modders patience..), they have

hundreds of single mesh nodes for lights to cover all possibilities for the stores ...

 

Oh heck ya...when I modded the F-15C cockpit to have a working MFD, I had to make a buttload of ini entries and meshes for all the combinations of weapons.  And that was for only an air to air bird...

 

FC

Share this post


Link to post
Share on other sites

Sorry for reviving that old thread, but my question is somewhat related I guess.

 

I have separated a weapons station in a bomb-only-part (StationID=1, Group=1) and a missile-only-part (StationID=2, Group=1) and my cockpit has "ARM"-lights for each station. My problem now is, that I have to use 1 "ARM"-light for both separated stations (as both still refer to the same pylon). I tried it with no luck. Is there anything I missed or that I can do about it? Cockpit is a stock one, so not available for 3D-work.

Well... I've found a solution ..

 

added Sparrow capability to USN F-4's inner wing stations which also required modifications to the missile panel..

had to use a light twice + move it to another position if a specific station is in use to fill a spot where no light exists

 

The trick is to not use the MovementType=LIGHT

 

I use MovementType=Position_X (Y,Z)

And the ItemNumber=  can also be the Value =

So , example from the F-4B Sparrow mod

 

[station6Light]

Type=WEAPON_STATION_SELECTOR

NodeName=selected_L_FWD

MovementType=POSITION_Y     (moves mesh fore/aft in this case)

Set[01].Position=0.002               (moves it forward 2 mm to hide it behind the panel mesh)

Set[01].Value=5.0                        (this is station ID #5 for which the light is OFF , also valid for IDs 1 to 4)

Set[02].Position=0.00                  (light is modeled in ON position, so no move required, 0.00)

Set[02].Value=6.0                        (this is station ID 6 for which the light is ON )

Set[03].Position=0.002                 (Set 3 hides the light mesh again to turn it OFF)

Set[03].Value=7.0

Set[04].Position=0.002                 (Set 4 has it still set to OFF to keep it OFF for station IDs 7 to 16)

Set[04].Value=16.0

Set[05].Position=0.00                   (Set 5 .. ON again for Station 17)

Set[05].Value=17.0

Set[06].Position=0.002                (Set 6 .. OFF again)

Set[06].Value=18.0

 

Above setup has the light ON for stations 6 and 17 and OFF for all others

I had to set it up that way to be able to move the same mesh vertically to use it for the #17 station (new left wing AIM-7 STA), there is no light

modeled for it in the cockpit

 

The vertical move with the same mesh selected_L_FWD :

[station17LightMove]

Type=WEAPON_STATION_SELECTOR

NodeName=selected_L_FWD

MovementType=POSITION_Z

Set[01].Position=0.00

Set[01].Value=16.0

Set[02].Position=-0.031

Set[02].Value=17.0

Set[03].Position=0.00

Set[03].Value=18.0

 

so the same mesh is used for 2 stations , first "ON in place" and the 2nd time "ON and moved vertically"

 

A second method where no vertical/horizontal move is required is to set it up like this :

 

1st use of ready_L_WING_a mesh with POSITION_Y, ItemNumber=10  = Station ID 10

[station10ArmedLight]

Type=WEAPON_QUANTITY

NodeName=ready_L_WING_a

ItemNumber=10

MovementType=POSITION_Y

Set[01].Position=0.01

Set[01].Value=0.0

Set[02].Position=0.00

Set[02].Value=1.0

 

2nd use of ready_L_WING_a mesh with POSITION_Y , ItemNumber=17  = Station ID 17

[station17ArmedLight]

Type=WEAPON_QUANTITY

NodeName=ready_L_WING_a

ItemNumber=17

MovementType=POSITION_Y

Set[01].Position=0.01

Set[01].Value=0.0

Set[02].Position=0.00

Set[02].Value=1.0

 

 

 

:skull::ninja::skull:

Some pics of the modified missile panel

 

missiles RDY/present on all fuselage and inner wing stations, shows heat and radar msls no matter which is selected (limitation)

without a missile selected

post-2042-0-46765200-1437583340_thumb.jpg

 

left forward fuselage sparrow selected

shows SELECTED light ON and in original position

post-2042-0-35723300-1437583339_thumb.jpg

 

left wing sparrow selected

shows the Left FWD SELECTED light ON and re-positioned downwards to the wing msl indicator

post-2042-0-57562400-1437583342_thumb.jpg

 

left forward and wing stations empty , right forward fuselage sparrow selected

post-2042-0-58984100-1437583341_thumb.jpg

Edited by Crusader
  • Like 5

Share this post


Link to post
Share on other sites

Hi Velo,

Thanks a lot for this helpful discussion. How do I add an external fuel tank light indicator to F-4Es light HAF F-4E phantom II? Can you please help me with that? Thanks a lot. 

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

  • Similar Content

    • By JamesWilson
      Hi,
      after seeing the TMF F-14 has wrong and inaccurate speed and fuel indicators, i found out the default Third Wire F-14 has working and accurate ones, but i dont wanna use it cause the TMF Tomcat is better and the cockpit too more realistic too, so can you switch the speed and fuel indicators on the TMF F-14 with the default Third Wire F-14? And for fuel too? Do you need to 3D model and/or do something else other than edit some text files?
       And is it or it's not possible to do?
      Down here are 2 pictures from the correct cockpit in the default Third Wire F-14:


      And 2 from the TMF F-14 (the inaccurate one):


       
      Thanks for helping.
    • By JamesWilson
      Hi everyone,
      I just noticed that the speed indicator in the F-14 Tomcat by TMF (TheMirageFactory) only shows up to 800 kts, and the Mach indicator does not move, not letting you know the speed of the aircraft if you have your HUD turned off.
      As you can see down here, i'm at Mach 2.23, but the indicator only shows 800 kts and doesn't go above. Obviously it adapts to my altitude, so if i'm higher, then the IAS is lower, but still should move, making it impossible flying at high speed without HUD turned on as i have it down here:

      Another issue, maybe even worse than the previous one, is that the fuel indicator shows wrong numbers, or as i may think, it shows "a number less". For example: if i have 20000 pounds of fuel left, it should show 20000, but it shows 02000. This is a theory on how it works, not confirmed, and i'm gonna explain you why i think it is like that:
      I hardly think i truly have 2000 pounds of fuel left, cause i choose Fuel 100% and tried climbing and flying for a long time with full afterburner, and the numbers slowly started going down, even reached the point of burning the engine at Mach 2.30and the fuel wasn't gone yet, it showed i had like 00700 left, so i presume it's 20000 in reality, otherwise i would have been out of fuel in no time, since it's a quantity even under the bingo quantity, but i flew for minutes and minutes in full afterburner, and at 8x speed, so. Speaking of Bingo, there's no bingo indicator.
      Here's a picture of the fuel indicator:

      I tried the default F-14 cockpit, and even if that one shows correctly both speed and fuel indicators and even if it's a great cockpit, i personally like more and find more realistic and immersive the TMF one.
      In the end, since these two indicators are crucial, especially for flying without HUD, and the fuel indicator especially, since there's no way to know how much fuel you have left even with HUD turned on other than the cockpit indicator.
      So, what i'm asking is:
      Is there a way to fix these? A mod that remakes the indicators? Or another cockpit that is not the default one that i can use to swap this one?
      Thanks in advance for helping me.
    • By muhammad
      Hi everyone!
      after few miles of scrolling .INI files and testing everything on the game
      FINALY:
      " Cockpit Shadows " !!
      --!  enabling process is same for each plane  ! --
      --!  enabling process should apply on each plane you like to have cockpit shadows on 'em  ! --
      --!  Be Advised !: This "Cockpit Shadows" has some little BUGs so we all should work on it together to make it better  !-- 
      It's better than nothing :D
       
      * Q: How to enable Cockpit Shadows?
      - A: All you need to do is to make a .INI file with the same name and right at the place your chosen plane cockpit 3D file ( .LOD ) is located.
      Example: 
      !! [  Cockpit file are located at the folder with the same name (most of the times)  ] !!
      SHO to Viper team F-16 BLK 30 to act like a test plane 

      here the plane's Cockpit 3D model is the LOD file named " Cockpit_F-16C_B30.LOD " and above of that, our personally made .INI file;
      Now
      Inside the .INI file we should drop this :
       
      [Shadow]
      CastShadow=TRUE
      ShadowCastDist=5000
      MaxVisibleDistance=800 
      -------------------------------------------------
      * you are free to change the numbers  
      -------------------------------------------------
       
      here's an example file which you have to change it's name to the plane's cockpit file name !
      plane's cockpit file name.INI
       
      *with this simple trick you can enable shadows for every .LOD file.
      feel free to ask.
       
       alexis99 thanks for that little help
       
      sorry for bad English :)
      hope ya'll enjoy!
      one love.
       
       
      plane's cockpit file name.INI
    • By LaoHu
      Would it be possible to put a photograph in your cockpit? Often pilots are shown to have a photo of a loved one inside their cockpit attached to the dashboard to remind them of home, give them inspiration, etc. Would it be possible to stick one in a cockpit through some kind of texture edit or something? 
    • By MrMaxterX


      View File Simple Cockpit - Fly the unflyable aircrafts
      This mods allows you to fly the following aircraft (doesn't include all the variants);
      Many thanks to Trevisol for making the mod and sending me the file with his permission to download
      A-1 A-6 AN-12 B-57 F-104 E-2C EA-6B F-84F IL-28 J-6 MIG-15 MIG-17 MIG-19 MIG-21 MIG-23 MIG-27 Mirage 5 Spitfire SU-7 TU-16 TU-22 TU-95 Vampire Vautour YAK-23 YAK-38 This mod is just a simple addon that adds a few pre existing cockpit into a lot of aircraft that was not allowed for the player to use, only the AI.
      Since it's lightweight, it use the already included cockpits of the F-8, P-51, Mirage and a few other aircraft, with a couple of changes here and there;
      Submitter MrMaxterX Submitted 12/14/2022 Category Jet Cockpits  
×

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..