Basically, the Fisher-Yates algorithm ensures that every shuffle outcome is equally likely.
By comparison, you can think of Robro's suggestion as flipping a coin on each pair of values to decide which ones to swap. That makes it increasingly less likely for a value to be moved far from its starting position, which will be more evident with longer lists. It'll also require at least as many swaps as Fisher-Yates...possibly a LOT more depending on how the browser handles unstable sort criteria.
So using Fisher-Yates is probably the simplest option in the long run, unless you want the bias.
this.setTone(255, 255, 255);This solves my problem. Thanks guys
Quick question: Would it be "easy" to change the way animated autotiles work? Like, using 4 animated frames instead of 3?
Using Yanfly's action sequence, how do I make this sequence only happen when the skill hits?
(Or make it not happen on miss/evade either one works.)
Supposedly you can use if statements but I haven't found a way to make it work after some searching :S
(For reasons I need to have this happen here and cannot do it in the "effects" section.)
(This effect does work right now, but it always triggers regardless of hit or miss)
<follow Action>
remove state 27: target
remove state 28: target
add state 21: target
</follow Action>
Hey all, I was wondering if there is a way to make Yanfly's ShopMenuCore have currently equipped items considered "In Possession" for the sake of the shop menu. This confused me during a playtest and it would probably confuse players as well thinking they did not have a piece of equipment even if a character already had it equipped.
Guys, I've been trying to use $gameScreen.picture(id).tone() but it's not returning anything... I can grab anything from the picture, like coordinates and opacity, but not the picture's tone. Any ideas why?
Never mind, looks like I'm using it at the wrong moment.
What does it mean to have 'TypeError Cannot read property 'hitType' of null'?
I was just testing my deployed game on the Steam Deck and on one of my playthroughs, I was suddenly hit by this error after an actor defeats an enemy during battle. I don't know what this error means as I can't open the console on the Steam Deck. I also can't replicate the error on my PC to check where the error is.
Someone help.
You can always install MZ on the Steam Deck, which will make developing for it easier is a bunch of ways.
Or just enable access to DevTools on deployment (I don't know how to do that on MZ, but I is rather simple on MV).
All that error tells us is that something is trying to access a "hitType" property of a null object. Maybe something trying to use an item/ability that doesn't exist?
Listing which battle-related plugins you're using might also help, but without the rest of the error it will be rather difficult to diagnose anything.
I'm using MV, and I need to check whether one variable is equal to another variable plus or minus one. In other words, I need to check (as an if statement) if variable1 = variable2+1 some times, and variable1 = variable2-1 other times. As far as I know there isn't a way to do this through basic event commands, so I'll need to use JS. The only way I can think to do this is making 3 versions of variable2, the basic one and two that are one more and one less than it, but with all the different situations that need their own version of variable2, that would result in way way more variables than I'd like to work with. Is there a script or something I could use?