.DAT Variables

Learn to make aircraft, maps and more with all of the tools. All the tutorials you will ever need are located here!
NOTE THAT HACKING THE MAIN YSFLIGHT .EXE IS FORBIDDEN
User avatar
Flake
Staff
Staff
Posts: 4236
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 800 times
Been thanked: 1119 times
Contact:

.Dat Variables

Post by Flake » Wed Aug 19, 2015 4:44 pm

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.

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: 93 times
Been thanked: 127 times

.Dat Variables

Post by Dragon_Mech » Thu Aug 20, 2015 2:59 am

thanks flake. but what about the other code i was asking about?
Owner, Dragonic Machine Industries
Image

User avatar
Flake
Staff
Staff
Posts: 4236
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 800 times
Been thanked: 1119 times
Contact:

.Dat Variables

Post by Flake » Thu Aug 20, 2015 7:42 am

Ah.

Look I have an idea but I'm not 100%. Experiment and find out! change the values, see what happens.

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: 93 times
Been thanked: 127 times

.Dat Variables

Post by Dragon_Mech » Thu Aug 20, 2015 11:55 am

i wonder what this does......KERBLAM!!!
Owner, Dragonic Machine Industries
Image

User avatar
waspe414
Veteran
Veteran
Posts: 1148
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa
Location: Canada
Has thanked: 94 times
Been thanked: 157 times

.Dat Variables

Post by waspe414 » Thu Aug 20, 2015 3:19 pm

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
Staff
Staff
Posts: 4236
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 800 times
Been thanked: 1119 times
Contact:

Re: .Dat Variables

Post by Flake » Thu Oct 22, 2015 7:36 am

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.

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: 93 times
Been thanked: 127 times

Re: .Dat Variables

Post by Dragon_Mech » Thu Oct 22, 2015 5:14 pm

thanks for that information. i'll keep this in mind when i edit .dat files
Owner, Dragonic Machine Industries
Image

User avatar
Midnight Rambler
Senior Veteran
Senior Veteran
Posts: 2110
Joined: Thu Feb 10, 2011 11:08 pm
Favorite Aircraft: F-16
Location: Australia
OS: Windows 10
Has thanked: 258 times
Been thanked: 358 times

Re: .Dat Variables

Post by Midnight Rambler » Wed Jan 06, 2016 5:34 am

Bump.

Updated
Image

User avatar
NightRaven
Staff
Staff
Posts: 1838
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: soviet and (nazi) german aircraft
Location: singapore
OS: windoze 10 64-bit
Has thanked: 520 times
Been thanked: 603 times

Re: .Dat Variables

Post by NightRaven » Wed Jan 06, 2016 6:15 am

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

User avatar
u2fly
Veteran
Veteran
Posts: 1172
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 652 times
Been thanked: 265 times
Contact:

Re: .Dat Variables

Post by u2fly » Wed Jan 06, 2016 6:22 am

Also rename topic from ".Dat Variables" to more correct ".DAT variables".
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Midnight Rambler
Senior Veteran
Senior Veteran
Posts: 2110
Joined: Thu Feb 10, 2011 11:08 pm
Favorite Aircraft: F-16
Location: Australia
OS: Windows 10
Has thanked: 258 times
Been thanked: 358 times

Re: .Dat Variables

Post by Midnight Rambler » Wed Jan 06, 2016 10:31 am

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

User avatar
NightRaven
Staff
Staff
Posts: 1838
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: soviet and (nazi) german aircraft
Location: singapore
OS: windoze 10 64-bit
Has thanked: 520 times
Been thanked: 603 times

Re: .DAT Variables

Post by NightRaven » Sat Jan 09, 2016 11:26 am

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
Image

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3715
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1513 times
Been thanked: 1632 times
Contact:

Re: .DAT Variables

Post by Neocon » Tue Jan 12, 2016 10:59 pm

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: 484
Joined: Thu Feb 24, 2011 7:01 pm
Favorite Aircraft: F-22A Raptor
Location: -9° 59' 6.90", -138° 49' 35.51
OS: Fail10PremiumEdition
Has thanked: 280 times
Been thanked: 178 times
Contact:

Re: .DAT Variables

Post by Vic Viper » Wed Jan 13, 2016 1:20 am

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

"If you don't know who I am...then maybe your best course would be to tread lightly."

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3715
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1513 times
Been thanked: 1632 times
Contact:

Re: .DAT Variables

Post by Neocon » Wed Jan 13, 2016 1:45 am

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
First Class Membership
First Class Membership
Posts: 3403
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 532 times
Been thanked: 1179 times
Contact:

Re: .DAT Variables

Post by decaff_42 » Mon Jan 25, 2016 4:19 pm

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 by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Feel free to ask me a question! I'll try to answer it as well as I can or recommend a more knowledgeable member if necessary.

User avatar
u2fly
Veteran
Veteran
Posts: 1172
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 652 times
Been thanked: 265 times
Contact:

Re: .DAT Variables

Post by u2fly » Thu Feb 11, 2016 4:47 am

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.
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3715
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1513 times
Been thanked: 1632 times
Contact:

Re: .DAT Variables

Post by Neocon » Thu Feb 11, 2016 5:25 am

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
First Class Membership
First Class Membership
Posts: 3403
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 532 times
Been thanked: 1179 times
Contact:

Re: .DAT Variables

Post by decaff_42 » Sun Mar 06, 2016 7:52 pm

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 by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Feel free to ask me a question! I'll try to answer it as well as I can or recommend a more knowledgeable member if necessary.

User avatar
u2fly
Veteran
Veteran
Posts: 1172
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 652 times
Been thanked: 265 times
Contact:

Re: .DAT Variables

Post by u2fly » Sun Mar 06, 2016 9:16 pm

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?
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests