• Anmelden

1

Samstag, 18. Juli 2009, 01:05

Brauche Ring-Main-Menu-Script

Wie oben schon erwähnt bräuchte ich ein Mein-Menu im ringmenü-stil

Tja, mehr gibts nicht zum sagen ^^
  • Weisheit des Monats

    Schon mal versucht in nem Callscrip "exit" auszuführen?
    Viel Spaß dabei!
    :D
  • Mein Projekt

    Light the Darkness
    Bild
    Systeme:
    PC (RMXP)
    PSP (LUA Player)

    Story: 5%
    Scripte: 60%
    Chars: 20%
    Faces: 15%
    Musik: 5%
    Maps: 2%
  • Smileybombe

    :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
    :D :D :D :D :D :D :D :D :D :D
    :) :) :) :) :) :) :) :) :) :)
    Ich hab euch gewarnt!

2

Samstag, 18. Juli 2009, 01:15

Welches Menü meinst du, das normale Spielmenü? Dann schau dir mal die Scripte im RMXP-ScriptExplorer an, den kannst du hier unter Tools downloaden.
Ich glaub da ist dabei was du suchst. Wenn nicht, dann solltest du genauer beschreiben was du willst, und wie es aussehen soll.

3

Freitag, 24. Juli 2009, 22:27

den rmxp script explorer hab ich, das ring-menü auch schon im spiel ^^
aber ich brauch das script fürs hauptmenü (neues spiel, laden, beenden)
  • Weisheit des Monats

    Schon mal versucht in nem Callscrip "exit" auszuführen?
    Viel Spaß dabei!
    :D
  • Mein Projekt

    Light the Darkness
    Bild
    Systeme:
    PC (RMXP)
    PSP (LUA Player)

    Story: 5%
    Scripte: 60%
    Chars: 20%
    Faces: 15%
    Musik: 5%
    Maps: 2%
  • Smileybombe

    :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
    :D :D :D :D :D :D :D :D :D :D
    :) :) :) :) :) :) :) :) :) :)
    Ich hab euch gewarnt!

4

Samstag, 25. Juli 2009, 00:08

Nun, hier das dazugehörige Ring-Window und ein neues Scene_Title, beides als neues Script über Main einfügen.
Übrigens wirkt es eher dreieckig als wie ein Ring, das liegt daran, das es nur drei Elemente sind, es bewegt sich trotzdem alles in einer Kreisbewegung.
Spoiler: Ringmenü Window

Ruby Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#------------------------------------------------------------------------------
#  Window_RingMenu
#------------------------------------------------------------------------------
class Window_Ring_TitelMenu < Window_Base
  STARTUP_FRAMES = 20
  MOVING_FRAMES = 5
  RING_R = 64        
  #------------------------------------------------
  # ICONS DIE VERWENDET WERDEN
  #------------------------------------------------
  ICON_NEW   = RPG::Cache.icon("038-Item07")
  ICON_LOAD  = RPG::Cache.icon("034-Item03")
  ICON_EXIT   = RPG::Cache.icon("020-Accessory05")
  #------------------------------------------------
  ICON_DISABLE= RPG::Cache.icon("")
  MODE_START = 1 
  MODE_WAIT  = 2 
  MODE_MOVER = 3 
  MODE_MOVEL = 4 
  attr_accessor :index
#------------------------------------------------------------------------------
#  Initialize
#------------------------------------------------------------------------------
  def initialize( center_x, center_y, commands )
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width-32, height-32)
    self.contents.font.name = ["Monotype Corsiva","Comic Sans MS","Tahoma"]
    self.contents.font.color = Color.new(250,170,0,255)
    self.contents.font.size = 28
    self.opacity = 0
    self.back_opacity = 0
    @commands = commands
    @item_max = commands.size
    @index = 0
    @items = [ ICON_NEW, ICON_LOAD, ICON_EXIT ]
    
    @disabled = []
    @commands.size.times{@disabled.push(false)}
    
    @cx = center_x
    @cy = center_y
    setup_move_start
    refresh
  end
#------------------------------------------------------------------------------
#  Update
#------------------------------------------------------------------------------
  def update
    super
    refresh
  end
#------------------------------------------------------------------------------
#  Refresh
#------------------------------------------------------------------------------
  def refresh
    self.contents.clear
    case @mode
    when MODE_START
      refresh_start
    when MODE_WAIT
      refresh_wait
    when MODE_MOVER
      refresh_move(1)
    when MODE_MOVEL
      refresh_move(0)
    end
    rect = Rect.new(0, @cy-96-8, 640, 32)
    self.contents.draw_text(rect, @commands[@index],1)
  end
#------------------------------------------------------------------------------
#  Refresh Start
#------------------------------------------------------------------------------
  def refresh_start
    d1 = 2.0 * Math::PI / @item_max
    d2 = 1.0 * Math::PI / STARTUP_FRAMES
    r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
    for i in 0...@item_max
      j = i - @index
      d = d1 * j + d2 * @steps
      x = @cx + ( r * Math.sin( d ) ).to_i
      y = @cy - ( r * Math.cos( d ) ).to_i
      draw_item(x, y, i)
    end
    @steps -= 1
    if @steps < 1
      @mode = MODE_WAIT
    end
  end
#------------------------------------------------------------------------------
#  Refresh Wait
#------------------------------------------------------------------------------
  def refresh_wait
    d = 2.0 * Math::PI / @item_max
    for i in 0...@item_max
      j = i - @index
      x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
      y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
      draw_item(x, y, i)
    end
  end
#------------------------------------------------------------------------------
#  Refresh Move
#------------------------------------------------------------------------------
  def refresh_move( mode )
    d1 = 2.0 * Math::PI / @item_max
    d2 = d1 / MOVING_FRAMES
    d2 *= -1 if mode != 0
    for i in 0...@item_max
      j = i - @index
      d = d1 * j + d2 * @steps
      x = @cx + ( RING_R * Math.sin( d ) ).to_i
      y = @cy - ( RING_R * Math.cos( d ) ).to_i
      draw_item(x, y, i)
    end
    @steps -= 1
    if @steps < 1
      @mode = MODE_WAIT
    end
  end
#------------------------------------------------------------------------------
#  Draw Item
#------------------------------------------------------------------------------
  def draw_item(x, y, i)
    rect = Rect.new(0, 0, @items[i].width, @items[i].height)
    if @index == i
      self.contents.blt( x, y, @items[i], rect )
      if @disabled[@index]
        self.contents.blt( x, y, ICON_DISABLE, rect )
      end
    else
      self.contents.blt( x, y, @items[i], rect, 128 )
      if @disabled[@index]
        self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
      end
    end
  end
#------------------------------------------------------------------------------
#  Disable Item
#------------------------------------------------------------------------------
  def disable_item(index)
    @disabled[index] = true
  end
#------------------------------------------------------------------------------
#  Setup Move Start
#------------------------------------------------------------------------------
  def setup_move_start
    @mode = MODE_START
    @steps = STARTUP_FRAMES
  end
#------------------------------------------------------------------------------
#  Setup Move Move
#------------------------------------------------------------------------------
  def setup_move_move(mode)
    if mode == MODE_MOVER
      @index -= 1
      @index = @items.size - 1 if @index < 0
    elsif mode == MODE_MOVEL
      @index += 1
      @index = 0 if @index >= @items.size
    else
      return
    end
    @mode = mode
    @steps = MOVING_FRAMES
  end
#------------------------------------------------------------------------------
#  Animation
#------------------------------------------------------------------------------
  def animation?
    return @mode != MODE_WAIT
  end
end
zum Lesen den Text mit der Maus markieren

Spoiler

Ruby Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#==============================================================================
 
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================
 
 
class Scene_Title
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # If battle test
    if $BTEST
      battle_test
      return
    end
    # Load database
    $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")
    # Make system object
    $game_system = Game_System.new
    # Make title graphic
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title($data_system.title_name)
    # Make command window
    s1 = "Neues Spiel"
    s2 = "Spiel laden"
    s3 = "Beenden"
    #---------------------------
    # Einrichten des Ringmenüs
    #---------------------------
    kreis_m_y = 480-64*2#240-24
    @command_window = Window_Ring_TitelMenu.new(305,352,[s1,s2,s3])
    @command_window.index = 0
    #---------------------------
    
    # Continue enabled determinant
    # Check if at least one save file exists
    # If enabled, make @continue_enabled true; if disabled, make it false
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
    # If continue is enabled, move cursor to "Continue"
    # If disabled, display "Continue" text in gray
    if @continue_enabled
      @command_window.index = 1
    else
      @command_window.disable_item(1)
    end
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)
    # Stop playing ME and BGS
    Audio.me_stop
    Audio.bgs_stop
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of command window
    @command_window.dispose
    # Dispose of title graphic
    @sprite.bitmap.dispose
    @sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update command window
    @command_window.update
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        command_new_game
      when 1
        command_continue
      when 2
        $game_system.se_play($data_system.decision_se)
        command_shutdown
      end
      return
    end
    return if @command_window.animation?
    if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @command_window.setup_move_move(Window_Ring_TitelMenu::MODE_MOVEL)
      return
    end
    if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @command_window.setup_move_move(Window_Ring_TitelMenu::MODE_MOVER)
      return
    end
  end
  #------------------------------------------------------------------------------
end
zum Lesen den Text mit der Maus markieren

5

Montag, 3. August 2009, 13:56

Danke! Genau das hab ich gebraucht!
  • Weisheit des Monats

    Schon mal versucht in nem Callscrip "exit" auszuführen?
    Viel Spaß dabei!
    :D
  • Mein Projekt

    Light the Darkness
    Bild
    Systeme:
    PC (RMXP)
    PSP (LUA Player)

    Story: 5%
    Scripte: 60%
    Chars: 20%
    Faces: 15%
    Musik: 5%
    Maps: 2%
  • Smileybombe

    :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
    :D :D :D :D :D :D :D :D :D :D
    :) :) :) :) :) :) :) :) :) :)
    Ich hab euch gewarnt!

Zombie_Fan

Ankömmling

Motto: Ja ne is Klar?

  • Nachricht senden

6

Donnerstag, 6. August 2009, 00:12

Hey das ist genial ...
Danke :D
Werds benutzen ... an wen gehen die Credits?
Wenn es Machbar ist dann mach es auch. Wenn es nicht machbar ist frag jemanden wie es machbar wird.

7

Donnerstag, 6. August 2009, 18:05

Wer das originale Ringmenü gemacht hat weiß ich leider nicht, zusammengebaut mit dem Titelbildschirm habe ich es, wobei das keine große Arbeit war.

Ähnliche Themen

Social Bookmarks