DoubleX RMVXA Permanent States


DoubleX RMVXA Permanent States  v1.00c
​


by DoubleX
​




Introduction


A battler's states are cleared if a he/she/it dies in the default setting. This is hardcoded and can only be edited via scripting.


With this script, users can set specific states to be always added back automatically upon battlers' revival. These states may be regarded as permanent states.


Video










Features


Use of notetags(requires knowledge of notetag usage) to set specific states to be permanent states


A way to set all states to be permanent states without using notetags(and ignoring them)


How to use


Open the script editor and put this script into an open slot between Materials and Main. Save to take effect.


FAQ


None


Credit and Thanks


DoubleX(Giving me credit is completely optional)


No terms of use other than not claiming this script as created by anyone except DoubleX or his alias


Compatibility


Scripts aliasing or rewriting method:


- clear_states under class Game_BattlerBase
- revive under class Game_Battler


may have compatibility issues with this script


Place this script above those aliasing any of these methods if possible


Changelog


v1.00c(GMT 1400 14-7-2015):


- Increased this script's compactness and efficiency


v1.00b(GMT 0200 12-3-2014):
- Fixed permanent states bug upon battler's revival


v1.00a (GMT 0700 13-2-2014):
 - 1st version of this script finished


(DoubleX)Permanent States v1.00c.rar
Fanncy..

Nice job 🙂
These permanent states can be removed by an item or something though?

(May be a dumb question)
These permanent states can be removed by an item or something though?

(May be a dumb question)
It should be yes if there's no any other custom scripts as my scripts just stores all permanent states into an array right before all states are cleared due to death and restores all of them from that array right after battler's revival 🙂

Spoiler
class Game_BattlerBase #----------------------------------------------------------------------------| # Alias method: clear_states | #----------------------------------------------------------------------------| alias clear_states_permanent_state clear_states def clear_states # This part is added by this script to store permanent states @permanent_states = [] @permanent_states_turns = {} if @states && @states.size > 0 @states.each { |state| if $data_states[state].permanent_state          @permanent_states.push(state)          @permanent_states_turns[state] = @state_turns[state]        end } end # clear_states_permanent_state end # clear_states #----------------------------------------------------------------------------| # New method: add_permanent_states | #----------------------------------------------------------------------------| def add_permanent_states @states = @permanent_states @state_turns = @permanent_states_turns end # add_permanent_statesend # Game_BattlerBaseclass Game_Battler < Game_BattlerBase #----------------------------------------------------------------------------| # Alias method: revive | #----------------------------------------------------------------------------| alias revive_permanent_states revive def revive # This part is added by this script to add permanent states upon revival add_permanent_states # revive_permanent_states end # reviveend # Game_Battler
P.S.: Your question isn't dumb at all, it just means I should've explained more things more clearly from the very beginning 😀
Updates

v1.00c(GMT 1400 14-7-2015):

- Increased this script's compactness and efficiency

Original thread: https://forums.rpgmakerweb.com/threads/doublex-rmvxa-permanent-states.23666/