- Pokémon Essentials Version
- v18.1 ➖
The Update Assistant is a script that helps update player's games when they get a new version of the game and prevents players with newer versions of the game from playing old versions and possibly breaking their saves. The instructions are in the script itself, along with settings you can use. If you find any errors, please post them in the Discussions Tab. If you have any questions, feel free to ask them in the previously mentioned tab too.
Code:
################################################################################
# _ _ _ _ _ _ _ _
#| | | |_ __ __| |__ _| |_ ___ /_\ _____(_)__| |_ __ _ _ _| |_
#| |_| | '_ \/ _` / _` | _/ -_) / _ \ (_-<_-< (_-< _/ _` | ' \ _|
# \___/| .__/\__,_\__,_|\__\___| /_/ \_\/__/__/_/__/\__\__,_|_||_\__|
# |_|
# _ _ _
#| |__ _ _ __ _ __ ___| |_ _ _ __ _(_)_ _ ___ _ _ __ ___ _____ _ _ _ _
#| '_ \ || | / _` / _/ -_) _| '_/ _` | | ' \/ -_) '_/ _` \ V / -_) '_| || |
#|_.__/\_, | \__,_\__\___|\__|_| \__,_|_|_||_\___|_| \__,_|\_/\___|_| \_, |
# |__/ |__/
#
# "Update Assistant by acetraineravery"
################################################################################
# To use, put "pbNewGameVersion" near the end of your intro/new game sequence
# and "pbCheckUpdater" after
#
# if !$game_map.events # Map wasn't set up
# $game_map = nil
# $scene = nil
# pbMessage(_INTL("The map is corrupt. The game cannot continue."))
# return
# end
#
# in PScreen_Load.
################################################################################
CURRENT_GAME_VERSION = 1 # The version of your game. Do NOT use a number below
# your last version's update number.
UPDATE = true # True by default. If false, there will be no update
# sequence. This is used if you don't need the player's
# info to be changed in a specific version.
USE_COMMON_EVENT = true # True by default. If true, it uses a common event to
# update. If false, it will use ruby code instead.
# The code section can be edited in
# "INSERT SCRIPT STUFF HERE"
UPDATE_COMMON_EVENT = 10 # If USE_COMMON_EVENT is true, this is the id of the
# common event being used for updating. 10 by default.
UPDATE_VARIABLE = 90 # The variable used for updates. Do not change outside
# of this script.
################################################################################
def pbNewGameVersion
if $game_variables[UPDATE_VARIABLE] == 0
$game_variables[UPDATE_VARIABLE] = CURRENT_GAME_VERSION
end
end
def pbCheckUpdater
if $game_variables[UPDATE_VARIABLE] > CURRENT_GAME_VERSION
Kernel.pbMessage("Your save file comes from an incompatible version of the game.")
Kernel.pbMessage("Please update to the latest version of the game!")
scene=PokemonLoad_Scene.new
screen=PokemonLoadScreen.new(scene)
screen.pbStartLoadScreen
else
if $game_variables[UPDATE_VARIABLE] != CURRENT_GAME_VERSION
if UPDATE == true
if USE_COMMON_EVENT == true
pbCommonEvent(UPDATE_COMMON_EVENT)
else
# INSERT SCRIPT STUFF HERE #
Kernel.pbMessage("Game was updated!")
end
end
$game_variables[UPDATE_VARIABLE] = CURRENT_GAME_VERSION
pbSave
end
end
end
PluginManager.register({
:name => "Update Assistant",
:version => "1.0",
:credits => "acetraineravery",
:link => "https://reliccastle.com/resources/515/"
})
- Credits
- acetraineravery