An input-induced move invokes
Game_Player.prototype.executeMove, which by default just calls
moveStraight. So a simple solution would be to just copy+paste
Game_CharacterBase.prototype.moveStraight, remove the
setDirection lines, and set that up as an override for
executeMove. However, with that approach you'd need to be careful about plugins you may be using that affect the
moveStraight code...
😅
Suggestion: have a flag that flips whenever
executeMove is called, which disables
setDirection for that move. I've written a little plugin that seems to do this: the player doesn't turn unless they're undergoing a forced move (i.e. move route). Might need adjustment based on what movement plugins you may be using, though. Plugin attached (you can rename it if you like), full code in spoiler below~
Spoiler: Full code
Code:
(function() {
'use strict';
let noTurn;
(function(alias) {
Game_Player.prototype.executeMove = function(d) {
noTurn = true;
alias.call(this, d);
};
})(Game_Player.prototype.executeMove);
(function(alias) {
Game_Player.prototype.setDirection = function(d) {
if (!noTurn) alias.call(this, d);
else noTurn = false;
};
})(Game_Player.prototype.setDirection);
})();
[Edit: removed redundant alias.]