Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ################################################################################
- # TITLE PRODUCTION 1.1
- # By: Ixfuru
- ################################################################################
- # This script is a powerful tool for altering the way your game starts. It has
- # control over the title scene and adds a new intro part which allows you a wide
- # variety of controls and options. It also has a feature to toggle preset
- # game switches and alter preset variables when calling a new game.
- ################################################################################
- # To use this script, you must put it above 'Main' and below 'Materials in the
- # script editor of your RPGMakerVX project.
- ################################################################################
- # This script is licensed under 'Creative Commons' non-commercial rights. You
- # may only use this script in a commercial project if you get direct authorization
- # from its author, Ixfuru, who can be contacted on RPGMakerVX.net via 'The Finish
- # Line' user forum, on RPGMakerweb.com and RMRK.net via PM.
- ################################################################################
- # This script is NOT newb friendly. It requires addition of a new folder
- # containing graphics to be added inside your 'Graphics' folder. It also
- # requires a good bit of setup here in the module. The setup herein is covered
- # through an abundance of instructions and examples. If you are having
- # problems with the script's setup, be sure to study each section and post
- # in the forums where you found this script for assistance if you still can't get
- # it.
- ################################################################################
- module Ixfuru
- module TitleProduction
- #===========================================================================
- # SECTION 1:
- #
- # The Folder
- #
- # Your first step to using the script, (after it is installed as stated
- # above, is to create a folder called 'Production' and put it into the
- # project's Graphics folder. Insid the folder, you will need the
- # minimum of these images:
- #
- # -Those using only the Title Scene functions:
- #
- # -A background image 544x416 for the backdrop of your title scene
- # -An image FOR EACH of the commands you wish to have(preferrably 180x65)
- # -An image for the commands cursor(any size)
- # -An image to be used as a Logo
- #
- # -Those wanting the intro functions, will also require:
- #
- # -A background for the intro (544x416)
- # -An image for the logo displayed on the intro(no wider than 544 x about 48)
- #
- #
- # -For those that want to get the most out of the script, there is really
- # no actual limit to the amount of resources you can add. This script
- # has the ability to use scrolling images called 'Planes' which can be set
- # to move in eight different directions. It also has the ability to use
- # moving images on the Title Scene. So, after you've read over the instructions
- # and get a feel for how the system works, you may add the images that best
- # fit the intro/title scene you wish to create.
- #===========================================================================
- #===========================================================================
- # SECTION 2:
- #
- # Intro Skipping
- #
- # If you only want to use the title functions, then set the following
- # constant 'SKIP_INTRO' to true and it will bypass the Intro section completely
- # at runtime. If you want to use the intro when you release your game, but
- # don't want to sit through it during the playtesting, then keep this false
- # until you like the way your intro looks, then set it to true for playtesting.
- # Once you're ready to release the project, return here and set the value to
- # false again.
- #===========================================================================
- SKIP_INTRO = false
- #===========================================================================
- # SECTION 3:
- #
- # The Intro
- #
- # The intro is a unique system which is much like making a little movie.
- # You are the director. It's up to you to prepare the set and the performers
- # for their given, (however brief) moments in front of the camera. The
- # first step in building the Intro is to adjust the constant variable in
- # section 3a. This is where you'll set up certain parameters of your
- # intro scene. This includes the graphics used as well as some properties
- # to your scrolling planes (if you choose to use any. Next, you'll jump to
- # section 3b. In this section you will you will actually say which parts
- # go where, how long they stay, as well as other characteristics of each
- # segment to the section.
- #===========================================================================
- #===========================================================================
- # 3a. Intro : Graphics
- #
- # This section stores the graphics you will use in the intro scene. Set up
- # each one by reading the instructions for each. Keep in mind that because
- # there is no limit to the amount of sections or graphics you can use, most
- # are stored in arrays, (between []s) or hashes, (between {}s). Those that
- # are stored in hashes, typically are done so because they have a great many
- # options to set for each one. In the intro section, only the graphics
- # used for 'INTRO_PLANES' are stored this way.
- #
- # -intro logos-
- #
- # This array holds the images that you want to use for logos in the scene.
- # You can place as many as you want in the array, just make sure, like
- # in all graphics settings, that you have the graphic in the 'Production'
- # folder you made to support its name when added. Intro logos can show up
- # and disappear with accompanying sound effects and can be placed at
- # speciic x or ys.
- INTRO_LOGOS = ["FL1"]
- # -intro texts-
- #
- # This can be very confusing, but the INTRO_TEXTS, though ideal for display
- # of text sprites, IS NOT LIMITED to this. Any size or shape of graphic
- # is possible in this section. Just make sure it fits on the screen.
- # During runtime, the intro_texts have a variety of settings which are
- # set when a new graphic is called. This includes the ability to play
- # sound effects when appearing/disappearing, the ability to 'fadein' and
- # fadeout. Intro texts images can be set at specific x and y coordinates.
- # All Texts images share the same viewport with the logo image. Therefor,
- # you need to set the variable called 'LOGO_TEXT_Z' to a value which defines
- # how close to the screen you wish for the images to display. The background
- # of the scene is always shown at a value of 0 (zero). So, make sure you
- # set the value to something above that.
- INTRO_TEXTS = ["TextFinishLine", "TextIxfuru", "TextJWR"]
- INTRO_LOGO_TEXT_Z = 50
- # -intro planes-
- #
- # Planes are the moving 'parallaxes' that can be set (only one at a given time)
- # in the intro section). They are stored in the hash below and each one
- # must have specific properties set as well. The properties are:
- #
- # id : this is the value which is used to call the plane at runtime
- # graphic : the graphic used as the plane
- # direction: the direction the plane will move
- # (see -plane directions- below)
- # speed : the number of pixels the graphic will move each frame
- # opacity : transparency (0-255)
- # z : how close the plane appears to the screen.
- #
- # ****IXFURU TRICKS***
- # You can give the appearance of an overlayed background by keeping the
- # intro plane stationary. This is done by setting the plane at a semi-transparent
- # opacity and setting the ':speed' property to 0. Also, you can block out
- # the background completely by making the opacity 255. If you do this, make
- # sure that you have the 'LOGO_TEXT_Z' from above set to a value greater
- # than that of the plane, or the plane will also cover the texts and logos.
- # ********************
- # -plane directions-
- #
- # There are eight different directions the planes can travel, you signify
- # the direction you wish for the plane to move by giving the :direction
- # property a value 0-7. Here is a list of the values and the directions
- # the plane will move accordingly:
- #
- # 0 : top left to bottom right diagonal
- # 1 : top to bottom
- # 2 : top right to bottom left diagonal
- # 3 : left to right
- # 4 : right to left
- # 5 : bottom right to top left diagonal
- # 6 : bottom to top
- # 7 : bottom right to top left
- INTRO_PLANES = {
- 0 => {:graphic => "IntroPlane",
- :direction => 3,
- :speed => 2,
- :opacity => 95,
- :z => 100},
- }
- INTRO_PLANE_VIEWPORT_Z = 40
- # -intro backgrounds-
- #
- # The intro background doesn't have very many properties. It's just an image
- # that is used for the backdrop of the intro sequence. Only one background
- # can be displayed at any given time. It is ALWAYS set to a Z value of 0 (zero)
- # and always set to appear at x 0, y 0. Make sure that if you want the
- # backgrounds to cover the entire screen, they are 544 x 416. The background
- # appearing and disappearing can be set to have an accompanying sound effect.
- #
- # ***IXFURUS TRICKS***
- # Though it is imperative to have a background image that fully covers the
- # screen in size, you can create a 'sliver' type background, (or one that
- # only covers a portion of the background, by creating an image 544x416, but
- # having whatever portion you want to be transparent.
- # ********************
- INTRO_BACKGROUNDS = ["IntroBack"]
- # -intro transition-
- #
- # Set this constant variable to the graphic you want to use as the
- # transition (kind of like entering a battle) between the intro and when
- # the title scene appears. In this version of the script, the transition
- # is still buggy and it is possible to bypass this by using an empty
- # string ("") for this value.
- INTRO_TRANSITION = "Transition"
- # -intro animated objects-
- #
- # Animated Objects are images found in their own folder and named by
- # index of their animation sequence. That is, 0, 1, 2, 3, etc. These
- # indicate the frame of the sequence in which they're shown. When you create
- # an animated object, you are actually creating a 'Sprite_Base'. This bears
- # an important difference in those images which are displayed for 'texts' and
- # 'logo'. That is, they can have animations from the database played upon
- # them. To set up the animated objects, you have to use the hash below and
- # this formula:
- #
- # object_id => {:folder => folder_name,
- # :frames => {index => {:se => sound_effect_id,
- # :animation => animation_id,
- # :flash_self => [[red, green, blue], duration],
- # :flash_viewport => [[red, green, blue], duration],
- # :x => x_coordinate,
- # :y => y_coordinate,
- # :zoom => zoom_ratio,
- # :time => frame_count_of_index
- # :opacity => transparency(0-255)
- # :stay => should_index_image_stay_visible?},
- # :linger => image_stays_after_animation? (true or false)
- # },
- #
- # object_id : this is the reference id value which will be used to call the
- # specific animated object into effect.
- #
- # :folder : place the name of the subfolder from your Production folder where
- # the images of the animated object are found.
- #
- # :frames : setting up the frames takes some time, but it has many powerful
- # properties which can make the animated object move and flash and
- # even have a database animation played upon it. To create one,
- # you need to set each property as follows:
- #
- # 1) se : this is the sound effect that is played when the frame begins.
- # Use 'nil' for no sound effect.
- # 2) animation : this is the database animation you can play upon it.
- # You just need to render the id of the animation you
- # wish to choose. You can use 'nil' to bypass the
- # option for the given index.
- # 3) flash_self : this is a two-element array which holds the color
- # and duration of a flash you wish to use for
- # the frame. You can use and empty array [] or 'nil'
- # to bypass this option. If you use it, you must
- # provide the first element array a RGB color and the
- # second element with a duration for the how long the
- # flash should last.
- # 4) flash_viewport : this is the same as flash self, however, when
- # this occurs, it flashes the screen, not the
- # actual object. 'nil' or '[]' defines no flash.
- # 5)x and y : these two values set the actual x and y coordinate of
- # where the animation should be shown on the screen.
- # 6) zoom : this is the float value (decimal point) value which
- # determines how zoomed in or out the object appears
- # from its normal size. 1.0 is actual size of the image.
- # 7) time : this is the actual amount of frames the current index
- # of the animated object appears. When its time ends,
- # it is disposed of (unless :stay is set to true) and
- # replaced by the next index image.
- # 8) opacity : this is the transparency of the current index. It
- # is set from (0-255), with 0 being invisible.
- # 9) stay : this is an important value, as it tells the sequence to
- # either keep the image of this index, or dispose of it.
- # By utilizing this, you can have the appearance of more
- # than one animated object showing at any one point of the
- # animation.
- #
- # :linger : this defines whether or not the entire animated object should
- # remain visible once the animated sequence ends. Set this to
- # true to keep the image, or false to dispose of it when the
- # object has run its course.
- #
- # Below is an example of a properly set up frame:
- #
- # :frames => {5 => {:se => 7,
- # :animation => nil,
- # :flash_self => [[118, 188, 0], 15],
- # :flash_viewport => [],
- # :x => 210,
- # :y => 100,
- # :zoom => 1.0,
- # :time => 6,
- # :opacity => 255,
- # :stay => false},
- #
- # In this example, at index 5, the image would appear accompanied by whatever
- # sound effect you placed with an id of 7 in the SOUNDS hash. There would
- # be no animation. The image itself would flash for 15 frames with the
- # color RGB = 118, 188, 0, The viewport wouldn't flash. It would appear at
- # x 210 and y 100. It would have its normal dimensions (no zoom), it would
- # remain for 6 frames, having an opacity of 255 and be disposed of when it
- # was over.
- #
- #********IXFURU TRICK***********
- # If you wanted to just display a database animation, you could do so, by
- # making the opacity 0 and running the animation. In this way, you could
- # use a blank image and place it wherever you want the animation to run.
- #*******************************
- ANIMATED_OBJECTS = {
- 0 => {:folder => "Ixfuru",
- :linger => false,
- :frames => {0 => {:se => 2,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 440,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 1 => {:se => 3,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 420,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 2 => {:se => 2,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 400,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 3 => {:se => 3,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 380,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 4 => {:se => 2,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 360,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 5 => {:se => 3,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 340,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 6 => {:se => 2,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 320,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 7 => {:se => 3,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 300,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 8 => {:se => 2,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 280,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 9 => {:se => 3,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 260,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 10 => {:se => 2,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 240,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 11 => {:se => 3,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 220,
- :y => 160,
- :zoom => 1.0,
- :time => 3,
- :opacity => 255,
- :stay => false},
- 12 => {:se => nil,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 220,
- :y => 160,
- :zoom => 1.0,
- :time => 25,
- :opacity => 255,
- :stay => false},
- 13 => {:se => nil,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 220,
- :y => 160,
- :zoom => 1.0,
- :time => 6,
- :opacity => 255,
- :stay => false},
- 14 => {:se => nil,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => nil,
- :x => 220,
- :y => 160,
- :zoom => 1.0,
- :time => 25,
- :opacity => 255,
- :stay => false},
- 15 => {:se => 4,
- :animation => nil,
- :flash_self => nil,
- :flash_viewport => [[255, 255, 255], 12],
- :x => 220,
- :y => 160,
- :zoom => 1.0,
- :time => 25,
- :opacity => 255,
- :stay => false},
- } # End Frames
- } # End Properties
- }# End ANIMATED_OBJECTS hash
- # The Z coordinate of all animated objects.
- ANIMATED_OBJECTS_VIEWPORT_Z = 90
- #===========================================================================
- # 3c. Intro : Production
- #
- # Okay, so you've now created the images which will be used as the performers
- # in your big intro scene, now its time to put them to work, by giving them
- # direction and roles to fill.
- #
- # The production part of the script is the most complex and MOST CRUCIAL to
- # developing a great intro. The entire thing is stored in a massive hash called
- # 'PRODUCTION'. Within the hash, you will set up each phaze of the intro, by
- # using step names to call in the given images at the given times.
- # When you call upon them, do so in string form, double-quoted, (""). The
- # following lists each 'step_name' and displays the settings each specific
- # step is required to have to make it valid.
- #
- #---------------------------------------------------------------------------
- # 3b(1)
- #---------------------------------------------------------------------------
- #
- # "ilogos" : this calls in an INTRO_LOGOS graphic.
- #
- # -properties-
- #
- # id : this refers to the element of the INTRO_LOGOS where the
- # graphic is located.
- # x : the x coordinate where the logo should be placed(0-544)
- # y : the y coordinate where the logo should be placed(0-416)
- # se_in : the sound which should be played when the logo appears;
- # set this 'nil' if you don't want a sound effect. The value
- # you set here refers to the 'SOUNDS' hash in the section
- # 4, and refers to the id given in the :se part of the hash.
- # se_out : the sound effect you wish to play when logo disappears;
- # set to nil, for no se.
- #
- # -array form-
- #
- # [id, x, y, se_in, se_out]
- #
- #---------------------------------------------------------------------------
- #
- # "itexts" : this calls one of the INTRO_TEXTS graphics into play.
- #
- # -properties-
- #
- # id : this refers to the element of the INTRO_TEXTS array where
- # the graphic is located.
- # x : the x coordinate of the image
- # y : the y coordinate of the image
- # se_in : sound effect upon appearing
- # se_out : sound effect upon disappearing
- # fadein : should the text fade in? (true or false)
- # fadeout :should the text_fade out? (true or false)
- # fade_frames : frames it takes to fade in or out
- # fade_speed : opacity gained or reduced per frame when fading
- #
- # -array form-
- #
- # [id, x, y, se_in, se_out, fadein, fadeout, fade_frames, fade_speed]
- #
- #---------------------------------------------------------------------------
- #
- # "iplane" : this calls one of the INTRO_PLANES into the scene.
- #
- # -properties-
- #
- # id : id of the plane you want to call, refers to the hash key
- # of the INTRO_PLANES hash which refers to the given plane.
- #
- # -array form-
- #
- # [id]
- #
- #---------------------------------------------------------------------------
- #
- # "iback" : this calls one of the INTRO_BACKGROUNDS into play
- #
- # -properties-
- #
- # id : refers to the element of the INTRO_BACKGROUNDS array, where
- # the image name is located.
- # se_in : sound effect to play when appearing
- # se_out : sound effect to play when disappearing
- #
- # -array form-
- #
- # [id, se_in, se_out]
- #
- #---------------------------------------------------------------------------
- #
- # "ibgm" : this calls for a new background music
- #
- # -properties-
- #
- # id : refers to the hash key, or reference value of the
- # background you wish to call, located in the SOUNDS hash
- # of section 4, under the :bgm property.
- #
- # -array form-
- #
- # [id]
- #
- #---------------------------------------------------------------------------
- #
- # "ibgs" : calls in a new background sound
- #
- # -properties-
- #
- # id : refers to the hash key of the SOUNDS :bgs you wish to
- # start playing
- #
- # -array form-
- #
- # [id]
- #
- #---------------------------------------------------------------------------
- #
- # "ise" : calls in a sound effect
- #
- # -properties-
- #
- # id : refers to the hash key of the SOUNDS :se hash for the
- # sound effect you wish to play
- #
- # -array form-
- #
- # [id]
- #
- # "iao" : calls an animated object
- #
- # -properties-
- #
- # id : refers to the ANIMATED_OBJECTS hash id you gave the
- # object you wish to call
- #
- # -array form-
- #
- # [id]
- #
- #---------------------------------------------------------------------------
- #
- # nil : using nil as the step call, tells the system not to add any new
- # images or sounds, but to just wait
- #
- # -properties-
- #
- # none
- #
- # -array form-
- #
- # none
- #
- #---------------------------------------------------------------------------
- # 3b(2)
- #---------------------------------------------------------------------------
- #
- # For each part of the PRODUCTION hash, you give an chronological id and
- # link it to the properties for each step call. This is the formula for
- # each entry:
- #
- # chronological_id => {:for_frames => amount_of_frames
- # :step => [step_call_string, [properties]]
- #
- # chronological_id : this value is set to an integer. It must start at 0 (zero)
- # and each id much be one more than the last. You can
- # add as many segments to the intro scene as you want and
- # therefor there is no max limit.
- #
- # :for_frames : for the 'amount_of_frames' part, replace it with an integer
- # value which states how long this segment of the scene lasts.
- # The :for_frames property is used to tell the system when to
- # advance to the next step_id and call in the next part of the
- # scene. So, if you set this to 180, the scene will wait 180
- # frames before progressing to the next chronological_id. The
- # counter will not begin until the new image or section's
- # call is completely fulfilled, so don't worry about items
- # which may take a little longer to fulfill than others.
- #
- # :step : this property is where you will actually insert the step call string
- # and an array of the various properties each step requires as listed
- # above in section 3b(1). The set up for this property is as follows
- #
- # step => [step_call_string, [properties]]
- #
- # And here is an example of a valid call:
- #
- # :step => ["iback", [2, "Slash1", "Slash2"]],
- #
- # In the example above, we call for a background, the graphic's name
- # is the 2nd element of the INTRO_BACKGROUNDS array. When the
- # background appears, we play the sound effect, "Slash1" and when it
- # disappears, we play "Slash2".
- #
- # Example of a simple wait:
- #
- # :step => [nil]
- #
- # That's the proper way to call for a wait. Since nil has no
- # properties, we can omit the array as the second element of the
- # :step array. Refer to section 3b(1) for the proper array set
- # up for the given step call.
- #
- #*******IXFURUS TRICKS************
- # Got a few pictures that make up an animation. Though, the system doesn't
- # incorporate animations, you can make one by placing all the images you
- # want to use as a logo, background or text image and play them successively
- # quickly, like this (for background):
- #
- # 0 => {:for_frames => 3,
- # :step => ["iback", [0, "Sword1", nil]},
- #
- # 1 => {:for_frames => 3,
- # :step => ["iback", [1, "Sword2", nil]},
- #
- # 2 => {:for_frames => 3,
- # :step => ["iback", [2, "Sword3", nil]},
- #
- # If you've been following along, you would see that each one of these
- # images would appear 3 frames apart, and it would call a different
- # graphic from the INTRO_BACKGROUNDS array each time. (The sound effects,
- # "Sword1", "Sword2", etc. aren't meaningful in this sequence, but shows
- # that you can play a different sound each image of the 'animation'.
- #*************************************
- #
- #===========================================================================
- PRODUCTION = {
- #flag_id => {:for_frames => frames_to_run_flagstep,
- # :step => [prodcution_string, properties]}
- 0 => {:for_frames => 20,
- :step => [nil]},
- # START_BGS
- 1 => {:for_frames => 10,
- :step => ["ibgs", [1]]},
- # SHOW BACKGROUND
- 2 => {:for_frames => 10,
- :step => ["iback", [0, nil, nil]]},
- # SHOW PLANE
- 3 => {:for_frames => 10,
- :step => ["iplane", [0]]},
- # RUN IXFURU ANIMATION
- 4 => {:for_frames => 10,
- :step => ["iao", [0]]},
- # SHOW INTRO LOGO
- 5 => {:for_frames => 270,
- :step => ["ilogos", [0, 80, 160, nil, nil]]},
- # BETWEEN TEXT
- 6 => {:for_frames => 60,
- :step => [nil]},
- # SHOW SECOND TEXT
- 7 => {:for_frames => 180,
- :step => ["itexts", [1, 80, 160, 0, nil, true, true, 75, 1]]},
- # BETWEEN TEXT
- 8 => {:for_frames => 60,
- :step => [nil]},
- # SHOW LAST TEXT
- 9 => {:for_frames => 180,
- :step => ["itexts", [2, 80, 160, 0, nil, true, true, 75, 1]]},
- }
- #===========================================================================
- #
- # SECTION 4:
- #
- # Sounds
- #
- # There are three types of sounds used in the system, BGMs (background music),
- # BGS (background sound) and SE (sound effects). The following hash
- # is used to store all the sounds that you will be using. This includes those
- # you wish to use in the Intro (and referred to in the PRODUCTION hash) and
- # those you wish to use in the Title scene, which is set up in SECTION 5.
- # To set up the hash, fill in those sounds which you wish to use, giving
- # them each an 'id' or reference value for the hash key and then a three
- # element array which is used to store the actual sound and its properties
- # that you wish to use. There are three sub-hashes, one for the BGMs, called
- # :bgm, one for the BGSs, called :bgs and one for the SEs, called :se.
- # In each, the formula is the same:
- #
- # sound_id => [sound_filename, volume, pitch],
- #
- # For the 'sound_filename', just make sure you are referencing an audio file
- # from the appropriate subhash. In other words, don't call a BGM audio file
- # to play in the SE section.
- #
- #===========================================================================
- SOUNDS = {
- :bgm => {0 => ["Realm of Sirs", 80, 100]},
- :bgs => {0 => ["Wind", 40, 100],
- 1 => ["ambience", 40, 100]},
- :se => {0 => ["Magic", 100, 50],
- 1 => ["Normal Item Get", 100, 80],
- 2 => ["Blow6", 100, 80],
- 3 => ["Blow2", 100, 80],
- 4 => ["Ice4", 100, 150]}
- }
- # -title sounds-
- #
- # Though the sounds are stored above and you can use multiple bgms, bgs
- # in the Intro, you must designate a specific bgm and bgs for use in the title
- # scene. You do this by putting the sound_id for the sound you wish to
- # use as defined in the SOUNDS hash.
- TITLE_SOUND_IDS = {
- :bgm => 0,
- :bgs => 0,
- }
- #===========================================================================
- #
- # SECTION 5:
- #
- # The Title Scene
- #
- # There are several sections you can customize in the title scene. This
- # includes the logo, subtitle logo, commands images, cursor image, planes
- # and 'extra' images. Each section has specific values which must be setup
- # in order to make the scene valid. Follow the instructions for each.
- #
- #===========================================================================
- #===========================================================================
- #
- # 5a. Title : Logo
- #
- # The title logo is the actual image which represents the name of the game.
- # It is a necessary part of the scene. You can only have one Title logo and
- # it cannot be changed. The only properties you can change for the logo are
- # the x and y coordinates
- #===========================================================================
- # Refers to the graphic's filename you wish to use
- TITLE_LOGO = "Logo"
- # Refers to the x and y placement of the logo image
- TITLE_LOGO_X = 95
- TITLE_LOGO_Y = 10
- #===========================================================================
- #
- # 5b. Title : Subtitle
- #
- # It is NOT necessary to have a subtitle. But this image will be used to
- # display the subtitle to the game, or any other image you may wish to display
- # as 'part of' the logo. Like the Logo, you only need to set up the
- # x and y placement here. Use 'nil' or an empty string, "" for this value
- # to bypass using it.
- #===========================================================================
- # The Graphic
- TITLE_SUBTITLE = ""
- # The coordinates
- TITLE_SUBTITLE_X = 120
- TITLE_SUBTITLE_Y = 70
- #===========================================================================
- #
- # 5c. Title : Commands
- #
- # The commands images are what replaces the little window which shows
- # the options for the player when he/she first loads up the title scene
- # in the default system. In this script, you get a different command
- # for each of the commands. And You CAN HAVE UNLIMITED commands, as long
- # as you can make them fit on the screen AND provided they all have the same
- # height. This is important, as they need to look structured in some sort of
- # way for when the cursor image moves amongst them awaiting user selection.
- # So again, you can have however many you want, but they MUST be the same
- # height.
- #
- # The commands properties are stored in a hash. This hash holds three
- # important properties. The hash key represents the order in which they
- # will be displayed. So, you need to start at zero and advance upwards
- # by one with each new command. This value is used by the cursor for
- # command index.
- #
- # command_index => {:graphic => filename,
- # :scene => string_reference_to_new_scene},
- #
- # Replace 'filename' for the :graphic property with the name of the
- # image you wish to use for the given command. Then replace the
- # 'string_reference_to_new_scene' with a double-quoted ("") string (word)
- # which references to the scene you wish to change to when the player selects
- # the given command.
- #
- #^^^^^^^^^^^^VERY IMPORTANT^^^^^^^^^^^^^^^^
- #
- # You MUST have a command which references "scene_map" for when the player
- # wants to start a new game, "scene_file" for when the player wants to
- # continue their saved game and advance to the file scene. And a 'nil',
- # without the quotes for when the player wants to exit the program. The
- # order of them is not crucial, and you can reference other scenes from
- # here if you want to. Even custom scenes like options/credits/minigame, etc.
- # Just as long as you create one for each of the mandatory ones just
- # described.
- #
- #^^^^^^^^^^^^VERY IMPORTANT^^^^^^^^^^^^^^^^^
- #
- # Though the functions required to move to the mandatory scenes are
- # part of the script, if you reference a new or unique scene which is not
- # one of these, YOU MUST SET UP THE 'SECTION X: Custom Scene Change' section
- # which is found late in the script. This will be further explained in Section
- # 6.
- #===========================================================================
- TITLE_COMMANDS = {
- 0 => {:graphic => "NewGame",
- :scene => "scene_map"},
- 1 => {:graphic => "Continue",
- :scene => "scene_file"},
- 2 => {:graphic => "Credits",
- :scene => "scene_credits"},
- 3 => {:graphic => "Exit",
- :scene => nil},
- }
- # -command placement-
- #
- # With these three variables, you set up the placement of where you want the
- # commands of the title scene to appear. Here's how it works, you set up the
- # x coordinate for where you want the commands to line up and the y coordinate
- # for where the FIRST COMMAND will appear. The others, will appear directly
- # below the first spaced equally apart. Finally, you set up the z placement
- # to set the viewport for how close you want the images to appear. This is
- # important, as if you want the commands to appear above everything else in the
- # scene, you need to provide a value that verifies that, else you may end up
- # with commands that are overlapped by planes, extras, etc.
- # the x where the commands line up
- TITLE_COMMAND_X = 220
- # the y of the first command
- TITLE_COMMAND_Y = 160
- # the z of the viewport which holds the commands
- TITLE_COMMAND_Z = 100
- #===========================================================================
- #
- # 5e. Title : Planes
- #
- # The title planes are like those of the Intro planes, however, in the
- # title scene, there can be multiple planes running in different directions
- # at different speeds on the scene at the same time. For the planes, you need
- # to set up each with an 'id' for the hash key and then set up the properties:
- #
- # plane_id => {:graphic => filename,
- # :direction => directional_value, (see Intro planes direction)
- # :speed => pixels_to_move_per_frame,
- # :opacity => transparency (0-255) 0 is invisible
- # :z => z_placement, (how close the image should appear)
- #
- #===========================================================================
- TITLE_PLANES = {
- 0 => {:graphic => "TitlePlane",
- :direction => 3,
- :speed => 2,
- :opacity => 200,
- :z => 0},
- 1 => {:graphic => "TitlePlane",
- :direction => 4,
- :speed => 2,
- :opacity => 200,
- :z => 0},
- }
- #===========================================================================
- #
- # 5f. Title : Background
- #
- # There is only one background which can be displayed on the title. It always
- # appears z 0 (zero) and always places itself at the upper left hand corner.
- # Background images can have a 'wave' effect applied to them. This
- # makes it look as if the image is moving. To make the title have this
- # effect, set the 'TITLE_WAVE' value to 'true' and set up the next three
- # variables to control the appearance of the effect.
- #
- #===========================================================================
- # The graphic used for the background
- TITLE_BACKGROUND = "TitleBack"
- # Use a wave effect?
- TITLE_WAVE = true
- # - title wave -
- #
- # If TITLE_WAVE is true, then these are the properties. You may need to
- # adjust and maneuver these around a bit upon playtesting to get the effect
- # you looking for. The AMP and LENGTH are measured in pixels. The amp
- # effect causes the image to be skewed on its horizontal x position, and
- # these control how many pixels they move. SPEED controls how fast the
- # movement occurs.
- TITLE_BACKGROUND_WAVE_AMP = 35
- TITLE_BACKGROUND_WAVE_LENGTH = 15
- TITLE_BACKGROUND_WAVE_SPEED = 14
- #===========================================================================
- # 5g. Title : Extras
- #
- # Extras are any other image that you want to display in the scene. You can
- # have unlimited amounts of extra images. Each has its own properties. Unlike
- # other images, the 'extras' are moveable. So in the second part of the section
- # you will set up the boundaries, speeds, etc. which controls their movement.
- # Extras have many values to set, the graphic, the opacity (transparency),
- # wave effect (See - title wave - above for details), and x and y placement,
- # a zoom_x and zoom_y which controls the height and width of the image and
- # the viewport_z which is used to set up the closeness of where the extras
- # viewport is placed. This is used to clarify which extras overlap which other
- # extras. Give each extra an 'id' in the hash as the hash key and set up
- # the required properties. The id of the extra image is used to reference it
- # at runtime.
- #
- # -zoom values-
- #
- # For :zoom_x and :zoom_y, you need to supply the value as a floating point
- # value (or decimal point value) which states how large you want the image
- # to be. When zooming, 1.0 represents actual size of the image, while
- # larger values, like 3.0 or 4.5 grow the sprite, while lesser ones, like
- # 0.4 shrink it.
- #
- # The zoom values can be controlled through a moving extra, which will explained
- # in section 5g(1).
- #
- # -extra viewports-
- #
- # Extra images each have their own viewport upon creation. That allows you to
- # set the z value of each through their viewport and causes certain extras
- # to overlap others. The higher the viewport_z value you give, the more
- # others it will overlap.
- #
- #===========================================================================
- TITLE_EXTRA_IMAGES = {
- 0 => {:image => "Fojjy",
- :opacity => 255,
- :wave => [],
- :x => 40,
- :y => 190,
- :zoom_x => 1.0,
- :zoom_y => 1.0,
- :viewport_z => 100},
- 1 => {:image => "Ghost",
- :opacity => 255,
- :wave => [2, 3, 13],
- :x => 140,
- :y => 140,
- :zoom_x => 1.0,
- :zoom_y => 1.0,
- :viewport_z => 50},
- 2 => {:image => "Ghost",
- :opacity => 255,
- :wave => [2, 3, 13],
- :x => 400,
- :y => 140,
- :zoom_x => 1.5,
- :zoom_y => 1.5,
- :viewport_z => 75},
- 3 => {:image => "Sullendolf",
- :opacity => 255,
- :wave => [],
- :x => 30,
- :y => 90,
- :zoom_x => 0.6,
- :zoom_y => 0.6,
- :viewport_z => 15},
- 4 => {:image => "FriedaGhost",
- :opacity => 128,
- :wave => [2, 3, 8],
- :x => 100,
- :y => 140,
- :zoom_x => 0.8,
- :zoom_y => 0.8,
- :viewport_z => 30},
- }
- #=============================================================================
- # 5g(1)
- #
- # -Moving Extras-
- #
- # Extra images can be told to move. Right now, the script only allows random
- # movement, with the values you provide used to set the boundaries of each
- # direction which the image can move.
- #
- #=============================================================================
- # This array can be left empty if don't want any extra images to move. This
- # will render them all stationary. You reference which images you want to move,
- # by placing their ids (from the TITLE_EXTRA_IMAGES hash above) into the
- # array. For instance, [1, 3, 5, 6] would make it so that the images you
- # created with ids of 1, 3, 5, 6 were set to move.
- MOVING_EXTRAS = [1, 2]
- # These two variables set the boundaries in which a randomly moving
- # extra image will move (This is still pretty glitchy right now, as moving
- # images tend to disappear completely sometimes). For both of these
- # values, you need to set a low and high coordinate for how far the
- # image can move before it's considered out of bounds. This is supposed to
- # create movements which are illegal and tell the image to travel in another
- # direction.
- MOVING_EXTRAS_X_BOUNDARIES = [10, 502] # [low_x_coordinate, high_x_coordinate]
- MOVING_EXTRAS_Y_BOUNDARIES = [10, 374] # [low_y_coordinate, high_y_coordinate]
- # These are the same as the X/Y boundaries, except they control the zoom effect
- # of the extra in question. so, if the extra reaches the low or high values
- # in their current zoom_x or zoom_y, they will be unable to continue shrinking or
- # growing respectively.
- MOVING_EXTRAS_ZOOM_BOUNDARIES = [0.1, 5.0]
- # This determines how fast the image moves from left to right, up and down
- MOVING_EXTRAS_PARALLEL_MOVE_RATE = 6
- # This controls how fast the image zooms in and out
- MOVING_EXTRAS_DISTANCE_MOVE_RATE = 0.1
- #=============================================================================
- #
- # 5h. Title : Cursor
- #
- # This variable simply gives the filename of the cursor. This is a mandatory
- # graphic. It's the graphic which is used to move from command to command
- # in the Title scene.
- #=============================================================================
- TITLE_CURSOR_GRAPHIC = "BellCursor"
- #=============================================================================
- #
- # SECTION 6:
- #
- # Calling Custom Scenes
- #
- # If you have set up the commands in section 5c to reference scenes that are
- # not new_game, continue and shutdown, you must jump to the SECTION X section
- # which is located near line 2300, and is part of the method called
- # 'determine_scene_change'
- #=============================================================================
- #=============================================================================
- # SECTION 7:
- #
- # Preset Switches and Variables
- #
- # This section gives you the ability to toggle switches and variables prior
- # the first map of a new game.
- #=============================================================================
- # -preset switches-
- #
- # Simply place the id of the switches you want to be preset in the array.
- PRESET_SWITCHES = [82, 84, 87]
- # -preset variables-
- #
- # In the following hash, you need to place the variable you wish to alter as
- # the hash key, and the amount you want to set it to as the value. Like this:
- #
- # 10 => 28,#
- #
- # That would set variable 10 to a value of 28.
- PRESET_VARIABLES = {
- 31 => 100,
- 32 => 500,
- 33 => 1000,
- }
- ##############################################################################
- #*****************************************************************************
- # DON'T EDIT BELOW THIS LINE, UNLESS REQUIRED TO!
- #*****************************************************************************
- ##############################################################################
- end
- end
- ################################################################################
- # Cache
- ################################################################################
- module Cache
- def self.production(filename)
- load_bitmap("Graphics/Production/", filename)
- end
- def self.animated_object(folder, filename)
- load_bitmap("Graphics/Production/" + folder + "/", filename)
- end
- end
- ################################################################################
- # TITLE PRODUCTION
- ################################################################################
- class Title_Production
- attr_reader :frame_count
- attr_reader :flag_count
- attr_reader :wait_count
- attr_reader :production
- attr_reader :production_end
- attr_accessor :intro_complete
- def initialize
- @frame_count = 0
- @flag_count = 0
- @wait_count = 0
- @intro_complete = false
- @plane_base = Ixfuru::TitleProduction::INTRO_PLANES
- @production = Ixfuru::TitleProduction::PRODUCTION
- @production_end = false
- @animated_objects = {}
- @animation_running = false
- create_viewports
- start_step
- end
- #-----------------------------------------------------------------------------
- # Create Viewports
- #-----------------------------------------------------------------------------
- def create_viewports
- @plane_viewport = Viewport.new(0, 0, 544, 416)
- @plane_viewport.z = Ixfuru::TitleProduction::INTRO_PLANE_VIEWPORT_Z
- @background_viewport = Viewport.new(0, 0, 544, 416)
- @background_viewport.z = 0
- @logo_text_viewport = Viewport.new(0, 0, 544, 416)
- @logo_text_viewport.z = Ixfuru::TitleProduction::INTRO_LOGO_TEXT_Z
- @ao_viewport = Viewport.new(0, 0, 544, 416)
- @ao_viewport.z = Ixfuru::TitleProduction::ANIMATED_OBJECTS_VIEWPORT_Z
- end
- #-----------------------------------------------------------------------------
- # Start Step
- #-----------------------------------------------------------------------------
- def start_step
- case @production[@flag_count][:step][0]
- when nil
- @wait_count = @production[@flag_count][:for_frames]
- return
- when "ilogos"
- create_logo
- when "itexts"
- create_texts
- when "iback"
- create_background
- when "iplane"
- create_plane
- when "iao"
- create_animated_object
- when "ibgs"
- start_bgs
- when "ibgm"
- start_bgm
- end
- @wait_count = @production[@flag_count][:for_frames]
- end
- #-----------------------------------------------------------------------------
- # Create Animated Object
- #-----------------------------------------------------------------------------
- def create_animated_object
- obj_id = @production[@flag_count][:step][1][0]
- obj_base = Ixfuru::TitleProduction::ANIMATED_OBJECTS[obj_id]
- sprite = Sprite_Base.new(@ao_viewport)
- index = 0
- sprite.bitmap = Cache.animated_object(obj_base[:folder], index.to_s)
- frame = obj_base[:frames][index]
- sprite.x = frame[:x]
- sprite.y = frame[:y]
- sprite.opacity = frame[:opacity]
- sprite.zoom_x = frame[:zoom]
- sprite.zoom_y = frame[:zoom]
- if frame[:se] != nil
- play_production_se(frame[:se])
- end
- if frame[:animation] != nil
- sprite.start_animation($data_animations[frame[:animation]])
- end
- if frame[:flash_self] != nil
- color = Color.new(frame[:flash_self][0], frame[:flash_self][1], frame[:flash_self][2])
- sprite.flash(color, frame[:flash_self][1])
- end
- if frame[:flash_viewport] != nil
- color = Color.new(frame[:flash_viewport][0], frame[:flash_viewport][1], frame[:flash_viewport][2])
- @ao_viewport.flash(color, frame[:flash_viewport][1])
- end
- @animated_objects[obj_id] = {:index => index, :max_index => obj_base[:frames].size,
- :frame_count => 0, :max_frames => frame[:time], :keep_current => frame[:stay],
- :end_keep => obj_base[:linger], :sprites => [sprite]}
- @animation_running = true
- end
- #-----------------------------------------------------------------------------
- # Create Logo
- #-----------------------------------------------------------------------------
- def create_logo
- if @logo != nil && !@logo.disposed?
- dispose_logo
- end
- @logo = Sprite.new(@logo_text_viewport)
- properties = @production[@flag_count][:step][1]
- if properties == nil
- @logo.dispose
- new_flag
- return
- end
- pl = Ixfuru::TitleProduction::INTRO_LOGOS[properties[0]]
- @logo.bitmap = Cache.production(pl)
- @logo.x = properties[1]
- @logo.y = properties[2]
- unless properties[3] == nil
- play_production_se(properties[3])
- end
- end
- #-----------------------------------------------------------------------------
- # Create Plane
- #-----------------------------------------------------------------------------
- def create_plane
- if @plane != nil && !@plane.disposed?
- dispose_plane
- end
- @plane = Plane.new(@plane_viewport)
- @plane_id = @production[@flag_count][:step][1][0]
- properties = @plane_base[@plane_id]
- if properties == nil
- @plane.dispose
- new_flag
- return
- end
- @plane.bitmap = Cache.production(properties[:graphic])
- @plane.z = properties[:z]
- @plane.opacity = properties[:opacity]
- end
- #-----------------------------------------------------------------------------
- # Create Background
- #-----------------------------------------------------------------------------
- def create_background
- if @background != nil && !@background.disposed?
- dispose_background
- end
- @background = Sprite.new(@background_viewport)
- properties = @production[@flag_count][:step][1]
- if properties == nil
- @background.dispose
- new_flag
- return
- end
- bg = Ixfuru::TitleProduction::INTRO_BACKGROUNDS[properties[0]]
- @background.bitmap = Cache.production(bg)
- @background.x = 0
- @background.y = 0
- if properties[1] != nil
- play_production_se(properties[1])
- end
- end
- #-----------------------------------------------------------------------------
- # Create Texts
- #-----------------------------------------------------------------------------
- def create_texts
- if @texts != nil && !@texts.disposed?
- dispose_texts
- end
- @texts = Sprite.new(@logo_text_viewport)
- properties = @production[@flag_count][:step][1]
- @old_texts_properties = properties
- if properties == nil
- @texts.dispose
- new_flag
- return
- end
- it = Ixfuru::TitleProduction::INTRO_TEXTS[properties[0]]
- @texts.bitmap = Cache.production(it)
- @texts.x = properties[1]
- @texts.y = properties[2]
- unless properties[3] == nil
- play_production_se(properties[3])
- end
- if properties[5] # Fadein?
- @texts.opacity = 0
- until @texts.opacity >= 255
- @texts.opacity += 255 / properties[7] #FadeFrames
- i = 0
- until i >= properties[8] * 60 #FadeSpeed
- i += 1
- end
- end
- else
- @texts.opacity = 255
- end
- end
- #-----------------------------------------------------------------------------
- # Start BGM
- #-----------------------------------------------------------------------------
- def start_bgm
- RPG::BGM.stop
- music_id = @production[@flag_count][:step][1][0]
- song = Ixfuru::TitleProduction::SOUNDS[:bgm][music_id]
- RPG::BGM.new(song[0], song[1], song[2]).play
- end
- #-----------------------------------------------------------------------------
- # Start BGS
- #-----------------------------------------------------------------------------
- def start_bgs
- RPG::BGS.stop
- sound_id = @production[@flag_count][:step][1][0]
- sound = Ixfuru::TitleProduction::SOUNDS[:bgs][sound_id]
- RPG::BGS.new(sound[0], sound[1], sound[2]).play
- end
- #------------------------------------------------------------------------------
- # New Flag
- #-----------------------------------------------------------------------------
- def new_flag
- @frame_count = 0
- @flag_count += 1
- if @flag_count >= @production.size
- @production_end = true
- return
- end
- start_step
- end
- #-----------------------------------------------------------------------------
- # Frame Update
- #-----------------------------------------------------------------------------
- def update
- if @production_end
- end_scene
- transition_to_title
- else
- if @animation_running
- update_animated_object
- else
- update_production
- end
- end
- update_plane
- update_background
- update_logo
- update_texts
- end
- #-----------------------------------------------------------------------------
- # Update Production
- #-----------------------------------------------------------------------------
- def update_production
- @frame_count += 1
- if @frame_count >= @wait_count
- end_step
- new_flag
- end
- end
- #-----------------------------------------------------------------------------
- # Update Animated Object
- # This method is called only when an 'Animated Object' is being displayed,
- # it is used in order to keep the intro scene from advaning frames until the
- # entire animation has run its course.
- #
- # @animated_objects[obj_id] = {:index => index, :max_index => frames.size,
- #~ :frame_count => 0, :max_frames => frame[:time], :keep_current => frame[:stay],
- #~ :end_keep => obj_base[:linger], :sprites = sprite}
- #-----------------------------------------------------------------------------
- def update_animated_object
- @ao_viewport.update
- return if @animated_objects.empty?
- obj_id = @production[@flag_count][:step][1][0]
- ao = @animated_objects[obj_id]
- obj_base = Ixfuru::TitleProduction::ANIMATED_OBJECTS[obj_id]
- ao = @animated_objects[obj_id]
- for sprite in ao[:sprites]
- sprite.update
- if sprite.bitmap == Cache.animated_object(obj_base[:folder], ao[:index].to_s)
- old_sprite = sprite
- end
- end
- ao[:frame_count] += 1
- if ao[:frame_count] >= ao[:max_frames]
- if ao[:keep_current]
- ao[:index] += 1
- if ao[:index] >= ao[:max_index]
- if ao[:end_keep]
- @animation_running = false
- return
- else
- for sprite in ao[:sprites]
- sprite.dispose
- end
- @animation_running = false
- return
- end
- end
- frame = obj_base[:frames][ao[:index]]
- new_sprite = Sprite_Base.new(@ao_viewport)
- new_sprite.bitmap = Cache.animated_object(obj_base[:folder], ao[:index].to_s)
- new_sprite.x = frame[:x]
- new_sprite.y = frame[:y]
- new_sprite.zoom_x = frame[:zoom]
- new_sprite.zoom_y = frame[:zoom]
- new_sprite.opacity = frame[:opacity]
- if frame[:se] != nil
- play_production_se(frame[:se])
- end
- if frame[:animation] != nil
- new_sprite.start_animation($data_animations[frame[:animation]])
- end
- if frame[:flash_self] != nil
- color = Color.new(frame[:flash_self][0][0], frame[:flash_self][0][1], frame[:flash_self][0][2])
- new_sprite.flash(color, frame[:flash_self][1])
- end
- if frame[:flash_viewport] != nil
- color = Color.new(frame[:flash_viewport][0][0], frame[:flash_viewport][0][1], frame[:flash_viewport][0][2])
- @ao_viewport.flash(color, frame[:flash_viewport][1])
- end
- ao[:sprites].push(new_sprite)
- ao[:frame_count] = 0
- ao[:max_frames] = frame[:time]
- ao[:keep_current] = frame[:stay]
- else
- ao[:index] += 1
- if ao[:index] >= ao[:max_index]
- if ao[:end_keep]
- @animation_running = false
- return
- else
- for sprite in ao[:sprites]
- sprite.dispose
- end
- @animation_running = false
- return
- end
- end
- old_sprite.bitmap = Cache.animated_object(obj_base[:folder], ao[:index].to_s)
- frame = obj_base[:frames][ao[:index]]
- old_sprite.x = frame[:x]
- old_sprite.y = frame[:y]
- old_sprite.zoom_x = frame[:zoom]
- old_sprite.zoom_y = frame[:zoom]
- old_sprite.opacity = frame[:opacity]
- if frame[:se] != nil
- play_production_se(frame[:se])
- end
- if frame[:animation] != nil
- old_sprite.start_animation($data_animations[frame[:animation]])
- end
- if frame[:flash_self] != nil
- color = Color.new(frame[:flash_self][0][0], frame[:flash_self][0][1], frame[:flash_self][0][2])
- old_sprite.flash(color, frame[:flash_self][1])
- end
- if frame[:flash_viewport] != nil
- color = Color.new(frame[:flash_viewport][0][0], frame[:flash_viewport][0][1], frame[:flash_viewport][0][2])
- @ao_viewport.flash(color, frame[:flash_viewport][1])
- end
- ao[:frame_count] = 0
- ao[:max_frames] = frame[:time]
- ao[:keep_current] = frame[:stay]
- end
- end
- end
- #-----------------------------------------------------------------------------
- # Update Plane
- #-----------------------------------------------------------------------------
- def update_plane
- return if @plane == nil || @plane.disposed?
- properties = @plane_base[@plane_id]
- spd = properties[:speed]
- dir = properties[:direction]
- scroll_plane(dir, spd)
- end
- #-----------------------------------------------------------------------------
- # Update Background
- #-----------------------------------------------------------------------------
- def update_background
- return if @background == nil || @background.disposed?
- @background.update
- end
- #-----------------------------------------------------------------------------
- # Update Logo
- #-----------------------------------------------------------------------------
- def update_logo
- return if @logo == nil || @logo.disposed?
- @logo.update
- end
- #-----------------------------------------------------------------------------
- # Update Texts
- #-----------------------------------------------------------------------------
- def update_texts
- return if @texts == nil || @texts.disposed?
- @texts.update
- end
- #-----------------------------------------------------------------------------
- # End Step
- #-----------------------------------------------------------------------------
- def end_step
- case @production[@flag_count][:step][0]
- when "ilogos"
- se_id = @production[@flag_count][:step][1][4]
- unless se_id == nil
- play_production_se(se_id)
- end
- dispose_logo
- when "itexts"
- se_id = @production[@flag_count][:step][1][4]
- unless se_id == nil
- play_production_se(se_id)
- end
- dispose_texts
- end
- end
- #-----------------------------------------------------------------------------
- # End Scene
- #-----------------------------------------------------------------------------
- def end_scene
- dispose_background
- dispose_plane
- dispose_texts
- dispose_logo
- dispose_animated_objects
- end
- #-----------------------------------------------------------------------------
- # Dispose Animated Objects
- #-----------------------------------------------------------------------------
- def dispose_animated_objects
- return if @animated_objects.empty?
- @animated_objects.each { |obj_id, properties|
- return if properties[:sprites].empty?
- for sprite in properties[:sprites]
- sprite.dispose
- end
- }
- end
- #------------------------------------------------------------------------------
- # Transition to Title
- #-----------------------------------------------------------------------------
- def transition_to_title
- unless Ixfuru::TitleProduction::INTRO_TRANSITION == "" ||
- Ixfuru::TitleProduction::INTRO_TRANSITION == nil
- transition = Ixfuru::TitleProduction::INTRO_TRANSITION
- Graphics.freeze
- Graphics.transition(80, "Graphics/Production/" + transition, 80)
- end
- RPG::BGM.stop
- RPG::BGS.stop
- end_scene
- @intro_complete = true
- end
- #-----------------------------------------------------------------------------
- # Dispose Plane
- #-----------------------------------------------------------------------------
- def dispose_plane
- return if @plane == nil || @plane.disposed?
- @plane.dispose
- end
- #-----------------------------------------------------------------------------
- # Dispose Background
- #-----------------------------------------------------------------------------
- def dispose_background
- return if @background == nil || @background.disposed?
- @background.dispose
- end
- #-----------------------------------------------------------------------------
- # Dispose Logo
- #-----------------------------------------------------------------------------
- def dispose_logo
- return if @logo == nil || @logo.disposed?
- @logo.dispose
- end
- #-----------------------------------------------------------------------------
- # Dispose Texts
- #-----------------------------------------------------------------------------
- def dispose_texts
- return if @texts == nil || @texts.disposed?
- if @old_texts_properties[6]
- until @texts.opacity <= 0
- @texts.opacity -= @old_texts_properties[7]
- i = 0
- until i >= @old_texts_properties[8] * 60 #FadeSpeed
- i += 1
- end
- end
- @texts.dispose
- else
- @texts.dispose
- end
- end
- #-----------------------------------------------------------------------------
- # Scroll Plane
- #-----------------------------------------------------------------------------
- def scroll_plane(direction, speed)
- case direction
- when 0 # UpperLeft to LowerRight
- @plane.ox += speed
- @plane.oy += speed
- when 1 # Top to Bottom
- @plane.oy += speed
- when 2 # UpperRight to LowerLeft
- @plane.ox -= speed
- @plane.oy += speed
- when 3 # Left to Right
- @plane.ox += speed
- when 4 # Right to Left
- @plane.ox -= speed
- when 5 # LowerLeft to UpperRight
- @plane.ox += speed
- @plane.oy -= speed
- when 6 # Bottom to Top
- @plane.oy -= speed
- when 7 # LowerRight to UpperLeft
- @plane.ox -= speed
- @plane.oy -= speed
- end
- end
- #-----------------------------------------------------------------------------
- # Play Pfoduction SE
- #-----------------------------------------------------------------------------
- def play_production_se(sound_id)
- return if sound_id == nil
- se = Ixfuru::TitleProduction::SOUNDS[:se][sound_id]
- RPG::SE.new(se[0], se[1], se[2]).play
- end
- end
- ################################################################################
- # SCENE TITLE
- ################################################################################
- class Scene_Title < Scene_Base
- def initialize(from_file = false)
- @production = Title_Production.new
- if from_file
- @production.intro_complete = true
- end
- @title_ready = false
- @title_index = 0
- @moving_extras = []
- end
- #--------------------------------------------------------------------------
- # * Start processing
- #--------------------------------------------------------------------------
- def start
- super
- load_database # Load database
- create_game_objects # Create game objects
- check_continue # Determine if continue is enabled
- end
- #--------------------------------------------------------------------------
- # * Post-Start Processing
- #--------------------------------------------------------------------------
- def post_start
- end
- #--------------------------------------------------------------------------
- # * Pre-termination Processing
- #--------------------------------------------------------------------------
- def pre_terminate
- end
- #--------------------------------------------------------------------------
- # * Termination Processing
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_commands
- dispose_planes
- dispose_background
- dispose_logo
- dispose_subtitle
- dispose_extras
- dispose_cursor
- snapshot_for_background
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- def update
- super
- if Ixfuru::TitleProduction::SKIP_INTRO && !@production.intro_complete
- @production.intro_complete = true
- elsif !@production.intro_complete
- @production.update
- else
- if @title_ready
- update_background
- update_planes
- update_logo
- update_subtitle
- update_extras
- update_commands
- else
- start_title
- end
- end
- end
- #-----------------------------------------------------------------------------
- # Start Title
- #-----------------------------------------------------------------------------
- def start_title
- create_background
- create_planes
- create_logo
- create_subtitle
- create_extras
- create_commands
- create_cursor
- start_bgs
- start_bgm
- @title_ready = true
- end
- #-----------------------------------------------------------------------------
- # Create_background
- #-----------------------------------------------------------------------------
- def create_background
- @background_viewport = Viewport.new(0, 0, 544, 416)
- @background = Sprite.new(@background_viewport)
- @background.bitmap = Cache.production(Ixfuru::TitleProduction::TITLE_BACKGROUND)
- if Ixfuru::TitleProduction::TITLE_WAVE
- @background.wave_amp = Ixfuru::TitleProduction::TITLE_BACKGROUND_WAVE_AMP
- @background.wave_length = Ixfuru::TitleProduction::TITLE_BACKGROUND_WAVE_LENGTH
- @background.wave_speed = Ixfuru::TitleProduction::TITLE_BACKGROUND_WAVE_SPEED
- end
- end
- #-----------------------------------------------------------------------------
- # Create Planes
- #-----------------------------------------------------------------------------
- def create_planes
- @planes = {}
- tp = Ixfuru::TitleProduction::TITLE_PLANES
- return if tp.empty?
- tp.each { |plane_id, properties|
- vp = Viewport.new(0, 0, 544, 416)
- vp.z = properties[:z]
- plane = Plane.new(vp)
- plane.bitmap = Cache.production(properties[:graphic])
- plane.opacity = properties[:opacity]
- @planes[plane_id] = plane
- }
- end
- #-----------------------------------------------------------------------------
- # Create Logo
- #-----------------------------------------------------------------------------
- def create_logo
- @logo_viewport = Viewport.new(0, 0, 544, 416)
- @logo = Sprite.new(@logo_viewport)
- @logo.bitmap = Cache.production(Ixfuru::TitleProduction::TITLE_LOGO)
- @logo.x = Ixfuru::TitleProduction::TITLE_LOGO_X
- @logo.y = Ixfuru::TitleProduction::TITLE_LOGO_Y
- end
- #-----------------------------------------------------------------------------
- # Create Subtitle
- #-----------------------------------------------------------------------------
- def create_subtitle
- return unless Ixfuru::TitleProduction::TITLE_SUBTITLE != ""
- @subtitle_viewport = Viewport.new(0, 0, 544, 416)
- @subtitle = Sprite.new(@subtitle_viewport)
- @subtitle.bitmap = Cache.production(Ixfuru::TitleProduction::TITLE_SUBTITLE)
- @subtitle.x = Ixfuru::TitleProduction::TITLE_SUBTITLE_X
- @subtitle.y = Ixfuru::TitleProduction::TITLE_SUBTITLE_Y
- end
- #-----------------------------------------------------------------------------
- # Create Extras
- #-----------------------------------------------------------------------------
- def create_extras
- @extras = []
- tei = Ixfuru::TitleProduction::TITLE_EXTRA_IMAGES
- return if Ixfuru::TitleProduction::TITLE_EXTRA_IMAGES.empty?
- tei.each { |tei_id, properties|
- vp = Viewport.new(0, 0, 544, 416)
- vp.z = properties[:viewport_z]
- extra = Sprite.new(vp)
- extra.bitmap = Cache.production(properties[:image])
- extra.x = properties[:x]
- extra.y = properties[:y]
- extra.opacity = properties[:opacity]
- unless properties[:wave].empty?
- extra.wave_amp = properties[:wave][0]
- extra.wave_length = properties[:wave][1]
- extra.wave_speed = properties[:wave][2]
- end
- extra.zoom_x = properties[:zoom_x]
- extra.zoom_y = properties[:zoom_y]
- @extras.push(extra)
- if Ixfuru::TitleProduction::MOVING_EXTRAS.include?(tei_id)
- @moving_extras.push(extra)
- end
- }
- end
- #-----------------------------------------------------------------------------
- # Create Commands
- #-----------------------------------------------------------------------------
- def create_commands
- @commands = {}
- @cursor_ys = {}
- comms = Ixfuru::TitleProduction::TITLE_COMMANDS
- @command_x = Ixfuru::TitleProduction::TITLE_COMMAND_X
- cy = Ixfuru::TitleProduction::TITLE_COMMAND_Y
- @commands_viewport = Viewport.new(0, 0, 544, 416)
- @commands_viewport.z = Ixfuru::TitleProduction::TITLE_COMMAND_Z
- comms.each { |command_id, properties|
- comm = Sprite.new(@commands_viewport)
- comm.bitmap = Cache.production(properties[:graphic])
- @cursor_ys[command_id] = cy
- comm.x = @command_x
- comm.y = cy
- cy += comm.height
- @commands[command_id] = comm
- }
- end
- #-----------------------------------------------------------------------------
- # Create Cursor
- #-----------------------------------------------------------------------------
- def create_cursor
- @cursor = Sprite.new(@commands_viewport)
- @cursor.bitmap = Cache.production(Ixfuru::TitleProduction::TITLE_CURSOR_GRAPHIC)
- @cursor.x = @command_x - (@cursor.width + 4)
- @cursor.y = @cursor_ys[0]
- end
- #-----------------------------------------------------------------------------
- # Start Background Sound
- #-----------------------------------------------------------------------------
- def start_bgs
- bgs_id = Ixfuru::TitleProduction::TITLE_SOUND_IDS[:bgs]
- bgs = Ixfuru::TitleProduction::SOUNDS[:bgs][bgs_id]
- RPG::BGS.new(bgs[0], bgs[1], bgs[2]).play
- end
- #-----------------------------------------------------------------------------
- # Start Background Music
- #-----------------------------------------------------------------------------
- def start_bgm
- bgm_id = Ixfuru::TitleProduction::TITLE_SOUND_IDS[:bgm]
- bgm = Ixfuru::TitleProduction::SOUNDS[:bgm][bgm_id]
- RPG::BGM.new(bgm[0], bgm[1], bgm[2]).play
- end
- #-----------------------------------------------------------------------------
- # Update Commands
- #-----------------------------------------------------------------------------
- def update_commands
- @commands.each_value { |c|
- c.update
- }
- @cursor.update
- if Input.trigger?(Input::C)
- comm = Ixfuru::TitleProduction::TITLE_COMMANDS[@title_index]
- if comm[:scene] == "scene_file" && !@continue_enabled
- Sound.play_buzzer
- else
- Sound.play_decision
- determine_scene_change
- end
- elsif Input.trigger?(Input::UP)
- Sound.play_cursor
- if @title_index == 0
- @title_index = @commands.size - 1
- update_cursor_position
- else
- @title_index -= 1
- update_cursor_position
- end
- elsif Input.trigger?(Input::DOWN)
- Sound.play_cursor
- if @title_index == @commands.size - 1
- @title_index = 0
- update_cursor_position
- else
- @title_index += 1
- update_cursor_position
- end
- end
- end
- #-----------------------------------------------------------------------------
- # Update Cursor Position
- #-----------------------------------------------------------------------------
- def update_cursor_position
- @cursor.y = @cursor_ys[@title_index]
- end
- #-----------------------------------------------------------------------------
- # Update Background
- #-----------------------------------------------------------------------------
- def update_background
- @background.update
- end
- #-----------------------------------------------------------------------------
- # Update Planes
- #-----------------------------------------------------------------------------
- def update_planes
- tp = Ixfuru::TitleProduction::TITLE_PLANES
- return if tp.empty?
- @planes.each { |plane_id, plane|
- scroll_plane(plane_id, plane)
- }
- end
- #-----------------------------------------------------------------------------
- # Scroll Plane
- #-----------------------------------------------------------------------------
- def scroll_plane(plane_id, plane)
- tp = Ixfuru::TitleProduction::TITLE_PLANES
- properties = tp[plane_id]
- speed = properties[:speed]
- case properties[:direction]
- when 0 # UpperLeft to LowerRight
- plane.ox += speed
- plane.oy += speed
- when 1 # Top to Bottom
- plane.oy += speed
- when 2 # UpperRight to LowerLeft
- plane.ox -= speed
- plane.oy += speed
- when 3 # Left to Right
- plane.ox += speed
- when 4 # Right to Left
- plane.ox -= speed
- when 5 # LowerLeft to UpperRight
- plane.ox += speed
- plane.oy -= speed
- when 6 # Bottom to Top
- plane.oy -= speed
- when 7 # LowerRight to UpperLeft
- plane.ox -= speed
- plane.oy -= speed
- end
- end
- #-----------------------------------------------------------------------------
- # Update Logo
- #-----------------------------------------------------------------------------
- def update_logo
- @logo.update
- end
- #-----------------------------------------------------------------------------
- # Update Subtitle
- #-----------------------------------------------------------------------------
- def update_subtitle
- return if @subtitle == nil
- @subtitle.update
- end
- #-----------------------------------------------------------------------------
- # Update Extras
- #-----------------------------------------------------------------------------
- def update_extras
- return if @extras.empty?
- for extra in @extras
- extra.update
- if @moving_extras.include?(extra)
- update_moving_extra(extra)
- end
- end
- end
- #-----------------------------------------------------------------------------
- # Update Moving Extras
- #-----------------------------------------------------------------------------
- def update_moving_extra(sprite)
- sx = sprite.x
- sy = sprite.y
- sz = sprite.zoom_x
- move_type = 0
- case move_type
- when 0
- ppm = [0, 1, 2, 3] #possible parallel moves (left, right, up, down)
- pdm = [0, 1] # possible distance moves (zoom grow, zooms shrink)
- xbounds = Ixfuru::TitleProduction::MOVING_EXTRAS_X_BOUNDARIES
- ybounds = Ixfuru::TitleProduction::MOVING_EXTRAS_Y_BOUNDARIES
- zbounds = Ixfuru::TitleProduction::MOVING_EXTRAS_ZOOM_BOUNDARIES
- pmove = Ixfuru::TitleProduction::MOVING_EXTRAS_PARALLEL_MOVE_RATE
- dmove = Ixfuru::TitleProduction::MOVING_EXTRAS_DISTANCE_MOVE_RATE
- if sx - pmove <= xbounds[0]
- ppm.delete(0)
- elsif sx + pmove >= xbounds[1]
- ppm.delete(1)
- end
- if sy - pmove <= ybounds[0]
- ppm.delete(2)
- elsif sy + pmove >= ybounds[1]
- ppm.delete(3)
- end
- if sz - dmove <= zbounds[0]
- pdm.delete(1)
- elsif sz + dmove >= zbounds[1]
- pdm.delete(1)
- end
- next_move = rand(3)
- if next_move < 2
- move = ppm[rand(ppm.size)]
- move_parallel(sprite, move, pmove)
- else
- move = pdm[rand(pdm.size)]
- move_distance(sprite, move, dmove)
- end
- end
- end
- #-----------------------------------------------------------------------------
- # Move Parallel
- #-----------------------------------------------------------------------------
- def move_parallel(sprite, direction, amount)
- case direction
- when 0
- sprite.x += amount
- when 1
- sprite.x -= amount
- when 2
- sprite.y += amount
- when 3
- sprite.y -= amount
- end
- end
- #-----------------------------------------------------------------------------
- # Move Distance
- #-----------------------------------------------------------------------------
- def move_distance(sprite, direction, amount)
- case direction
- when 0
- sprite.zoom_x += amount
- sprite.zoom_y += amount
- when 1
- sprite.zoom_x -= amount
- sprite.zoom_y -= amount
- end
- end
- #-----------------------------------------------------------------------------
- # Dispose Background
- #-----------------------------------------------------------------------------
- def dispose_background
- @background.dispose
- end
- #-----------------------------------------------------------------------------
- # Dispose Planes
- #-----------------------------------------------------------------------------
- def dispose_planes
- return if @planes.empty?
- @planes.each_value { |plane|
- plane.dispose
- }
- end
- #-----------------------------------------------------------------------------
- # Dispose Logo
- #-----------------------------------------------------------------------------
- def dispose_logo
- @logo.dispose
- end
- #-----------------------------------------------------------------------------
- # Dispose Subtitle
- #-----------------------------------------------------------------------------
- def dispose_subtitle
- return if @subtitle == nil
- @subtitle.dispose
- end
- #-----------------------------------------------------------------------------
- # Dispose Extras
- #-----------------------------------------------------------------------------
- def dispose_extras
- return if @extras.empty?
- for extra in @extras
- extra.dispose
- end
- end
- #-----------------------------------------------------------------------------
- # Dispose_Commands
- #-----------------------------------------------------------------------------
- def dispose_commands
- @commands.each_value { |command|
- command.dispose
- }
- end
- #-----------------------------------------------------------------------------
- # Dispose Cursor
- #-----------------------------------------------------------------------------
- def dispose_cursor
- @cursor.dispose
- end
- #--------------------------------------------------------------------------
- # * Determine if Continue is Enabled
- #--------------------------------------------------------------------------
- def check_continue
- @continue_enabled = (Dir.glob('Save*.rvdata').size > 0)
- end
- #--------------------------------------------------------------------------
- # * Check Player Start Location Existence
- #--------------------------------------------------------------------------
- def confirm_player_location
- if $data_system.start_map_id == 0
- print "Player start location not set."
- exit
- end
- end
- #-----------------------------------------------------------------------------
- # Determine Scene Change
- #-----------------------------------------------------------------------------
- def determine_scene_change
- comms = Ixfuru::TitleProduction::TITLE_COMMANDS
- new_scene = comms[@title_index][:scene]
- case new_scene
- when "scene_map"
- command_new_game
- when "scene_file"
- command_continue
- when nil
- command_shutdown
- ##**************************************************************************
- ## SECTION X:
- ##
- ## Custom SCene Changes
- ##
- ## For each custom scene you referenced in your command setup, you need to
- ## alter this scene to call the method which will take you there. To do
- ## that, use this:
- ##
- ## when string_reference
- ## method_name
- ##
- ## for 'string_reference', you need to give the exact double-quoted ("")
- ## string (word) you provided in section 5c for the :scene property.
- ## for 'method_name' you can give anything, but by rule, you should
- ## use 'command_' to prefix the method's name. Like 'command_credits' or
- ## 'command_options', etc.
- ##
- ## Once you've finished this preliminary call, you need to skip down to the
- ## last section SECTION X2: Custom Methods in order to create the actual
- ## method which will take you to your new scene.
- ##**************************************************************************
- when "scene_credits"
- command_credits
- end
- end
- #--------------------------------------------------------------------------
- # * Command: New Game (OVERWRITTEN)
- #--------------------------------------------------------------------------
- def command_new_game
- confirm_player_location
- Sound.play_decision
- $game_party.setup_starting_members # Initial party
- $game_map.setup($data_system.start_map_id) # Initial map position
- $game_player.moveto($data_system.start_x, $data_system.start_y)
- $game_player.refresh
- $scene = Scene_Map.new
- RPG::BGM.fade(1500)
- RPG::BGS.fade(1500)
- Graphics.fadeout(60)
- Graphics.wait(40)
- Graphics.frame_count = 0
- RPG::BGM.stop
- RPG::BGS.stop
- toggle_preset_switches
- alter_preset_variables
- $game_map.autoplay
- end
- #-----------------------------------------------------------------------------
- # Toggle Preset Switches
- #-----------------------------------------------------------------------------
- def toggle_preset_switches
- switches = Ixfuru::TitleProduction::PRESET_SWITCHES
- return if switches == nil || switches.empty?
- for switch in switches
- $game_switches[switch] = true
- end
- end
- #-----------------------------------------------------------------------------
- # Alter Preset Variables
- #-----------------------------------------------------------------------------
- def alter_preset_variables
- variables = Ixfuru::TitleProduction::PRESET_VARIABLES
- return if variables == nil || variables.empty?
- variables.each { |var_id, amount|
- $game_variables[var_id] = amount
- }
- end
- #--------------------------------------------------------------------------
- # * Command: Continue
- #--------------------------------------------------------------------------
- def command_continue
- if @continue_enabled
- RPG::BGS.stop
- RPG::BGM.stop
- Sound.play_decision
- $scene = Scene_File.new(false, true, false)
- else
- Sound.play_buzzer
- end
- end
- ##============================================================================
- ##
- ## SECTION X2:
- ##
- ## Custom Methods
- ##
- ## By default, I've prepared a little method for you to follow here if all you
- ## want to do is call a new scene. Just make sure, when you create yours,
- ## you put the RPG::BGS.stop, RPG::BGM.stop and the $scene = parts in your
- ## new method, as that alone will take you where you want to go and assure
- ## you that you have no lingering sounds from the Title Scene. Here's an
- ## example, besides the command_credits I've given you.
- ##
- ## def command_options
- ## RPG::BGS.stop
- ## RPG::BGM.stop
- ## $scene = Scene_Options.new
- ## end
- ##
- ##^^^^^^^^^^^^^VERY IMPORTANT^^^^^^^^^^^^^^^^^^^^^
- ##
- ## Two things, first of all choosing the credits command in the default WILL
- ## throw an error, because no such scene exists. And secondly, placing a new
- ## method DOES NOT AUTOMATICALLY MAKE THE SCENE appear. You must have the
- ## scene you want to call created in one of your scripts!
- ##
- ##============================================================================
- #-----------------------------------------------------------------------------
- # Command: Credits
- #-----------------------------------------------------------------------------
- def command_credits
- RPG::BGS.fade(1500)
- RPG::BGM.fade(1500)
- Graphics.fadeout(60)
- Graphics.wait(40)
- RPG::BGS.stop
- RPG::BGM.stop
- $scene = Scene_Credits.new(title)
- end
- # place your new methods HERE!
- ##############################################################################
- #*****************************************************************************
- # DON'T EDIT BELOW HERE
- #*****************************************************************************
- ##############################################################################
- end
- ################################################################################
- # SCENE FILE
- ################################################################################
- class Scene_File < Scene_Base
- #--------------------------------------------------------------------------
- # * Return to Original Screen (Aliased)`
- #--------------------------------------------------------------------------
- def return_scene
- if @from_title
- $scene = Scene_Title.new(true)
- elsif @from_event
- $scene = Scene_Map.new
- else
- $scene = Scene_Menu.new(4)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment