-
December 24th, 2018, 20:27 #1
- Join Date
- Jun 2018
- Posts
- 112
Need help using images and tokens from a module
Hello,
I'm making an extension for FG and I'm having issues using images and tokens in my module. Using image@module isn't working. I've tried using GetModule, getmoduleinfo, get path, get root... I think I'm getting close, but it has eluded me for the last couple weeks. I might just be messing up the syntax... I don't know anymore... It's extremely frustrating!
I also do not know if I should use a onmodule load trigger, or just be able to use Oninit... Or if I need to identify the addressing in some way...
I have been working hard to crack this cookie... Any help would be greatly appreciated!
I'm trying to set an image (for bitmapWidget) or token (setting the prototype())but so far I have to include the file in the extension... And I want to use a token module...
Thank you all for your time, help and Happy holidays!
V/r,
~Bob
-
December 24th, 2018, 21:16 #2
-
December 24th, 2018, 21:56 #3
- Join Date
- Jun 2018
- Posts
- 112
-
December 24th, 2018, 22:03 #4
- Join Date
- Jun 2018
- Posts
- 112
So using an onmoduleload is probably my best bet... But still having pathing issues...
-
December 24th, 2018, 23:25 #5
-
December 25th, 2018, 00:15 #6
- Join Date
- Jun 2018
- Posts
- 112
I don't see why it would necessarily need to be "in" the ext...
To my knowledge the load hierarchy is:
FG
Rulesets
Extensions
Modules
If the sole problem was the load order, then rulesets would not be able to access modules... And the function I'm looking for is basically the same as the letters module usage by extensions and rulesets... Just instead of letters.mod, I want to use my module...
Automatic Letters was even incorporated into coreRPG by moonwizard after Ikael made a module to do such, for the SW ruleset... Obviously it was changed for the ruleset... But, my question is how do I do it?...
In the ruleset moonwizard made the addressing as token@module... I just need to know how to setup that same type of addressing for my extension...Last edited by Diablobob; December 25th, 2018 at 00:20.
-
December 25th, 2018, 00:19 #7
- Join Date
- Jun 2018
- Posts
- 112
Also before it was added to corRpg, trenlo adjusted the extension code to be used in 5e... And it worked... I'm just trying to figure out that ability
-
December 25th, 2018, 02:58 #8
For tokens you need the full path to the token within the .mod file, plus the @<module name> reference (the <name> field from the module definition.xml file). For example: tokens/tokenname.png@Token Module
I'm not really sure what you're trying to do and when. If you're trying to access tokens in modules during the initialization of an extension, then that probably won't work - which is what damned was mentioning. If your code is only ran once the campaign is fully loaded, then you should be able to access the token files in a module - assuming you have the path and module name correct.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
December 25th, 2018, 04:13 #9
- Join Date
- Jun 2018
- Posts
- 112
Ah! I think that is where I was having an issue... I miss understood the context of damned's message... If you read this damned, I'm sorry if I seamed rude in anyway! I was just trying to figure stuf out...
Also thank you trenloe, I will try that... I was thinking that was the case, but I think I was placing it in the wrong location...
-
December 25th, 2018, 04:25 #10
- Join Date
- Jun 2018
- Posts
- 112
I think what my main problem is I was trying to define them in the ext, but was missing adding them to the mod file definitions... I'll let you know when I get to try it out
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks