Hello, I've been trying to make a passive skill that, when aquired, passively increases the player movement speed in the overworld. I tried using YEP_AutoPassiveStates and change the player speed through a script in the Notes section of the state. I'd be very thankful if someone could explain how to do this to me. Thanks!
MV Passive skill that modifies movement speed
RPG Maker MV SupportI think you'd need another plugin to apply character speed changes? E.g. (untested):
Someone else may have a simpler suggestion~
JavaScript:
/*:
* @target MV MZ
* @plugindesc <add map speed: X> notetag for trait objects.
* @author Caethyril
* @url https://forums.rpgmakerweb.com/threads/179771/
* @help Notetag should work on any trait-bearing object:
* Actor, Class, Weapon, Armor, State.
* E.g. (case-sensitive):
* <add map speed: 0.5>
* +0.5 to player's move speed on the map while equipped.
*
* Free to use and/or modify for any project, no credit required.
*/
;void (function() {
"use strict";
/** User-facing name for this plugin's notetag. @type {string} */
const TAG = "add map speed";
/**
* @param {object} obj Reference trait-bearing object.
* @returns {number} Sum of tag values from trait objects on `obj`.
*/
const getTag = function(obj) {
if (!obj)
return 0;
let add = 0;
for (const o of obj.traitObjects()) {
const tag = o.meta[TAG];
if (typeof tag === "string")
add += Number(tag, 10) || 0;
}
return add;
};
// Patch - add tag value(s) to player's real move speed.
void (function(alias) {
Game_Player.prototype.realMoveSpeed = function() {
return alias.apply(this, arguments) + getTag($gameParty.leader());
};
})(Game_Player.prototype.realMoveSpeed);
})();
Original thread: https://forums.rpgmakerweb.com/threads/passive-skill-that-modifies-movement-speed.179771/