Mobius's "The Story So Far" Script

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
363
Reaction score
85
First Language
English
Primarily Uses
The Story So Far 1.0

by

MobiusXVI


Release Notes
v. 1.0 Initial Release

Introduction
The purpose of this script is to allow you to remind the player about what has happened in the story whenever they load their game. I hope you enjoy it!

Features
- Very little scripting needed to make script work, since it uses maps for cutscenes.
- Can have as many or few chapters as you want
- Allows player to skip watching the cutscene and load directly into game (especially useful when reloading a game due to death)

Screenshots
None.

How to Use
- Place this script below the defaults but above main. If you have other scripts that modify saving/loading, put this one below them.
- What this script does is check a game variable of your choosing to determine the current "chapter". Then it loads a map that you specify to let you play out a cutscene of your own design to recap the story. So you'll need to complete the configuration section below to do this.
- You can do whatever you want on the cutscene maps, including going to additional maps if need be. Whenever you finish with your cutscene, all you have to do is put the following script call in an event and the game will then load and allow the player to keep going: "Mobius_Story_So_Far.finish_cutscene" (without quotes)
- The additional configuration needed is listed in the script under "Configuration"

Demo
http://www.mediafire.com/download/alsku2kn3c2ke0d/Story So Far Demo.zip

Script

Code:
#===============================================================================
# The Story So Far
# Author: Mobius XVI
# Version: 1.0
# Date: 26 DEC 2013
#===============================================================================
#
# Introduction:
#
# The purpose of this script is to allow you to remind the player about what
# has happened in the story whenever they load their game.
#
# Instructions:
#
# - Place this script below the defaults but above main. If you have other
# scripts that modify saving/loading, put this one below them.
# - What this script does is check a game variable of your choosing to
# determine the current "chapter". Then it loads a map that you specify to
# let you play out a cutscene of your own design to recap the story.
# So you'll need to complete the configuration section below to do this.
# - You can do whatever you want on the cutscene maps, including going to
# additional maps if need be. Whenever you finish with your cutscene, all
# you have to do is put the following script call in an event and the game
# will then load and allow the player to keep going.
# "Mobius_Story_So_Far.finish_cutscene" (without quotes)
#
# Features:
#
# - Very little scripting needed to make script work, since it uses maps for
# cutscenes.
# - Can have as many or few chapters as you want
# - Allows player to skip watching the cutscene and load directly into game
# (especially useful when reloading a game due to death)
#
# Issues/Bugs/Possible Bugs:
#
# - There may be incompatibility issues with any script that heavily modifies
# the saving/loading of the game. Placing this script below them should
# alleviate most problems
#
# Credits/Thanks:
# - Mobius XVI, author
# - Monkeysnow55, for requesting it
#
# License
# - This script is licensed under a Creative Commons
# Attribution-ShareAlike 3.0 Unported license.
# A human readable summary is available here:
# http://creativecommo.../3.0/deed.en_US
# The full license is availble here:
# http://creativecommo...a/3.0/legalcode
# In addition, this script is only authorized to be posted to the
# forums on RPGMakerWeb.com.
# Further, if you do decide to use this script in a commercial product,
# I'd ask that you let me know via a forum post or a PM. Thanks.
#
#===============================================================================
# CONFIGURATION
#===============================================================================
module Mobius_Story_So_Far
CHAPTER_VARIABLE = 1
# Define the game variable that will be used to determine what chapter
# the player is on.

CUTSCENE_MAPS = [[2, 0, 0], # Chapter 0 / Prologue
                [3, 19, 7], # Chapter 1
                [4, 6, 0],  # Chapter 2
                [5, 0, 0],  # Chapter 3
                #[MAP_ID, STARTING_X, STARTING_Y], # CHAPTER X
                # ...
                ] # Array end - DON'T DELETE!
# This is an array of arrays. The inner arrays have three entries. The first
# is the Map_ID for whatever map you want to use for the cutscene. The second
# and third entries are for the player's x and y coordinates respectively.
# The inner arrays are all indexed, so whichever one comes first is used
# when the chapter variable is 0, the second array is used when the chapter
# variable is 1, and so on. Make sure all inner arrays are separated by commas
end
#===============================================================================
# ** Story So Far - EDIT BELOW THIS LINE AT OWN RISK
#===============================================================================
class Game_Temp
attr_accessor :cutscene_filename # filename to load after cutscene
end

class Scene_Load

# alias old loading method
alias mobius_ssf_on_decision on_decision

# new loading method
def on_decision(filename)
# If file doesn't exist
unless FileTest.exist?(filename)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Set help text
@help_text = "Do you want to watch the story so far?"
@help_window.set_text(@help_text)
# Create choice window
@choice_window = Window_Command.new(120, ["Yes", "No"])
@choice_window.active = true
# Center choice window
@choice_window.x = 640 / 2 - @choice_window.width / 2
@choice_window.y = 480 / 2 - @choice_window.height / 2
@choice_window.z = 200
# Wait for input
end

# Load into cutscene
def load_into_cutscene(filename)
# Play load SE
$game_system.se_play($data_system.load_se)
# Read save data
file = File.open(filename, "rb")
read_save_data(file)
file.close
# Remeber filename
$game_temp.cutscene_filename = filename
# Get chapter info
chapter_variable = Mobius_Story_So_Far::CHAPTER_VARIABLE
chapter = $game_variables[chapter_variable]
# Get cutscene info
cutscene_info_array = Mobius_Story_So_Far::CUTSCENE_MAPS[chapter]
unless cutscene_info_array
print("No cutscene info for chapter")
mobius_ssf_on_decision
return
end
# Set cutscene info
cutscene_map_id = cutscene_info_array[0]
cutscene_x = cutscene_info_array[1]
cutscene_y = cutscene_info_array[2]
# Stop BGM
Audio.bgm_stop
# Load cutscene map
# Set up new map
$game_map.setup(cutscene_map_id)
# Move player to initial position
$game_player.moveto(cutscene_x, cutscene_y)
# Refresh player
$game_player.refresh
# Straighten player
$game_player.straighten
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
end

class Scene_File

# alias old update method
alias mobius_ssf_update update

def update
# If choice window is up don't do other updating
if @choice_window != nil and @choice_window.active
# Update command window
@choice_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @choice_window.index
when 0 # Yes
# Load into cutscene
load_into_cutscene(make_filename(@file_index))
when 1 # No
# Call old loading method
mobius_ssf_on_decision(make_filename(@file_index))
end
@choice_window.dispose
end
return
else # If no choice window, perform normal updating
mobius_ssf_update
end
end
end

module Mobius_Story_So_Far

def Mobius_Story_So_Far.finish_cutscene
# Prevent Screen Changes
Graphics.freeze
# Recall old filename
filename = $game_temp.cutscene_filename
# Create Load screen
$scene = Scene_Load.new
# Load savefile using original method
$scene.mobius_ssf_on_decision(filename)
end
end

FAQ
None yet.

Credit and Thanks
Special thanks to Monkeysnow55 for requesting this script.

Author's Notes
This script is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported license.
A human readable summary is available here: http://creativecommo.../3.0/deed.en_US
The full license is availble here: http://creativecommo...a/3.0/legalcode
In addition, this script is only authorized to be posted to the forums on RPGMakerWeb.com.
Further, if you do decide to use this script in a commercial product, I'd ask that you let me know via a post here or a PM. Thanks.
 
Last edited:

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
363
Reaction score
85
First Language
English
Primarily Uses
Added. If it's still confusing, let me know. I'm not the best out writing out instructions, but the demo should be fairly easy to follow what I do. 
 

Mooshry

Ariana Grande has consumed my very existence help.
Veteran
Joined
May 30, 2016
Messages
363
Reaction score
142
First Language
Cow
Primarily Uses
RMMV
Could you make a version for MV or VX Ace?
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
363
Reaction score
85
First Language
English
Primarily Uses
I don't own MV, so I won't make an MV version. As for VXA, I've considered re-making my XP scripts for it a bunch of different times but have yet to actually do so :p. Since you've specifically asked for an Ace version for this script, I'll consider it. But at the same time, I'm really busy right now so I'd say it's unlikely to happen anytime soon. Sorry :(. If I do though, I will make a post about it and let you know.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Julian Brooks wrote on Hudell's profile.
Hi, I'm trying to use the Orange Mapshot plugin on Mac, but it isn't working. Could you assist? I'm attempting to do Parallax Mapping. Thanks.
I can't believe my dlc flopped that hard. It's depressing. I'm a fricking failure at being a musician.
Person: "Taxes are bs and money is, too! Anarchy!!" *Literally anything goes wrong* Same Person: "Why hasn't the government fixed this???"
Stream will be live shortly with a session of Haunting Ground! Feel free to drop by!

Forum statistics

Threads
94,354
Messages
920,173
Members
124,111
Latest member
Azarae
Top