Hi, here is one of my script !
Autor : Darkleo
Version : 1.0
Feature :
This script has 3 features.
* It can add an intro (a picture appears then disappears)
* It can totally remove the title scene
* It can disconnect intro and title while tests. (when the game is launch trough editor)
I think you don't need screenshoot ^^
Script :
I'm French, and I know I'm not very good at English, so please correct me ^^
Enjoy ! (or not)
Autor : Darkleo
Version : 1.0
Feature :
This script has 3 features.
* It can add an intro (a picture appears then disappears)
* It can totally remove the title scene
* It can disconnect intro and title while tests. (when the game is launch trough editor)
I think you don't need screenshoot ^^
Script :
Code:
#====================================================================
# â– Scene_Title
# Autor : Darkleo
# Modifie l'entrée en jeu en rajoutant une intro
# Permet lors des tests de passer directement àla map
#====================================================================
class Scene_Title
#--------------------------------------------------------------------------
### Configuration ###
# 1 = Always
# 2 = Disconnect while tests
# 3 = Never
Intro = 2
Pic_Intro = 'Logo.png' # In Title file
Pic_sound = '061-Thunderclap01' # SE played while intro
Set_Intro = [0, 250] # Time, start opacity
Title = 2
### End ###
#--------------------------------------------------------------------------
def initialize
@phase = $BTEST ? 4 : 0
case Intro
when 1
@intro = true
when 2
@intro = !$DEBUG
when 3
@intro = false
end
case Title
when 1
@title = true
when 2
@title = !$DEBUG
when 3
@title = false
end
end
#--------------------------------------------------------------------------
def main
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
Graphics.frame_count = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
end
#--------------------------------------------------------------------------
def update
case @phase
when 0
@intro ? start_intro : @phase = 2
when 1
update_intro if @intro
when 2
if @title
start_title
return
end
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
when 3
update_title if @title
when 4
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$scene = Scene_Battle.new
end
end
#--------------------------------------------------------------------------
def start_intro
Audio.se_play('Audio/SE/' + Pic_sound, 90, 100)
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title(Pic_Intro)
@sprite.opacity = Set_Intro[0]
@compteur = 0
@phase += 1
end
#--------------------------------------------------------------------------
def update_intro
@compteur += 1
@sprite.opacity += ( @compteur < Set_Intro[1]/2 ? 1 : -1 )
if Input.trigger?(Input::C) or Input.trigger?(Input::X) or @compteur >= Set_Intro[1]
@sprite.dispose
@phase += 1
end
end
#--------------------------------------------------------------------------
def start_title
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
$game_system.bgm_play($data_system.title_bgm)
s1 = 'Nouvelle partie'
s2 = 'Charger une partie'
s3 = 'Quitter'
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
# Test pour griser ou non l'option charger
@continue_enabled = false
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata") or FileTest.exist?("Sauvegarde#{i+1}.rxdata")
@continue_enabled = true
end
end
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
@phase += 1
end
#--------------------------------------------------------------------------
def update_title
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
@command_window.dispose
@sprite.dispose
Audio.bgm_stop
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
when 1
unless @continue_enabled
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@command_window.dispose
@sprite.dispose
$scene = Scene_Load.new
end
when 2
$game_system.se_play($data_system.buzzer_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
end
end
#--------------------------------------------------------------------------
end
#====================================================================
I'm French, and I know I'm not very good at English, so please correct me ^^
Enjoy ! (or not)