.DAT Variables: Aircraft

Topics about .dat, .srf, .dnm, .ist, Blender, Gepoly, etc.
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

.Dat Variables

Post by Flake »

H P B means:

Heading, Pitch, Bank.

So the first one is the angle on the compass from true north the turret will face. Then the turret is pitched up or down, then it is rolled about with bank.

Generally the last parameter should not make a difference - you can leave it 0.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

.Dat Variables

Post by Dragon_Mech »

thanks flake. but what about the other code i was asking about?
Owner, Dragonic Machine Industries
Image
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

.Dat Variables

Post by Flake »

Ah.

Look I have an idea but I'm not 100%. Experiment and find out! change the values, see what happens.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

.Dat Variables

Post by Dragon_Mech »

i wonder what this does......KERBLAM!!!
Owner, Dragonic Machine Industries
Image
User avatar
waspe414
Staff
Staff
Posts: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

.Dat Variables

Post by waspe414 »

Midnight Rambler wrote:[post]21029[/post] TURRETPO 0 0m 0m -22.05m 180deg 0deg 0deg - The position (X, Y, Z) of the turret and its angle (H, P, B).

TURRETPT 0 -60deg 60deg 0deg - The minimum pitch, maximum pitch and neutral pitch of the turret. (The turret will move within these parameters)

TURRETHD 0 -60deg 60deg 0deg # Number MinHdg MaxHdg NeutralHdg
The degree inputs in TURRETPO change the turret's default orientation relative to the aircraft.
TURRETPT and TURRETHD are the minimum, maxumum, and neutral pitch and heading of the turret.

The TURRETPO heading input actually specifies the middle of the heading arc, and TURRETHD is added to it. (So if you want a turret that can move 90 degrees to the right and only 45 to the left, but starts pointing forward: TURRETPO 0 0m 0m 0m 22.5deg 0deg 0deg TURRETHD -67.5deg 67.5deg -22.5deg)

Also to note, # and REM are comment indicators in YS files (similar to // or /* in other languages), so everything from a # to the end of the line is ignored by the program.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

Re: .Dat Variables

Post by Flake »

Just wanted to add to this:

When calculating engine performance, you can get the force in lbf (which ysf accepts) from Wikipedia.

I'll use the Ge-f404 engine (as used by the F/A-18A hornet.): https://en.wikipedia.org/wiki/General_E ... erformance

Power output is 11,000lbf (48.9kn) dry and 17,700lbf (78.7 kn) wet.

Double that as the aircraft has two engines, and my dat file says 22,000lbf dry military power and 35,500 (close enough) wet afterburner

Fuel consumption is given by the SFC rating of the engine.

which is 177.5kg wet and 82.6 dry.

So fuel consumption per second is: SFC(kn) * Max power(kn) / (60*60) [60*60 is how many seconds in one hour]

so, wet fuel consumption for example: 177.5 * 78.7 / (60 *60) = 177.5*78.7/3600 = 13969.25/3600 = 3.88...

So my engine consumes 3.88kg of fuel per second.

Dry, the engine consumes 1.12kg/second.

My weight is given from: https://en.wikipedia.org/wiki/McDonnell ... 18C.2FD.29

So WeightClean is set to 23000lb,
WeightLoad is ignored (set by YSF when adding weapons).
WeightFuel is the fuel capacity, 10860lb.

This should give you pretty accurate power, weight, and fuel consumption performance.

That said, WeightClean/WeightLoad is sort of ambigous so experiment there with what you feel comfortable with.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

Re: .Dat Variables

Post by Dragon_Mech »

thanks for that information. i'll keep this in mind when i edit .dat files
Owner, Dragonic Machine Industries
Image
User avatar
Midnight Rambler
Staff
Staff
Posts: 2136
Joined: Thu Feb 10, 2011 11:08 pm
Favorite Aircraft: F-16
Location: Australia
OS: Windows 11
Has thanked: 267 times
Been thanked: 374 times

Re: .Dat Variables

Post by Midnight Rambler »

Bump.

Updated
Image
NightRaven
Senior Veteran
Senior Veteran
Posts: 1851
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: .
OS: windoze 10 64-bit
Has thanked: 617 times
Been thanked: 619 times

Re: .Dat Variables

Post by NightRaven »

Thanks MR, but I was more of hoping of adding variables that were missed out and changing some descriptions.
These are the variables missed:
WPNSHAPE - most important
SMOKECOL
STALHORN
GEARHORN
FLAPPOSI
AAMVISIB
BOMVISIB
AGMVISIB
RKTVISIB, though I haven't tested it out.

Description that needs to be changed are for:

CTLLDGEA TRUE/FALSE - Is gear extended when spawning?

CTLBRAKE TRUE/FALSE - Is brake activated when spawning?

CTLSPOIL 0.0 - How much of the spoiler is activated when spawning?

CTLABRNR TRUE/FALSE - Is afterburner on when spawning?

CTLTHROT 0.0 - How much throttle when spawning?

CTLIFLAP 0.0 - How much of the flap is extended when spawning?

CTLINVGW 0.0 - How much the variable geometry wing is retracted when spawning?

as following KetchupWarthog's post here.

2015 variables should also be added in a separate section to ensure no version clashes.
Such variables include the REALPROP, FLATCLR, PSTMPWR, CLDECAY, TIREFRIC and other variables of the like introduced in the most recent 2015 version.

Maybe ground objects need more love too, but that's for another time I suppose.
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: .Dat Variables

Post by u2fly »

Also rename topic from ".Dat Variables" to more correct ".DAT variables".

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
Midnight Rambler
Staff
Staff
Posts: 2136
Joined: Thu Feb 10, 2011 11:08 pm
Favorite Aircraft: F-16
Location: Australia
OS: Windows 11
Has thanked: 267 times
Been thanked: 374 times

Re: .Dat Variables

Post by Midnight Rambler »

NightRaven wrote:Thanks MR, but I was more of hoping of adding variables that were missed out and changing some descriptions.
These are the variables missed:
WPNSHAPE - most important
SMOKECOL
STALHORN
GEARHORN
FLAPPOSI
AAMVISIB
BOMVISIB
AGMVISIB
RKTVISIB, though I haven't tested it out.

Description that needs to be changed are for:

CTLLDGEA TRUE/FALSE - Is gear extended when spawning?

CTLBRAKE TRUE/FALSE - Is brake activated when spawning?

CTLSPOIL 0.0 - How much of the spoiler is activated when spawning?

CTLABRNR TRUE/FALSE - Is afterburner on when spawning?

CTLTHROT 0.0 - How much throttle when spawning?

CTLIFLAP 0.0 - How much of the flap is extended when spawning?

CTLINVGW 0.0 - How much the variable geometry wing is retracted when spawning?

as following KetchupWarthog's post here.

2015 variables should also be added in a separate section to ensure no version clashes.
Such variables include the REALPROP, FLATCLR, PSTMPWR, CLDECAY, TIREFRIC and other variables of the like introduced in the most recent 2015 version.

Maybe ground objects need more love too, but that's for another time I suppose.
Sorry mate I thought I had covered everything. Changed the CTLLDGEA stuff. Where would you like to put the following stuff:

WPNSHAPE
SMOKECOL
STALHORN
GEARHORN
FLAPPOSI
AAMVISIB
BOMVISIB
AGMVISIB
RKTVISIB

I'll make a 2015 dat section as well
Image
NightRaven
Senior Veteran
Senior Veteran
Posts: 1851
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: .
OS: windoze 10 64-bit
Has thanked: 617 times
Been thanked: 619 times

Re: .DAT Variables

Post by NightRaven »

WPNSHAPE AIM120 FLYING .../...
WPNSHAPE FLR STATIC .../...
Allows for usage of custom weapon skins for specific aircraft. The type of weapon is defined first, followed by what state it is in: still hanging from the aircraft pylons (STATIC) or launched from the aircraft (FLYING). The filepath of the corresponding weapon skin is defined last. This variable is used only after the 2012 test version.
Note: WPNSHAPE FLR STATIC refers to a flarepod while WPNSHAPE FLR FLYING refers to a deployed flare.
AAMVISIB TRUE/FALSE - Are the air-to-air missiles visible in flight?
AGMVISIB TRUE/FALSE - Are the air-to-ground missiles visible in flight?
BOMVISIB TRUE/FALSE - Are the bombs visible in flight?
RKTVISIB TRUE/FALSE - Are the rockets visible in flight?
^ can be placed just after HRDPOINT. RKTVISIB does work.

SMOKECOL 0 255 255 255 - Allows for predefined colours of each smoke generator when selecting the aircraft. Before the 2014 test version, the first number 0 is fixed, meaning all the smoke generators generate the same colour smoke; after it, 0 refers to the first SMOKEGEN position declared, 1 refers to the next, 2 refers to the one after that, and so on. The RGB decimal code is then defined.
^ can be placed after SMOKEOIL

STALHORN TRUE/FALSE - Is there a stall warning?
GEARHORN TRUE/FALSE - Is there a ground proximity warning when the gear is retracted too close to the ground?
FLAPPOSI 0.0
FLAPPOSI 0.3
FLAPPOSI 1.0
Defines which positions the flap will be at when the next flap setting is activated (default keys W and S).
^ can be placed anywhere, probably in between HTRADIUS and TRIGGER1
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

Re: .DAT Variables

Post by Neocon »

I have a question about SUBSTNAM. I tried adding

SUBSTNAM B737

To an aircraft .dat file. I put that in a .dat file on my server, then launched YSF and took off in that aircraft. Then I opened an install of YSF that does not have that aircraft installed, expecting to see a stock 737 sitting there, but got a block plane instead.

Does this line work in 2015?
User avatar
Vic Viper
Staff
Staff
Posts: 541
Joined: Thu Feb 24, 2011 7:01 pm
Favorite Aircraft: de Havilland Mosquito
Location: -9° 59' 6.90", -138° 49' 35.51
OS: Windows 2001
Has thanked: 392 times
Been thanked: 199 times
Contact:

Re: .DAT Variables

Post by Vic Viper »

Last time I checked it did...are you placing it after IDENTIFY and before CATEGORY?

EDIT - confirmed working on the 49th server, tested with 49th A-10 TVC, substituted with stock A-10. Peek at your dat Pat?
Image
VFA-49 FORUM

"Why are we still here? Just to suffer? Every night, I can feel my leg...and my arm...even my fingers. The body I've lost...the comrades I've lost...won't stop hurting. It's like they're all still there. You feel it too, don't you? I'm going to make them give back our past"
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

Re: .DAT Variables

Post by Neocon »

Vic Viper wrote:Last time I checked it did...are you placing it after IDENTIFY and before CATEGORY?
Ok. I thought it could be popped in anywhere. I looked at the 49th A-10 .dat and I'll change all the .dat files I previously modified and try again. :roll:

EDIT: I didn't see any difference. Is the the aircraft name supposed to be in quotes? The name isn't in quotes in the 49th A-10, and I didn't use quotes in my .dat file, but it still doesn't seem to work.
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: .DAT Variables

Post by decaff_42 »

I'd like to help organize all the great data here and add some instructions for new dat modders. Please help me collect all the variables into this google sheet. I think the biggest thing here is to put when variables were introduced, what variables can be used in each and expand the comments for each one a bit with a new modder in mind. Midnight Rambler has done a great job with editing and keeping up-to-date with the overall list. I'm just trying to provide an alternative organization.

Here are a list of units I have seen/know to work with YSFlight:
Length: meters (m) and feet (ft)
Speed: MACH, Kilometers per hour (km/h), Knots (kts), meters per second (m/s)
Power: (Propellers only) Horsepower (HP)
Weight: Ton [2000 pounds] (t), pounds (lb), kilograms (kg)
Area: square meters (m^2), square feet (ft^2) (Only used for wing area)
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: .DAT Variables

Post by u2fly »

NOSHADOW TRUE - Do not display ground object onground shadow.
--
* For ground object's .DAT file ONLY! Aircraft's DAT files not support this variable and YSFlight will report error if you try it.

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

Re: .DAT Variables

Post by Neocon »

u2fly wrote:Aircraft's DAT files not support this variable and YSFlight will report error if you try it.
I was going to try it, so you saved me some time. :) Thanks.
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: .DAT Variables

Post by decaff_42 »

Does anyone know if the RCS value in the DAT file effects how far away SAMs and AAA can engage the aircraft? Or is it only changing how close another aircraft can engage?
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: .DAT Variables

Post by u2fly »

decaff_42 wrote:Does anyone know if the RCS value in the DAT file effects how far away SAMs and AAA can engage the aircraft? Or is it only changing how close another aircraft can engage?
Did you try find SAM rotation in YSF file?

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest