noted.. I will try it...
I finish make this
gitlab.com
any suggestion for the name?
this is the code you can make mp turn 0.. fyi.. I make sure all character is heal then make mp turn 0
since you make mp 0. you need function to recover the mp
hope this help you
hope the plugins works
* added new quote (not added new reply)
* I forgot about the state.. sory
and I failed to make same like your template..
I finish make this
MV/SRPGgearMV_JP/js/plugins/SRPG_Custom.js · main · G. Wibisono / Rpgmaker · GitLab
GitLab.com
var id mp is for variable you use to recover mp (default on variable id 7). Insert the number first before execute recover MP
on Battle start put Plugin command
to make all character and enemy MP = 0. This is include AI
since MP must recover during turn.. added number on your variable (default 7) then use plugin command
if you want to recover all character use
on Battle start put Plugin command
Code:
SRPGStartNoMP
since MP must recover during turn.. added number on your variable (default 7) then use plugin command
Code:
SRPGGainMP
if you want to recover all character use
Code:
SRPGRecoverAll
JavaScript:
Game_System.prototype.SRPG_recoverAll = function() {
console.log($dataSystem );
$dataSystem.partyMembers.forEach(function(actorId) {
var actor = $gameActors.actor( actorId);
if (actor) {
actor.recoverAll();
//console.log("recover all battler");console.log(actor, actorId );
}
});
}
Game_System.prototype.SRPG_startMP0 = function() {
//recoverAll friend
this.SRPG_recoverAll();
$dataSystem.partyMembers.forEach(function(actorId) {
var actor = $gameActors.actor(actorId);
if (actor) {
actor.gainMp( -actor.mmp );
//console.log("decrease mp");console.log(actor, actorId);
}
});
//only enemies and AI
$gameMap.events().forEach(function(event) {
var eventId=event.eventId();
var battlerArray = $gameSystem.EventToUnit(eventId);
//----------------
if (battlerArray && (battlerArray[0] === 'actor' || battlerArray[0] === 'enemy')) {
var mpUnit = battlerArray[1].mmp;//max mp
if (battlerArray[1].isAlive()) battlerArray[1].gainMp( -mpUnit);
}
//----------------
});
}
since you make mp 0. you need function to recover the mp
JavaScript:
Game_System.prototype.SRPG_gainMP = function() {
//only enemies and AI
$gameMap.events().forEach(function(event) {
var eventId=event.eventId();
var battlerArray = $gameSystem.EventToUnit(eventId);
//----------------
if (battlerArray && (battlerArray[0] === 'actor' || battlerArray[0] === 'enemy')) {
var mpUnit = $gameVariables.value( SRPG_Custom.varIdMP );
if (battlerArray[1].isAlive()) battlerArray[1].gainMp( mpUnit );
}
//----------------
});
};
I'm focus on making into plugins.. and not read this..
hope the plugins works
* added new quote (not added new reply)
* I forgot about the state.. sory



