Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Chapters Script v2., An updated version.
Genshyu
post Jan 14 2009, 01:38 AM
Post #1


Level 8
Group Icon

Group: Revolutionary
Posts: 118
Type: Scripter
RM Skill: Intermediate




Chapter window v2.

Updates:
Added new percentage window.

Screenshots:



Script:

CODE
=begin
Script made from Genshyu.
Instructions:
Use variables 40, 41, 42, and 43. The names of the variables are in this demo.
=end

class Window_Chapter1 < Window_Base
  def initialize(actor)
    super(0, 104, 544, 208)
    refresh
  end
  def refresh
        self.contents.clear
      end
      def update
        self.contents.clear
        self.contents.draw_text(0, 0, 544, 49, "Chapter Complete.")
        end
    end
    class Window_Chapter2 < Window_Base
  def initialize(actor)
    super(0, 104, 544, 208)
    @items = $game_variables[41]
    @items2 = $game_variables[42]
    @chapter = $game_variables[40]
    refresh
  end
  def refresh
        self.contents.clear
      end
      def update
        self.contents.clear
        self.contents.draw_text(0, 0, 544, 49, "Results:")
        self.contents.draw_text(0, 49, 544, 49, "Items Collected:" + " " + @items.to_s + " " + "/" + " " + @items2.to_s)
        self.contents.draw_text(0, 65, 544, 49, "Next Chapter:" + " " + @chapter.to_s)
        if @items == @items2
          self.contents.draw_text(0, 96, 544, 49, "All Items Collected!")
        end
      end
    end
    class Window_ChapterIntro < Window_Base
      def initialize
        super(0, 104, 544, 208)
        @items2 = $game_variables[42]
        @chapter = $game_variables[40]
        refresh
      end
      def refresh
        self.contents.clear
      end
      def update
        self.contents.clear
        self.contents.draw_text(0, 0, 544, 49, "Chapter" + " " + @chapter.to_s + ".")
        self.contents.draw_text(0, 49, 544, 49, "Items:" + " " + @items2.to_s)
      end
    end
class Scene_Chapter < Scene_Base
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  def start
    super
    create_menu_background
    @Window_Loading = Window_Chapter1.new(@actor)
  end
  def terminate
    super
    @Window_Loading.dispose
    dispose_menu_background
  end
  def update
    update_menu_background
    @Window_Loading.update
    if Input.trigger?(Input::C)
      Sound.play_decision
      $scene = Scene_Chapter2.new
    end
    super
  end
end
class Scene_Chapter2 < Scene_Base
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  def start
    super
    create_menu_background
    @Window_Loading = Window_Chapter2.new(@actor)
  end
  def terminate
    super
    @Window_Loading.dispose
    dispose_menu_background
  end
  def update
    update_menu_background
    @Window_Loading.update
    if Input.trigger?(Input::C)
      Sound.play_decision
      $scene = Scene_Map.new
    end
    super
  end
end
class Scene_ChapterIntro < Scene_Base
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  def start
    super
    create_menu_background
    @Window_Loading = Window_ChapterIntro.new
  end
  def terminate
    super
    @Window_Loading.dispose
    dispose_menu_background
  end
  def update
    update_menu_background
    @Window_Loading.update
    if Input.trigger?(Input::C)
      Sound.play_decision
      $scene = Scene_Map.new
    end
    super
  end
end
class WindowChaperHud < Window_Base
  def initialize
    super(188, 134, 189, 149)
    @items = $game_variables[41]
    @maxitems = $game_variables[42]
    @percent = $game_variables[43]
    refresh
  end
  def refresh
  end
  def update
    self.contents.clear
    self.contents.draw_text(0, 16, 544, 49, "Items:" + " " + @items.to_s + "/ " + @maxitems.to_s)
    self.contents.draw_text(0, 32, 544, 49, @percent.to_s + "%" + " " + "complete.")
  end
end
class Scenechapterstatus < Scene_Base
  def initialize
    @chaptermessage = WindowChapermessage.new
    @chapterstatus = WindowChaperHud.new
  end
  def terminate
    @chaptermessage.dispose
    @chapterstatus.dispose
  end
  def update
    @chaptermessage.update
    @chapterstatus.update
    if Input.trigger?(Input::C)
      Sound.play_decision
      $scene = Scene_Map.new
    end
  end
end
class WindowChapermessage < Window_Base
  def initialize
    super(188, 283, 189, 96)
    refresh
  end
  def refresh
  end
  def update
    self.contents.draw_text(0, 0, 149, 49, "Press enter to continue.")
  end
end
class Scene_Map < Scene_Base
    def update_call_capterwindow
    if Input.trigger?(Input::L)
      Sound.play_decision
      return if $game_map.interpreter.running?        # Event being executed?
      return if $game_system.menu_disabled            # Menu forbidden?
      $game_temp.menu_beep = true                     # Set SE play flag
      $scene = Scenechapterstatus.new
    end
  end
    def update
    super
    $game_map.interpreter.update      # Update interpreter
    $game_map.update                  # Update map
    $game_player.update               # Update player
    $game_system.update               # Update timer
    @spriteset.update                 # Update sprite set
    @message_window.update            # Update message window
    unless $game_message.visible      # Unless displaying a message
      update_transfer_player
      update_encounter
      update_call_menu
      update_call_debug
      update_scene_change
      update_call_capterwindow
    end
  end
end



Demo:
http://www.mediafire.com/download.php?y4tdjnzzoxc

This post has been edited by Genshyu: Apr 27 2009, 09:14 AM


__________________________
My current Scripts.

[Show/Hide] Save / Load Scripts.



Things I am currently Learning:
RGSS2.
If you use a script you don't have to give credit :D I'm nice like that. However, if you wan't to give credit then Give Credit to Craig Ramsey.
Go to the top of the page
 
+Quote Post
   
l33tpie 6
post Jan 14 2009, 02:40 AM
Post #2


Interesting, huh?
Group Icon

Group: Revolutionary
Posts: 706
Type: Developer
RM Skill: Intermediate




Hey, this looks like a pretty nice script! I'll use this in my side project on VX.


__________________________
Visit the Team Gaia Forum today!



Featured project of RPG RPG Revolution! Click the red bar for more information!
Huge thanks to Coolio for the avatar!
Go to the top of the page
 
+Quote Post
   
Genshyu
post Jan 14 2009, 02:54 AM
Post #3


Level 8
Group Icon

Group: Revolutionary
Posts: 118
Type: Scripter
RM Skill: Intermediate




QUOTE (l33tpie 6 @ Jan 14 2009, 02:40 AM) *
Hey, this looks like a pretty nice script! I'll use this in my side project on VX.

Cool ^^.


__________________________
My current Scripts.

[Show/Hide] Save / Load Scripts.



Things I am currently Learning:
RGSS2.
If you use a script you don't have to give credit :D I'm nice like that. However, if you wan't to give credit then Give Credit to Craig Ramsey.
Go to the top of the page
 
+Quote Post
   
Leaff-kun~desu
post Feb 16 2009, 12:11 PM
Post #4



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




Quick question,
do the items in the shops interfere with this at all?
Lets say i have a Red Leaff in my shop [a restorative item], but its not anywhere outside the shop.
Does the script count that as an item?
Go to the top of the page
 
+Quote Post
   
ninjaheldransom
post Feb 26 2009, 12:38 PM
Post #5


GFX Designer - Rpg Devloper
Group Icon

Group: Revolutionary
Posts: 130
Type: Event Designer
RM Skill: Advanced




on my current game im working on using vx
this script would be a nice touch to it.
its great


__________________________
Graphic Designer
Story Writer
Go to the top of the page
 
+Quote Post
   
Genshyu
post Mar 18 2009, 11:21 AM
Post #6


Level 8
Group Icon

Group: Revolutionary
Posts: 118
Type: Scripter
RM Skill: Intermediate




QUOTE (Leaff-kun~desu @ Feb 16 2009, 01:11 PM) *
Quick question,
do the items in the shops interfere with this at all?
Lets say i have a Red Leaff in my shop [a restorative item], but its not anywhere outside the shop.
Does the script count that as an item?

No, the items in the shops dont have anything to do with this script. The variables are only increased when you tell them to be.


__________________________
My current Scripts.

[Show/Hide] Save / Load Scripts.



Things I am currently Learning:
RGSS2.
If you use a script you don't have to give credit :D I'm nice like that. However, if you wan't to give credit then Give Credit to Craig Ramsey.
Go to the top of the page
 
+Quote Post
   
Genshyu
post Apr 27 2009, 09:13 AM
Post #7


Level 8
Group Icon

Group: Revolutionary
Posts: 118
Type: Scripter
RM Skill: Intermediate




Updated.


__________________________
My current Scripts.

[Show/Hide] Save / Load Scripts.



Things I am currently Learning:
RGSS2.
If you use a script you don't have to give credit :D I'm nice like that. However, if you wan't to give credit then Give Credit to Craig Ramsey.
Go to the top of the page
 
+Quote Post
   
rgangsta
post Aug 19 2009, 04:49 PM
Post #8


Level 8
Group Icon

Group: Revolutionary
Posts: 119
Type: Artist
RM Skill: Skilled




can you please repost the demo. or add the instructions in the script?


__________________________
Go to the top of the page
 
+Quote Post
   
Genshyu
post Sep 19 2009, 07:17 AM
Post #9


Level 8
Group Icon

Group: Revolutionary
Posts: 118
Type: Scripter
RM Skill: Intermediate




QUOTE (rgangsta @ Aug 19 2009, 05:49 PM) *
can you please repost the demo. or add the instructions in the script?

Sorry I dont have that comp anymore, hmm.. I assume the link is dead. Darn, I forgot how to use this too sad.gif Sorry guys


__________________________
My current Scripts.

[Show/Hide] Save / Load Scripts.



Things I am currently Learning:
RGSS2.
If you use a script you don't have to give credit :D I'm nice like that. However, if you wan't to give credit then Give Credit to Craig Ramsey.
Go to the top of the page
 
+Quote Post
   
Fonstw
post Jan 9 2012, 10:40 AM
Post #10


Level 3
Group Icon

Group: Member
Posts: 36
Type: Writer
RM Skill: Intermediate




CODE
=begin
Script made from Genshyu.
Instructions:
Use variables 40, 41, 42, and 43. The names of the variables are in this demo.
=end

What are the names?

This post has been edited by Fonstw: Jan 9 2012, 10:45 AM


__________________________
Haven't you ever noticed that "four" is the only number with the same amount of letters as it's definition in the entire English language?
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st May 2013 - 03:07 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker