Thread: LUA questions?
-
September 9th, 2022, 23:27 #1
LUA questions?
I can't seem to find or figure out where to post questions, specifically about LUA, for instance, what's the syntax for simple rounding, using the math function?
-
September 9th, 2022, 23:52 #2
See the developers guide https://fantasygroundsunity.atlassia...eveloper+Guide as a starting point. You’ll probably get more help by posting in the armoury section or on Discord.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
September 9th, 2022, 23:53 #3
math.ceil (round up) or math.floor (round down) on a number. Most questions would be placed in the Workshop when related to coding questions.
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
-
September 10th, 2022, 01:36 #4
https://www.lua.org/docs.html for general questions about the LUA language. As mentioned above see the developer guide section of the FG wiki for information specific to programming for FG.
-
September 10th, 2022, 01:46 #5---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
September 10th, 2022, 05:38 #6
I find plenty of info on .ceil and .floor, but that's just round up, round down. I need a simple rounding, where .5 is rounded up and anything less is rounded down. Gone through the LUA 5.1 reference and so far, it's looking like I'll just have to make a function.
Can an admin move this to the Armory or Workshop, or do I just repost it?
-
September 10th, 2022, 07:35 #7
Lua deliberately doesnt have existing functions for everything.
If you need to do something like simple rounding use
math.floor(num + 0.5);
-
September 10th, 2022, 17:37 #8
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks