5E Character Create Playlist
  1. #1

    Join Date
    Mar 2020
    Location
    Sydney, Australia
    Posts
    247

    Using LUA Script from an Imported Ruleset

    Greetings,

    So I am developing a ruleset and extends upon another ruleset.

    I am using the <importruleset> tag to indicate the base ruleset. I do not want to rewrite anything of the original but rather extend or overwrite.

    Two questions have cropped up (thus far) ...

    1. How can I REQUIRE that the imported ruleset exists so that if it does not, this ruleset cannot be selected in the Create New Game.

    2. Can I call functions that are inside the imported ruleset? For example if it has a function called RegisterNewAttribute, can I use that function somehow to register my own additional Attributes?

    All help appreciated,
    D

  2. #2
    The import makes the ruleset code available. You can make calls to global scripts, use templates and also merge new code into already defined elements.If the imported ruleset doesnt exist, it would error out as it wont find the code your importing.
    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

  3. #3

    Join Date
    Mar 2020
    Location
    Sydney, Australia
    Posts
    247
    Quote Originally Posted by superteddy57 View Post
    The import makes the ruleset code available. You can make calls to global scripts, use templates and also merge new code into already defined elements.If the imported ruleset doesnt exist, it would error out as it wont find the code your importing.
    Okay from what you stated, it seems that #1 is answered if not an elegant result for the user - but it is answered.

    #2, however, I am not clear on. The ruleset has a specific function within one of its LUA scripts. I want to execute that function. I cannot just call it from my LUA script. So am I missing something?

    Thanks in advance,
    D

  4. #4
    I honestly need more information on what you are trying to accomplish to give you a more detailed answer, as this could go in a few different ways. The quick answer as I am assuming it's a global script is to call it and the function using dot notation. (e.g ActorManager.getActor()). If it's not a global script, then that will require using the class it's attached to or pull the code and attach it in a new file to the ruleset. Again, these are broad strokes to answer your question as not many specifics are given.
    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

  5. #5

    Join Date
    Mar 2020
    Location
    Sydney, Australia
    Posts
    247
    Quote Originally Posted by superteddy57 View Post
    I honestly need more information on what you are trying to accomplish to give you a more detailed answer, as this could go in a few different ways. The quick answer as I am assuming it's a global script is to call it and the function using dot notation. (e.g ActorManager.getActor()). If it's not a global script, then that will require using the class it's attached to or pull the code and attach it in a new file to the ruleset. Again, these are broad strokes to answer your question as not many specifics are given.
    Thanks again, I located the problem.

    I accidentally set a namespace in my extension to the same namespace in the imported ruleset - thus the function was being "destroyed" and thus not available.

    All working up to this point now.

    Thank you again,
    D

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
  •  
Starfinder Playlist

Log in

Log in