DICE PACKS BUNDLE

Thread: lua maths

  1. #1

    lua maths

    hi,

    Is it allowed to do .maths with the current .lua version in FG? If so, i'd like to know how to do this :

    I got a Strength value that i can get. I'd like to get (2x Strength) to use the result elsewhere.

    Many thanks

  2. #2

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    The name of the strength attribute in the database depends on which ruleset you're using. In Castles and Crusades, for example, you can use the following to calculate that value:

    local nTotal = DB.getValue(nodeChar, "abilities.strength.score", 0);
    nTotal = nTotal * 2;

  3. #3
    Thanks, i'll try it.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    For further info on what you can do with LUA in FG see here: https://www.fantasygrounds.com/modguide/scripting.xcp
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in