Here is what I am trying to do:
In my game, I am attempting to create a Haste stat, a mechanic that would effectively increase spell casting speed (shortening the time required for a spell to go off after selecting it).
Here is the battle system I use: http://www.yanfly.moe/wiki/Battle_System_-_ATB_(YEP)
The way I made this new Haste stat is by using variables, placed in 4 different variables, each utilized for each of my game's characters. The problem I am running into is trying to differentiate who is attacking (or using a skill/item), I have successfully gotten it use a single variable, the problem is that when it does that, that 1 variable is applied globally, to both enemies as well as all actors. That isn't what I want, Haste is supposed to be a stat just like any other, where each character's Haste stat is unique.
So, here are the methods I attempted so far:
Within the Plugin Parameters, you will see a spot called Charge Gauge, and it says that "this is a formula processed as an eval". I can't figure out how to create an if statement for this, to check which battler is about to take action. If I simply try to write an if statement, it just fails, crashing with an error, something about if statements or something.
This is what I have so far that I have been testing: var a = BattleManager.actor.id; if(a === 2){1500 - ($gameVariables.value(84) * 9);} else {1500;}
My testing character, actor 2, uses a Haste stat stored at variable 84. For testing, I am multiplying the Haste stat by 9, which should result in a skill going off instantly. Furthermore, if the battler is not determined to be actor 2, it should default to the normal charge amount of 1500. However, what is happening instead, is everything is being ignored, simply using the 1500 charge amount for everyone.
The second thing I tried was trying to use the "Attack Speed" trait, hoping it might work during the Charge time, but unfortunately, it does not.
The third thing I tried was using the JS stuff provided on the page I linked earlier, but none of them do what I want. I did have an alternative idea of trying to make Haste instead cause your next turn to start quicker, but that doesn't work either.
I am fairly new to this stuff, but for the most part, I have figured out quite a bit on my own. Every idea I have had so far, I have figured out how to create it and make it work correctly. But this has had me stuck for over a week now, and I just can't figure it out. Anyone have any new ideas, or input that could help?
In my game, I am attempting to create a Haste stat, a mechanic that would effectively increase spell casting speed (shortening the time required for a spell to go off after selecting it).
Here is the battle system I use: http://www.yanfly.moe/wiki/Battle_System_-_ATB_(YEP)
The way I made this new Haste stat is by using variables, placed in 4 different variables, each utilized for each of my game's characters. The problem I am running into is trying to differentiate who is attacking (or using a skill/item), I have successfully gotten it use a single variable, the problem is that when it does that, that 1 variable is applied globally, to both enemies as well as all actors. That isn't what I want, Haste is supposed to be a stat just like any other, where each character's Haste stat is unique.
So, here are the methods I attempted so far:
Within the Plugin Parameters, you will see a spot called Charge Gauge, and it says that "this is a formula processed as an eval". I can't figure out how to create an if statement for this, to check which battler is about to take action. If I simply try to write an if statement, it just fails, crashing with an error, something about if statements or something.
This is what I have so far that I have been testing: var a = BattleManager.actor.id; if(a === 2){1500 - ($gameVariables.value(84) * 9);} else {1500;}
My testing character, actor 2, uses a Haste stat stored at variable 84. For testing, I am multiplying the Haste stat by 9, which should result in a skill going off instantly. Furthermore, if the battler is not determined to be actor 2, it should default to the normal charge amount of 1500. However, what is happening instead, is everything is being ignored, simply using the 1500 charge amount for everyone.
The second thing I tried was trying to use the "Attack Speed" trait, hoping it might work during the Charge time, but unfortunately, it does not.
The third thing I tried was using the JS stuff provided on the page I linked earlier, but none of them do what I want. I did have an alternative idea of trying to make Haste instead cause your next turn to start quicker, but that doesn't work either.
I am fairly new to this stuff, but for the most part, I have figured out quite a bit on my own. Every idea I have had so far, I have figured out how to create it and make it work correctly. But this has had me stuck for over a week now, and I just can't figure it out. Anyone have any new ideas, or input that could help?