How to get game folder's path on web browser

ravenhood

Veteran
Veteran
Joined
Feb 26, 2020
Messages
62
Reaction score
29
First Language
Chinese
Primarily Uses
RMMV
Hi, normally, when i want to access to certain file path, ex: img/minestuff/image.png
I will run require('path') to get game folder path and then join it with the string above to get the file's path.

But if i do so on Web Browser, it will cause error because nodeJs doesn't seem to work on HMTL5 or st, but require no longer work. So, how do i get the path to that file of mine now?
Thank you (T.T) It's so frustrated
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,720
Reaction score
8,503
First Language
German
Primarily Uses
RMMV
on the web, you don't need an absolute path, you can use relative paths.

if you can't use relative paths for whatever reasons, you should explain why in more details and someone might be able to tell you a workaround.
 

Latest Threads

Latest Posts

Latest Profile Posts

RivalRamen_Games wrote on jacobv1014's profile.
I really like your profile picture! Who is that in it? is she an OC?
Making his first game
This scene was suppose to be a test... but now, it's going in the game as official side/optional content. :kaosalute:


functionality(This is function demo not game demo)
1 The door of ABS map can open upon clearing all the monsters
2 Secret room/road arrow/lighting/whatever others can be shown upon clearing too
3 Boss HP bar and loot effect, loot jump and item name color as well as the pick-up animation effect
4 Back to town and "victory aftermath" screen for ABS maps/rooms

Forum statistics

Threads
115,330
Messages
1,089,039
Members
149,994
Latest member
Huzzahhh
Top