[VX Ace] Title Command Window Problem in Script

Status
Not open for further replies.

Christopher Riel

Villager
Member
Joined
Jul 17, 2017
Messages
24
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Hello everyone, I downloaded a script that modifies and animates the title.
which includes several layers of images such as Background, Fog, Layout, Particles, etc.

it turns out that in that script also modifies the title command window that has original RPG Maker (the window of "New Game", "Continue" and "shutdown")

so I dedicated myself to eliminate the particles, and the title command window that the script had by default, in order to manually include the RPG Maker title command window.

but it turns out that I have not been successful in do it.
I have tried to define the window, in addition to defining it in the same script with its actions, but it has not worked.
simply the title command window is not displayed in the title screen.

Here is the script in case you want to see it:

Ruby:
#Make Sure to Copy and Paste this into the RPG Script
#after you downloaded this or copied this!

if true

module Azian_Animated_Title
  BACKGROUND_SCROLL_SPEED = [-1,0]
  CHARACTER_POSITION = [0,0]    
  CHARACTER_AURA_EFFECT = true
  TRASITION_DURATION = 10
  NEWGAME_STOP_BGM = true
end


$imported = {} if $imported.nil?
$imported[:azian_animated_title_screen] = true


#Scene Title


class Scene_Title
  include Azian_Animated_Title

# Main
     
  def main
      Graphics.update
      Graphics.freeze
      execute_setup
      execute_loop
      dispose
  end
  def execute_setup
      create_sprites
  end

# Execute Loop
     
  def execute_loop
       Graphics.update
       Graphics.transition(TRASITION_DURATION)
       play_title_music
       loop do
          Input.update
          update
          Graphics.update
          break if SceneManager.scene != self
       end
   end
end


# Scene Title

class Scene_Title

       
  def create_sprites
      create_background
      create_fog
      create_character
      create_layout
  end
   
           
  def create_fog
      @fog = []
      @fog_speed = [0,0,0]
      for index in 0...2
         @fog.push(Plane.new)
         @fog[index].bitmap = Cache.title1("Fog" + index.to_s)
         @fog[index].blend_type = 0
         @fog[index].opacity = 0
         if index == 0
            @fog[index].z = 4
            @fog_speed[index] = 2
         else
            @fog[index].z = 1
            @fog_speed[index] = 1
         end  
      end
  end

#Background(To Activate the Background)
  def create_background
      @background = Plane.new
      @background.bitmap = Cache.title1("Background")
      @background_scroll = [BACKGROUND_SCROLL_SPEED[0],BACKGROUND_SCROLL_SPEED[1],0]
      @background.z = 0
      @background.opacity = 0
  end

#Layout
  def create_layout
      @layout = Sprite.new
      @layout.bitmap = Cache.title1("Layout")
      @layout.z = 20
      @layout.opacity = 0
  end
       

#Character (Where Character is Positioned)
  def create_character
      @character = Sprite.new
      @character.bitmap = Cache.title1("Character")
      @character.ox = @character.bitmap.width / 2
      @character.oy = @character.bitmap.height / 2
      @character.x = CHARACTER_POSITION[0] + @character.ox
      @character.y = CHARACTER_POSITION[1] + @character.oy
      @character.z = 3
      @character.opacity = 0
  end

end

# Scene Title (Aka: The Graphics and Layout)

class Scene_Title
       
  def dispose
      Graphics.freeze
      dispose_background
      dispose_character
      dispose_layout
      dispose_fog
  end
           
  def dispose_background
      @background.bitmap.dispose
      @background.dispose  
  end

           
  def dispose_layout
      @layout.bitmap.dispose
      @layout.dispose
  end

  def dispose_fog
      @fog.each {|sprite| sprite.bitmap.dispose }
      @fog.each {|sprite| sprite.dispose }
  end  

   
  def dispose_character
      @character.bitmap.dispose
      @character.dispose
end  

end


#  Scene Title

class Scene_Title

       
  def update_sprites
      update_background  
      update_character
      update_fog
  end
   
         
  def update_fog
      @fog_speed[2] += 1
      return if @fog_speed[2] < 3
      @fog_speed[2] = 0
      for index in 0...2
          @fog[index].opacity += 5
          @fog[index].ox += @fog_speed[index]
      end
  end

         
  def update_background
      @layout.opacity += 5
      @background.opacity += 5
      @background_scroll[2] += 1
      return if @background_scroll[2] < 4
      @background_scroll[2] = 0
      @background.ox += @background_scroll[0]
      @background.oy += @background_scroll[1]
    end
   
  def update_character
      @character.opacity += 5
  end

end


# Scene Title

class Scene_Title

  def update
      update_sprites
  end

  def play_title_music
      $data_system.title_bgm.play
      RPG::BGS.stop
      RPG::ME.stop
  end

  def fadeout_all(time = 1000)
      RPG::BGM.fade(time) if NEWGAME_STOP_BGM
      RPG::BGS.fade(time)
      RPG::ME.fade(time)
      Graphics.fadeout(time * Graphics.frame_rate / 1000)
      RPG::BGM.stop if NEWGAME_STOP_BGM
      RPG::BGS.stop
      RPG::ME.stop
  end

end

end
(The image files can be any, but if you want to try them, these are the names and measures:
in the "Titles 1" folder:
Background.png (1088x416)
Character.png (544x416)
Fog0.png (544x416)
Fog1.png (544x416)
Layout.png (544x416))

zxzzz439.png

I would really like the script to execute the command window, I would really appreciate the help.
------------------------------
EDIT!:

I have solved my problem, order the entire code manually, and added the term "update_all_windows" and "dispose_all_windows" from "Scene_Base class" to "Scene_Title" in addition to adding the code to "create_command_window" in the part of the Loop.

also thank you very much for the advice and codes that have given me that also helped me to solve my problem! c:
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,845
Reaction score
5,524
First Language
Indonesian
Primarily Uses
RMVXA
The script is a complete mess, not sure what was in the scripter mind when they were writing this, it might as well as redo what this script is trying to achieve. Or probably the script wasn't originally written for VXA (nevermind, they use SceneManager, so it's for VXA). Where did you get this?

Also, mind providing the demo?
 

Christopher Riel

Villager
Member
Joined
Jul 17, 2017
Messages
24
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
The script is a complete mess, not sure what was in the scripter mind when they were writing this, it might as well as redo what this script is trying to achieve. Or probably the script wasn't originally written for VXA (nevermind, they use SceneManager, so it's for VXA). Where did you get this?

Also, mind providing the demo?

I found this script on YouTube, specifically this video:

Of course, I can give you the demo made by me (with generic images)
here it is: Title Demo

As I said above, I had removed the particles and the title command windows of the script to add the RPG Maker title command window.
 

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
112
First Language
English
Primarily Uses
RMVXA
If you're trying to get a scrolling parallax effect, an alternative option would be to set up new sprites/planes or customize the current ones in Scene_Title, nd make them manually update x/y/whatever. You'd just need to alias def update, and make sure to dispose of any new graphics.
 

Christopher Riel

Villager
Member
Joined
Jul 17, 2017
Messages
24
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
If you're trying to get a scrolling parallax effect, an alternative option would be to set up new sprites/planes or customize the current ones in Scene_Title, nd make them manually update x/y/whatever. You'd just need to alias def update, and make sure to dispose of any new graphics.
I have tried what you say, but I have had problems with the animations, the movement of the scroll cannot lower decimals like 0.3 or 0.5 only in whole numbers, if it is done in Scene_Title like the script, the animation does not flow and causes low FPS, for some reason with the script there are no low FPS.
 

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
112
First Language
English
Primarily Uses
RMVXA
I have tried what you say, but I have had problems with the animations, the movement of the scroll cannot lower decimals like 0.3 or 0.5 only in whole numbers, if it is done in Scene_Title like the script, the animation does not flow and causes low FPS, for some reason with the script there are no low FPS.
Yeah you'd have to stick to whole numbers I think. Also I have to second what TheoAllen said. No offense to the original scripter but this code is a complete mess. I'd recommend finding something else. (Hard to come by scene_title scripts that don't have particles + command pics but I'm sure there's some out there.)

If you seriously want to use this, first thing I'd do is just optimize it - I don't know why they decided to organize half of this stuff the way they did... or commission someone to do it for you.

They overwrite the new game, continue, and end commands. Basically it checks button presses and assigns a value to @com_index ; it doesn't rely on the title command window at all. So you'd have to remove that, any methods that define command pictures, and any methods that checked com_index. (And of course, bring back the original command window on startup.)
 

Christopher Riel

Villager
Member
Joined
Jul 17, 2017
Messages
24
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Yeah you'd have to stick to whole numbers I think. Also I have to second what TheoAllen said. No offense to the original scripter but this code is a complete mess. I'd recommend finding something else. (Hard to come by scene_title scripts that don't have particles + command pics but I'm sure there's some out there.)

If you seriously want to use this, first thing I'd do is just optimize it - I don't know why they decided to organize half of this stuff the way they did... or commission someone to do it for you.

They overwrite the new game, continue, and end commands. Basically it checks button presses and assigns a value to @com_index ; it doesn't rely on the title command window at all. So you'd have to remove that, any methods that define command pictures, and any methods that checked com_index. (And of course, bring back the original command window on startup.)

I really don't care that it has no particles, only that the background is animated. I tried the same by eliminating everything that has to do with the command window that brings the default script (including @com_index). but even so when I call the title command window it does not appear.

and I really don't know what else I can do.
 

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
112
First Language
English
Primarily Uses
RMVXA
I really don't care that it has no particles, only that the background is animated. I tried the same by eliminating everything that has to do with the command window that brings the default script (including @com_index). but even so when I call the title command window it does not appear.

and I really don't know what else I can do.
I'd recommend just looking elsewhere for scripts. Possible alternatives:
I will say though; if update_basic makes your game lag, even for something basic like @sprite1.x += 1, then yeah, you're either not coding it right, or your game's buggy/unoptimized. You can try this as a test; paste this at the bottom of the default Scene_Title (right before the last end statement). It's not gonna look pretty though lol

Code:
  alias testalias_update update
  def update
    testalias_update
    @sprite1.x += 1
  end
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,609
Reaction score
3,786
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Wanted to post a video of location i've finished but it doesn't work...
The game jam has done a lot of good in actually kicking my butt into action. I've even gotten over my crippling hatred of mapping thanks to it! :LZSexcite:

(Okay, there's also schoolwork forcing me to get on the computer, but I like to give credit where credit is due.)
Decided to start working on my second biome/area...


I'm sure I'll end up hating and changing things a whole lot over the next week. :LZSexcite:
Anyone who says anything "needs to tone down the swearing" has just instantly lost 90% of my respect, unless of course they're talking about like children's programming or a teacher or something.
I feel bad sometimes around others, I hate, and I mean HATE being touched, and I know they don't know I hate it so much

Forum statistics

Threads
95,656
Messages
930,801
Members
125,988
Latest member
jiive
Top