Jump to content
Sign in to follow this  
joepoway

FlywithLua Question ?

Recommended Posts

I am new to FlyWithLua and had a programming question.

I have installed the latest version of FlyWithLua into X Plane 11 and it went well. What I want to do is setup a XX.lua script to stop having to change two data references every time I start X Plane 11, the two I want to automate are:

Clouds / cloud_shadow_lighten_ratio = 0

Fog / fog_be_gone = 0.2000 

First can both of these be programmed and if so could someone provide me the exact script so I can copy it into notepad++ and save the XX.lua file into my script folder?

 

Thanks in advance

Joe


Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites

create a file 'artscontrol.lua' via notepad++ (place it under /xplane/resources/plugins/flywithlua/scripts/

 

-- script to set the clouds dataref to 0 and the fog dataref to 0.2000

set("sim/private/controls/clouds/cloud_shadow_lighten_ratio", 0)

set("sim/private/controls/fog/fog_be_gone", 0.2000)

 

 

note: if you are running the very latest lua version it may not work because i think laminar asked the developers to remove the capability to modify art controls. The xplane log.txt file will say 'dataref not found'

Give it a try

 


Manuel Merelles

Share this post


Link to post
Share on other sites
3 hours ago, mmerelles said:

create a file 'artscontrol.lua' via notepad++ (place it under /xplane/resources/plugins/flywithlua/scripts/

 

-- script to set the clouds dataref to 0 and the fog dataref to 0.2000

set("sim/private/controls/clouds/cloud_shadow_lighten_ratio", 0)

set("sim/private/controls/fog/fog_be_gone", 0.2000)

 

 

note: if you are running the very latest lua version it may not work because i think laminar asked the developers to remove the capability to modify art controls. The xplane log.txt file will say 'dataref not found'

Give it a try

 

For this to work, you need to download FlyWithLua v5.x or earlier.  v6.x will not work...causes many older lua scripts to crap out...

Share this post


Link to post
Share on other sites
2 hours ago, Sesquashtoo said:

For this to work, you need to download FlyWithLua v5.x or earlier.  v6.x will not work...causes many older lua scripts to crap out...

Hello
You can provide direct link to download of FlywithhLua that you use and works perfectly, last version 2.6.2, created yesterday does not work.
Thank you.

João Alfredo


It is impossible to please Greeks and Trojans

É impossivel agradar Gregos e Troianos

Share this post


Link to post
Share on other sites

Thanks for the feedback.

Assuming I can get a copy of the older working version I was wondering if it is possible to place two versions in the plugin folder and just place certain "code" in the older scripts folder and ones that work with the newer version in that scripts folder? So basically having two working versions in the plugin folder and therefore two would show up in the drop down. I ask this because I assume each version offers different capabilities as mentioned above.

Additionally I would appreciate a link to a working version that would enable what I desire to accomplish with fog and cloud shadows 

 

Thanks in advance

Joe

 

 


Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites
43 minutes ago, joepoway said:

Thanks for the feedback.

Assuming I can get a copy of the older working version I was wondering if it is possible to place two versions in the plugin folder and just place certain "code" in the older scripts folder and ones that work with the newer version in that scripts folder? So basically having two working versions in the plugin folder and therefore two would show up in the drop down. I ask this because I assume each version offers different capabilities as mentioned above.

Additionally I would appreciate a link to a working version that would enable what I desire to accomplish with fog and cloud shadows 

 

Thanks in advance

Joe

 

Here's an interesting response on another forum I found:

Ben Supnik says:

June 23, 2017 at 11:44 am

sim/private is how you know it IS for the hackers. If it was a public dataref, the implication is that it was a long term supported part of the interface that we will honor indefinitely. This is NOT that - this is something you can poke at until you can't - it may go away at any time. I'm not going to INTENTIONALLY delete it, but if it's not easy to support, we're not going to write backward compatibility code for it.

If FWL won't write private datarefs, y'all have to take that up with Carsten or use another plugin - ANY plugin can write a private dataref with the XPLMDataAccess API.

 

 


Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites

I'm new to X-Plane, did not know that what's being done implied something, say illegal, so I see only the option to ask Ben to make the possibility of making the fog calibration official, but on the other hand I see that they are stubborn and consider the fog excessive as normal. Asking does not cost anything, maybe a no, or being ignored.
I'm going to make a request in X-Plane developer, maybe if many ask, of course.

 

 

João Alfredo


It is impossible to please Greeks and Trojans

É impossivel agradar Gregos e Troianos

Share this post


Link to post
Share on other sites
2 hours ago, Dumont said:

I'm new to X-Plane, did not know that what's being done implied something, say illegal, so I see only the option to ask Ben to make the possibility of making the fog calibration official, but on the other hand I see that they are stubborn and consider the fog excessive as normal. Asking does not cost anything, maybe a no, or being ignored.
I'm going to make a request in X-Plane developer, maybe if many ask, of course.

 

 

João Alfredo

Another X Plane response. Tyler Young says:

June 23, 2017 at 9:15 am

This is a raw dataref only, so it does not behave like a typical X-Plane setting. Our intention in exposing this is to make it available to "hackers" and plugin authors. Unless someone wants to develop a plugin to manage this setting, it will always default back to 1 at sim start. (It's a ratio between 0 and 1, so 0.5 gives you half the default level of fog.)

 

They are testing this out to see its appeal. They won't make it public yet because then they need to support it with all the developers and they aren't ready to do that yet. It sure appears they don't care if we experiment with it through the dataref but if they take it out then the FWL code will throw an error and perhaps that's why the FWL code doesn't want to support these "private" variables. I think if they hear how much we love the option they might put it in the selection options ultimately like P3D does

 

Joe


Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites
14 minutes ago, joepoway said:

Tyler Young says:

June 23, 2017 at 9:15 am

This is a raw dataref only, so it does not behave like a typical X-Plane setting. Our intention in exposing this is to make it available to "hackers" and plugin authors. Unless someone wants to develop a plugin to manage this setting, it will always default back to 1 at sim start. (It's a ratio between 0 and 1, so 0.5 gives you half the default level of fog.)

 

They are testing this out to see its appeal. They won't make it public yet because then they need to support it with all the developers and they aren't ready to do that yet. It sure appears they don't care if we experiment with it through the dataref but if they take it out then the FWL code will throw an error and perhaps that's why the FWL code doesn't want to support these "private" variables. I think if they here how much we love the option they might put it in the selection options ultimately like P3D does

 

Joe

I hope this works out, while I'm trying to find the older version of FWL to use during the period of indecision.

 

 

João Alfredo


It is impossible to please Greeks and Trojans

É impossivel agradar Gregos e Troianos

Share this post


Link to post
Share on other sites
On 6/28/2017 at 7:19 AM, Dumont said:

Hello
You can provide direct link to download of FlywithhLua that you use and works perfectly, last version 2.6.2, created yesterday does not work.
Thank you.

João Alfredo

FlyWithLua Core v2.6.2 loads in all .lua scripts. Restrictions have been taken out of this edition:

 

http://forums.x-plane.org/index.php?/files/file/35579-flywithlua-core-edition-for-x-plane-11-windows-linux-mac-os-x-version/

  • Upvote 1

Share this post


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

FlyWithLua Core v2.6.2 loads in all .lua scripts. Restrictions have been taken out of this edition:

 

http://forums.x-plane.org/index.php?/files/file/35579-flywithlua-core-edition-for-x-plane-11-windows-linux-mac-os-x-version/

Okay, now it works perfect, if I want zero fog I should just change 2 by 0.
And I do not understand scripts, the first line produces what?
Thank you very much for your cooperation.


João Alfredo


It is impossible to please Greeks and Trojans

É impossivel agradar Gregos e Troianos

Share this post


Link to post
Share on other sites
9 hours ago, Dumont said:

Okay, now it works perfect, if I want zero fog I should just change 2 by 0.
And I do not understand scripts, the first line produces what?
Thank you very much for your cooperation.


João Alfredo

Here's the link to the version 2.6.2 Complete Edition:

http://forums.x-plane.org/index.php?/files/file/38445-flywithlua-complete-edition-for-x-plane-11-windows-linux-mac-os-x-version/&_fromLogin=1

This is not supported as the Core Edition is but it is supposed to enable all art control Datarefs

Joe

  • Upvote 1

Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites
12 minutes ago, joepoway said:

Here's the link to the version 2.6.2 Complete Edition:

http://forums.x-plane.org/index.php?/files/file/38445-flywithlua-complete-edition-for-x-plane-11-windows-linux-mac-os-x-version/&_fromLogin=1

This is not supported as the Core Edition is but it is supposed to enable all art control Datarefs

Joe

Hello Joe

What I downloaded from the link that Sesquashtoo sent me, I'm sure it works. I downloaded the two files:
  FlyWithLua_Core_v2.6.2_Lin_Mac_Win.zip and Replacement_for_Complete_Edition_v2.6.2.zip (it's an update)
This is the link I know works:
Http://forums.x-plane.org/index.php?/files/file/35579-flywithlua-core-edition-for-x-plane-11-windows-linux-mac-os-x-version/
But maybe what you gave me too?

Thanks for your attention

João Alfredo


It is impossible to please Greeks and Trojans

É impossivel agradar Gregos e Troianos

Share this post


Link to post
Share on other sites

Interesting because that's the link to the Core version not the Complete Edition that has everything enabled? I was given the link to the Complete Edition from the developer open it and see. Perhaps the Core version works ? I just wrote the Lua script with the Complete Edition installed and it worked flawlessly!

Joe


Joe (Southern California)

SystemI9-9900KS @5.1Ghz/ Corsair H115i / Gigabyte A-390 Master / EVGA RTX 2080 Ti FTW3 Hybrid w 11Gb / Trident 32Gb DDR4-3200 C14 / Evo 970 2Tb M.2 / Samsung 40inch TV 40ku6300 4K w/ Native 30 hz capability  / Corsair AX850 PS / VKB Gunfighter Pro / Virpil MongoosT-50 Throttle / MFG Crosswind Pedals /   LINDA, VoiceAttack, ChasePlane, AIG AI, MCE, FFTF, Pilot2ATC, HP Reverb G2

Share this post


Link to post
Share on other sites
14 minutes ago, joepoway said:

Interesting because that's the link to the Core version not the Complete Edition that has everything enabled? I was given the link to the Complete Edition from the developer open it and see. Perhaps the Core version works ? I just wrote the Lua script with the Complete Edition installed and it worked flawlessly!

Joe

Ok

Some 20 minutes I return

Also works perfect, I hope LR makes this official, I never liked that excessive white fog

 

 

João Alfredo

Edited by Dumont
Add Data

It is impossible to please Greeks and Trojans

É impossivel agradar Gregos e Troianos

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...