-
April 21st, 2020, 06:19 #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
-
April 21st, 2020, 07:45 #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
-
April 21st, 2020, 09:56 #3
- Join Date
- Mar 2020
- Location
- Sydney, Australia
- Posts
- 247
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
-
April 21st, 2020, 10:47 #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
-
April 21st, 2020, 14:07 #5
- Join Date
- Mar 2020
- Location
- Sydney, Australia
- Posts
- 247
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks