Hi everyone. I'd like to know if there is a plugin that already exist that can do what I'd like to do. I would like in my battle to have a new "BAR", actually something like in the picture I shared, that is used to cast some spell. It's like element in the environnement. When you use some water element, it goes down, then the wood element goes up proportionnaly. So, when you are out of your element, you can't cast spell of that element until someone else cast a spell of another element that boost your element. For a simpler way to make it, it would be just number inside the circle of the element to show how much there is. By the way, it's share to EVERYONE, even monsters.
RPG maker MV Shared element IN battle
RPG Maker MV SupportThis can be done without too much hassle using Yanfly's "Skill Core" Plugin. You can do this via the Lunatic Codes. I tested it out as it isn't too different from how my battle system works. You'd place these in the note box of all your skills:
http://yanfly.moe/2015/10/13/yep-8-skill-core/
Variable 1 for example is the WATER Element. The "2" represents the "cost" to use the skill.
This setup will prevent the skill from being used if Variable 1 (Water Skill Points) is below 2.
You'll create a Variable to represent each element you have and set the cost of each skill to whatever you want.
The "execution" part will make the changes we need. Here we'll increase/decrease the variables of whichever elements should be affected.
In this example Variable 1 represents WATER and Variable 2 represents NATURE. When we use our WATER skill the Variable(1) for WATER decreases by 2 points while the Variable(2) for NATURE increases by 2 points.
You'd just set the amount of "Points" each element will have at the start of a battle. (Like based on the environment or whatever, that's up to you.)
...And now for the visual part. The Orange HUD plugins work great for this. Galv has an awesome Variable Bar Plugin but I don't know if that works in battle though. The orange plugins will let you display a number and an image.
https://forums.rpgmakerweb.com/index.php?threads/orange-hud.47186/
You'll want these:
OrangeHud.js
OrangeHudLine.js
OrangeHudFixedPicture.js
"OrangeHudLine" will be used for displaying the Variable on screen. While "OrangeHudFixedPicture" will be used to display the images of each element on screen."
This should be everything you need. (At least off the top my head)
http://yanfly.moe/2015/10/13/yep-8-skill-core/
Variable 1 for example is the WATER Element. The "2" represents the "cost" to use the skill.
This setup will prevent the skill from being used if Variable 1 (Water Skill Points) is below 2.
You'll create a Variable to represent each element you have and set the cost of each skill to whatever you want.
Code:
<Custom Requirement>
if ($gameVariables.value(1) >= 2) {
value = true;
} else {
value = false;
}
</Custom Requirement>
The "execution" part will make the changes we need. Here we'll increase/decrease the variables of whichever elements should be affected.
In this example Variable 1 represents WATER and Variable 2 represents NATURE. When we use our WATER skill the Variable(1) for WATER decreases by 2 points while the Variable(2) for NATURE increases by 2 points.
Code:
<Custom Execution>
var WATER = $gameVariables.value(1);
var NATURE = $gameVariables.value(2);
$gameVariables.setValue(1, WATER - 2);
$gameVariables.setValue(2, NATURE + 2);
</Custom Execution>
You'd just set the amount of "Points" each element will have at the start of a battle. (Like based on the environment or whatever, that's up to you.)
...And now for the visual part. The Orange HUD plugins work great for this. Galv has an awesome Variable Bar Plugin but I don't know if that works in battle though. The orange plugins will let you display a number and an image.
https://forums.rpgmakerweb.com/index.php?threads/orange-hud.47186/
You'll want these:
OrangeHud.js
OrangeHudLine.js
OrangeHudFixedPicture.js
"OrangeHudLine" will be used for displaying the Variable on screen. While "OrangeHudFixedPicture" will be used to display the images of each element on screen."
This should be everything you need. (At least off the top my head)
wow thanks for the nice reply. I understand nothing at the lunatic mode so it will be great help to have this code. Just hope I can get the visual with the tools you sent me, if not, it will me useless 🙁 THanks a lot
i put also the custom execution in the skill parameter?
Can you just tell me how to determine the initial amount for each map?
Exemple I want the forest to start with 3 wood, 0 fire, 2 earth, 2 metal, 3 water
and where should I put the code?
Can you just tell me how to determine the initial amount for each map?
Exemple I want the forest to start with 3 wood, 0 fire, 2 earth, 2 metal, 3 water
and where should I put the code?
hmmm nothing is showing. I tried \i[1] %1 / 100 to have an icon, any icon will do to test, nothing works. even the number is not showing -_- And I also put an event that when I walk on it, the variable will increase (so maybe because it was 0 it was not showing anything) But still nothing! Will try more later, try to see what i did wrong. Maybe it's in conflict with another plugin
I take it something like this is what you ultimately want:
Also, depending how you're encounters work you can set the variables at the start of each battle in the troop settings. If you have on-screen encounters you can set them on the enemy npc on the field.
You can download this DEMO I put together with all of this set up. That way you can study how it works. You'll be able to see how all of it works.
Download Here
Also, depending how you're encounters work you can set the variables at the start of each battle in the troop settings. If you have on-screen encounters you can set them on the enemy npc on the field.
You can download this DEMO I put together with all of this set up. That way you can study how it works. You'll be able to see how all of it works.
Download Here
wow EXACTLY what i want! THANKS A LOOOOT!
Cool. If you have any more questions feel free to ask!
Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-mv-shared-element-in-battle.106801/