MZ What does Speed Invocation do in Time Progress Battle?

I know that in normal turn based battle, the Speed Invocation modifies actor AGI so that they act sooner or later. But what does it do exactly in Time Progress? Does having it be negative add a charge time? Is there a point to having positive Speed in it?
Yes, negative speed adds to the casting time. The total casting time for all actions in a turn is proportional to the square root of the sum of their negative speeds. There are various other factors, though.
Spoiler: relevant code from rmmz_objects.js
JavaScript:
Game_Battler.prototype.tpbBaseSpeed = function() {
    const baseAgility = this.paramBasePlus(6);
    return Math.sqrt(baseAgility) + 1;
};

Game_Unit.prototype.tpbBaseSpeed = function() {
    const members = this.members();
    return Math.max(...members.map(member => member.tpbBaseSpeed()));
};

Game_Battler.prototype.tpbSpeed = function() {
    return Math.sqrt(this.agi) + 1;
};

Game_Battler.prototype.tpbRequiredCastTime = function() {
    const actions = this._actions.filter(action => action.isValid());
    const items = actions.map(action => action.item());
    const delay = items.reduce((r, item) => r + Math.max(0, -item.speed), 0);
    return Math.sqrt(delay) / this.tpbSpeed();
};

Game_Battler.prototype.tpbRelativeSpeed = function() {
    return this.tpbSpeed() / $gameParty.tpbBaseSpeed();
};

Game_Unit.prototype.tpbReferenceTime = function() {
    return BattleManager.isActiveTpb() ? 240 : 60;
};

Game_Battler.prototype.tpbAcceleration = function() {
    const speed = this.tpbRelativeSpeed();
    const referenceTime = $gameParty.tpbReferenceTime();
    return speed / referenceTime;
};

Game_Battler.prototype.updateTpbCastTime = function() {
    if (this._tpbState === "casting") {
        this._tpbCastTime += this.tpbAcceleration();
        if (this._tpbCastTime >= this.tpbRequiredCastTime()) {
            this._tpbCastTime = this.tpbRequiredCastTime();
            this._tpbState = "ready";
        }
    }
};
E.g. let's say that:
  • Battle system is in TPB Wait mode;
  • Harold has 81 AGI;
  • Harold's AGI isn't (de)buffed, i.e. base TPB speed = current TPB speed;
  • Harold is alone, i.e. party base TPB speed = Harold's base TPB speed;
  • Harold uses a skill with speed -900.
Then:
  • Harold's relative TPB speed = 1 (because unbuffed and alone).
  • Reference time is 60 (from TPB Wait battle mode).
    • TPB acceleration is 1/60, i.e. cast time increases by 1/60 every frame.
  • Harold's TPB speed is sqrt(81) + 1 = 9 + 1 = 10 (from AGI).
    • Required cast time is sqrt(900) / 10 = 3 (skill speed / TPB speed).
  • Frames spent casting = 3 / (1/60) = 180 frames.
Hopefully my maths is correct there! 😅

By default positive speed has no effect in TPB mode.
I see. Thank you for the info! I wonder why the reference time between Active and Wait is different. Is that just a feels thing I wonder?
I think it's so that you have more time to act: Active TPB keeps going while you're choosing skills etc.

Original thread: https://forums.rpgmakerweb.com/threads/what-does-speed-invocation-do-in-time-progress-battle.178980/