Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Attract Mode
- Original author: Yato
- Original date: December 9, 2013
- Source thread: https://forums.rpgmakerweb.com/threads/attract-mode.20800/
- Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS3 Scripts (RMVX Ace)
Summary
Attract Mode 1.3 by Racheal Introduction This script allows you to set up an attract mode when the player sits idle on the title screen, similar to many arcade and console games.
Archived First Post
Attract Mode 1.3
by Racheal
Introduction
This script allows you to set up an attract mode when the player sits idle on the title screen, similar to many arcade and console games.
Features
- Sends the player to a blank map after a certain number of frames spent on the title screen.
- Returns the player to the title screen with a press of a button.
- *New* Choose to display attract mode once before the first time the title is shown
How to Use
Insert the script anywhere in the Materials section above Main and then configure the options.
Script
Spoiler
#==============================================================================
# Attract Mode
# by: Racheal
# Version 1.3
# Created: 09/12/2013
# Updated: 10/12/2013
#==============================================================================
# Allows you to set up an attract mode map if the player idles on the title
# screen. Attract mode can be canceled at any time with the confirm or cancel
# keys.
#==============================================================================
# Instructions:
# * Insert in the Materials section
# * Configure to your liking below
#==============================================================================
#==============================================================================
# Customization
#==============================================================================
module Racheal_Attract_Mode
# Map that attract mode sends you to
ATTRACT_MAP = 2
# Set whether to view attract mode before the first time you se
# title screen
SHOW_FIRST = true
# Amount of time (in frames) until attract mode kicks in
# The time is set exceptionally low in this demo just so you don't have to
# sit around and wait a long time to see it.
WAIT = 320
end
#==============================================================================
# End Customization
#==============================================================================
module Input
BUTTONS = [
:LEFT, :UP, :RIGHT, OWN,
:A, :B, :C,
:X, :Y, :Z,
:L, :R,
:SHIFT, :CTRL, :ALT,
:F5, :F6, :F7, :F8, :F9
]
def self.any_press?
BUTTONS.any? {|i| press? i}
end
end
#==============================================================================
module DataManager
#--------------------------------------------------------------------------
# * Set Up Attract Mode
#--------------------------------------------------------------------------
def self.setup_attract
create_game_objects
$game_party.setup_starting_members
$game_map.setup(Racheal_Attract_Mode::ATTRACT_MAP)
$game_player.moveto(5, 5)
$game_player.refresh
Graphics.frame_count = 0
end
end
#==============================================================================
class Scene_Attract < Scene_Map
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
SceneManager.goto(Scene_Title) if Input.any_press?
end
end
#==============================================================================
class Scene_Title < Scene_Base
@@attract_seen = !Racheal_Attract_Mode::SHOW_FIRST
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
alias scene_title_start_attract_mode start
def start
unless @@attract_seen
start_attract
@@attract_seen = true
return
end
scene_title_start_attract_mode
@count = 0
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias scene_title_update_attract_mode update
def update
scene_title_update_attract_mode
@count += 1
start_attract if @count == Racheal_Attract_Mode::WAIT
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
alias scene_title_terminate_attract_mode terminate
def terminate
Graphics.freeze
scene_title_terminate_attract_mode if @viewport
end
#--------------------------------------------------------------------------
# * Start Attract
#--------------------------------------------------------------------------
def start_attract
DataManager.setup_attract
close_command_window if @command_window
fadeout_all
$game_player.transparent = true
$game_player.followers.visible = false
$game_player.refresh
$game_map.autoplay
SceneManager.goto(Scene_Attract)
end
end
#==============================================================================
# Attract Mode
# by: Racheal
# Version 1.3
# Created: 09/12/2013
# Updated: 10/12/2013
#==============================================================================
# Allows you to set up an attract mode map if the player idles on the title
# screen. Attract mode can be canceled at any time with the confirm or cancel
# keys.
#==============================================================================
# Instructions:
# * Insert in the Materials section
# * Configure to your liking below
#==============================================================================
#==============================================================================
# Customization
#==============================================================================
module Racheal_Attract_Mode
# Map that attract mode sends you to
ATTRACT_MAP = 2
# Set whether to view attract mode before the first time you se
# title screen
SHOW_FIRST = true
# Amount of time (in frames) until attract mode kicks in
# The time is set exceptionally low in this demo just so you don't have to
# sit around and wait a long time to see it.
WAIT = 320
end
#==============================================================================
# End Customization
#==============================================================================
module Input
BUTTONS = [
:LEFT, :UP, :RIGHT, OWN,
:A, :B, :C,
:X, :Y, :Z,
:L, :R,
:SHIFT, :CTRL, :ALT,
:F5, :F6, :F7, :F8, :F9
]
def self.any_press?
BUTTONS.any? {|i| press? i}
end
end
#==============================================================================
module DataManager
#--------------------------------------------------------------------------
# * Set Up Attract Mode
#--------------------------------------------------------------------------
def self.setup_attract
create_game_objects
$game_party.setup_starting_members
$game_map.setup(Racheal_Attract_Mode::ATTRACT_MAP)
$game_player.moveto(5, 5)
$game_player.refresh
Graphics.frame_count = 0
end
end
#==============================================================================
class Scene_Attract < Scene_Map
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
SceneManager.goto(Scene_Title) if Input.any_press?
end
end
#==============================================================================
class Scene_Title < Scene_Base
@@attract_seen = !Racheal_Attract_Mode::SHOW_FIRST
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
alias scene_title_start_attract_mode start
def start
unless @@attract_seen
start_attract
@@attract_seen = true
return
end
scene_title_start_attract_mode
@count = 0
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias scene_title_update_attract_mode update
def update
scene_title_update_attract_mode
@count += 1
start_attract if @count == Racheal_Attract_Mode::WAIT
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
alias scene_title_terminate_attract_mode terminate
def terminate
Graphics.freeze
scene_title_terminate_attract_mode if @viewport
end
#--------------------------------------------------------------------------
# * Start Attract
#--------------------------------------------------------------------------
def start_attract
DataManager.setup_attract
close_command_window if @command_window
fadeout_all
$game_player.transparent = true
$game_player.followers.visible = false
$game_player.refresh
$game_map.autoplay
SceneManager.goto(Scene_Attract)
end
end
Credit
- Racheal
Demo
Download Here
Please don't mind how silly the attract mode is. I already spent way more time on this demo than I did the script. I'm sure it can be used far more effectively than what I showed here.
Author's Notes
Free for commercial and non-commercial use. Just credit me (and let me know if you use it, just because).
Thanks to Super Cremno 64 Turbo HD, I've updated the script to allow for any standard button to cancel attract mode. The demo has also been updated.
Since this script just teleports you to a map of your choosing, the possibilities for what you can do with it are pretty plentiful. My only recommendations are to not use anything that requires player input (i.e., a text box that doesn't auto-close) and to return to the title screen at the end of the auto-event.
Features Mentioned
- Sends the player to a blank map after a certain number of frames spent on the title screen.
- Returns the player to the title screen with a press of a button.
- New* Choose to display attract mode once before the first time the title is shown
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
Credit - Racheal Demo Download Here
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...