FG Spreadshirt Swag
  1. #1

    Can "Rolls" be accessed from LUA to ... roll?

    I think I recall Damned saying that the only way to roll rolls was pressing the button. If so, that is fine - I will try creating my first non MC roll later . But I figured I'd check.

    Basically, I will have a /swsave that get's it's target number programatically based on race/class/level and some situational factors. That's fine for when I want them to manually trigger it. But I already coded a /swspell that either says X casts y or it says that and rolls damage dice either static or level based. I figure I could add to that that it triggers a save roll on the target(s) but not sure if can work it to use the /swsave or if need to do my own non MC action for that.

    If know of examples if it IS allowed, feel free to name em.

  2. #2
    If you are using the CoreRPG roll actions system internally, then you can use ActionsManager.performAction with a nil for the draginfo parameter. (See 5E for many examples.)

    If you want to access the API directly, and manage yourself; there is a Comm.throwDice API call.

    Regards,
    JPG

  3. #3
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    23,935
    Blog Entries
    1
    Just have a look at the code that runs when the Roll button is clicked.

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Joshua Stream Pre

Log in

Log in