[VX ACE] I AM NOT A LUNATIC

Posts

Pages: 1
Max McGee
with sorrow down past the fence
9159
This thread is "I think out loud while trying to figure out how to accomplish something simple with RGSS3 and you all laugh at how badly I'm failing/offer suggestions how to fail less". If anyone else finds even the simplest scripting tasks as paralyzingly unapproachable as I do, maybe this will help you with the learnings.

The script in question I am trying to leverage is "Yanfly Engine Ace - Lunatic States Package - Punishment v1.01" and specifically an add-on scriptlet somebody (I'm not sure who) made for it to allow a 'DOOM' or 'Death Sentence' effect a la Final Fantasy.

    #----------------------------------------------------------------------

# Punish Effect No. 9: Doom

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# When this state's turns reaches 0 and clears itself, the battler will

# be instantly killed unless immortal. The death effect will not occur

# if the state is removed manually through a skill or item.

#

# Recommended notetag:

# <leave effect: doom>

#----------------------------------------------------------------------

when /DOOM/i

return if dead?

# Change the number to the id of any revive animation you wish to play,

# or to "nil" if you do not wish for any animation to play

@animation_id = 0

remove_state(state.id)

add_state(1)

die

What I am trying to accomplish is a Gradual Petrify status again a la Final Fantasy. After a few turns, the character will be turned to stone.

The first thing I did was set up a stone state, State 24 in my database. It makes an actor unable to act and it has no removal conditions (so you'd need a 'Stone to Flesh' spell or a Soft-equivalent item to cure it). Its traits set Target Rate, Physical Damage Rate, Magical Damage Rate, and Floor Damage Rate all to 0%, so the effected actor shouldn't be targeted by enemies and if they are, all damage they take will be reduced to 0%. Then I added State Resists for all negative status effects because statues can't bleed, be poisoned, etcetera.

Now basically it looks to me like this Punish Effect No. 9 does exactly what I want, it just inflicts the wrong state. So what I'm going to do is basically copy it, change the name, change the comments, and change the state it inflicts.

What I wound up with including my comments looks like this, and is pasted right below the existing Doom effect:

    #----------------------------------------------------------------------
# Punish Effect No. 10: Petrify
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# When this state's turns reaches 0 and clears itself, the battler will
# be turned to stone. The petrification state will not be inflicted
# if the state is removed manually through a skill or item.
#
# Recommended notetag:
# <leave effect: petrify>
#----------------------------------------------------------------------

when /PETRIFY/i

# Change the number to the id of any revive animation you wish to play,

# or to "nil" if you do not wish for any animation to play

@animation_id = 0

remove_state(state.id)

add_state(24)

Now all I need to do should be to create an "About To Get Stoned" state which I will call "Flesh To Stone" (State 25). It doesn't do anything on its own and it goes away at the end of battle and in three turns. It has a " <leave effect: petrify> " note tag in its Notes box.

There. That...should...work? I know it doesn't do a couple things I want it to do. Multiple applications of State 25 won't cause State 24 to trigger immediately, but I can live without that. Additionally, every actor being Petrified won't trigger a game over effect like it probably should which is a slightly bigger problem.
Put a
print "work you asshole\n"

bit in your when block, before the @animation_id or so. See if that gets printed to the console. If it is then there's something wrong with your script in the when block, otherwise something isn't set right so the code is never executed and it'll have to be double checked.

I used the base version of this script on a project I worked on nearly a year ago, I remember having some headache with making it go but damned if I can remember what it was.
Max McGee
with sorrow down past the fence
9159
So this..."worked", in that the Petrifying State when left alone for three turns did indeed lead to the Petrified state. The problem is, the presence of the Petrified state COMPLETELY broke the game in a new and interesting way:

The second character in my party (highest AGI) was the one Petrified, and as a result (???) of that only my first party member was able to act. Neither the other two non-petrified party members nor any of the enemies were ever allowed to act in battle. I have no idea why this is but I have to assume it's either VX Ace itself or Fomar1053's ATB/CTB battle system script is completely freaking out and blowing a gasket over either the Petrification status effect itself or the way it was applied.

So I've got to basically "comment out" the Stone Stare ability from my game for now, because I can't think of any quick way to fix this.
Pages: 1