HELP IN MAKING STATES STACK. [VXA]

Posts

Pages: 1
And I'm here with another question. I'll ask this before I pass out. I've been working on my game for 12 hours, and I'm tiiiiired.....

Here. I want to make states stack, like in pokemon. It's mainly buffs and debuffs to stats. I don't see an option to increase/decrease by exact values instead of by percentages, so I was wondering how this is done in Ace (or if it's even possible...)

Thank you!
And good night.
I've been working on it, but in the mean time I have an ungainly method using a new state for each time you stack, and it should work for now. Put a.bleed(a,b) in the custom damage formula then paste this script into materials.

class Game_Battler < Game_BattlerBase
def bleed(a,b)
if b.state?(45)
b.add_state(44)
elsif b.state?(44)
b.add_state(43)
else
b.add_state(45)
end
end
end

You'll probably want to rename the script as something other than bleed, so thats after def (keep the a,b), and use whatever state numbers correspond to three states that are all the same. This is also assuming the states last for the duration of the battle, but hey, better than nothing.
I recommend reading this and this, there's a lot of cool things you can do for custom formula.

Edit: Don't pay attention to anything I just said (except the two links), it's a messy way to do things. As long as your states last for the whole battle, all you have to do is go to main script game battler, and comment out this on line 83:
unless state?(state_id)
So that the game will continue to add same state. I've heard there are problems with tracking states that expire in battle, however.
If you want it to be an exact value over percent, I'm pretty sure there's no default method of changing an enemy's parameter, and believe me I've looked. You can change enemy hp, mp, tp, but not their parameters.
Thanks Novalux!
I just stuck with the percentages anyway, increasing/decreasing stats by 50% with each instance.

The links were very informative too! I mean, look at all the stuff you thought you couldn't do :D
No problem, I wanted to look into this myself anyhow. Came up with another fix though, as I'm assuming you don't want all your states to be stackable/last the whole battle, so you can make some stack and others don't by replacing with this:
def add_state(state_id)
if state_addable?(state_id) && state_id<=20 #stackable limit
add_new_state(state_id)
reset_state_counts(state_id)
@result.added_states.push(state_id).uniq!
else
add_new_state(state_id) unless state?(state_id)
reset_state_counts(state_id)
@result.added_states.push(state_id).uniq!
State id 44 would be the id of the last state you want to be stack-able (1-20 can stack), while anything greater will act normally, just re-arrange your states.
Pages: 1