Hey there.
I realise this is a fairly old topic, but I believe I have a solution to this issue, and I thought I should post it incase anyone here (or anyone in the future) still needs help. For the record, I have a fair amount of programming experience, but not much in RGSS3, so this solution is pretty hacky and not very 'professional'. But it works, so...
The issue, I found, occurs inside the method, "determine_autolife_state_id", as another script (in my case, YEA Lunatic States) clears the dead character's states before it gets a chance to run. The solution below is done in YEA Lunatic States, so if you have that, great; if not, it should theoretically work by doing the same thing in
whichever script is the last to redefine/alias the "erase_state" method.
I would suggest you make a backup of both scripts before making any modifications, just incase something goes wrong.
Step 1:
Spoiler
First thing's first; do a Ctrl-Shift-F and search for "def erase_state". Go to the last result.
You need to make the two marked changes in this code. Do not touch anything else.
#==============================================================================# ■ Game_BattlerBase#==============================================================================class Game_BattlerBase $statesAtDeath = [] # <-------------------------------------- ADD THIS LINE # Possibly some other methods here # ... #-------------------------------------------------------------------------- # alias method: erase_state #-------------------------------------------------------------------------- alias game_battlerbase_erase_state_lsta erase_state def erase_state(state_id) $statesAtDeath.push($data_states[state_id]) # <------------ ADD THIS LINE lunatic_state_effect🙂erase, $data_states[state_id], self) change_state_origin🙂erase) game_battlerbase_erase_state_lsta(state_id) end # Possibly some other methods here # ...end # Game_BattlerBase
Step 2:
Spoiler
Now, go to Mr. Bubble's Auto-Life Effect script, and go to around line 507.
Replace the "determine_autolife_state_id" method with the following code:
def determine_autolife_state_id autolife_result = nil for state in $statesAtDeath next if state.nil? autolife_result = state.id if activate_autolife?(state) end $statesAtDeath.clear return autolife_result if autolife_result != nil return 0 end
With any luck, your auto-life spells should now work fine.
I hope this helps some people. Feel free to contact me (or reply to this thread if it doesn't get closed for necro-posting?) if you need any further help with this... I'm not always around but I'll do what I can, when I can.