RMMV Is there any way to show picture or txt from url link?

decinbr

Veteran
Veteran
Joined
Mar 20, 2015
Messages
125
Reaction score
9
First Language
brazil
Primarily Uses
In order to show news about the game to the players
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
3,886
Reaction score
1,479
First Language
Dutch
Primarily Uses
RMMV
description is vague, can you explain what you want to accomplish?
what news? Something like a changelog? or ingame something?

because there are 1 plugin that can be used for that or inbuilt tutorial
with some html knowledge, or through another plugin that does the job
nicely as well which can be seen on the title scene and ingame if you want.

otherwise, explain more before I link those plugin if it's something YOU DO NOT
mean o avoid confusion.
 

decinbr

Veteran
Veteran
Joined
Mar 20, 2015
Messages
125
Reaction score
9
First Language
brazil
Primarily Uses
I want that a txt from my github for example, is showed inside game. Everytime when i change the txt file outside the game also is changed inside the game.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
3,886
Reaction score
1,479
First Language
Dutch
Primarily Uses
RMMV
that is more dynamic option like an online feature. which is not
doable by default.

there are online plugins, but dynamic object pure for that? not seen yet.
but I dont know if anyone will be able to make a plugin for that because
it is probably not that easy to do.

if you know how to use js, maybe you can figure it out.
on this page: Ocram_Local_Coop is also explained by another how you can
be able to draw a dynamic object (which is probably what you want).

but while this is more actor based, it's probably doable if you create
a different object, else request a plugin, because it doesn't exist so far I now.
 

decinbr

Veteran
Veteran
Joined
Mar 20, 2015
Messages
125
Reaction score
9
First Language
brazil
Primarily Uses
Thanks for the answer.
 

orochi2k

The Mad King of Neolithic
Veteran
Joined
Jan 2, 2021
Messages
99
Reaction score
151
First Language
Chinese
Primarily Uses
RMXP
I have a solution to this problem in RMXP.
I put another program written in AU3(AutoIt 3) to collect online information and then, write it to a local file.
In every update of the RPG MAKER side, check if that local location has the file that the AU3 program collected. If yes, then open it and read it into the game.

However, it will damage RMMV/RMMZ's porting ability.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
994
Reaction score
581
First Language
Poland
Primarily Uses
RMMV
You cannot do it directly from url link, because each file you see on website is managed/cached by web browser, I don't know how built in MV player manages such files, but you must keep in mind 3 things to do it:

First, you must download a file and store it temporarly, this can be done by
Code:
window.href()
method

Second, you must load that file and store it's content in variable, for that I recommend this tutorial:

Third and most important thing is to delete that file ASAP when it's not needed anymore, because sooner or later your project will contain tons of trash files.

Personally I would recommend using a game launcher (like many MMO games uses) that it's based at least on WinINet (part of Windows API) and display news/updates before actuall game starts.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,545
Reaction score
8,155
First Language
German
Primarily Uses
RMMV
@orochi2k @Soulrender
RMMV and RMMZ create HTML5-based games that always run in a browser (the exe is nothing but a browser-variant for directly accessing the base index.html) and as such always have direct web access.

@decinbr
you basically have two problems when showing pictures and text inside a MV/MZ game.

1) you need a direct link to what you want to show, and most of the free websites around try to redirect such links whenever you try to give them.
That is because such links would circumvent the ads they want you to show to pay for their service, and whenever a link is redirected to show their site including their ads it would break the game framework.

2) you need a frame inside the game to have a place where to show the content you want to display, because otherwise the link would have no space and not be visible.

the first problem has two possible fixes: either find a hosting site that allows deep linking, or pay for the webhosting - that would also have the advantage of giving you a site to host your own game at your own adress. I've been paying 10€ per month for a package of ten websites with unlimited traffic and gigabytes of upload space, and I have never had problems linking to any of my files.

the second problem either needs a plugin to create a new screen for "news" and link it to the menu or the title, or you have to use an event with a javascript command to open a new webadress in a new browser window. Which is something that javascript had been written to do, I just don't have the time to look for the required javascript commands.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,008
Reaction score
8,897
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

 Masked 

Assistant
Veteran
Joined
Oct 28, 2015
Messages
111
Reaction score
289
First Language
Portuguese
Primarily Uses
RMMZ
For a simple text file, you can use fetch (MDN - Using Fetch) to get things from a Github Gist:

JavaScript:
fetch("https://gist.githubusercontent.com/masked-rpgmaker/8a3737d97e4abff001003fb60496ea47/raw")
.then(async response =>
    $gameMessage.add(await response.text()))

(this is just an example, you should handle communication errors properly; and maybe don't display it via $gameMessage)

You can do the same with image files (upload it to github, fetch the raw file, decode the response bytes and use it as a PIXI texture), but it's somewhat harder.
 

decinbr

Veteran
Veteran
Joined
Mar 20, 2015
Messages
125
Reaction score
9
First Language
brazil
Primarily Uses
What is that? A plugin? sorrry! Im very noob on these things
 

Latest Threads

Latest Profile Posts

After gathering, sorting out & reconsidering hundreds of enemy battlers over the last two das, finally my favorite part begins: Inventing names and lore for them all :D
I'm running a sale for Learn RPG Maker MV on Itch.io, can I compete with NSFW games earning goals?
Another Friday and another Zoom call that could have been an email. Working from home is awesome.
Finished with the semester; finally have some time to play around with MV :kaopride:
Started work on the fishing Mini-Game

Forum statistics

Threads
111,372
Messages
1,060,543
Members
144,699
Latest member
Lumivos
Top