-
January 4th, 2019, 09:29 #1
Where to find information on all APIs and functions usable for custom FG coding?
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/...eveloper_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?Last edited by StoryWeaver; January 4th, 2019 at 10:30.
Extension writer, FGU Backer, Ultimate License holder.
5E Enhancer (development and support on hold for now)
Combat Enhancer 5E Classic (no longer officially supported, community support only)
ps. Do not send PM's for support for the extensions I write, I will not not be able to respond there. Use the relevant forum threads instead so the community can benefit from the replies, thank you.
-
January 4th, 2019, 12:02 #2
https://www.fantasygrounds.com/refdoc/ and examples in other rulesets is what I use.
-
January 4th, 2019, 19:39 #3
In short, you have already found the two best sources. There is no complete and comprehensive documentation. I believe you can also look at some online LUA documentation, but I don't remember which version of LUA FG uses. Other than that, search the forums here, especially the Workshop, and ask when you have questions.
Problems? See; How to Report Issues, Bugs & Problems
On Licensing & Distributing Community Content
Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
Note, I am not a SmiteWorks employee or representative, I'm just a user like you.
-
January 4th, 2019, 20:56 #4
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
The best thing is to study corerpg ruleset. Look at the scripts directory. All the managers are in there. Look at the base.xml and it will show you the manager names and the associated script file.
-
January 4th, 2019, 21:34 #5
You found the weakest part of FG
The past is a rudder to guide us, not an anchor to hold us back.
-
January 5th, 2019, 03:58 #6
It seems I'm on the right track in that case. I'll keep digging into the CoreRPG code, other extensions and the reference documents.
Thank you all for your replies, I appreciate them.Last edited by StoryWeaver; January 5th, 2019 at 04:00.
Extension writer, FGU Backer, Ultimate License holder.
5E Enhancer (development and support on hold for now)
Combat Enhancer 5E Classic (no longer officially supported, community support only)
ps. Do not send PM's for support for the extensions I write, I will not not be able to respond there. Use the relevant forum threads instead so the community can benefit from the replies, thank you.
-
January 5th, 2019, 04:33 #7
- Join Date
- Jun 2013
- Location
- Isanti, MN
- Posts
- 2,922
-
April 10th, 2020, 11:34 #8
Is there a way to determine what diagonal distance has been selected in the options,
IE Standard, Variant, Raw
From in code of course.
-
April 10th, 2020, 11:42 #9
I believe it is defined in the gameelements.xml under the distance tag.
Dominic Morta
Ruleset Developer
Smiteworks
How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it
How to provide an Unity Connection issue?-Connection Issues and What to Provide
Unity Updater issue?-Updater Issues
Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained
Comcast or Cox ISP User?-Comcast XFinity and Cox Users
Have a suggestion?-Feature Request
-
April 10th, 2020, 12:47 #10
Yes it is, But im talking about when you change it in the options menu from standard to variant to raw.
Can you detect that in code.
Im hoping so as it affects the value of a pointer arrow or distance between targets.
So changing the option is changing distance values
distance option.PNG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks