Nobody for this?
I think this is the part where "everything" happens in YEP_ItemCore:
Window_ItemStatus.prototype.getItemInfoCategory = function(i) {
var fmt = Yanfly.Param.ItemRecoverFmt;
if (i === 0) return fmt.format(TextManager.param(0));
if (i === 1) return fmt.format(TextManager.hp);
if (i === 2) return fmt.format(TextManager.param(1));
if (i === 3) return fmt.format(TextManager.mp);
if (i === 4) return Yanfly.Param.ItemAddState;
if (i === 5) return Yanfly.Param.ItemRemoveState;
if (i === 6) return Yanfly.Param.ItemAddBuff;
if (i === 7) return Yanfly.Param.ItemRemoveBuff;
return '';
};
Window_ItemStatus.prototype.drawItemData = function(i, dx, dy, dw) {
if (!this._item) return;
var effect;
var value = '---';
var pre = '';
var text = '';
var icons = [];
if (i === 0) {
effect = this.getEffect(Game_Action.EFFECT_RECOVER_HP);
value = (effect) ? effect.value1 : '---';
if (value === 0) value = '---';
if (value !== '---' && value !== 0) value *= 100;
}
if (i === 1) {
effect = this.getEffect(Game_Action.EFFECT_RECOVER_HP);
value = (effect) ? effect.value2 : '---';
if (value === 0) value = '---';
}
if (i === 2) {
effect = this.getEffect(Game_Action.EFFECT_RECOVER_MP);
value = (effect) ? effect.value1 : '---';
if (value === 0) value = '---';
if (value !== '---' && value !== 0) value *= 100;
}
if (i === 3) {
effect = this.getEffect(Game_Action.EFFECT_RECOVER_MP);
value = (effect) ? effect.value2 : '---';
if (value === 0) value = '---';
}
if (i >= 4) {
icons = this.getItemIcons(i, icons);
}
this.changeTextColor(this.normalColor());
if (value === '---') {
this.changePaintOpacity(false);
} else if (i < 4) {
if (value > 0) pre = '+';
value = Yanfly.Util.toGroup(parseInt(value));
if ([0, 2].contains(i)) text = '%';
}
if (icons.length > 0) {
this.changePaintOpacity(true);
dx = dx + dw - icons.length * Window_Base._iconWidth;
dx += this.textPadding() - 2;
for (var j = 0; j < icons.length; ++j) {
var icon = icons[j];
this.drawIcon(icon, dx, dy + 2);
dx += Window_Base._iconWidth;
}
} else {
text = pre + value + text;
this.drawText(text, dx, dy, dw, 'right');
this.changePaintOpacity(true);
}
Window_ItemStatus.prototype.getEffect = function(code) {
var targetEffect;
this._item.effects.forEach(function(effect) {
if (effect.code === code) targetEffect = effect;
}, this);
return targetEffect;
};
Window_ItemStatus.prototype.getItemIcons = function(i, array) {
this._item.effects.forEach(function(effect) {
if (i === 4 && effect.code === Game_Action.EFFECT_ADD_STATE) {
var state = $dataStates[effect.dataId];
if (state && state.iconIndex !== 0) array.push(state.iconIndex);
}
if (i === 5 && effect.code === Game_Action.EFFECT_REMOVE_STATE) {
var state = $dataStates[effect.dataId];
if (state && state.iconIndex !== 0) array.push(state.iconIndex);
}
if (i === 6 && effect.code === Game_Action.EFFECT_ADD_BUFF) {
var icon = Game_BattlerBase.ICON_BUFF_START + effect.dataId;
array.push(icon);
}
if (i === 6 && effect.code === Game_Action.EFFECT_ADD_DEBUFF) {
var icon = Game_BattlerBase.ICON_DEBUFF_START + effect.dataId;
array.push(icon);
}
if (i === 7 && effect.code === Game_Action.EFFECT_REMOVE_BUFF) {
var icon = Game_BattlerBase.ICON_BUFF_START + effect.dataId;
array.push(icon);
}
if (i === 7 && effect.code === Game_Action.EFFECT_REMOVE_DEBUFF) {
var icon = Game_BattlerBase.ICON_DEBUFF_START + effect.dataId;
array.push(icon);
}
}, this);
array = array.slice(0, Yanfly.Param.ItemMaxIcons);
return array;
};
With my very modest understanding, I'm able to make "TP" appear by using fmt.format(TextManager.mp);
But the problem is that I don't know how to automatically add the amount of TP it restores.
If I had this then I could just replace one of the 8 lines with the TP information instead, for instance the i=8 which I think I don't need.