Jump to content
The simFlight Network Forums

Loggin of [Auto] Startup


Recommended Posts

Is there some logging option I can enable to log [Auto] script parsing/starting?

I have some [Auto] scripts that work. I added a new one and it doesn't seem to load on aircraft switches. It runs if I assign it to a key press, added ipc.log() to it, but won't start on [Auto].

Link to comment
Share on other sites

Is there some logging option I can enable to log [Auto] script parsing/starting?

Starting and ending of Lua plug-ins is also logged when you select "button and key operations" logging. This is because, apart from the [Auto] facility, that is how they would usually be started or stopped.

I have some [Auto] scripts that work. I added a new one and it doesn't seem to load on aircraft switches. It runs if I assign it to a key press, added ipc.log() to it, but won't start on [Auto].

The generic [Auto] only loads once, initially when FS is ready to fly. Only aircraft or profile specific sections [Auto.<name>] load on aircraft loads, when the name or profile applies. Also don't forget that aircraft or profile specific ones only re-execute on a CHANGE of aircraft or profile, not reloading or loading one of the same match.

What version of FSUIPC are you using? Until recently there was also a bug where even the aircraft/profile specific sections didn't work unless you also had an [Axes], [JoystickCalibrations], [buttons] or [Keys] specific section too (though not necessarily for the same aircraft/profile).

You could paste your [Auto... sections here for me to check if you wished.

Regards

Pete

Link to comment
Share on other sites

Starting and ending of Lua plug-ins is also logged when you select "button and key operations" logging. This is because, apart from the [Auto] facility, that is how they would usually be started or stopped.

The generic [Auto] only loads once, initially when FS is ready to fly. Only aircraft or profile specific sections [Auto.<name>] load on aircraft loads, when the name or profile applies. Also don't forget that aircraft or profile specific ones only re-execute on a CHANGE of aircraft or profile, not reloading or loading one of the same match.

What version of FSUIPC are you using? Until recently there was also a bug where even the aircraft/profile specific sections didn't work unless you also had an [Axes], [JoystickCalibrations], [buttons] or [Keys] specific section too (though not necessarily for the same aircraft/profile).

You could paste your [Auto... sections here for me to check if you wished.

Regards

Pete

I'll try that... 4.745. can I do an Auto on any aircraft change (I understand the reload limitation) like Auto.*?

Regardless, I'm just running a simple script to reload fuel tanks to 50+/-5% and for some reason that doesn't seem to happen when I first load a flight even though the Auto section is:

[Auto]

1=Lua ConstantFailure

2=Lua ThrottleManager

3=Lua SetFuel

Link to comment
Share on other sites

I'll try that... 4.745. can I do an Auto on any aircraft change (I understand the reload limitation) like Auto.*?

No, but you could write a script to detect aircraft changes and run/rerun Lua packages that way. Or if all you are after is restarting the script on an aircraft change, build such a test into that script. There's an AIR file change counter at offset 32FC, and of course you can read the aircraft name in 3D00.

Regardless, I'm just running a simple script to reload fuel tanks to 50+/-5% and for some reason that doesn't seem to happen when I first load a flight even though the Auto section is:

The first flight is the one loaded when FS is ready, not when you go into the Flight menu to load one.

Regards

Pete

Link to comment
Share on other sites

No, but you could write a script to detect aircraft changes and run/rerun Lua packages that way. Or if all you are after is restarting the script on an aircraft change, build such a test into that script. There's an AIR file change counter at offset 32FC, and of course you can read the aircraft name in 3D00.

Very odd... key presses work for the Lua, but [Auto] does not. I changed script ordering, still nothing. In an act of desperation, I renamed it from SetFuel to FuelManager, and it worked. Can I not use "Set" in the filename for [Auto] - as shown above?

Link to comment
Share on other sites

Very odd... key presses work for the Lua, but [Auto] does not. I changed script ordering, still nothing. In an act of desperation, I renamed it from SetFuel to FuelManager, and it worked. Can I not use "Set" in the filename for [Auto] - as shown above?

Ah! It will look like the LuaSet command, so "LuaSet Fuel". Sorry, I hadn't noticed that. I don't think spaces are so relevant.

I'll make a note to see if that can be changed so that the position of the space is important. Not sure why it is different in Key assignments as opposed to Auto entries. That's a bit strange as the same parsing code is used.

(I'll have to do something about it, as the documentation for [Auto] actually uses a name starting with 'Set' as an example! :-( )

Regards

Pete

Link to comment
Share on other sites

Ah! It will look like the LuaSet command, so "LuaSet Fuel". Sorry, I hadn't noticed that. I don't think spaces are so relevant.

I'll make a note to see if that can be changed so that the position of the space is important. Not sure why it is different in Key assignments as opposed to Auto entries. That's a bit strange as the same parsing code is used.

(I'll have to do something about it, as the documentation for [Auto] actually uses a name starting with 'Set' as an example! :-( )

Regards

Pete

Do I get a prize when I report the 10th bug? :)

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy 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.