TESPY'S PROFILE
Tespy
150
I've loved games and programming since I was young. I joined this site because of my interest in Eredia: The Diary of Heroes, a project I eventually helped out in the play-testing and proofreading/editing departments.
My best skills lie in game programming, proofreading/editing English text, and play-testing games.
Most of my game programming experience is in Unity, and I've grown pretty confident in my skills. I've been learning to script for RMMV as well, and at the time of this writing, I've created two nice plugins for it.
Most of my play-testing/proofreading/editing experience is as QA staff at a certain eroge publisher. Did more than 8 projects for them.
My best skills lie in game programming, proofreading/editing English text, and play-testing games.
Most of my game programming experience is in Unity, and I've grown pretty confident in my skills. I've been learning to script for RMMV as well, and at the time of this writing, I've created two nice plugins for it.
Most of my play-testing/proofreading/editing experience is as QA staff at a certain eroge publisher. Did more than 8 projects for them.
Search
Filter
[RMMV] Class variable values reset to undefined upon scene change
Yes, I used the "this" pointer in both instances. And I know what it's for; I have a fair foundation in object-oriented computer programming xD
First, the pointer was used when the variable was initialized in the object constructor. Then, as I mentioned before, it is called in the class' isMenuEnabled function.
All this should be happening within the same object; I only instantiated one in my script.
First, the pointer was used when the variable was initialized in the object constructor. Then, as I mentioned before, it is called in the class' isMenuEnabled function.
All this should be happening within the same object; I only instantiated one in my script.
[RMMV] Class variable values reset to undefined upon scene change
I've encapsulated my plugin (mostly) in a class, and in its constructor, I have this:
That code runs just fine as soon as the title screen is booted up; the developer tools window logs "Maps: 503" as it should. But as soon as I start a new game, apparently that variable just resets itself to undefined; when I log it in my aliased isMenuEnabled function, the dev tools window logs "Maps: undefined".
There is literally nothing in that plugin that sets that variable to undefined.
I'm confused. Could someone explain to me why this happened? If it's normal behavior in RMMV, how do I avoid my class variables being reset when the scene changes? This resetting would make sense if the variables were pointing to things that RMMV itself manages, but yeah.
this._maps = ['503'];
console.log("Maps: " + this._maps);
That code runs just fine as soon as the title screen is booted up; the developer tools window logs "Maps: 503" as it should. But as soon as I start a new game, apparently that variable just resets itself to undefined; when I log it in my aliased isMenuEnabled function, the dev tools window logs "Maps: undefined".
There is literally nothing in that plugin that sets that variable to undefined.
I'm confused. Could someone explain to me why this happened? If it's normal behavior in RMMV, how do I avoid my class variables being reset when the scene changes? This resetting would make sense if the variables were pointing to things that RMMV itself manages, but yeah.
[RMMV] How do I use my own classes in RMMV?
I pressed F8 this time as you suggested, and the window popped up! It said that it doesn't allow certain ES6 keywords (let, const, class, etc) outside of strict mode. So, all I had to do to make my classes work is to set my scripts to use strict mode.
Thanks, coelocanth ^_^
Thanks, coelocanth ^_^
Hungover.PNG
[RMMV] How do I use my own classes in RMMV?
1. What do you mean? This post confirms that classes work in RMMV.
2. Unfortunately, nothing happens when I press F12 as you said.
2. I know I could have plugins encapsulated that way, but it's just so... ugly. I prefer to use straight-up functions, which worked just fine for me.
3. I've already been going through JS tutorials, specifically in Codecademy's Intro to JS course; I didn't even bother going through SRDude's tutorials until it taught me classes, which is fairly deep into the aforementioned Codecademy course.
2. Unfortunately, nothing happens when I press F12 as you said.
2. I know I could have plugins encapsulated that way, but it's just so... ugly. I prefer to use straight-up functions, which worked just fine for me.
3. I've already been going through JS tutorials, specifically in Codecademy's Intro to JS course; I didn't even bother going through SRDude's tutorials until it taught me classes, which is fairly deep into the aforementioned Codecademy course.
[RMMV] How do I use my own classes in RMMV?
I've been following SRDude's plugin tutorials on Youtube, and have been refactoring the code to fit my style. It worked just fine until I decided to create my own class encapsulating the plugin in the tutorial. The code:
For some reason, just having this class in the plugin file makes it do nothing, even though I didn't instantiate the class. I still had the old code set up to run, and it only works when the class is commented out.
What should I do so that I can use my own custom classes in plugins? If it helps, I'm using V1.5.1.
// [Global scope] For Aliasing
var oldExecuteMove = Game_Player.prototype.executeMove;
class MyFirstPlugin
{
run()
{
Game_Player.prototype.executeMove = this._executeMove;
}
_executeMove(direction)
{
// Call the old version first, then whatever new stuff you want to add. This is
// what people call Aliasing in RMMV coding.
oldExecuteMove.call(this, direction);
this.moveStraight(direction);
$gameMessage.add("Hello World!");
}
}
For some reason, just having this class in the plugin file makes it do nothing, even though I didn't instantiate the class. I still had the old code set up to run, and it only works when the class is commented out.
What should I do so that I can use my own custom classes in plugins? If it helps, I'm using V1.5.1.
Eva Reynes: Volume One
Fair enough. And, I see ^_^ I just gained a new respect for Sage; I didn't know he was so versatile, able to draw in two different styles.
Eva Reynes: Volume One
I agree that this looks pretty good ^_^ I'll be looking forward to a demo.
Though, one thing I'd like to suggest is to make the font size about the right size to fit two lines of dialogue per box, like in the 3DS Fire Emblem games. That is, if you ever plan to port this game to mobile; the bigger font size will be much easier to read on a smaller screen.
Should you not be able to fit a full sentence in one dialogue box, you'd take a page out of manga's book (heh) and place ellipses to separate the line between boxes.
Btw, who's the artist behind those lovely CGs? : o
Though, one thing I'd like to suggest is to make the font size about the right size to fit two lines of dialogue per box, like in the 3DS Fire Emblem games. That is, if you ever plan to port this game to mobile; the bigger font size will be much easier to read on a smaller screen.
Should you not be able to fit a full sentence in one dialogue box, you'd take a page out of manga's book (heh) and place ellipses to separate the line between boxes.
Btw, who's the artist behind those lovely CGs? : o
Future of Eredia and Potatobrain Games
I'll be looking forward to both this new detective game and Eredia 2. :) Will the detective game be made in RMMV, btw?













