STAR TREK 2d20
  1. #1

    Coroutine Standard Lua Library

    Hi Guys,

    Does anyone know if the Coroutine Standard Lua Library is included in FG (the (somewhat old) Wiki Documentation notwithstanding)?

    If no, what would it take to put it in, Moon? Or allow us Devs' to add it ourselves?

    If yes, then why can't I get a function call (coroutine.create("my_couroutine") to work?

    Cheers
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  2. #2
    Ikael's Avatar
    Join Date
    Jan 2008
    Location
    Finland/Joensuu
    Posts
    2,383
    Quote Originally Posted by dulux-oz View Post
    Hi Guys,

    Does anyone know if the Coroutine Standard Lua Library is included in FG (the (somewhat old) Wiki Documentation notwithstanding)?

    If no, what would it take to put it in, Moon? Or allow us Devs' to add it ourselves?

    If yes, then why can't I get a function call (coroutine.create("my_couroutine") to work?

    Cheers
    Fantasy Grounds supports only very few Lua libraries (string, math, table) ref: https://www.fantasygrounds.com/modguide/scripting.xcp
    "Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness

    Post your SavageWorlds ruleset feature requests and issue reports here!

  3. #3
    Quote Originally Posted by Ikael View Post
    Fantasy Grounds supports only very few Lua libraries (string, math, table) ref: https://www.fantasygrounds.com/modguide/scripting.xcp
    The (somewhat old) Wiki Documentation notwithstanding!

    Thankyou for the response and for the help (not just now but in the past as well) but that was exactly the response I was attempting to avoid!

    To put it another way: I do actually RTFM, but as that particular page is at least 4 years old, I was wondering if things had been updated - also the reason for my subsequent questions.

    So, referring back to my original post...
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  4. #4
    Given that FG is a single threaded app with an API which is not designed to be thread safe, I have concerns that enabling coroutine would cause some re-entrancy problems when making API calls back to FG from different threads.

    Regards,
    JPG

  5. #5
    Quote Originally Posted by Moon Wizard View Post
    Given that FG is a single threaded app with an API which is not designed to be thread safe, I have concerns that enabling coroutine would cause some re-entrancy problems when making API calls back to FG from different threads.

    Regards,
    JPG
    OK, that makes perfect sense - I'll just have to come up with a different solution.

    Incidentally, will the Unity version be multi-threaded?

    Cheers
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  6. #6
    Possibly. However the main interface and API will continue to run in a single thread. We are looking at multi-threading the network code and possibly a couple other bits as well. We're still investigating what makes sense to change with the port, given we want to maintain maximum compatibility.

    Cheers,
    JPG

  7. #7
    Quote Originally Posted by Moon Wizard View Post
    Possibly. However the main interface and API will continue to run in a single thread. We are looking at multi-threading the network code and possibly a couple other bits as well. We're still investigating what makes sense to change with the port, given we want to maintain maximum compatibility.

    Cheers,
    JPG
    Cool

    Well, I solved by initial problem anyway, so no sweat on my part (not now, anyway)

    Cheers
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

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
  •  
DICE PACKS BUNDLE

Log in

Log in