[Ace] Need help with Mr. Bubble's Auto-Life Effect

Hello there,

i am using Theoallens Side Battle system ( http://www.theolized.com/ ) along with Mr. Bubble's Auto-Life Effect ( https://mrbubblewand.wordpress.com/rgss3/auto-life-effect/ )

It works perfectly when applied to actors or items. But i can't make a reraise spell!

I made a spell wich applies a reraise state. The reraise state has the notetag <autolife>.

Once the actor under the effect of reraise dies, just gets the death effect at the end of the round.

I'm just curious if i set it up wrong or there is maybe a conflict with theoallen's script.
any clues?
I'm curious about this topic as well. I've seen the same compatibility issue with TSBS.

It works perfectly on the actor, but not on the state.
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.

Original thread: https://forums.rpgmakerweb.com/threads/ace-need-help-with-mr-bubbles-auto-life-effect.38453/