Hi there!
Don't know if I should make a new thread for this, but I have another question that's very similar to my initial one:
It's possible to make skills that temporarily buff an entity's parameters (i.e. skill that makes ATK go up for five turns). As far as I can tell, the amount by which a parameter increases via that method is tied to certain percentage thresholds. But is it possible to, once more, have that increase be determined by a formula? Something like:
b.[target parameter] * 0.3 * ((1 / b.[target parameter]) * a.luk) = amount added to b's [target parameter]
- This is certainly possible with my Dynamic Parameters. If you managed to apply a state to the battler when using the skill, then you can have a dynamic parameter template into this state to increase its attack using a formula.
Spoiler: Screenshots
Creating the dynamic template, and writing down the formula on the Attack parameter. But instead of "b" and "target", you can just use the "this" keyword to refer to the battler that has this state.
And here applying the Dynamic Parameter template to the state:
Alternatively, if I were to instead have a skill apply a state that buffs ATK for a flat 20% while it's on, is it possible to have a formula calculate the amount of turns that state stays applied? Like:
round(3 * ((1 / b.atk) * a.luk)) = amount of turns the state is applied
Sorry for all these inane math questions. My javascript skills are virtually nonexistent.
- Now, for that one, I'm not sure. The dynamic parameters are supposed to return a number that will change the parameter chosen. But maybe you can do a hack.
You may not be able to change the amount of turns the state will last on the battler. But, you may be able to remove that state based on a condition.
The thing is, you will need a way to check for the exact moment you want to do that in battle. I am really not familiar with the battle flow code, so maybe other people could help you with that. But here is something that I was thinking about. It's kind of a pseudo-code, don't know if it will work. You can put it on any parameter inside a dynamic template parameter. But just use one.
JavaScript:
if($gameParty.InBattle() && BattleManager.isInTurn()){
if(BattleManager.actor() === this){
const chanceRemoveState = Math.randomInt(100)
if(chanceRemoveState > 50){
this.removeState(stateId)
}
}
0
}else{
0
}
My intention on the code above is to check if the game is on a battle, then check if is the actor's turn. If it is, it will have a chance of removing the state from the actor by 50%.
Now, hahaha, this is really a long shot.
But that also gives me some plugin idea, probably for MZ though.
Like, I installed Eli_DynamicParameters and looked into it, but it seemed like you could only apply notetags to weapons, armors, and states, and by putting a template on a state I have no idea how to tell it to take data from the source of that state, instead of just the bearer of it.
On the first answer, you just need to put the template on the state as I have shown, and the plugin will make the rest.