If you are using yanfly plugins then you can with buffs/states core + passive skills + passive state conditions. The passive state condition will be $gameSystem.isBattlePhase() == "actor_phase". The passive skills plugin allows you to assign it to a unit (and doesn't disappear if they 'die'). Buff states core might be a dependency. If you want to achieve +5 atk then you might also need yanfly parameter plugin that allows you to change stats on a integer basis.
MV SRPG Engine MV - Plugins for creating Tactical Battle System
JS Plugin Releases (RMMV)Please test above first.. Before testing mine.
I'm affraid that code work too on enemy turn. AFAIK the code said battle phase, not player phase.
I'm not on pc and need you to check it out.
Okay.. If you edit map.. There is 4 blank event on left top corner.. Lets called it "state".. If anyone can give other name.. Plz correct me.
I'm writing the state here
From left to right
sory for long reply
. . . .
Can you/someone post tag name from event on top left corner
* there is 4 or more there
I'm affraid that code work too on enemy turn. AFAIK the code said battle phase, not player phase.
Make sense..
I'm not on pc and need you to check it out.
Okay.. If you edit map.. There is 4 blank event on left top corner.. Lets called it "state".. If anyone can give other name.. Plz correct me.
I'm writing the state here
From left to right
- battle Start
- actor Turn
- enemy Turn
- turn End
- before Battle
- After Action
On player state (no 2?)
Run common event for buffing player.. Since you will use it frequently not on 1 map only
- the step -
Cek if switch to buff is off if on/true..skip
If not buffed..Give buff to your targeted player
Make sure buffed switch is ON
----------
Enemy state
Run debuff here. Put on your common event. The step reverse from above
you must added debuff when lose or defeat. the debuff must same you use on enemy state
Run common event for buffing player.. Since you will use it frequently not on 1 map only
- the step -
Cek if switch to buff is off if on/true..skip
If not buffed..Give buff to your targeted player
Make sure buffed switch is ON
----------
Enemy state
Run debuff here. Put on your common event. The step reverse from above
you must added debuff when lose or defeat. the debuff must same you use on enemy state
sory for long reply
. . . .
* there is 4 or more there
triancontane's SideEffectSkill plugin allows to add a state to a character before a skill effect is activated, then use Yanfly's auto passive to determine if the given skill or an existant skill (like you used a skill called swing sword then check if character has a passive weapon focus sword + character is weapon type equipped correctely) would cause the auto passive state +5 atk to appear.
Need to test both compatibility with srpg engine however, only did it with regular mv project.
Which folder? I just moved everything back to MV and reconverted everything over there...
this "data" folder since there is map*** and other json related to your config.. You can hide it .. Some programer not wanted showing all his work..
* is kinda programer code.. not to show all unless is secure or you trust
This is the MZ one. The one having issues with the stuff showing right. MV is working fine.
Actually.. I dont have MZ and my laptop are not good running MZ.
Btw we are discuss on MV right?
Btw we are discuss on MV right?
We can yea. But my MV isn't having any issues atm. The issue was on MZ, in which Dopan stated support on it is minimum due to majority of SRPG is supported on MV.
Alright - now I have a new issue. Referencing link here - https://forums.rpgmakerweb.com/index.php?threads/mp-starts-0-for-everyone.155055/#post-1329131
I'll also attach the Data for MV.
I'll also attach the Data for MV.
Sry.. I'm answering in here also
It seem.. Your player and troops will be heal when battle start state end. Mean when start turn 1 after bla-bla (opening) , your decrease mp will turn full!!
.
My suggestion put your code on actor turn state. Give condition to make it run:
The common is not run
Is this first turn
.
If both are true.. Run the common event
It seem.. Your player and troops will be heal when battle start state end. Mean when start turn 1 after bla-bla (opening) , your decrease mp will turn full!!
.
My suggestion put your code on actor turn state. Give condition to make it run:
The common is not run
Is this first turn
.
If both are true.. Run the common event
sry my current showcase demo was not availleble (broken link)
---
i had first to build this itchio page, in order to be able to have a permanent demo-link
this demo does not have much explanations, it is a setup to build new projects while having a test map & all default switches installed , ect..
(the plugin manager and its plugins are bugfree, as far i know)
turn all character into 0
using common event.. if someone able make plugin of this, please..
call the common event on Battle Start .. not at unit turn
using common event.. if someone able make plugin of this, please..
please added recover all before decreasing all
then added decrease by giving -999
then added decrease by giving -999
Code:
//----Decrease all hero using ---
$gameMap.events().forEach(function(event) {
var eventId=event.eventId();
var battlerArray = $gameSystem.EventToUnit(eventId);
//----------------work on enemy only ?!?----
if (battlerArray && (battlerArray[0] === 'actor' || battlerArray[0] === 'enemy')) {
var mpUnit = battlerArray[1].mp; //console.log( mpUnit);
if (battlerArray[1].isAlive()) battlerArray[1].gainMp( -mpUnit);
}
//----------------
});
the code work on enemy.. but I'm added hero to note only
call the common event on Battle Start .. not at unit turn
my plugin SRPG_UnitGroups.js ..
adapted a script which i found in the srpg core, with different variations, including this minimum variation for own edit usage: (img is from UnitGroups-plugin)
.. this is able to trigger a group of units, in this case its all alive units ,actors and enemys..
(your method should work aswell, this is just another method)
--> i used a game-interpreter function , so that the script can be triggered via scriptcall
...
i also made a little github tutorial, where i show this script and other basic srpg scripts..
( i used github in order to better show the js code )
Srpg-plugins/$ScriptCallList_SRPG.js at main · DopanPlugins/Srpg-plugins
srpg plugins (rpg mv). Contribute to DopanPlugins/Srpg-plugins development by creating an account on GitHub.
script for unit groups ect is already explained a few times in this thread^^
---
edit
- SRPG_UnitGroups.js is in my demo & i reuploaded it to my github mainpage ..
This works. After playing with it though, it seems like the increase method won't work either. So like, when all MP is 0'd, per turn both sides have a MP regen of +10 per passing turn. Such an example: player phase, everyone gets a +10 on MP. Enemy phase, same thing. That way, either side can use magic one the appropriate amount is available to use.
Edit: Figuring an alternative (Something I want to remove eventually) I made a state called MP Regen and force it under the actor and enemies. This works after turn 1, for it does not work right away on the same turn. What I can do if there's no solution is after SRPG Battles, I can remove the state from the actor so that it doesn't apply in the dtb mode (seeing this game will be dtb/srpg based.) and MP can be used normally when in dtb.
Update on edit: Find out enemies MP won't regen, and state doesn't exist.
Final Update: For adding the id, I created the script that Dopan provided and explained to me. For right now, maybe it is best for me to use the state MP Regen. Added the solution in pics.
I've tried using this code before, but I do not understand its functionality is the problem. I'm not super JS savvy (only time I've used it was for websites, and at a very small percentage.) Even though I am able to read syntax, it's the logic I have trouble understanding.
try to avoid double posting^..
However.. the logic is explained on the github tutorial which i posted..
i try to make a more simple explanation:
JavaScript:
for (var i = 1; i <= $gameMap.events().length; i++) {
var battleunit = $gameSystem.EventToUnit(i);
var eventunit = $gameMap.event(i);
if (battleunit && eventunit && (battleunit[0] === 'actor' || battleunit[0] === 'enemy') && (!battleunit[1].isDead())) {
battleunit[1].addState(addId);
}
};
1. var i starting with 1 represents the event id, "$gameMap.events().length" is the max number.. this line makes sure all event ids from 1 to max number will be used
2. var battleunit, is where we store the battleunit data, which is a mix of event[0] & battler[1] data
3. var eventunit is where we store the map.event data
4a. this if condition asks if the event id of battleunit & eventunit is existing
4b. and if the battleunit[0] is actor or "||" enemy (here we can remove one option if we want)
4c.. and if battlerunit is not dead ( "!" means "not" )
5. every battleunit[1] that fit to the above conditions will get state ( [1] is added to adress the battler data here)
-> the whole point is that the "for" is used instead of "if" or "forEach"..
.. to check all availleble events on map..
.. the forEach-method does a similar thing
the other if conditions are used to avoid bugs, if units are dead and to make sure that the triggered event is also a battle unit and no normal event,,
I see.... is the function part needed or can I use the for loop as its own for it to work?
And I'm guessing addid is replaced with the id number for it to add the state per battleunit, yes?
this script can be used as it is.. the function i used was just for the plugin..
the "addid" was just a dummy placeholder & should be the state id (any valid number which is a valid state id)
I see... well, the script did work for the id part. And my guess is, if I want to remove it just replace addid with removeid. (Or just use the in game block code seeing I only need to remove the state from actors...)
Sorry for sounding complicated. Think I understand the code now. What overwhelmed me is the function part.
Srpg-plugins/$ScriptCallList_SRPG.js at main · DopanPlugins/Srpg-plugins
srpg plugins (rpg mv). Contribute to DopanPlugins/Srpg-plugins development by creating an account on GitHub.
--
$gameSystem.EventToUnit(eventID)[1].removeState(stateId);
which is in this context => battleunit[1].removeState(stateId);
JavaScript:
for (var i = 1; i <= $gameMap.events().length; i++) {
var battleunit = $gameSystem.EventToUnit(i);
var eventunit = $gameMap.event(i);
if (battleunit && eventunit && (battleunit[0] === 'actor' || battleunit[0] === 'enemy') && (!battleunit[1].isDead())) {
battleunit[1].removeState(stateId);
}
};
"addState" and "removeState" are different codes.
the one code adds the state the other removes it,, there is no code that can do both
-> the code triggers functions, and these are 2 different functions^^
..
the 3rd would be "isStateAffected" which asks is the state is applyed or not, that one is used mostly in if conditions
Original thread: https://forums.rpgmakerweb.com/threads/srpg-engine-mv-plugins-for-creating-tactical-battle-system.110366/







