Thread: Couple extension questions
-
February 26th, 2021, 21:54 #1
Couple extension questions
Is there a way to import another extension? If so, how would I go about doing that? And if so, is overriding functions in the imported extension as easy as it is to override functions in the rulesets?
Example:
I've got a CoreRPG Wound Overlay extension. Say I want to make a 5E specific Wound Overlay extension that takes the CoreRPG version and modifies it slightly. As opposed to copy/pasting, I want to import the code from the CoreRPG version.
If the CoreRPG version has a function named updateWoundOverlay maybe I want to call the CoreRPG version of that in my 5E, but insert some additional code. Or maybe I want to override that function entirely. How would I go about that?
Another question:
What's the best practice approach to documenting that an extension adds a slash command in the chat window? It's not showing up in /help when I've added one.
-
February 26th, 2021, 23:30 #2
There are some posts (somewhere) by Dulux-Oz where he shows how to prevent an extension from being selected on the campaign window unless the required extension is also selected. Its several years ago.
Add an Announcement ?
-
February 26th, 2021, 23:34 #3
It might as simple as:
Code:<dependency> <name>BaseExtension</name> </dependency>
-
February 26th, 2021, 23:37 #4
But how about within the new extension code itself when dealing with the dependency extension code? Is it just the same as say dealing with CoreRPG code in an extension?
Just wasn't sure if this was the way to go about it. Particularly if you happen to have a bunch of slash commands being added. Also not sure if there's a way to get them to show up when you type /helpLast edited by daddyogreman; February 26th, 2021 at 23:53.
-
February 26th, 2021, 23:52 #5
-
February 27th, 2021, 00:16 #6
Your code doesnt know if the underlying code was loaded by CoreRPG, 5E (example) or an extension. The code it sees is all code that has been loaded to that point.
-
February 27th, 2021, 00:18 #7
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks