Board index FlightGear Development Nasal

fgcommand doco ?

Nasal is the scripting language of FlightGear.

fgcommand doco ?

Postby gkick » Tue Jul 02, 2019 2:56 am

Hi,

Anyone knows if there is a listing somewhere of available fgcommands ? Looking for a way to load a scenario bypassing the launcher and the ai dialog

thks
gkick
 
Posts: 106
Joined: Sun Jan 01, 2017 11:04 pm

Re: fgcommand doco ?

Postby wlbragg » Tue Jul 02, 2019 4:53 am

Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4808
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: fgcommand doco ?

Postby gkick » Tue Jul 02, 2019 5:30 am

Thanks you, however I am looking for an equivalent fgcommand(..... which can be imbedded in a nasal script
gkick
 
Posts: 106
Joined: Sun Jan 01, 2017 11:04 pm

Re: fgcommand doco ?

Postby Octal450 » Tue Jul 02, 2019 5:53 am

Leto did something like like this in the f16, maybe it is use to you: https://github.com/NikolaiVChr/f16/blob ... /mig28.nas

Kind Regards,
Josh
Octal450

Lead Programmer, IDG (Join our Discord!)
Download High Quality Aircraft from Octal450 Hangar
User avatar
Octal450
 
Posts: 4286
Joined: Tue Oct 06, 2015 12:51 pm

Re: fgcommand doco ?

Postby gkick » Tue Jul 02, 2019 6:05 am

Thanks Josh
gkick
 
Posts: 106
Joined: Sun Jan 01, 2017 11:04 pm

Re: fgcommand doco ?

Postby Johan G » Thu Jul 04, 2019 10:10 pm

gkick wrote in Tue Jul 02, 2019 2:56 am:Anyone knows if there is a listing somewhere of available fgcommands ?

Not that it was what you where looking for, but in case someone find this topic looking for more on them, see the README.commands file for a (hopefully rather complete) list and the FlightGear wiki article Bindings (permalink) which might be of additional help.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5480
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: fgcommand doco ?

Postby Hooray » Sat Jul 06, 2019 11:14 am

Actually, that's exactly right: fgcommands are documented in README.commands, which unfortunately hasn't been updated in a while.

Like you say, these days many subsystems register their own fgcommands, so that it would make sense to expose the SGCommandMgr to Nasal to obtain a list of commands dynamically, possibly in conjunction with fields documenting purpose and syntax/usage.

This would be a really simply C++ modification that would nicely fit the addcommand/removecommand APIs, i.e. an API to retrieve a list of available fgcommands, along with a help string, and an example.

That way, the list of fgcommands could be dynamically retrieved and shown on-screen, directly inside FlightGear, e.g. as part of the Nasal Console.

This would be superior to anything involving README files or wiki articles, because FlightGear fgcommands would become self-documenting
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am


Return to Nasal

Who is online

Users browsing this forum: No registered users and 2 guests