RMVX BATTLE EVENT PROBLEMS

Posts

Pages: 1
Max McGee
with sorrow down past the fence
9159
So, I know you're supposed to do everything with RGSS nowadays with these newfangled RPG Makers, but does that really mean that they have to completely break event based code? I remember back in the day before RMVX, a lot of people accomplished a lot with RM2k and RM2k3 just by using events to "code". That doesn't seem to be possible with VX; either that, or I'm doing something wrong.

Background Info
I am completely new to RPG Maker VX (just started messing with it today) but a seven year veteran of the RPG Maker franchise; I've made games with every maker since 2k.

Here is what I am trying to accomplish, using the "Default Battle System": essentially, Re-raise, from Final Fantasy Tactics; a skill that causes a status effect that automatically resurrects a character upon their next death.

Does anyone have or know of (or would easily be able to write) a script that accomplishes this?

My attempts to render this in battle event "code" have been frustrated to no end. (I would copy paste the code, but considering there is no convenient way of doing that, I'll just feebly attempt to describe the problem instead.)

An Attempted Explanation of the Attempted Event "Code"
First, I had an event that was supposed to set a variable equal to the character's HP each turn, and then check to see if that variable was zero. If it was, the event would restore the character's HP by half, and remove both the 'Incapacitated' and 'Revivify' status effects. Unfortunately, I couldn't even get past the first part; the program refused to set the variable equal to the character's HP. Or her Max HP. Or her Level. Or in fact, any of her stats. I found this extremely distressing. I even put in an show text event just to report to me the variable's value, and it was always zero. So the 'resurrection' kept going off pointlessly every time I used the skill.

At this point, the Resurrection goes off every time the skill is used, and does nothing.

Secondly, I tried a workaround: I made the event check for the character having the status effect "Incapacitated" since I couldn't check for 0 HP. This was no good either; since I have only one character in the party in this game (unless you play a summoner; not relevant here), the program triggered the "game over" event in the base script before the event had a chance to process.

At this point, the Resurrection won't go off upon character death.

Thirdly, I tried to make the twofold triggers of that page of event code having the 'Revit' switch on (i.e. having used the skill) AND being at or below 1% Health. This did not fix the above problem. When the character dies, I still get a game over, not resurrected.

To anyone familiar with event code:
Do you know what I'm doing wrong, aside from not having another character in the party?

To anyone familiar with RGSS:
Any ideas on how to script a workaround?

I'm trying to decide whether or not to buy RMVX, and I have to admit that running into a roadblock like this, this early is leading me towards not. The problem with 'game over' triggering first would have happened in the previous makers probably, but um, what about the fact that the program won't let me set any variables equal to character stats? I can't think of any sane reason for that.

Any and all help will be much appreciated.

-Max

P.S. Uh, on an unrelated note, what's up with the battle backgrounds or lack thereof? Not a fan of that either.
Not detecting variables is a serious code blunder that Enterbrain made in the Game_Interpreter script. Please see the link below, it should resolve the variable problem.

http://rmrk.net/index.php/topic,25049.0.html

Scroll down to DrakoShade's post

As a side note, the 'Level' variable still does not seem to work with this.

Edit: Battle backgrounds is easily resolvable with a script on one of the big script sites. It should be easy enough to find.
I don't think it will be possible using events for the reason you mentioned, a one-player party will send you to the game over screen after dying. Here's a simple script I came up with that will fix that. Just paste it in a new page below the "Materials" heading in the script editor:


class Game_Battler
def reraise
if @states.include?(x)
self.hp=((maxhp / 5).to_i)
@states.delete(x)
return true
end
return false
end

def dead?
return (not @hidden and @hp == 0 and not @immortal and not reraise)
end
end


First, you'll need to create a new state in the editor, named Reraise or whatever you'd like, with the icon you'd like. Set it to expire at the end of battle if you desire. Leave every other option alone, they don't matter.

In the script, replace "x" in the @states..(x) to the exact ID number of the Reraise state you created in the editor.

In the script, "self.hp=((maxhp / 5).to_i)" is the formula provided to give the player back 20% of their health after reviving. Change this formula to whatever you want (i.e., self.hp=(1) to simply give them 1 hp; maxhp is obviously a variable that contains that character's maximum hp).

For aesthetics, in the "incapacitated" state, you may want to change the messages printed to the battle screen, because the "Message when an actor/enemy fell into the state" message will be replaced within half a second by the "Message when state releases" message without making a new message line. I don't know how to fix that at the moment. What I did is set the first message to "was knocked out." and the last message to "was knocked out, but has revived!" to make it look better.

Lemme know if it didn't work.
Also, here are some links for battle backgrounds scripts. There's several others you can probably find by fiddling with Google.

http://www.gamebaker.com/rmvx/scripts/e/battle-backgrounds.php

http://www.rpgmakervx.net/index.php?showtopic=354
Max McGee
with sorrow down past the fence
9159
Thanks a lot guys, you rule. I burned myself out on RMVX for today; I'll check out these scripts tomorrow. :)
Max McGee
with sorrow down past the fence
9159
Lavalle, that script doesn't seem to be doing anything in Battle Test? Do I need to Test Play for the scripts to take effect?

EDIT: Okay, yes, I do. It works beautifully, which is to say, it works. I'll worry about aesthetics later. Thanks a million!

EDIT: POISON IS BROKEN. The poison status effect is broken. Does anyone know why that is? I can't fix it. I'm making a stupid friggin' scorpion monster with an attack that does damage and poison. I've tried everything I can think of; I can't make an attack that deals damage inflict poison. This is a very basic thing. Why won't it work? I even copied an attack that deals damage and inflicts poison from the default skills and changed the icon and text; that won't work. The default skill will work in the Battle Test...BUT EVEN THE DEFAULT SKILL WON'T WORK IN TEST PLAY.

This is really pissing me off. It's poison. I'm not trying to code anything special here, no fancy systems. It's just fucking poison. Why won't POISON work?

Nevermind, it DECIDED TO START WORKING AGAIN. For no real reason.
Why won't computer programs ever behave in a predictable manner like logic leads you to believe they should?
Pages: 1