StoryWeaver
January 4th, 2019, 09:29
While developing in lua within FG, besides googling, extracting and digging through modules and extensions to see sample code I've found these two resources.
https://www.fantasygrounds.com/refdoc/
https://www.fantasygrounds.com/wiki/index.php/Developer_Guide
While they are good they still seem to miss a large amount of more specific information on various functions and API calls within FG that are available.
As just one example the, OptionsManager (ex OptionsManager.addOptionValue()) function. Found this in a reply to a forum question some years back, "OptionsManager.isOption(<option name>, <option value>) or OptionsManager.getOption(<option name>)". Found calls to this in CoreRPG.pak\scripts\data_options_core.lua, but so far been unable to find the original source of this information.
That's just one example of course, but there are any number of functions or calls such as those, and as I can't exactly walk/step through the code during execution to trace the source and keep an eye on the variables during the process it leads me to the following questions.
Is there some other document source I'm missing that details all of these?
Or do I need to search for them manually in for example the CoreRPG.pak and do my best to guess the parameters and make sense of them from there?
Are some of these encrypted away in the data\vault, if so how do I find these details if there?
How do I find the pipeline of function calls?
In other words, where/how do I find out what purpose, parameters, return values etc. all the inbuilt FG functions have?
https://www.fantasygrounds.com/refdoc/
https://www.fantasygrounds.com/wiki/index.php/Developer_Guide
While they are good they still seem to miss a large amount of more specific information on various functions and API calls within FG that are available.
As just one example the, OptionsManager (ex OptionsManager.addOptionValue()) function. Found this in a reply to a forum question some years back, "OptionsManager.isOption(<option name>, <option value>) or OptionsManager.getOption(<option name>)". Found calls to this in CoreRPG.pak\scripts\data_options_core.lua, but so far been unable to find the original source of this information.
That's just one example of course, but there are any number of functions or calls such as those, and as I can't exactly walk/step through the code during execution to trace the source and keep an eye on the variables during the process it leads me to the following questions.
Is there some other document source I'm missing that details all of these?
Or do I need to search for them manually in for example the CoreRPG.pak and do my best to guess the parameters and make sense of them from there?
Are some of these encrypted away in the data\vault, if so how do I find these details if there?
How do I find the pipeline of function calls?
In other words, where/how do I find out what purpose, parameters, return values etc. all the inbuilt FG functions have?