Updating is working today for me. Nice job.
Since it works like this, why bother making it use getRelativePath?
I get happy, and smile when I see the advanced Modders working with the game devs
Too bad I donât call myself an advanced modder, but a good worshipper instead
If you donât want to update the description (just like the image), donât fill in the information (leave the description field blank).
Confirmed: GDT.getRelativePath() doesnât seem to always return the expected path.
So? Does that mean we wonât use it at all? Return back to the old format?
I donât think so
Looking what is wrong, now
Cool. That almost means that I wonât have to reconvert 30 files in my mod about images.
Can I make a suggestion? If we use an image file we upload to the workshop as a thumbnail, can you make it without the image be renamed to image-thumbnail? I have an image named as img-Thumbnail-Thumbnail-Thumbnail.png, thatâs why.
How is the image called that you upload to steam? Image-Thumbnail? If so, the generated image would, obviously, be called Image-Thumbnail-Thumbnail. Or am I missing the point?
Important notice concerning GDT.getRelativePath()
The method GDT.getRelativePath() returns reliable information only outside events and callbacks.
To make sure you always work with the correct path, we suggest that you implement it the following way:
- In your main module javascript file (i.e. myMod.js), where you use GDT.loadJs(âŚ), add your own path storing variable
- Throughout your project, simply reference that variable to always obtain the correct path to your mod folder
Example:
var ModName_AuthorName = {};
(function () {
ModName_AuthorName.modPath = GDT.getRelativePath();
var ready = function () {
};
var error = function () {
};
GDT.loadJs(['source/source.js',
'source/OtherFile.js',
'source/SubFolder/AnotherFile.js'
], ready, error);
})();
Through all your module, you can then use the ModName_AuthorName
object to access the modPath
property (ModName_AuthorName.modPath
) and also extend that object at your wish, to implement whatever you might globally need for your mod. .
As an additional hint:
This approach would also allow other mod writers to take reference to other mods and would open new possibility for mods to interact with each other.
Obviously âModName_AuthorNameâ should be replaced with your according values;)
Yeah, so thatâs causing the Thumbnail, but what if it wasnât renamed at all?
I suppose you fixed it, lol
I did it slightly wrong, fixing the errors now xD
Okay.
Where exactly should the images be placed? In the root folder or should they be auto detected?
You should define the images.
There ya go
T
Thanks, useful.
xD