Original Source
- Original title: Load resources, JSON, etc. with XMLHttpRequest
- Original author: globophobe
- Original date: November 26, 2016
- Source thread: https://forums.rpgmakerweb.com/threads/load-resources-json-etc-with-xmlhttprequest.71505/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Learning Javascript
Summary
I've been tasked with making an educational RPG. I need to have a quiz in the battles. I put event pages in troops to show messages, and choices at the start of each turn. This is great Next, I need to load quiz data, which is JSON, from a server, as well as sound and picture files. Reading through forum posts, and MV's source code, it seems that resources are loaded with XMLHttpRequest. It seems like it would be enough to get the JSON response, and split the key/values into MV's variables, i.e....
Archived First Post
Next, I need to load quiz data, which is JSON, from a server, as well as sound and picture files. Reading through forum posts, and MV's source code, it seems that resources are loaded with XMLHttpRequest. It seems like it would be enough to get the JSON response, and split the key/values into MV's variables, i.e. var 1 = question; 2 = sound file; 3 = picture; 4 = answer; 5 = distractor, etc. Buffer the question, so vars 6 ~ 10 are the next question. And after the user makes a choice send their response to the server, shifts vars 6 ~ 10 to vars 1 ~ 5, and load another question, etc.
Ideally, the sound and picture files will be exported from the server to MV, and via Python inserted directly into MV's JSON files. My questions are, "Does this make any sense?" and "Are there any issues to be aware of with loading MV with remote resources?"
Also, "What other resources/tutorials do you suggest to help creating plugins?"
So far, I've found:
https://docs.google.com/spreadsheets/d/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs/edit#gid=0
and plugins such as:
https://github.com/triacontane/PluginDevelopment/tree/master/js/plugins
to be good guides.
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...