Weihnachtsspecial! Was passier hier:
Ich arbeite imo an einen Script. Und jeden Tag werde ich es updaten. Manchmal werde ich aber nur was am Code verändern.
Mein Script:
Fehler: f*ck umlaute ^,^
Was macht es:
Es verändert das Menü fst komplett. Es ist möglich, 5 Partymember zu besitzen.
Das Menü:
Das Fenster mit den Auswahlpunkten hat 4 Kommandos:
Items, Charaktere, Speichern und Beenden.
Items, Speichern und Beenden erklären sich ja von selbst ^,^
Daraufhin werden die zwei Fenster links aktiv. Dort kann man den Charakter mit ↑ und ↓ auswählen. Mit ← und → kann man das markieren, was nach einen Druck nach Enter geschehen soll.
Code: ACHTUNG!!! UNBEDINGT DIE ERSTEN ZEILEN DURCHLESEN!
ungetestet auf Win2000, WinXP, WinVista, Win7... Also noch gar nicht auf Windows ^,^
---
Fehlende Features bzw. noch nicht eingebaut:
Code verkürzen (zu 50% fertig)
Globale Variablen löschen
Untermenüs fehlen komplett
Einscrollende Fenster
Ideen und Kritik werden berücksichtigt, solange es nicht heißt:
Dein Code ist unnötig kompliziert(das weiß ich ^,^)
Wow, sieht das geil aus(bitte konstruktive Kritik
Und ja, mir ist klar, dass ich wieder mit Tomaten beworfen werde, da es ja noch nicht fertig ist. Mir geht es hier bloß um die Vorstellung und um das Sammeln von Ideen.
Na dann, es ist ja noch 03.12.2010 ^,^ Also macht das Türchen uff xD
Ich werde diesen Thread hier immer wieder mal updaten und hier meine RPG Maker XP Scripts vorstellen.
Dieses Script hier ist noch nicht fertig, aber dennoch nützlich. Ich muss nur noch einstellen, dass die Battle Graphic des 5 Spielers angezeigt wird. Jep, des fünften Partymembers, denn dieses Script ändert das Menü nicht nur zu einem Glas-Menü(evt. wird Steps wieder eingebaut), sondern erhöht auch die maximale Anzahl an Partymenbern auf 5, wie man es von vielen Spielen kennt. Der 5 Spieler kann auch schon kämpfen. Und alles selber Gescriptet, deshalb bin ich so stolz auf mich Lange Rede kurzer Sinn:
@gold_window = Window_Gold.new @gold_window.x = 480 @gold_window.y = 286 @gold_window.opacity = $wo if $sw @steps_window = Window_Steps.new @steps_window.x = 480 @steps_window.y = 350 @steps_window.opacity = $wo end @status_window = Window_MenuStatus.new @status_window.x = 0 @status_window.y = 0 @status_window.opacity = $wo Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @playtime_window.dispose @gold_window.dispose if $sw @steps_window.dispose end @status_window.dispose @map_spriteset.dispose end def update @map_spriteset.update @command_window.update @playtime_window.update @gold_window.update if $sw @steps_window.update end @status_window.update if @command_window.active update_command return end if @status_window.active update_status return end end end
# # #
if $pm class Window_BattleStatus < Window_Base def initialize super(0, 320, 640, 160) self.contents = Bitmap.new(width - 32, height - 32) @level_up_flags = [false, false, false, false] refresh end def dispose super end def level_up(actor_index) @level_up_flags[actor_index] = true end def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size actor = $game_party.actors[i] actor_x = i * 120 + 3 draw_actor_name(actor, actor_x, 0) draw_actor_hp(actor, actor_x, 32,80) draw_actor_sp(actor, actor_x, 64, 80) if @level_up_flags[i] self.contents.font.color = normal_color self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!") else draw_actor_state(actor, actor_x, 96) end end end def update super if $game_temp.battle_main_phase self.contents_opacity -= 4 if self.contents_opacity > 191 else self.contents_opacity += 4 if self.contents_opacity < 255 end end end class Window_PartyCommand < Window_Selectable def initialize super(180, 0, 280, 64) self.contents = Bitmap.new(width - 32, height - 32) self.back_opacity = 180 @commands = ["Kämpfe", "Flüchte"] @item_max = 2 @column_max = 2 draw_item(0, normal_color) draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color) self.active = false self.visible = false self.index = 0 end def draw_item(index, color) self.contents.font.color = color rect = Rect.new(0 + index * 120 + 4, 0, 128 - 10, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index], 1) end def update_cursor_rect self.cursor_rect.set(0 + index * 120, 0, 128, 32) end end class Game_Actor < Game_Battler def screen_x if self.index != nil return self.index * 120 + 60 else return 0 end end end class Scene_Battle def phase3_setup_command_window @party_command_window.active = false @party_command_window.visible = false @actor_command_window.active = true @actor_command_window.visible = true @actor_command_window.x = @actor_index * 120 @actor_command_window.index = 0 end end class Spriteset_Battle attr_reader :viewport1 attr_reader :viewport2 def initialize @viewport1 = Viewport.new(0, 0, 640, 320) @viewport2 = Viewport.new(0, 0, 640, 480) @viewport3 = Viewport.new(0, 0, 640, 480) @viewport4 = Viewport.new(0, 0, 640, 480) @viewport2.z = 101 @viewport3.z = 200 @viewport4.z = 5000 @battleback_sprite = Sprite.new(@viewport1) @enemy_sprites = [] for enemy in $game_troop.enemies.reverse @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy)) end @actor_sprites = [] @actor_sprites.push(Sprite_Battler.new(@viewport2)) @actor_sprites.push(Sprite_Battler.new(@viewport2)) @actor_sprites.push(Sprite_Battler.new(@viewport2)) @actor_sprites.push(Sprite_Battler.new(@viewport2)) @actor_sprites.push(Sprite_Battler.new(@viewport2)) @weather = RPG::Weather.new(@viewport1) @picture_sprites = [] for i in 51..100 @picture_sprites.push(Sprite_Picture.new(@viewport3, $game_screen.pictures[i])) end @timer_sprite = Sprite_Timer.new update end def dispose if @battleback_sprite.bitmap != nil @battleback_sprite.bitmap.dispose end @battleback_sprite.dispose for sprite in @enemy_sprites + @actor_sprites sprite.dispose end @weather.dispose for sprite in @picture_sprites sprite.dispose end @timer_sprite.dispose @viewport1.dispose @viewport2.dispose @viewport3.dispose @viewport4.dispose end def effect? for sprite in @enemy_sprites + @actor_sprites return true if sprite.effect? end return false end def update @actor_sprites[0].battler = $game_party.actors[0] @actor_sprites[1].battler = $game_party.actors[1] @actor_sprites[2].battler = $game_party.actors[2] @actor_sprites[3].battler = $game_party.actors[3] @actor_sprites[4].battler = $game_party.actors[4] if @battleback_name != $game_temp.battleback_name @battleback_name = $game_temp.battleback_name if @battleback_sprite.bitmap != nil @battleback_sprite.bitmap.dispose end @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name) @battleback_sprite.src_rect.set(0, 0, 640, 320) end for sprite in @enemy_sprites + @actor_sprites sprite.update end @weather.type = $game_screen.weather_type @weather.max = $game_screen.weather_max @weather.update for sprite in @picture_sprites sprite.update end @timer_sprite.update @viewport1.tone = $game_screen.tone @viewport1.ox = $game_screen.shake @viewport4.color = $game_screen.flash_color @viewport1.update @viewport2.update @viewport4.update end end end
So, noch ein simples Menü findet ihr hier auch noch. Es besitzt nur 4 Auswahlmöglichkeiten: Items, Speichern, Zurück zum Spiel und Aufhören.
Auch dies ist ein Glasmenü, perfekt zu kleineren Spielchen wie Mario Party ect.
Der Einbau:
Ersetzt das alte Item-Menu durch dieses. Allerdings müsst ihr in Scene_save in der Zeile 33 die Zahl durch eine 1,
in Scene_end die Ziffer in der Zeile 59 durch eine 3
Das ist zwar komplex aber es lohnt sich.
class Scene_Menu #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main @map_spriteset = Spriteset_Map.new # Make command window s1 = "Item" s2 = "Speichern" s3 = "Zurück zum Spiel" s4 = "Ende" @command_window = Window_Command.new(180, [s1, s2, s3, s4]) @command_window.index = @menu_index @command_window.x = 320 - @command_window.width / 2 @command_window.y = 240 - @command_window.height / 2 @command_window.opacity = 160 # If number of party members is 0 if $game_party.actors.size == 0 # Disable items, skills, equipment, and status @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end # If save is forbidden if $game_system.save_disabled # Disable save @command_window.disable_item(4) end 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 windows @command_window.dispose # @status_window.dispose @map_spriteset.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @map_spriteset.update # Update windows @command_window.update # @status_window.update # If command window is active: call update_command if @command_window.active update_command return end # If status window is active: call update_status if @status_window.active update_status return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def update_command # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to map screen $scene = Scene_Map.new return end # If C button was pressed if Input.trigger?(Input::C) # If command other than save or end game, and party members = 0 if $game_party.actors.size == 0 and @command_window.index < 4 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Branch by command window cursor position case @command_window.index when 0 # item # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to item screen $scene = Scene_Item.new when 1 # skill # If saving is forbidden if $game_system.save_disabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to save screen $scene = Scene_Save.new when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to end game screen $scene = Scene_Map.new when 3 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to end game screen $scene = Scene_End.new return end end #-------------------------------------------------------------------------- # * Frame Update (when status window is active) #-------------------------------------------------------------------------- def update_status # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Make command window active @command_window.active = true @status_window.active = false @status_window.index = -1 return end # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 1 # skill # If this actor's action limit is 2 or more if $game_party.actors[@status_window.index].restriction >= 2 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to skill screen $scene = Scene_Skill.new(@status_window.index) when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to equipment screen $scene = Scene_Equip.new(@status_window.index) when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen $scene = Scene_Status.new(@status_window.index) when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 # save # If saving is forbidden if $game_system.save_disabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to save screen $scene = Scene_Save.new end end return end end end
Und hier noch was einfaches: 8 Way Moveevent:
class Game_Player < Game_Character def passable?(x, y, d) new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) unless $game_map.valid?(new_x, new_y) return false end if $DEBUG and Input.press?(Input::CTRL) return true end super end #----------------------------------------------------------------- def update last_moving = moving? unless moving? or $game_system.map_interpreter.running? or @move_route_forcing or $game_temp.message_window_showing case Input.dir8 when 1 move_lower_left when 2 move_down when 3 move_lower_right when 4 move_left when 6 move_right when 7 move_upper_left when 8 move_up when 9 move_upper_right end end last_real_x = @real_x last_real_y = @real_y super if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y $game_map.scroll_down(@real_y - last_real_y) end if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X $game_map.scroll_left(last_real_x - @real_x) end if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X $game_map.scroll_right(@real_x - last_real_x) end if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y $game_map.scroll_up(last_real_y - @real_y) end unless moving? if last_moving result = check_event_trigger_here([1,2]) if result == false unless $DEBUG and Input.press?(Input::CTRL) if @encounter_count > 0 @encounter_count -= 1 end end end end if Input.trigger?(Input::C) check_event_trigger_here([0]) check_event_trigger_there([0,1,2]) end end end end