Summary: I am looking to create states that will procure when Hit Points, Magic Points, and Technical Points reach certain levels for both actors and enemies in the hope of creating a type of juggling act for players as they have to watch and maintain a balance between each. If any one of these three indicator reaches zero, the actor or enemy dies. It appears to me that this may require some plugins, and more than likely a good amount of JavaScript.
Details:
State types:
Solution:
-----------------------
-----------------------
*Personal Note: I am a beginner when it comes to RMMV, Javascript and forums, but I am willing to learn. So if I make a mistake kindly let me know so I can do something to change it. Also, I ask that, if you give me advice, you take simple steps in explaining what I should do.
From what I can tell, the community here is amazing, and I hope to become a part of it.
Details:
State types:
- Buff
- Regeneration
- Dying
- Dead
- Current HP/MP/TP equals Max HP/MP/TP
- HP Buff - Attack and Defense are Doubled
- MP Buff - Magic Attack and Magic Defense are Doubled
- TP Buff - Luck and Agility are Doubled
- Current HP/MP/TP is less than 100% and more than 10% of Max HP/MP/TP
- HP Regeneration - HP recover at a rate of 1% of Max HP at the end of each turn
- MP Regeneration - MP recover at a rate of 1% of Max MP at the end of each turn
- TP Regeneration - TP recover at a rate of 1% of Max TP at the end of each turn
- Current HP/MP/TP is less than or equal to 10% and more than 0% of Max HP/MP/TP
- Bleed State - HP will be lost at a rate of 1% of Max HP at the end of each turn
- Limbo State - MP will be lost at a rate of 1% of Max MP at the end of each turn
- Exhaustion State - TP will be lost at a rate of 1% of Max TP at the end of each turn
- Bleed State - HP will be lost at a rate of 1% of Max HP at the end of each turn
- Current HP/MP/TP equals 0
- Death State - If HP, MP, or TP reaches 0, the target will recieve the 'death' state; any remaining HP, MP, or TP will also be reduced to 0.
Solution:
-----------------------
-----------------------
It seems to me that that the death state can remain as just one state for all three stats (HP/MP/TP). I was thinking that using HimeWorks' plugin "Progressive States" ( https://forums.rpgmakerweb.com/index.php?threads/progressive-states.50970/ ) for the 'Dying' states could work by having "Bleed", "Limbo" and "Exhaustion" turn into the 'Death' state when their associate stat finally hits 0. However, it might be easier just to have some JavaScript that uses if-then statements and set them up as follows:
Example:
if target.hp = target.mhp (then statement)
if target.hp < target. mhp (and statement) target.hp > target.mhp*0.1 (then statement)
if target.hp <= target.mhp*0.1 (and statement) target.hp != 0 (then statement)
if target.hp == 0 (then statement)
---------------------------------
In addition to everything else, I run into one particular issue: TP. I want TP to act more like MP, or in other words, a stamina bar. I added Yanfly's "Enhanced TP" (http://yanfly.moe/2016/01/08/yep-55-enhanced-tp/) to help make it act more like MP, but I had some issues. By default, RMMV has TP randomly generate at the beginning of a battle, but in order for TP to act like MP I cannot have that, so I changed the settings within the plugin to generate 0 TP at the start of the battle, and I allowed for TP to be preserved, allowing any remaining points to carry over once the battle is done. Then I noticed that 1) a new game will result in the actors having 0 TP to begin with and 2) enemies have 0 TP at the beginning of battle's. If I am to have a death state for having 0 TP, this creates a serious issue that would either mean an instant game over upon starting a new game, and if actors had any TP, enemies would instantly die once a battle starts.
Is there a way to change the starting TP so that it starts off at max, just like MP?
Example:
if target.hp = target.mhp (then statement)
if target.hp < target. mhp (and statement) target.hp > target.mhp*0.1 (then statement)
if target.hp <= target.mhp*0.1 (and statement) target.hp != 0 (then statement)
if target.hp == 0 (then statement)
---------------------------------
In addition to everything else, I run into one particular issue: TP. I want TP to act more like MP, or in other words, a stamina bar. I added Yanfly's "Enhanced TP" (http://yanfly.moe/2016/01/08/yep-55-enhanced-tp/) to help make it act more like MP, but I had some issues. By default, RMMV has TP randomly generate at the beginning of a battle, but in order for TP to act like MP I cannot have that, so I changed the settings within the plugin to generate 0 TP at the start of the battle, and I allowed for TP to be preserved, allowing any remaining points to carry over once the battle is done. Then I noticed that 1) a new game will result in the actors having 0 TP to begin with and 2) enemies have 0 TP at the beginning of battle's. If I am to have a death state for having 0 TP, this creates a serious issue that would either mean an instant game over upon starting a new game, and if actors had any TP, enemies would instantly die once a battle starts.
Is there a way to change the starting TP so that it starts off at max, just like MP?
In my attempt to create something like what I outlined above, I tried to use some plugins from Yanfly and Hime, and then add in what I needed through "Lunatic Mode" or JavaScript.
Before I had a clearer picture of what I wanted to do with states, I worked to create a constant state of MP Regeneration for actors and enemies. I tried to accomplish this through the use of Yanfly's "Auto Passive States" plugin ( http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/ ). I created a state, added a trait of 10% MP regeneration. I don't think it worked, so I removed the trait. I then added Yanfly's "Buff States Core" plugin ( http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/ ), and the following in the notes:
<Custom Turn End Effect>
user.gainMp(1);
</Custom Turn End Effect>
<Passive Condition: MP Below 100%>
This seemed to work, so I moved on to add another death state (one apart from the default "knockout") that would become applicable once the user's MP became 0. I copied the 'Knockout' state, then made it removable after 3 turns, added it to the auto passive states, and I added the following in the Notes so it would activate once MP became 0:
<Passive Condition: MP Below 1>
<Show Turns>
With this setup (the MP regen state, and the MP death state) I hoped that at 100% MP the regen would be off, below 100% it would be on, and at 0 MP the actor would have the death state. At 100%, no states were present, below 100% regen turned on, and at 0 MP the death state would activate, but the death state would immediately go away at the end of the turn because the regen state was still active, thus bringing MP to 1 and turning off the death state.
At this point I realized I needed a way to turn off regeneration once the death state kicked in, so I added Hime's plugin "Overriding states" ( https://forums.rpgmakerweb.com/index.php?threads/overriding-states.50889/ ) and put the following into the notes:
<override state: x>
'x' was the state ID of the MP regen. However, since both states were auto passive states, this did not remove or override the regen state.
Before I had a clearer picture of what I wanted to do with states, I worked to create a constant state of MP Regeneration for actors and enemies. I tried to accomplish this through the use of Yanfly's "Auto Passive States" plugin ( http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/ ). I created a state, added a trait of 10% MP regeneration. I don't think it worked, so I removed the trait. I then added Yanfly's "Buff States Core" plugin ( http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/ ), and the following in the notes:
<Custom Turn End Effect>
user.gainMp(1);
</Custom Turn End Effect>
<Passive Condition: MP Below 100%>
This seemed to work, so I moved on to add another death state (one apart from the default "knockout") that would become applicable once the user's MP became 0. I copied the 'Knockout' state, then made it removable after 3 turns, added it to the auto passive states, and I added the following in the Notes so it would activate once MP became 0:
<Passive Condition: MP Below 1>
<Show Turns>
With this setup (the MP regen state, and the MP death state) I hoped that at 100% MP the regen would be off, below 100% it would be on, and at 0 MP the actor would have the death state. At 100%, no states were present, below 100% regen turned on, and at 0 MP the death state would activate, but the death state would immediately go away at the end of the turn because the regen state was still active, thus bringing MP to 1 and turning off the death state.
At this point I realized I needed a way to turn off regeneration once the death state kicked in, so I added Hime's plugin "Overriding states" ( https://forums.rpgmakerweb.com/index.php?threads/overriding-states.50889/ ) and put the following into the notes:
<override state: x>
'x' was the state ID of the MP regen. However, since both states were auto passive states, this did not remove or override the regen state.
*Personal Note: I am a beginner when it comes to RMMV, Javascript and forums, but I am willing to learn. So if I make a mistake kindly let me know so I can do something to change it. Also, I ask that, if you give me advice, you take simple steps in explaining what I should do.
From what I can tell, the community here is amazing, and I hope to become a part of it.