LOKISHADE'S PROFILE
Lokishade
50
Search
Filter
[RMMV] Creating a custom variable and using it
So, it works... to an extent.
Maybe I have to find ways to reduce lag or something, because it takes forever to run the algorithm when there is only 600 tiles. I didn't have the patience to wait out for the 4356 tiles I was going for (a 66x66 map).
I am at a loss. Maybe working with arrays inherently takes too much time and I really need separate variables. I know that putting (0.0)sec pauses in RM2k3 reduced lag, but that's not how it works in RMMV.
P.S. I get the sense that maybe my wording was confusing. It's not through a command console that I declare these variables, but by opening a plain script call in RMMV and typing: window.myVar in it. That's all you have to do to have a global variable that can be used outside the function in which it is created. The command console was to illustrate the principle using Javascript browsers.
Maybe I have to find ways to reduce lag or something, because it takes forever to run the algorithm when there is only 600 tiles. I didn't have the patience to wait out for the 4356 tiles I was going for (a 66x66 map).
I am at a loss. Maybe working with arrays inherently takes too much time and I really need separate variables. I know that putting (0.0)sec pauses in RM2k3 reduced lag, but that's not how it works in RMMV.
P.S. I get the sense that maybe my wording was confusing. It's not through a command console that I declare these variables, but by opening a plain script call in RMMV and typing: window.myVar in it. That's all you have to do to have a global variable that can be used outside the function in which it is created. The command console was to illustrate the principle using Javascript browsers.
[RMMV] Creating a custom variable and using it
I chanced upon the solution to my problem in another forum. It was written 5 years ago, but darn it was it hard to find.
I'll paraphrase what the guy explained, since it could be of interest:
Since script calls are their own functions, everything you write in their prompts is self-contained and discarded when done. That means that, indeed, you have to attach your variable to something that is already global if you want it to be global.
Most people then suggest you make a modification of $gameVariables or something else in the maker, but this guy suggested something he himself qualified as outlandish: the window.
He even suggested testing it in your own browser, right here, right now by pressing F12, if your browser is Chrome or something that has this Console function and type:
So, all you have to do in RPG Maker is type in a script prompt:
and just like that, you have a global variable that can be used by any script call in the game. Just make sure that all future references to "myVar" come after the declaration, or else the game will crash.
Now, I am going to stress test this strange, yet simple method by making window.myVar an array and seeing if it can handle the data required to make Dijksra's algorithm function.
I'll paraphrase what the guy explained, since it could be of interest:
Since script calls are their own functions, everything you write in their prompts is self-contained and discarded when done. That means that, indeed, you have to attach your variable to something that is already global if you want it to be global.
Most people then suggest you make a modification of $gameVariables or something else in the maker, but this guy suggested something he himself qualified as outlandish: the window.
He even suggested testing it in your own browser, right here, right now by pressing F12, if your browser is Chrome or something that has this Console function and type:
let myVar = 5; //global scope console.log("The value is " + window.myVar); //myVar is a property of window automatically
So, all you have to do in RPG Maker is type in a script prompt:
window.myVar
Now, I am going to stress test this strange, yet simple method by making window.myVar an array and seeing if it can handle the data required to make Dijksra's algorithm function.
[RMMV] Creating a custom variable and using it
You guessed it right.
At this point, it is done solely through a script call that looks like
where n has to be set to the right value or else I don't get x. Since it is written code, I can even use variables as pointers. Of course, since it is not part of the maker's interface, I have to keep track of it all and know what's what.
I spent a year on Kazesui's tutorial to make heads and tails of it. It all seems much less complicated now than when I started, but I still don't have enough knowledge to write my own code.
So, the issue I am dealing with is the variable limitation. I thought I could fix that by using arrays, but the maker chokes when more than 100 variables are added to a built-in game variable. Still, the ability to make variables that are worth 100 each, that's very powerful and I foresee tons of uses from it, now that I know how to use it.
At this point, it is done solely through a script call that looks like
$gameVariables.value(1)[n] = x
I spent a year on Kazesui's tutorial to make heads and tails of it. It all seems much less complicated now than when I started, but I still don't have enough knowledge to write my own code.
So, the issue I am dealing with is the variable limitation. I thought I could fix that by using arrays, but the maker chokes when more than 100 variables are added to a built-in game variable. Still, the ability to make variables that are worth 100 each, that's very powerful and I foresee tons of uses from it, now that I know how to use it.
[RMMV] Creating a custom variable and using it
Thank you for your input. I see why so many people still use VX Ace.
What I am doing is following Kazesui's tutorial on tactical movement. He wrote that some 12 years ago for RM2k3. Doing it in RMMV requires me to circumvent the variable limitation that RM2k3 did not have. (You CAN point to variables that "don't exist", but they all return 0, whereas RM2k3 returned the value you put into them).
I tried turning a game variable into an array, but then the game returns "nothing" if there are more than 100 variables in it. It doesn't crash, but the called script just does nothing like it's not there. RMMV's default game variables seem to have too many functionalities attached to them to allow them to handle the sheer volume of data that I am feeding them.
The reason I want to create a custom variable is for it to be free of many functionalities so it can handle the volume of data I am feeding it. So, I don't think attaching it to an already existing object will do the job.
If worst comes to pass, I'll switch to VX Ace if you can still have arrays and do a square root operation in your code.
What I am doing is following Kazesui's tutorial on tactical movement. He wrote that some 12 years ago for RM2k3. Doing it in RMMV requires me to circumvent the variable limitation that RM2k3 did not have. (You CAN point to variables that "don't exist", but they all return 0, whereas RM2k3 returned the value you put into them).
I tried turning a game variable into an array, but then the game returns "nothing" if there are more than 100 variables in it. It doesn't crash, but the called script just does nothing like it's not there. RMMV's default game variables seem to have too many functionalities attached to them to allow them to handle the sheer volume of data that I am feeding them.
The reason I want to create a custom variable is for it to be free of many functionalities so it can handle the volume of data I am feeding it. So, I don't think attaching it to an already existing object will do the job.
If worst comes to pass, I'll switch to VX Ace if you can still have arrays and do a square root operation in your code.
[RMMV] Creating a custom variable and using it
Hi everyone. I need some pointers on this topic.
I want to create a custom variable in RMMV and then use it.
I tried to do this through a script call and it worked... to an extent. As it is, my knowledge doesn't let me do any further modifications to said variable. Even on the same event page, the second script call that tries to tamper with it makes the software say the variable I declared two lines ago isn't declared.
I need to find a way for the maker to remember my new variable so other events can add new data to it.
I want to create a custom variable in RMMV and then use it.
I tried to do this through a script call and it worked... to an extent. As it is, my knowledge doesn't let me do any further modifications to said variable. Even on the same event page, the second script call that tries to tamper with it makes the software say the variable I declared two lines ago isn't declared.
I need to find a way for the maker to remember my new variable so other events can add new data to it.
[Poll] What is the best kind of villain/antagonist?
For me, it's the Badass Villain.
The complete sleazebags that commit gratuitous atrocities throughout the game end up demoralizing me, more often than not. It's like, as long as I experience the medium, I live in hell and there is nothing I can do about it until the eleventh hour where I am finally allowed to just win. And by then, all I am left with is a pyrrhic victory where everything I loved and cherished is either dead or destroyed beyond repair.
Compare to the Badass Villain. Usually, if you don't want your villain to come across as pathetic, his evil has to be carried out with purpose. There is an intrigue going on in the shadows, where danger and adventure are intermarried. Defeating the Badass Villain requires you to man up and find a way. You *have* to find out that there is more to life than you currently know if you want to stand a chance.
Defeating the villain you hate is like stopping an hemorrhage. You just did it to survive and the damage is done because you couldn't do it right away.
Defeating the Badass villain requires you to become an even greater badass. You get to show everyone that there is another, better way to do things. You may even gain the respect of the Badass Villain and have him join your cause. (Movie example: Darth Vader Game example: Magus)
The complete sleazebags that commit gratuitous atrocities throughout the game end up demoralizing me, more often than not. It's like, as long as I experience the medium, I live in hell and there is nothing I can do about it until the eleventh hour where I am finally allowed to just win. And by then, all I am left with is a pyrrhic victory where everything I loved and cherished is either dead or destroyed beyond repair.
Compare to the Badass Villain. Usually, if you don't want your villain to come across as pathetic, his evil has to be carried out with purpose. There is an intrigue going on in the shadows, where danger and adventure are intermarried. Defeating the Badass Villain requires you to man up and find a way. You *have* to find out that there is more to life than you currently know if you want to stand a chance.
Defeating the villain you hate is like stopping an hemorrhage. You just did it to survive and the damage is done because you couldn't do it right away.
Defeating the Badass villain requires you to become an even greater badass. You get to show everyone that there is another, better way to do things. You may even gain the respect of the Badass Villain and have him join your cause. (Movie example: Darth Vader Game example: Magus)
What makes a good Crafting system?
I had a game idea floating around in my head for quite a while, one based around crafting. One way I found to circumvent the tediousness of grinding is to have the protagonist be in charge of all the operations.
He's the one to gather intel on the type of monsters encountered and what they drop, monstly through cataloguing his own observations. Then, he goes into battle with the people he selected and instructs them *how* to kill the monsters so they drop the desired loot every time.
Example: Defeating a Slime will only yield the Slime Core, the magic gem that suffused itself with Ooze to become a monster. But defeat it with Ice magic and its Ooze will freeze in place and be collectable instead of the Core. There is also a way of defeating a Slime instantly by driving a spear through its Core, thereby shattering it. Of course, this method makes the Slime drop nothing.
By making the type of attack matter for drops, you now have tactical decisions to make. Do you want this item instead of the other? Maybe there is a third, hidden item that can be obtained through less obvious means. Or maybe you just want to breeze past that encounter to preserve your resources.
He's the one to gather intel on the type of monsters encountered and what they drop, monstly through cataloguing his own observations. Then, he goes into battle with the people he selected and instructs them *how* to kill the monsters so they drop the desired loot every time.
Example: Defeating a Slime will only yield the Slime Core, the magic gem that suffused itself with Ooze to become a monster. But defeat it with Ice magic and its Ooze will freeze in place and be collectable instead of the Core. There is also a way of defeating a Slime instantly by driving a spear through its Core, thereby shattering it. Of course, this method makes the Slime drop nothing.
By making the type of attack matter for drops, you now have tactical decisions to make. Do you want this item instead of the other? Maybe there is a third, hidden item that can be obtained through less obvious means. Or maybe you just want to breeze past that encounter to preserve your resources.
What do you look for in games that you want to play?
I look mostly for novel ideas.
Before the merger, Enix used to publish many such games. Valkyrie Profile, in my opinion a rough gem, used platforming elements for dungeon exploration and combined real-time combos with classic turn based combat. It felt like it had the ambition of making you play the war in Asgard on top of it all but had to cut it due to the game being large enough. Oh, what could have been.
The fact that you recruited your warriors after their death meant you were witnessing the most tragic and desperate moment of their life. And then you swooped in to grant them passage to the afterlife. Very powerful. Sadly, the sequel failed to understand that this is the place where they struck gold. Instead, you just picked your warriors up like flowers and what could have been a powerful bonding experience is now reduced to an easily overlooked footnote in the status screen.
Star Ocean used real-time combat mechanics with multiple party members. In it, you could trigger some attacks and simply move out of the way to dodge them, like a fire breath. Very neat. Imagine my surprise when I found out they tried this on the SuperFamicom 3 years prior. My gripe was that, even though it had a futuristic setting, you were always stuck using medieval weaponry due to being catapulted in worlds without technological advancement. Don't present a novel idea only to backpedal on it, dammit. This is why my favorite Star Ocean 2 character is Opera, simply becaues she wields a huge a** multifunction futuristic rifle, and Precis because of all the gadgets she throws at the enemy. Nevermind that they are 2 of the 3 most annoying voiceovers of the game, I'm here for the futuristic concept.
Before the merger, Enix used to publish many such games. Valkyrie Profile, in my opinion a rough gem, used platforming elements for dungeon exploration and combined real-time combos with classic turn based combat. It felt like it had the ambition of making you play the war in Asgard on top of it all but had to cut it due to the game being large enough. Oh, what could have been.
The fact that you recruited your warriors after their death meant you were witnessing the most tragic and desperate moment of their life. And then you swooped in to grant them passage to the afterlife. Very powerful. Sadly, the sequel failed to understand that this is the place where they struck gold. Instead, you just picked your warriors up like flowers and what could have been a powerful bonding experience is now reduced to an easily overlooked footnote in the status screen.
Star Ocean used real-time combat mechanics with multiple party members. In it, you could trigger some attacks and simply move out of the way to dodge them, like a fire breath. Very neat. Imagine my surprise when I found out they tried this on the SuperFamicom 3 years prior. My gripe was that, even though it had a futuristic setting, you were always stuck using medieval weaponry due to being catapulted in worlds without technological advancement. Don't present a novel idea only to backpedal on it, dammit. This is why my favorite Star Ocean 2 character is Opera, simply becaues she wields a huge a** multifunction futuristic rifle, and Precis because of all the gadgets she throws at the enemy. Nevermind that they are 2 of the 3 most annoying voiceovers of the game, I'm here for the futuristic concept.
Whatchu Workin' On? Tell us!
With my addled brain that knows nothing of coding, I've been working on an adaptaion of DnD on RPG Maker MV for 2 years now (I didn't have much free time and even less concentration). This is gonna be a strategy RPG.
This is a very ambitious project, but it is the one I went the farthest with. Before then, I did every mistake in the book when it comes to managing a video game project. Now, I have the patience to work on the required game systems before attempting to design the game proper, BEFORE writing a story.
So far, thanks to the pointers of a friend, I can calculate the distance between two events (this is how I know I'm in melee range, for example). I can also fire a projectile that can get interrupted by any obstacle standing in the line of fire (this is how monks and ninjas will be able to catch arrows fired at their friends, for example).
I made it this far by using the tools available in the maker, a few lines of code here and there, and by not installing a single plug-in.
I followed Kazesui's tutorial on tactical movement and tried to adapt it to RPG Maker MV. Expectedly, I'm running into issues and I'm new to this site. Can someone point me to the proper place to discuss these issues, please?
There are many inspiring games presented on this site. I hope I can make something half as interesting someday.
This is a very ambitious project, but it is the one I went the farthest with. Before then, I did every mistake in the book when it comes to managing a video game project. Now, I have the patience to work on the required game systems before attempting to design the game proper, BEFORE writing a story.
So far, thanks to the pointers of a friend, I can calculate the distance between two events (this is how I know I'm in melee range, for example). I can also fire a projectile that can get interrupted by any obstacle standing in the line of fire (this is how monks and ninjas will be able to catch arrows fired at their friends, for example).
I made it this far by using the tools available in the maker, a few lines of code here and there, and by not installing a single plug-in.
I followed Kazesui's tutorial on tactical movement and tried to adapt it to RPG Maker MV. Expectedly, I'm running into issues and I'm new to this site. Can someone point me to the proper place to discuss these issues, please?
There are many inspiring games presented on this site. I hope I can make something half as interesting someday.
Pages:
1













