iframe plugin for RpgMakerMZ

iframe v1.0
by jakubiszon
​

Introduction
I have created a little plugin which allows launching extra pages in an iframe.
The plugin does not do much itself but it makes it easy to integrate other HTML pages with your RPG Maker game.
These pages can in turn return data into your game opening endless possibilities.

Features
  • showing pages built with any tool that can output HTML
  • reacting to events emitted by the pages
  • observing data inside the pages
  • calling a common event when events occur or data is changed
  • resizing the iframe to match window size

Screenshots
An example integration with pages built containing simple games built with PICO8 and Pocket Platformer.
preview.gif


How to Use
You need to include the pages in your ptoject files. Then you can reference them in the pageUrl param when calling the show command. Some extra parameters are needed to tell the plugin how the page will communicate its data back to the game.

Plugin Commands / Script Calls
  • show - displays an iframe
  • hide - hides the current iframe

The show method takes following parameters:
  • pageUrl - Address of the page to show, relative to the index page e.g. "./page1.html".
  • commonEvent - (optional) Event called when the page sends a callback or its data is changed.
  • outputVariable - (optional) Variable which assigned data received from the page right before the common event is launched.
  • callbackPath - (optional) The path of a callback to assign inside the embedded page.
  • watchPath - (optional) The path to data inside the iframe which is tracked for changes.

Demo
A very simple demo with PICO-8 and Pocket Platformer used as "traveling systems".
The demo server as a "proof of concept" for using callbackPath and watchPath to return data into the game.

Download

Terms and Credits
The plugin can be used with any games including commercial and adult-themed.
Crediting me is not required but would be appreciated. If you wished to give credit, please link to my github:
This looks like a very interesting plugin!

I saw on the github page that this comes with a gnu license. If I'm reading it correctly, does it mean any project that has this integrated must have its source code available? Just curious to know what needs to be done.
Hi. I have actually updated to use the Mozilla Public License Version 2.0
It allows using my code as part of any larger piece of software - including closed source and commercial. The files which you copy from my plugin to your program should be marked as using the license - the code in iframe.js already states that.

This in effect allows you to simply copy and use the iframe.js file and publish your game as you wish without restrictions. Hope that helps.
Hi. I have actually updated to use the Mozilla Public License Version 2.0
It allows using my code as part of any larger piece of software - including closed source and commercial. The files which you copy from my plugin to your program should be marked as using the license - the code in iframe.js already states that.

This in effect allows you to simply copy and use the iframe.js file and publish your game as you wish without restrictions. Hope that helps.
Thanks for the heads up! Glad to have gotten clarity on that.

Original thread: https://forums.rpgmakerweb.com/threads/iframe-plugin-for-rpgmakermz.175548/