View Full Version : Lua Version for FG
FredrikVladimir
November 5th, 2023, 01:11
What version of Lua does Fantasy Grounds use? (The latest version of Lua is 5.4.6) Is there a recommended IDE for developing Lua apps for FG?
LordEntrails
November 5th, 2023, 02:44
For some reason I want to say 3.1 But it should be mentioned in the Developer Guide: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996644285/Developer+Guide
Can't really speak to an IDE, but their is the RulesetWizard: Ruleset Wizard – The ruleset development environment for Fantasy Grounds (https://www.rulesetwizard.com/)
Trenloe
November 5th, 2023, 10:30
I can't find where it's documented, but I think it's LUA 5.1 - certainly that was the last version that the devs said they were using.
There's not an IDE to debug FG LUA code - they only way to do so is to run FG and make use of Debug commands in your code: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996644597/Debug
You can use multiple FG variables in the Debug commands - which will output "nil" if they variable isn't valid. This is very handy in checking on errors with nil variable. For example:
Debug.console ("Checking LUA table my LUA tables.", tMyLUATable1, tMyLUATable2, tMyLUATable3);
JustinFreitas
November 5th, 2023, 13:47
5.1… I saw it somewhere in a log file entry.
Edit: Yeah, it was in FGUpdaterEngine.log, here's the entry.
i: C:\Program Files\SmiteWorks\Fantasy Grounds\FantasyGrounds_Data/Plugins/x86_64/lua5.1.dll
LordEntrails
November 5th, 2023, 16:35
I got the .1 right. Do I get credit for that?
:)
FredrikVladimir
November 6th, 2023, 00:07
The good news is that I found a used copy of the 5.1 Manual for less than $10, delivered. So I don't have to shell out the $40 for the 5.4 manual.
Trenloe
November 6th, 2023, 09:23
There's plenty of LUA resources online.
Specific to LUA 5.1: https://www.lua.org/manual/5.1/
But keep in mind that not everything is implemented. Some info here: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996644496/Ruleset+-+Scripting#Fantasy-Grounds-Specific-Lua-Changes
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.