RPG Maker Forums


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, :DOWN,
: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).

I'd like to eventually figure out an easy way to cancel the attract mode with any player input instead of just the main two keys like it is right now. I'll update the script if I figure out how I want to do this.
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.

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top