PDA

View Full Version : If public info: What language is Fantasy Grounds coded in?



Varsuuk
January 1st, 2017, 06:40
1) I know it uses Lua for scripting, was just wondering if coded in C#, C++, C, Java (doubt... or would have a MAC kinda-native client ;)) or?

2) Second, for Unity build, was it mentioned if Mac-native client is planned for first release along with Windows (or moot if it's a same bytecode on various VMs)?


Neither asking for info SW has not already made public. Especially #2, I'm just too tired to look for the currently listed plan. I'm fine with taking it as it comes, was just wondering.

Zacchaeus
January 1st, 2017, 08:31
1) I've only ever heard of lua and xml being mentioned
2) I believe that native mac and Linux support is planned for Unity but no info on whether that will be in the initial release.

Nickademus
January 1st, 2017, 10:32
I've heard the application program is C++ currently.

Bidmaron
January 1st, 2017, 13:34
This post (https://www.fantasygrounds.com/forums/showthread.php?23859-Android-version&p=311035&highlight=android#post311035) discusses it a little, but I remember elsewhere I cannot find that the initial Unity release would still be Windows only and somewhere downstream other platforms (still unspecified as far as I know other than Mac support) would be added.

Varsuuk
January 1st, 2017, 19:48
I suspected it would be C++ since it is obviously not a "java" app and I see no loading of .NET anywhere.
But was just curious. I often wish I had the time to finally tackle learning Lua so could mess around with extensions or rulesets. But as my 3 weeks off is coming to an end I never got to even crack (virtually) a Lua PDF open. I did get to go through an online intro on Lua covering all the major areas but in a 101 style via Pluralsight.

C++ coding, that I can do now having a couple decades experience in that. Unfortunately, I don't work for them and instead work on boring Treasury bonds exchange coding...yaaaaaawn....

Nickademus
January 1st, 2017, 20:24
I learned lua in one day; literally made my first extension the day after. If you have any familiarity with programming, lua is not hard to learn. Having used a scripting language before helps, but it is still not a big deal. Honestly, it's not the language that would cause you issues, it's the design of the rulesets, as that's is where all the complexity comes in.

Pick something small to modify, look through the ruleset folder structure to get an idea of where the files are that you would need to change, open each one up (I recommend Notepad++ or any text editor that allows you to collapse sections) and just read. Try to match what you are seeing in the code with what you have experienced using FG. Then make small changes with heavy use of Debug.console("<string>" .. sStringVariable); to test things. Reference the Lua manual (https://www.lua.org/manual/5.1/) when needed.

Moon Wizard
January 1st, 2017, 20:43
Exactly what Nickademus said. I didn't know Lua before I started picking apart FG rulesets. If you have a programming background, it's a fairly straightforward scripting language. Plus, you can always work slowly and post questions here as you go.

Cheers,
JPG

Trenloe
January 1st, 2017, 20:45
Lots of hints (and links) to get you started here: https://www.fantasygrounds.com/forums/showthread.php?20651-Modifying-the-CoreRPG-ruleset