Neat little things I've discovered.

I decided to make a thread for all those little neat things I discover tinkering with javascript. (that haven't been requested yet) These aren't really plugins, but rather scripts that do a thing like what the engine is supposed to do, but may not be well known.
___________________________________________________________

My first thing, I just learned is that changes to game $gameSystem._windowTone happen instantly, so you can use it to make flashing windows. There may be a plugin that does this, but it can really be done with plain javascript.
flashwindow-o.gif

This can be acheived without plugin, via event script call...
PHP:
if(this.colorInterval === undefined){
    var rand255 = function(){return Math.round(Math.random()*255)};
    this.reTone = $gameSystem._windowTone;
    this.colorInterval = setInterval(function(){
        $gameSystem._windowTone = [rand255(),rand255(),rand255()];
    }, 100);
}
And to turn off... EDIT: Oops! forgot to add (this)... It was broken, but I fixed it. I should have tested first... another one of those IIFE event script gotchas, for me...
PHP:
clearInterval(this.colorInterval);
delete this.colorInterval;
$gameSystem._windowTone = this.reTone;
___________________________________________________________

These neat little things never cease to amaze me. Post neat little things you've discovered/learned too.
giphy.gif
Slightly off topic, until someone makes a general javascript chat thread, but don't let me forget this Grep command for making hundreds of function aliases at once.
Code:
\n((([^\.\n]+)\.[^\s]+) = function\(\) \{)
Code:
\n\3.prototype.aliasInit4Name = \2;\n\1 \n\tthis.aliasInit4Name.apply(this, arguments);\n\tthis.domWindowName="\3";
It took me a minute to cognite and type, so I'm posting it someplace for future reference. I'll lose it if I save it to a txt file.
Spoiler
Screen%20Shot%202017-04-07%20at%2011.53.17%20PM.png


Screen%20Shot%202017-04-07%20at%2011.53.35%20PM.png


EDIT: Yowza! Crash!
Don't worry about the stack size. I just now had to append iterated numbers to each alias also with Grep.

The neat thing I discovered here is ES6 IdentifierReference;
var foo = "bar"; {foo} === "foo";
too bad MV does not have it

Carry on...
All the pro scripters keep a master list of all their stuff in a link or whatever.
I've decided to compile a list of all the plugins and event scripts I've come up with on this forums (that I could find). I'm not starting a new thread because this forum already has a ton of my inactive threads. This is all stuff I've learned too, anyway.

No particular order, just where I went and found them.

Spoiler: Two different plugins to change a sprite's color.
Two different plugins to change a sprite's color.
https://forums.rpgmakerweb.com/index.php?threads/freezing-event.75257/
rotatehue.gif

Spoiler: Push an event with event script.

Spoiler: Pull an event with event script.

Spoiler: Weapon/Armor stat, plus game variable with display. (plugin)

Spoiler: Spawn and shoot projectiles from an event page. (plugin)
Spawn and shoot projectiles from an event page. (plugin)
https://forums.rpgmakerweb.com/index.php?threads/tower-that-shoot-player.75560/
fireballs-o.gif

Spoiler: Make events non-passable to certain events based on self switch. (plugin)
Make events non-passable to certain events based on self switch. (plugin)
https://forums.rpgmakerweb.com/index.php?threads/player-event-barrier.76237/page-4
twolights-o.gif

Spoiler: Skill that evaluates javascript from item notes. (plugin)
Skill that evaluates javascript from item notes. (plugin)
https://forums.rpgmakerweb.com/inde...instant-reaction-to-switch.76262/#post-716258
Screen%20Shot%202017-03-23%20at%208.53.33%20AM.png

Spoiler: Party members who don't fight in battle, like pets. (plugin)
Party members who don't fight in battle, like pets. (plugin)
https://forums.rpgmakerweb.com/inde...ers-followers-who-dont-fight-in-battle.76703/
Screen%20Shot%202017-04-01%20at%209.52.35%20PM.png
Screen%20Shot%202017-04-01%20at%209.52.42%20PM.png

Spoiler: Random title music (plugin.

Spoiler: Screen animation, 100px to the left.

Spoiler: Quick follower movement by event script.

Spoiler: Get events by name. (small plugin)
Get events by name. (small plugin)
https://forums.rpgmakerweb.com/inde...t_emily-both-move-to-mapx-0-and-mapy-0.76548/
PHP:
var RPGMakerMV = RPGMakerMV || {};
RPGMakerMV.getEventsByName = function(name){
  var events = [];
  for(var i = 0; i < $dataMap.events.length; i++){
    if($dataMap.events[i] === null) continue;
    if($dataMap.events[i].name !== undefined && $dataMap.events[i].name === name)
      events.push($gameMap._events[$dataMap.events[i].id]);
  }
  return events;
}

Spoiler: Missing images don't crash game, but rather are substituted with a dummy image.
Missing images don't crash game, but rather are substituted with a dummy image.
https://forums.rpgmakerweb.com/inde...ind-such-and-such-png-oog-or-waht-ever.76165/
Screen%20Shot%202017-03-22%20at%205.11.42%20AM.png

Spoiler: (off base, but...) Event that shoot animations.

Spoiler: Stairs by event script. (works better than my WIP plugin)

Spoiler: Event that triggers when the player is moving.

Spoiler: Event that fades away, walking...

Spoiler: WIP. Removing fullscreen font blur.

Spoiler: Playing music continues and overrides any autostart music when a switch is on.
Playing music continues and overrides any autostart music when a switch is on.
https://forums.rpgmakerweb.com/index.php?threads/map-to-ship-music.75483/

Spoiler: Seamless transition effect. (event script)


Spoiler: Enemy battlers as player battlers. (plugin)

Spoiler: Certain enemies move random, but chase you when you move. (plugin)
Certain enemies move random, but chase you when you move. (plugin)
https://forums.rpgmakerweb.com/index.php?threads/move-after-player.74877/

Spoiler: Looping picture (top layer parallax plugin).

Spoiler: Disable/Enable total player movement by event script.
Disable/Enable total player movement by event script.
https://forums.rpgmakerweb.com/index.php?threads/block-player-movement.74387/

Spoiler: Game focus/camera temporarily follows event instead of hero.
Game focus/camera temporarily follows event instead of hero.
https://forums.rpgmakerweb.com/index.php?threads/cinematic-camera-control.74391/

Spoiler: Game message over top of movie. (plugin)

Spoiler: Two plugins to change game or message font.

Spoiler: Plugin to record/playback/save audio from microphone.
Plugin to record/playback/save audio from microphone.
https://forums.rpgmakerweb.com/index.php?threads/plugin-to-record-voice.77683/
fiveseco.gif

Spoiler: Save screenshot as game picture. (two plugins)

Spoiler: Pin message to picture, like showing two messages at the same time.(plugin)
Pin message to picture, like showing two messages at the same time.(plugin)
https://forums.rpgmakerweb.com/index.php?threads/two-dialogues-at-the-same-time.77045/#post-727548
Screen%20Shot%202017-04-24%20at%207.55.35%20AM.png

Spoiler: Actual simultaneous messages. (plugin)
Actual simultaneous messages. (plugin)
https://forums.rpgmakerweb.com/inde...ues-at-the-same-time.77045/page-3#post-729636
PHP:
\[top]This is some \[middle]This is some  \[bottom]This is some
\[top]text on the  \[middle]text on the   \[bottom]text on the
\[top]top window   \[middle]middle window \[bottom]bottom window
\[top]four rows    \[middle]four rows     \[bottom]four rows
Screen%20Shot%202017-04-28%20at%206.28.52%20AM.png

Spoiler: Animated GIF title screen and battleback (WIP plugin)


Spoiler: Floor and mirror reflection (WIP plugin)


Spoiler: Message tooltip codex links. (WIP plugin)

Spoiler: Additional status menus. (tutorial)

Spoiler: Expanded info window and scrolling marquee info window.

Spoiler: Character tracks mouse. (plugin)

Spoiler: Scrolling overflow game messages.

Spoiler: Running Ruby in RPG Maker MV (tutorial)
This is very useful! Thanks!
Lots of lovely stuff. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/neat-little-things-ive-discovered.77000/