Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

VX: Development Issues

So I am currently creating a game for fun, Earthbound 2.  For those of you that have played the original Earthbound for SNES, there are a few things I am trying to do that are similar to the game.

1. When the main character (Ness) dies, the party instantly fails and is transported to the church.
2. Ness is instantly revived and recovered at the church if he dies.
3. The church will charge a small donation fee of (party member level * 20) to resurrect a single fallen ally.

So in example, if Paula, Jeff & Poo are dead then:
Paula's Level + Jeff's Level + Poo's Level * 20 = Revival Cost ($).

Right now, I have a common event set up that is constantly monitoring if Ness dies.  If Ness dies, it revives and recovers him at the church.  This works great so far with event placed NPCs that start battles, I can simply choose continue even if loser.  But, if a random encounter wipes out the party for example, well then it goes directly to game over.  It should NEVER go to game over, ever.  I tried adding an abort battle & call common event if Ness' HP is less than or equal to 0% to the encounter, but no go.  Anybody got ideas for this one?

The second problem I am having is really weird...almost like math on variables is not working.  I have a Revival Cost variable that is set to a constant of 20.  I also have a revival modifier that is used when Ness visits the church to revive fallen party members.  It adds the party members level to the revival modifier variable and then attempts to multiply it by the revival cost modifier.  But it isn't working.  The line reads:

Control Variables: [0011:Revival Modifier] += [Paula]'s Level

Paula's current level is 1 in this example.  When I have the NPC output variable (\v[11]) to check the value, its 0 every time.  Any ideas on this?

Also, if I try to continue anyway and do this:

Control Variables: [0011:Revival Modifier] *= Variable[0012:Revival Cost], the result is always 20.  20 is the value of Revival Cost as I mentioned earlier.  I tried setting Paula's level to 15.  So it should be doing 15 * 20 = 300, but no, the value is always 20.  What kinda weirdness is going on?

Much help is appreciated all, thanks so much!
 
What kind of event is monitoring Ness's health?

If it's, say, a parallel process common event, it won't run during battles-- you'll need to create events in the troops tab for every single troop, if I'm not mistaken.
 
So how do you add the event into the troop to prevent the gameover?  Because yes I am using a common event running as a parallel process.  Also thanks Regi about the information on the variable operations.

Edit.  I added the event to the troop that if Ness has 0% or less health to abort the battle, just as a test.  And it exited battle fine and then the common event kicked in which works.  But, even so, if the entire party gets wiped out, it still does the gameover screen.  I am still working on this but if anybody has a work around it would be greatly appreciated, thank you.
 
I don't know if this would have priority over the "Game Over," but you could try making the event resurrect the hero and then exit the battle, as a response to the hero's HP going to 0. 

It's worth a try-- anything else would take scripting that I'm not able to help with, I'm afraid.
 
Okay great, I think I got it now.  In Scene_Battle on line 197 I found this:

if result == 2 and not $game_troop.can_lose

So 2 means you just lost, and then it calls game over.  I simply took the else for an escape or victory and copied that code over to the if result == 2 for now.  I know it's spaghetti coding but I will fix it up before a beta release. 

Thanks so much for your help all, and that variable fix worked perfectly, my Nun now knows that 3 x 120 = 360 :D
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top