- Joined
- Jan 15, 2016
- Messages
- 81
- Reaction score
- 4
- First Language
- English
- Primarily Uses
Hiya! I am trying to set up a buff/debuff system that emulates Pokémon Gen VI. I don't think I'll need a script for this if I use a combination of states and variables, but we'll see.
In the following large spoiler tag, I explain what I'm trying to do, the overall goal. However, it can be a bit overwhelming; and since I already figured out some of how it works, you can skip the rest of this post and go down a few if you want, where I'll be asking how to do specific things towards the larger goal. You can still read the spoiler though if you want to see the bigger picture.
Thanks a bunch for any support!
In the following large spoiler tag, I explain what I'm trying to do, the overall goal. However, it can be a bit overwhelming; and since I already figured out some of how it works, you can skip the rest of this post and go down a few if you want, where I'll be asking how to do specific things towards the larger goal. You can still read the spoiler though if you want to see the bigger picture.
So imagine you have a scale like this, one for each of the following stats: ATK, DEF, MAT, MDF, and AGI.
As well as one more scale like this, shared for HIT and EVA:
We're going to use HIT vs. EVA for our example, which is the bottom of the two scales. Let's pretend the HIT and EVA percentage options that are built into the database don't exist for a second, just to avoid confusion.
Instead, just look at the bottom scale above and imagine an "accuracy" marker at +0. That is where it starts at the beginning of every battle. (Below +0 on the scale is the fraction 3/3, determining a 100% accuracy.) Then if someone buffs the user's HIT, the marker goes up the scale to +1. If they buff HIT again, it goes up to +2, and so on. EVA basically makes the marker go the opposite direction. If the scale is up to +2 due to the aforementioned buffs, then buffing the enemy's EVA once would bring it back down on the scale to +1. Then if EVA is buffed again, it goes back down to +0. And so on. So basically we're sliding a marker up and down the scale every time a particular stat is buffed or debuffed-- although it should be noted that HIT and EVA use the same scale.
So now that that is visualized, we can calculate the accuracy of a skill as such: "Skill's Success %" times "whatever fraction is below the current point on the scale". So if we started at +0 and had two EVA buffs, we'd be down on the scale to -2; and the fraction listed below that is 3/5, which would mean the chance of successfully hitting with a Skill with a Success % of 100 would be 100% * 3/5, which equals 60%.
It appears I will need two separate scale types-- one type for shared HIT and EVA, and one type for the other stats.
So first things first-- how much of this is doable with just a combination of states, skills, and/or variables? If I can avoid a script, I will try to do so so I can maximize compatibility chances and future-proofing, as well as flexibility and user-friendliness to people who are not me. Also, while there are two Pokémon engines out there already, I am making a very different kind of game; and also the scripts those engines use are not plug-and-play.
Code:
-6 -5 -4 -3 -2 -1 +0 +1 +2 +3 +4 +5 +6
|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|
2/8 2/7 2/6 2/5 2/4 2/3 2/2 3/2 4/2 5/2 6/2 7/2 8/2
Code:
-6 -5 -4 -3 -2 -1 +0 +1 +2 +3 +4 +5 +6
|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|
3/9 3/8 3/7 3/6 3/5 3/4 3/3 4/3 5/3 6/3 7/3 8/3 9/3
We're going to use HIT vs. EVA for our example, which is the bottom of the two scales. Let's pretend the HIT and EVA percentage options that are built into the database don't exist for a second, just to avoid confusion.
Instead, just look at the bottom scale above and imagine an "accuracy" marker at +0. That is where it starts at the beginning of every battle. (Below +0 on the scale is the fraction 3/3, determining a 100% accuracy.) Then if someone buffs the user's HIT, the marker goes up the scale to +1. If they buff HIT again, it goes up to +2, and so on. EVA basically makes the marker go the opposite direction. If the scale is up to +2 due to the aforementioned buffs, then buffing the enemy's EVA once would bring it back down on the scale to +1. Then if EVA is buffed again, it goes back down to +0. And so on. So basically we're sliding a marker up and down the scale every time a particular stat is buffed or debuffed-- although it should be noted that HIT and EVA use the same scale.
So now that that is visualized, we can calculate the accuracy of a skill as such: "Skill's Success %" times "whatever fraction is below the current point on the scale". So if we started at +0 and had two EVA buffs, we'd be down on the scale to -2; and the fraction listed below that is 3/5, which would mean the chance of successfully hitting with a Skill with a Success % of 100 would be 100% * 3/5, which equals 60%.
It appears I will need two separate scale types-- one type for shared HIT and EVA, and one type for the other stats.
So first things first-- how much of this is doable with just a combination of states, skills, and/or variables? If I can avoid a script, I will try to do so so I can maximize compatibility chances and future-proofing, as well as flexibility and user-friendliness to people who are not me. Also, while there are two Pokémon engines out there already, I am making a very different kind of game; and also the scripts those engines use are not plug-and-play.
Thanks a bunch for any support!
Last edited by a moderator:
