Calling Title Screen after Losing in a Nuzlocke?

Wiispeed03

Trainer
Member
Joined
Feb 26, 2018
Posts
53
I recently installed JV's nuzlocke script. It works perfectly, however I wanted to make it so after you lose a battle
(no matter if canlose is set to true or false) you would be sent back to the title screen and have to reload your previous save.
Here's what I was trying to do:
The script will successfully display the message, but instead of calling the title screen, it continues with the script and transfers me to the PC. (I have also tried pbCallTitle, but that doesn't work either.)
Thank you to anyone willing to help!
 

Lord X-Giga-X

Sardonyx's Reaper
Member
Joined
Jun 28, 2017
Posts
46
Okay, I can confirm that your added script will work if you add return on the line after $game_temp.to_title = true. However in the state given, this will most likely cause some weirdness with pbStartOver before eventually sending you to the title screen.

So what we're going to do is keep most of that added script, but remove the $game_temp.to_title = true line. Trust me, it'll make sense in a moment.

Now what you're going to go to PField_Battles (or PField_Field depending on which version of Essential's you're using, I'm assuming v17.2 here). Look for a section of script starting with Events.onEndBattle+=proc {|sender,e|. Here you'll find Kernel.pbStartOver. You're going to change this into a case of if/else, where if nuzlocke mode is active, then you will be sent to the title, or else Kernel.pbStartOver.


EDIT: Actually considering you also want it to happen regardless of what canlose is set to, you could set it up like this:
Code:
if (decision==2 || decision==5)	 $game_system.bgm_unpause
	$game_system.bgs_unpause
	if [nuzlocke condition here]
	  $game_temp.to_title = true
	else !canlose
	  Kernel.pbStartOver
	end
  end

Weird code spacing aside, yeah.
 
Last edited:

Wiispeed03

Trainer
Member
Joined
Feb 26, 2018
Posts
53
Okay, I can confirm that your added script will work if you add return on the line after $game_temp.to_title = true. However in the state given, this will most likely cause some weirdness with pbStartOver before eventually sending you to the title screen.

So what we're going to do is keep most of that added script, but remove the $game_temp.to_title = true line. Trust me, it'll make sense in a moment.

Now what you're going to go to PField_Battles (or PField_Field depending on which version of Essential's you're using, I'm assuming v17.2 here). Look for a section of script starting with Events.onEndBattle+=proc {|sender,e|. Here you'll find Kernel.pbStartOver. You're going to change this into a case of if/else, where if nuzlocke mode is active, then you will be sent to the title, or else Kernel.pbStartOver.


EDIT: Actually considering you also want it to happen regardless of what canlose is set to, you could set it up like this:
Code:
	if (decision==2 || decision==5)	 $game_system.bgm_unpause
		$game_system.bgs_unpause
		if [nuzlocke condition here]
		  $game_temp.to_title = true
	else !canlose
	  Kernel.pbStartOver
	end
  end

Weird code spacing aside, yeah.

Dude, thank you so much, it works basically perfectly! Just in case anybody else was wondering about this, In PokeBattle_Battle, I also added some script to make sure the starting over message doesn't display, plus a game over jingle that plays after you lose:

Code:
	if $PokemonGlobal.nuzlocke==true
	  pbBGMFade(x=5)
	  pbDisplayPaused(_INTL("{1}'s Pokemon have all fainted!",$Trainer.name))
	  pbDisplayPaused(_INTL("You lost the Nuzlocke!"))
	  pbDisplayPaused(_INTL("Returning to title screen..."))
	  pbSEPlay("Game Over")
	end
	  if @internalbattle && $PokemonGlobal.nuzlocke!=true
#Script continues...

The only thing thing I could see being a bit of a problem is after a loss, the screen flashes back to the map for a fraction of a second before going to the title screen.
But I don't see how that could be resolved so I'm probably just going to leave it be unless somebody else here has a solution.

Thanks again for your help!
 
Last edited:
Top