Im looking for a no gameover script.(pokemon like death with pokecenter)

Started by macht102, December 14, 2009, 05:13:43 am

Previous topic - Next topic

macht102

I've been looking for a script that when you die in a random battle you blackout like on the pokemon games. Thanks in advance.

Jackolas

events?

but if you really want I can make a script for this.
XP or VX?


Jackolas

this should work
hope its what you are looking for
Make sure that the Map ID variable etc are set before going into battle (else a crash will happen)

Spoiler: ShowHide
#==============================================================================
# ■ Custom GameOver
#==============================================================================
# script by:            Jackolas
# Version number:       V 1.0
# Last edit date:       14-12-09
#==============================================================================
# Wat is this:
# Teletports the player back to a saved point when losing a battle.
#==============================================================================
# How to Use:
#
# Use an Event to save the Map_ID, player_x and Player_Y to the assigned
# variables. If you repeat that at every inn/save point/etc the party gets
# transported to the last assigned point when they lose a battle.
#==============================================================================
module Jackolas_GameOver
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration below
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 VarID = 10          # Variable for Map ID
 VarX = 11           # Variable for Map X
 VarY = 12           # Variable for Map Y
 Autoheal = false    # Heal party after transport
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration above
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end

class Scene_Gameover
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Set variables
   @MapID = $game_variables[Jackolas_GameOver::VarID]
   @MapX = $game_variables[Jackolas_GameOver::VarX]
   @MapY = $game_variables[Jackolas_GameOver::VarY]
   # Set game over flag
   $game_temp.gameover = false
   # Return to BGM before battle starts
   $game_system.bgm_play($game_temp.map_bgm)
   # Clear in battle flag
   $game_temp.in_battle = false
   # Clear entire party actions flag
   $game_party.clear_actions
   # Remove battle states
   for actor in $game_party.actors
     actor.remove_states_battle
   end
   # Recover party if autoheal is true
   if Jackolas_GameOver::Autoheal == true
     for actor in $game_party.actors
       actor.recover_all
     end
   else
     for actor in $game_party.actors
       actor.hp = 1
     end
   end
   # Clear enemies
   $game_troop.enemies.clear
   # Call battle callback
   if $game_temp.battle_proc != nil
     $game_temp.battle_proc.call(2)
     $game_temp.battle_proc = nil
   end
   # Transport player
   $game_map.setup(@MapID)
   $game_player.moveto(@MapX, @MapY)
   # Switch to map screen
   $scene = Scene_Map.new
 end
end


Place above main and below Scene_Gameover
compatible with all scripts except the ones that mess with Scene_Gameover
(just place below those scripts to fix it)

macht102

THANKS SO MUCH!!!
It works perfectly, its exactly what i was looking for  :D

element

Aren't there already some scripts of that kind ?
I have one.
Winkio's I think

Jackolas

took me a total of about 2 mins to create this 1. so no problem :P

edit:
http://forum.chaos-project.com/index.php/topic,428.0.html

+ points of that script is that you can remove xp/gold (can easy add it to mine)
- points is that you can't change your re-spawn position (and since he wanted like pokemon death. its required to change)

also my script looks easier way of doing it (dunno if its the right way)

element

ok the change respawn thing sounds cool
could you add the gold/exp lose thing to yours ?
and also, that you'll lose all youre items except the one's youre holding/have equipped or something ?like in RuneScape
that would be great.

winkio

yeah, it was like the first script I created, so w/e.  I like the way I did it better because it shows a gameover screen and waits for you to press a button before respawning you.  But again, w/e.

Jackolas

I already thought it was 1 of your first scripts :P

am kinda rebuilding mine to include everything.
atm building in safety stuff.

edit:
almost done with version 1.1
gone be a total game over script with lots of options :P

added:

  • Fixed Spawn location / Variable spawn location

  • Map id / Variable of map id

  • Map x / Variable of map x

  • Map y / Variable of map y

  • Able to lose gold on death (true/false)

  • How much gold to lose (can be in % or in fixed number)

  • Able to lose exp on death (true/false)

  • Able to lose lvls on death (true/false)

  • how much exp to lose (can be in % or in fixed number)

  • Auto-heal on respawn (true/false)



I'm working to add:

  • Show Game Over screen with option to continue, load or main menu (true/false)

  • Able to lose items in backpack (true/false)

  • Likelihood you will lose item from backpack (in %)

  • Able to lose equipped items (true/false)

  • Likelihood you will lose item equipped (in %)



also need to find a way to report what's lost etc.

element

can you add that you will only lose for example the 5 most less valued items in your bag ?

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Jackolas

Quotecan you add that you will only lose for example the 5 most less valued items in your bag ?

will see. first need to find a way to do random items drops.. than i will look into this

QuoteHow about you make a script topic, Jackolas?

good idea:
http://forum.chaos-project.com/index.php/topic,5173.0.html

Edit:
for further updates:
http://forum.chaos-project.com/index.php?topic=5173.0