- Joined
- Aug 11, 2015
- Messages
- 598
- Reaction score
- 418
- First Language
- English
- Primarily Uses
The idea is to have a state that you can stack multiple times, with incremental bonus/penalty.
Let's say that a fire mage has a skill called "Ignite" which places a "Burn" debuff on the enemy. This debuff can be stacked multiple times, so using Ignite twice will increase the stack count to 2, thrice will increase the stack count to 3, all the way up to a predefined maximum number of stacks.
The debuff causes the enemy to take additional 5% fire damage on the first stack, 10% on the second stack, etc.
I am not exactly familiar with the plugin scripting side of things, so please bear with me.
I am thinking of achieving this with the help of note tags, so for the Ignite skill, the note tag could possibly look like
<state_stack: 10, 5> where 10 is for the state id to add, and 5 is for the number of times it can be stacked.
For skills that started off at x number of stacks and the stack gradually decreases overtime, we can have
<state_stack: 10, 5, 5> where 10 is for the related state id, 5 is for the number of times it can be stacked and the second 5 is the starting stack count.
I tried using multiple states and the damage formula in the skill box to achieve similar effect but I am stumped, which lead me to look for alternatives through plugins. I am using a skill called "Bulk Up" that increases the maximum HP of target in this example:
Skill set up:
State set up:
Trying to work my way around the lack of stackable state with the damage formula bar..
So far, it seems to work, but in a way it is not supposed to.
var x; var arr = [14, 15, 16, 17, 18]; for (var i = 0, len = arr.length; i < len; i++){x = b.isStateAffected(arr) ? arr[i+1] : arr}; b.addState(x); x;Note: the x at the end is used for testing purpose.
What I wanted to do was to apply a HP bonus buff that can be stack for up to 5 times.
I store the 5 states in an array called arr
var arr = [14, 15, 16, 17, 18];Then I put it through a loop to see if the target is affected by state arr
for (var i = 0, len = arr.length; i < len; i++){x = b.isStateAffected(arr) ? arr[i+1] : arr};If the target is affected by state id 14, then arr[0+1] (state id 15) will be assigned to the variable x.
If the target is not affected by state id 14, then arr (state id 14) will be assigned to the variable x
b.addState(x);Apply state x to the target, the value for x is calculated in the loop.
When the skill is used in a test battle, it went ahead and apply state 18 (the highest state) instead of starting with 14 (the lowest) and slowly building it up. I understand that this is the result of putting it through the loop, and quite frankly I am not sure how to get around it.
I wanted to remove the lower ranked state whenever we repeat the use of the skill, except for rank 5, which will not be removed until it is dispelled or the timer has expired. Tried using && removeState(n) but it doesn't seem to work in that conditional statement either.
Thanks for reading.. looking forward to the day when such plugin is available as you can truly make some really interesting boss encounter and make people consider the synergy between party members' skill usage.
Let's say that a fire mage has a skill called "Ignite" which places a "Burn" debuff on the enemy. This debuff can be stacked multiple times, so using Ignite twice will increase the stack count to 2, thrice will increase the stack count to 3, all the way up to a predefined maximum number of stacks.
The debuff causes the enemy to take additional 5% fire damage on the first stack, 10% on the second stack, etc.
I am not exactly familiar with the plugin scripting side of things, so please bear with me.
I am thinking of achieving this with the help of note tags, so for the Ignite skill, the note tag could possibly look like
<state_stack: 10, 5> where 10 is for the state id to add, and 5 is for the number of times it can be stacked.
For skills that started off at x number of stacks and the stack gradually decreases overtime, we can have
<state_stack: 10, 5, 5> where 10 is for the related state id, 5 is for the number of times it can be stacked and the second 5 is the starting stack count.
I tried using multiple states and the damage formula in the skill box to achieve similar effect but I am stumped, which lead me to look for alternatives through plugins. I am using a skill called "Bulk Up" that increases the maximum HP of target in this example:
Skill set up:
State set up:
So far, it seems to work, but in a way it is not supposed to.
var x; var arr = [14, 15, 16, 17, 18]; for (var i = 0, len = arr.length; i < len; i++){x = b.isStateAffected(arr) ? arr[i+1] : arr}; b.addState(x); x;Note: the x at the end is used for testing purpose.
What I wanted to do was to apply a HP bonus buff that can be stack for up to 5 times.
I store the 5 states in an array called arr
var arr = [14, 15, 16, 17, 18];Then I put it through a loop to see if the target is affected by state arr
for (var i = 0, len = arr.length; i < len; i++){x = b.isStateAffected(arr) ? arr[i+1] : arr};If the target is affected by state id 14, then arr[0+1] (state id 15) will be assigned to the variable x.
If the target is not affected by state id 14, then arr (state id 14) will be assigned to the variable x
b.addState(x);Apply state x to the target, the value for x is calculated in the loop.
When the skill is used in a test battle, it went ahead and apply state 18 (the highest state) instead of starting with 14 (the lowest) and slowly building it up. I understand that this is the result of putting it through the loop, and quite frankly I am not sure how to get around it.
I wanted to remove the lower ranked state whenever we repeat the use of the skill, except for rank 5, which will not be removed until it is dispelled or the timer has expired. Tried using && removeState(n) but it doesn't seem to work in that conditional statement either.
Thanks for reading.. looking forward to the day when such plugin is available as you can truly make some really interesting boss encounter and make people consider the synergy between party members' skill usage.
Last edited by a moderator:

