RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Help, adding an option to main menu.

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 83
Hello, I found a script that works perfect on my Rpg, that changes the main menu around, HOWEVER it adds an option for Tournament, I would like to replace that option with Credits, I was wandering if anyone could do this for me, It would be greatly Apriciated. and you will be on the credits ofc, here is the info I need...





Mainpage Script:


Code: [Select]
#==============================================================================
# ? Scene_Title
#------------------------------------------------------------------------------
# ???????????????????
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def main
    # ????????
    if $BTEST
      battle_test
      return
    end
    # ??????????
     
      $game_music = Game_Options.new
       $fight =  Tornament_Mode.new
        @my = Time.now
      $map_infos = load_data("Data/MapInfos.rxdata")
  for key in $map_infos.keys
    $map_infos[key] = $map_infos[key].name
end
    $data_actors        = load_data("Data/Actors.rxdata")
    $data_classes       = load_data("Data/Classes.rxdata")
    $data_skills        = load_data("Data/Skills.rxdata")
    $data_items         = load_data("Data/Items.rxdata")
    $data_weapons       = load_data("Data/Weapons.rxdata")
    $data_armors        = load_data("Data/Armors.rxdata")
    $data_enemies       = load_data("Data/Enemies.rxdata")
    $data_troops        = load_data("Data/Troops.rxdata")
    $data_states        = load_data("Data/States.rxdata")
    $data_animations    = load_data("Data/Animations.rxdata")
    $data_tilesets      = load_data("Data/Tilesets.rxdata")
    $data_common_events = load_data("Data/CommonEvents.rxdata")
    $data_system        = load_data("Data/System.rxdata")
    # ?????????????
      $game_system = Game_System.new
    $game_system.bgm_play($data_system.title_bgm)
    # ?????????????   
    # ????????????
    s1 = ""
    s2 = ""
    s3 = ""
    s4 = ""
    @command_window = Menu_Command.new(192, [s1, s2, s3, s4])
     @command_window.index = 0
  @command_window.width = 560
  @command_window.height = 250
  @command_window.opacity = 0
    @command_window.back_opacity = 0
    @command_window.x =  -10
    @command_window.y = 424
    @time = 0
    @sprite2 = Sprite.new
     @sprite2.bitmap = RPG::Cache.picture("book1")
     @sprite2.z = 150
     @sprite2.x = 40
     @sprite2.y = 440
     @select3_window = Window_Select.new
    @select3_window.x =  20
    @select3_window.y = 420
    @select3_window.back_opacity = 150
    @sprite3 = Sprite.new
     @sprite3.bitmap = RPG::Cache.picture("b7")
     @sprite3.z = 150
     @sprite3.x = 40
     @sprite3.y = 445
     @sprite3.visible = false
      @sprite4 = Sprite.new
     @sprite4.bitmap = RPG::Cache.picture("b6")
     @sprite4.z = 150
     @sprite4.x = 80
     @sprite4.y = 445
     @sprite4.visible = false
     @select1_window = Window_Select.new
    @select1_window.x = 115
    @select1_window.y = 420
    @select1_window.back_opacity = 150
     @sprite1 = Sprite.new
     @sprite1.bitmap = RPG::Cache.picture("exit")
     @sprite1.z = 150
     @sprite1.x = 230
     @sprite1.y = 445
     @select2_window = Window_Select.new
    @select2_window.x = 210
    @select2_window.y = 420
    @select2_window.back_opacity = 150
     @select4_window = Window_Select.new
    @select4_window.x = 305
    @select4_window.y = 420
    @select4_window.back_opacity = 150
    @tor = Sprite.new
     @tor.bitmap = RPG::Cache.picture("a4")
     @tor.z = 150
    @tor.x = 330
     @tor.y = 445
    #hand cursor
    @hand = Sprite.new
    @hand.bitmap = RPG::Cache.picture("hand_1")
    @hand.x = 13
    @hand.y = 452
    @hand.z = 600
    @hand.opacity = 50   
     @tit1 = Sprite.new
    @tit1.bitmap = RPG::Cache.title("title_1")
     @tit1.opacity = 0
       @tit2 = Sprite.new
     @tit2.bitmap = RPG::Cache.title("title_2")
      @tit2.opacity = 0
       @tit3 = Sprite.new
     @tit3.bitmap = RPG::Cache.title("title_3")
     @tit3.opacity = 0
       @tit4 = Sprite.new
     @tit4.bitmap = RPG::Cache.title("title_4")
     @tit4.opacity = 0   


    #hand cursor
    #text box for Title screen
        @menu = Window_Help.new
      @menu.set_text("New Game")
      @menu.x = 410
      @menu.y = 421
      @menu.z = 200
         @menu.width = 205
            @menu.height = 60
            @menu.back_opacity = 150
#continue enable and disable
    @continue_enabled = false
     @sprite3 = Sprite.new
     @sprite3.bitmap = RPG::Cache.picture("b7")
     @sprite3.z = 150
     @sprite3.x = 130
     @sprite3.y = 445
     @sprite3.opacity = 150
     @sprite3.visible = true
     @sprite4.visible = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
          @sprite4 = Sprite.new
     @sprite4.bitmap = RPG::Cache.picture("b6")
     @sprite4.z = 150
     @sprite4.x = 130
     @sprite4.y = 445
     @sprite4.visible = true
     @sprite3.visible = false
      end
    end
    # ???????????????????????????????
    # ?????????????????????????
    if @continue_enabled
      @command_window.index = 1
    else
      @command_window.disable_item(1)
    end
    # ???? BGM ???
    $game_system.bgm_play($data_system.title_bgm)
    # ME?BGS ??????
    Audio.me_stop
    Audio.bgs_stop
    # ?????????
    Graphics.transition
    # ??????
    loop do
      # ????????
      Graphics.update
      # ???????
      Input.update
      # ??????
      update
      if $scene != self
        break
      end
    end
    # ?????????
    Graphics.freeze
    # ????????????
    @command_window.dispose
    # ?????????????
#    @sprite.bitmap.dispose
    @tor.dispose
    @sprite1.dispose
    @sprite2.dispose
    @sprite3.dispose
    if  @continue_enabled = false
    @sprite3.dispose
    end
     if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
         @sprite4.dispose
        end
        @sprite4.dispose
    @select1_window.dispose
    @select2_window.dispose
    @select3_window.dispose
    @select4_window.dispose
    @menu.dispose
    @hand.dispose
   @tit1.dispose
       @tit3.dispose
        @tit2.dispose
        @tit4.dispose
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    # ????????????
    @select1_window.update
    @select2_window.update
    @select3_window.update
    @select4_window.update
    @menu.update
    @command_window.update
    @hand.update
    @tit1.update
       @tit3.update
      @tit2.update
        @tit4.update
        @tor.update
   
      case @command_window.index
      when 0 
        @menu.set_text("New Game")
        @hand.x = 13
      when 1
             @menu.set_text("Continue")
             @hand.x = 103
      when 2
             @menu.set_text("End game")
             @hand.x = 199
      when 3
            @menu.set_text("Tornament")
             @hand.x = 293
           end
              if Input.trigger?(Input::C)
               
      case @command_window.index
      when 0 
        command_new_game
      when 1 
        @sprite4.dispose
        command_continue
      when 2
        command_shutdown
      when 3
        command_tornament
      end
    end
@time = Time.now - @my
  if @time < 5
    if @tit4.opacity > 0
      @tit4.opacity -= 2
    end
    if @tit1.opacity < 255
      @tit1.opacity += 5
    end
  elsif @time >= 5 && @time < 10
    if @tit1.opacity > 0
      @tit1.opacity -= 2
    end
    if @tit2.opacity < 255
      @tit2.opacity += 5
    end
  elsif @time >= 10 && @time < 15
    if @tit2.opacity > 0
      @tit2.opacity -= 2
    end
    if @tit3.opacity < 255
      @tit3.opacity += 5
    end
  elsif @time >= 15 && @time < 20
    if @tit3.opacity > 0
      @tit3.opacity -= 2
    end
    if @tit4.opacity < 255
      @tit4.opacity += 5
    end
  elsif @time >= 20
      @my = Time.now
  end



 if @hand.opacity < 250
      @hand.opacity += 2
      return
    end
    if @hand.opacity == 250
       loop do
        Graphics.update
        Input.update
        @hand.update
        @command_window.update
        @hand.opacity -= 100
     break if @hand.opacity >= 10
         next
    end
  end
end


  #--------------------------------------------------------------------------
  # ? ???? : ??????
  #--------------------------------------------------------------------------
  #new method for tornament
   def command_tornament
       $game_system.se_play($data_system.buzzer_se)
      return
    $game_system.se_play($data_system.decision_se)
    Audio.bgm_stop
    Graphics.frame_count = 0
    $game_temp          = Game_Temp.new
    #$game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
   $game_party.setup_starting_members
    $game_map.setup(1)
    $game_player.moveto(10, 13)
    $game_player.refresh
    $game_map.autoplay
    $game_map.update
    $scene = Scene_Map.new
  end
 
 
  #end of tornament code
  def command_new_game
    # ?? SE ???
    $game_system.se_play($data_system.decision_se)
    # BGM ???
    Audio.bgm_stop
    # ??????????????????????
    Graphics.frame_count = 0
    # ??????????????
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # ?????????????
    $game_party.setup_starting_members
    # ???????????????
    $game_map.setup($data_system.start_map_id)
    # ?????????????
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    # ????????????
    $game_player.refresh
    # ??????????? BGM ? BGS ??????????
    $game_map.autoplay
    # ?????? (????????)
    $game_map.update
    # ??????????
#        $game_system.windowskin_name = "new system"
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # ? ???? : ???????
  #--------------------------------------------------------------------------
  def command_continue
    # ?????????????
    unless @continue_enabled
      # ??? SE ???
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    # ?? SE ???
    $game_system.se_play($data_system.decision_se)
    # ??????????
    $scene = Scene_Load.new
  end
  #--------------------------------------------------------------------------
  # ? ???? : ???????
  #--------------------------------------------------------------------------
  def command_shutdown
    # ?? SE ???
    $game_system.se_play($data_system.decision_se)
    # BGM?BGS?ME ????????
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # ???????
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def battle_test
    # ?????? (??????) ????
    $data_actors        = load_data("Data/BT_Actors.rxdata")
    $data_classes       = load_data("Data/BT_Classes.rxdata")
    $data_skills        = load_data("Data/BT_Skills.rxdata")
    $data_items         = load_data("Data/BT_Items.rxdata")
    $data_weapons       = load_data("Data/BT_Weapons.rxdata")
    $data_armors        = load_data("Data/BT_Armors.rxdata")
    $data_enemies       = load_data("Data/BT_Enemies.rxdata")
    $data_troops        = load_data("Data/BT_Troops.rxdata")
    $data_states        = load_data("Data/BT_States.rxdata")
    $data_animations    = load_data("Data/BT_Animations.rxdata")
    $data_tilesets      = load_data("Data/BT_Tilesets.rxdata")
    $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
    $data_system        = load_data("Data/BT_System.rxdata")
    # ??????????????????????
    #$game_element_weapon = $data_system.elements.index("skilled")
    Graphics.frame_count = 0
    # ??????????????
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    $game_music         = Game_Options.new
    # ??????????????????
    $game_party.setup_battle_test_members
    # ???? ID??????????????????
    $game_temp.battle_troop_id = $data_system.test_troop_id
    $game_temp.battle_can_escape = true
    $game_map.battleback_name = $data_system.battleback_name
    # ????? SE ???
    $game_system.se_play($data_system.battle_start_se)
    # ??? BGM ???
    $game_system.bgm_play($game_system.battle_bgm)
    # ??????????
    $scene = Scene_Battle.new
  end
end




Script i need Tournament replaced with.

Code: [Select]
$scene = Scene_Credits.new




I hope someone could help cuzz anytime I do it, It doesn't activate when you click tournament/Credits It activates when themainpage loads, and when you lets say, press anykey to go back to main menu it crashes the game, could anyone also make it so when you press Enter on the Credits page, It loops back to the main menu? here is the Credits page.




Code: [Select]
CREDITS_FONT = "Times New Roman"
CREDITS_SIZE = 24
CREDITS_OUTLINE = Color.new(0,0,127, 255)
CREDITS_SHADOW = Color.new(0,0,0, 100)
CREDITS_FILL = Color.new(255,255,255, 255)

#==============================================================================
# ¦ Scene_Credits
#------------------------------------------------------------------------------
# ??????????????????
#==============================================================================

class Scene_Credits

# This next piece of code is the credits. Please keep the Zelda teams credits.

CREDIT=<<_END_

Credits:
(Creator and Director)
Vamp
_____________________________
(Custom Ring Menu system)
XRXS
Maki
Dubealex
_____________________________
Mini Games:
Zeriab
_____________________________
Cheat Script:
BudsieBuds
_____________________________
Heal On Level Up:
Ccoa
_____________________________
Triple Triad:
Sephiroth
_____________________________
Ideas:
Ricky
Granite
Thomas
_____________________________
Landscape | Towns | Buildings | Worldmap |
Thomas (Friend of Mine.
_____________________________
Final Fantasy 7 Windows
AcedentProne
_____________________________
Testers:
Ricky:
Granite
_____________________________
Special Thanks:
None

_END_
def main

#-------------------------------
# Animated Background Setup
#-------------------------------

@sprite = Sprite.new
#@sprite.bitmap = RPG::Cache.title($data_system.title_name)
@backgroundList = ["001-Title01"] #Edit this to the title screen(s) you wish to show in the background. They do repeat. Just put a comma in between each like this ["title1","title2"]
@backgroundGameFrameCount = 0
# Number of game frames per background frame.
@backgroundG_BFrameCount = 90
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])

#------------------
# Credits txt Setup
#------------------

credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
credit_bitmap.font.name = CREDITS_FONT
credit_bitmap.font.size = CREDITS_SIZE
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -430 #-430
@frame_index = 0
@last_flag = false

#--------
# Setup
#--------

#Stops all audio but background music.
Audio.me_stop
Audio.bgs_stop
Audio.se_stop

Graphics.transition

loop do

Graphics.update
Input.update


update
if $scene != self
break
end
end
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end

##Checks if credits bitmap has reached it's ending point
def last?
if @frame_index > (@credit_sprite.bitmap.height + 500)
$scene = Scene_Map.new #change this to Scene_Title.new if you wish it to go to title screen instead.
Audio.bgm_fade(10000) #aprox 10 seconds
return true
end
return false
end

#Check if the credits should be cancelled
def cancel?
if Input.trigger?(Input::C)
$scene = Scene_Map.new #change this to Scene_Title.new if you wish it to go to title screen instead.
return true
end
return false
end
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
# Add current background frame to the end
@backgroundList = @backgroundList << @backgroundList[0]
# and drop it from the first position
@backgroundList.delete_at(0)
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])
end
return if cancel?
return if last?
@credit_sprite.oy += 1 #this is the speed that the text scrolls. 1 is default
#The fastest I'd recomend is 5, after that it gets hard to read.
@frame_index += 1 #This should fix the non-self-ending credits
end
end











Hope its possible if it isn't too much truble, this script is perfect only it has a tournament link not credits ^^
« Last Edit: July 13, 2009, 02:46:09 AM by vamp »

*
Rep:
Level 87
eww - can you change those to code windows instead of spoilers?  It'll make it much easier to read.

Posting the message you receive when you play it and it crashes would also be helpful.
Always remember you're unique.
Just like everybody else.

**
Rep: +0/-0Level 83
No problem, I posted this on several sites and your the first to reply ><, I am editing them to code in each site ^^ seems no one is willing to make this quick change for me. and the game is practically done besides this small issue...

**
Rep: +0/-0Level 83
Thank You shaz, you guys may close this topic ^^ its fixed... now to post for the other issue I am having ><

*
Rep:
Level 87
you're welcome :)
Always remember you're unique.
Just like everybody else.